Drupal Plugin: Page Ad

Drupal

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.

Installation

  • 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.php template file and insert the code <?php print $page_ad ?> where you want the block to show up.
  • Edit the template.php file 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.

Screenshot

This is how the admin side will look…

Admin interface

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.

About Binny V A 102 Articles
Freelance Web Developer on the LAMP Platform. Maintains a blogs http://blog.binnyva.com/. Other sites include Bin-Co and OpenJS

1 Trackback / Pingback

  1. Export To WordPress: Joomla Plugin – Bin-Blog

Leave a Reply

Your email address will not be published.


*