MyBlogPlanner

Archive for the ‘community’ Category

How to create simple block module in drupal 6.x

Friday, July 31st, 2009

Creating simple block module in drupal is easy you just need to concentrate on this artcile to learn to create simple block module in drupal step by step.

For drupal all block module whould uploaded to the folder sites/all/modules

Suppose I am creating an exampl module to display news from a single category.

Step 1: You Need to create one folder mydrupalnews and under that folder you need to crate 2 file mydrupalnews.info and mydrupalnews.module

Step 2:  File mydrupalnews.info contain the information about the block

;$Id$
name = mydrupalnews
version = 1.0
description = “My Drupal News”
core = 6.x
PHP = 4.3

Step 4: file mydrupalnews.module contains the behavior of the block. In programming language I can say you need to code what ever you like here.

I am pasting the content of the file here for better understand  of the coding.

<?php

function mydrupalnews_block($op=’list’,$delta=array(),$edit=array())
{
switch ($op)
{

case ‘list’:
$blocks[0][’info’] = t(’My Drupal News’);
return $blocks;
break;
case ‘view’:
ob_start();
$content = ob_get_clean();

$SQL = ‘Select * from category_node as cn
left join node as n  on cn.nid = n.nid
left join image_attach as ia on cn.nid = ia.nid
left join image as i on ia.iid = i.nid
left join files  as f on i.fid = f.fid
Where cn.cid =53 AND i.image_size = \’_original\’ order by n.nid desc LIMIT 0,3′;

// 53 is the category id of my site news. For your site you can change it easily.

$rowobj = db_query($SQL);
$content = ‘<div class=”news”>My Drupal News</div>’;

while($Row  = db_fetch_array($rowobj))
{
$content .= ‘<div class=”box”><div class=”img_box”><div class=”img”><img src=”‘.$Row[’filepath’].’” width=”92″ height=”92″></div>
<div class=”img_text”><a href=”node/’.$Row[’nid’].’”><strong>’.$Row[’title’].’</strong></a><br> <font color=”#996666″ style=”font-size:10px; padding-left:5px;” >’.date(’Y-m-d’,$Row[’created’]).’</font></div>
</div>
</div>’;
}

$blocks[’subject’] = t(’My Drupal News’);
$blocks[’content’] = $content;
return $blocks;
break;
}
}

You are done with your programming. After everything done you just need to upload the folder mydrupalnews to the folder sites/all/modules

Now login to administrator go to module link publish your custom module. Now go to block link you will see your block is listed there in block page change the position where you want to display the block in your drupal page.

At last MyBlogplanner is launced

Wednesday, January 9th, 2008

Hi guys today I got time to work on my own domain worked 4 hour today and installed the community for you all. Partcipate and enjoy your life this is for you all in this new year a gift for all.

Love you all. :)

MyBlogPlanner Team

My Blog Planner story

Thursday, October 25th, 2007

This is a short story a year back. I am designing a floating orkut system. Where user can scrap to other, can plan for there next blog post, can send private message to author of the blog and many more. At that time my boss Aji Issac Mathew plan to buy a domain for this tool. Today this tool is quite famous most of the blogger are using this tool and happy. Now the next phase of myblogplanner releasing now you will get thing here to do. Plan your blog to scrap your friend send private message to add your friend in your friend list. You can add video, audio, share your knowledge to other and make your blog known to the world a little time expand.

I hope you will enjoy to became part of this community and stay forever.

Best of luck

My Blog planner first post.

Saturday, September 22nd, 2007

This is Subikar, an IT professional trying to run a website for the common net-savvy people . I have taken this decision only after being in the web-development industry for over 2 years. I have chosen the ‘myblogplanner’ domain as a platform, wherein I would be able to support the users with all the functionalities of the web-world & they might grasp it quite smoothly. I do not wish to say muchamidst the development of my site , but would like to have more of such opportunities ahead of us. It would just take a week’s time before I could launch this platform in order to let you feel the buzz around a newborn community!

My Blog Planner Blog