hello
i want to make a module that will create a page, adds a link in secondary menu, adds some coding to page like displaying form and contnet.

please help me how to do it give me a starting
if you show me some code, I have no words to thank u!

Comments

bboldi’s picture

I could start explaining how the whole thing works, but there is already a good source for this ...I suggest you to start with this page

http://drupal.org/node/1074360

it contains every information you'll need to start with module development. After you have some basic understanding about module development, and you want to raise it to the next level, I suggest you to read Pro Drupal 7 Development

bilal.malik’s picture

hi bboldi
now i have pro drupal 7 development
and i m thankful to you for guiding me
thanks

savithac’s picture

//copy this code in a text editor and name it as example.info
name = example //your module name goes here
description = Demonstrates a page with content in a pager
package = Pro Drupal Development
core = 7.x

//copy this code in a text editor and name it as example.module

function example_menu() {
  $items['myexample'] = array(          
    'title' => 'My example',                        
    'description' => 'My example page',   
    'page callback' => 'myexample_page',
    'access callback' => TRUE,
  );
  return $items;
}
function  myexample_page() {
$form['page'] = array(  
    '#type' => 'textfield',
    '#title' => t('My Form'),
);
$form['test'] = array(  
    '#type' => 'textfield',
    '#title' => t('Body'),
);

$form['submit']= array(
  '#type'=>'submit',
  '#value'=>t('submit'),
  );
return($form);
}
function  example_submit($form, &$form_state){ 

$link='www.drupal.org';      //your node links goes here
 
  drupal_goto($link);
}
bilal.malik’s picture

hi savithac
i m reallly very thankful to you to guide me
thanks