On Oct 11, 2006, at 10:03 PM, Drupal Indonesia wrote:
I want to extend blogger.module with blogheader feature. What do I need is something like mambot in Joomla. The mambot can add on before/after a page. So, when use click on http://localhost/drupal/blog/2 then the Blogheader (this is a new field on the user profiles) will be displayed on the top of this blog page.
I need any doc or link that can help me doing this task in Drupal. Better if oen can show me any Drupal module that work like mambot.
Hi! I'm guessing that you want to allow users to create a header -- certain text that will always show up at the top of a blog posting. To allow the user to be able to set the header, you want to look at hook_user(). This will allow you to declare an item to be added to the user account screen, which they can then enter their header in. You could, I suppose, also use the profile.module for this, but it would be more general to provide your own interface. Once you've got the data saved somehow, you need to work on displaying it. Someone else suggested using blocks -- this would be implementing hook_block(), having it return a block which displays the header text, and then setting up the block to be at the top of the content for blog pages. If you would rather force all blog posts to have the header text from your module, rather than requiring set up via blocks, you would want to look at hook_nodeapi($op == 'view') (and probably $op == 'load' as well). This will allow you to modify $node->body and add in your data. HTH, Ricky