This is my first Drupal plugin – so I’m not sure how much mistakes I have made in creating this. Page Ad module allows the admin to add advertisement specific to a page. It will create a textarea in the edit/create page of content. Whatever HTML you type into it will be shown in a block anywhere on the client side display of that page.
Download Page Ad
Note: This module is for Drupal 5. I have not tested it in Drupal 6.
Note 2: I will not provide support for this plugin. If you run into any trouble, you are on your own.
- Download and extract the module
- Upload the module to sites/all/modules folder of Drupal.
- Enable the module from the admin side
- Edit the
node.tpl.phptemplate file and insert the code
<?php print $page_ad ?>where you want the block to show up.
- Edit the
template.phpfile and add the code
'page_ad' => t('Page Specific Ad')in the returning array for the regions function.
- Go to the block configuration page and set the ‘Page Specific Ad’ block with the ‘Page Specific Ad’ region.
This is a plugin that I created to learn a bit about Drupal. I did this quite a while ago. It may have a lot of error – because I’m not an expert in Drupal. I don’t use it much.
This is how the admin side will look…
Plugin Week 2
This plugin is part of the Plugin Week 2 series. Plugin Week is a week when I publish a new plugin each day for an entire week. I have already one this one time – so this is Plugin Week 2. The plugins released so far…
If you want to get news about the upcoming plugin releases(remember, 1 per day), please subscribe to this site.