This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Regarding the block

Hello All,

I have a primary link say "Real Estate" and on click of that i have to display the Block that prints the list of all the categories of real estate say Apartment, Home for sale, Office and so on....

Let me explain what i did yet:

i have created the New Content type and named it as a Real Estate which accepts the user input. I had use the Category module of drupal to attach the category to this input format.

For display the categories i have created new module say "display_realestate".
I have written the code that lists all the categories using hook_block() function.

  function display_realestate_block($op = 'list', $delta = 0, $edit = array()){
	switch($op){
		case 'list':
			$blocks[0]['info'] = t('Real Estate');
			return $blocks;
			
		
		case 'configure':
			//optional 
			break;
			
		case 'save':
			// optional
			break;
			
		case 'view':	
		 if (user_access('access content')) {
			switch($delta){
				case 0:
					$block['subject'] = t('Real Estate');
					$block['content'] = list_categories();
					break;
			} //switch $delta
		 } //if

	if (empty($block['content'])) {
               $block = array(); // zap empty block
        }    
	return $block;	 
	} //switch $op
  } //hook_block

sample module

i am very much beginner to Drupal can any buddy help to build sample module which will accept some data from user through textbox and that inserted into Mysql DB

Looking for reward points module

HI all,

I'm new to Drupal and am looking for a module to add rewards points for different user functions, ie add 1 point for commenting on a bog, add 5 points for adding a story, etc. I also need a way to subtract points, either manually or automatically. For example, subtract 2 points when entering a give-away contest.

Is there a module/combinate of modules that can do this?

Connie

problem uploading files in php...

hi,

I'm desperatly trying to upload a file using Drupal, but it seem not to work.
this is what I do :

upload.html :

<form enctype="multipart/form-data" action="upload.php" method="post">
  <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
  Image : <input name="image" type="file" />
</form>

upload.php :

New module

I had copy and paste the Annotate module, that drupal provides.
I had done all the settings from admin panel.

But still am not able to visible it at client/user side.
I had set access permission too.

Please advice.

capturing

HI i am very much never to the drupal i have site http://jataayu.net/?q=downloadmgr
there after clicking on download i need to capture client IP address ,which version he is downloading software etc,i dont know where to start from plz help me

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions