1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to create module in drupal 6.0 and install

Discussion in 'Drupal' started by moumita, Jun 25, 2009.

  1. #1
    I have tried many example but doesn't not work. I need an example module for drupal 6.0 from where I can learn how to code there. Even if any one have the guide book for module creation in drupal that will be great.

    Thank you in advance for all of your valuable reply.

    Moumita
     
    moumita, Jun 25, 2009 IP
  2. daringtakers

    daringtakers Well-Known Member

    Messages:
    808
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    The right place to seek information on module development is Drupal support forums
    Look at this handbook, it has every thing you need to write your own simple modules.
    http://drupal.org/node/231276
     
    daringtakers, Jun 25, 2009 IP
    Akela likes this.
  3. moumita

    moumita Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi,
    but its not creating a block also. i need one simple module which also create a block means a block module.

    so plz help me about this block module.
     
    moumita, Jun 25, 2009 IP
  4. daringtakers

    daringtakers Well-Known Member

    Messages:
    808
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Blocks can be created by using hook_block
    Check the link and look at the example at the end.

    You can write the hook inside your module.

    Are you sure, you want to create block melodramatically and not using the administer blocks screen ?
     
    daringtakers, Jun 25, 2009 IP
  5. mdraja123

    mdraja123 Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This tutorial was for Drupal 4.7. With Drupal 5 and Drupal 6 accession is abundant easier. Just upload the files to your server and appointment your site. Follow the admonition on the awning and you are done!

    I've apprehend some reviews of Drupal online that affirmation Drupal is adamantine to install.

    I'm not abiding what kinds of problems bodies accept had, but installing Drupal is absolutely actual accessible if you server is configured correctly.

    There are alone four steps:

    1. Upload Drupal to your server (for Drupal hosting, I acclaim Site5)

    2. Create a database and database user

    3. Edit the book /sites/default/settings.php to add your database affiliation information

    4. Create the database tables application the adapted .sql book in the /database directory
     
    mdraja123, Apr 26, 2010 IP
  6. jaikanth12

    jaikanth12 Guest

    Messages:
    119
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    A module is a collection of functions that link into Drupal, providing additional functionality to your Drupal installation. After reading this tutorial, you will be able to create a basic block module and use it as a template for more advanced modules and node modules.

    Getting Started: Creating a directory for your module and the initial .module file
    Telling Drupal about your module: Creating a .info file for your module, and implementing hook_help() to provide a brief description of your module in Drupal's help system
    Telling Drupal who can use your module: Implementing hook_perm(), which defines permission types for your module
    Declaring block content: Start of implementation of hook_block() -- the part that tells Drupal our module deploys a block
    Generating the block content: Finish implementing hook_block() -- the part that actually displays the block content. This involves running a database query to retrieve recent blog and forum posts, and then displaying them.
    Installing, enabling and testing the module: Getting the initial module working
    Creating a module configuration (settings) page: Modifying the module so that the user can define what "recent" means, by implementing hook_menu() and using the Drupal Form API to define a settings page
    Generating page content: Adding a full page view to the module, in case there are more recent posts than will fit easily in the block - part 1: write a function that generates the page
    Letting Drupal know about the new function: Part 2 of adding the full page view to the module -- using hook_menu() to give the page a URL
    Adding a 'more' link and showing all entries: Part 3 of adding the full page view to the module -- linking the new URL as a "more" link in the block
     
    jaikanth12, May 13, 2010 IP
  7. Jack Daniel

    Jack Daniel Guest

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    load module files to : /modules

    and then go to admin panel

    click Modules

    thick uploaded module and active it.
     
    Jack Daniel, May 13, 2010 IP