{"id":327,"date":"2009-07-17T23:30:21","date_gmt":"2009-07-17T18:00:21","guid":{"rendered":"http:\/\/www.bin-co.com\/blog\/?p=327"},"modified":"2009-07-17T23:30:21","modified_gmt":"2009-07-17T18:00:21","slug":"drupal-plugin-page-ad","status":"publish","type":"post","link":"https:\/\/www.bin-co.com\/blog\/2009\/07\/drupal-plugin-page-ad\/","title":{"rendered":"Drupal Plugin: Page Ad"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2009\/07\/druplicon-1-1.png\" alt=\"Drupal\" title=\"Drupal\" width=\"175\" height=\"200\" class=\"aligncenter size-full wp-image-329 intro\" align=\"right\" \/><\/a><\/p>\n<p class=\"intro\">This is my first Drupal plugin &#8211; so I&#8217;m not sure how much mistakes I have made in creating this. Page Ad module allows the admin to <strong class=\"highlight\">add advertisement specific to a page<\/strong>. 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.<\/p>\n<h3><a href='http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2009\/07\/page_ad.zip'>Download Page Ad<\/a><\/h3>\n<p>Note: This module is <strong class=\"highlight\">for Drupal 5<\/strong>. I have not tested it in Drupal 6.<\/p>\n<p>Note 2: <strong class=\"highlight\">I will not provide support for this plugin<\/strong>. If you run into any trouble, you are on your own.<\/p>\n<h2>Installation<\/h2>\n<ul>\n<li>Download and extract the module<\/li>\n<li>Upload the module to sites\/all\/modules folder of Drupal.<\/li>\n<li>Enable the module from the admin side<\/li>\n<li>Edit the <code>node.tpl.php<\/code> template file and insert the code <code>&lt;?php print $page_ad ?&gt;<\/code> where you want the block to show up.<\/li>\n<li>Edit the <code>template.php<\/code> file and add the code <code>'page_ad' => t('Page Specific Ad')<\/code> in the returning array for the regions function.<\/li>\n<li>Go to the block configuration page and set the &#8216;Page Specific Ad&#8217; block with the &#8216;Page Specific Ad&#8217; region.<\/li>\n<\/ul>\n<p>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 &#8211; because I&#8217;m not an expert in Drupal. I don&#8217;t use it much.<\/p>\n<h2>Screenshot<\/h2>\n<p>This is how the admin side will look&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2009\/07\/admin_side-1-1.png\" alt=\"Admin interface\" title=\"Admin interface\" width=\"403\" height=\"229\" class=\"aligncenter size-full wp-image-330\" \/><\/p>\n<h2>Plugin Week 2<\/h2>\n<p>This plugin is part of the Plugin Week 2 series. <strong class=\"highlight\">Plugin Week is a week when I publish a new plugin each day for an entire week<\/strong>. I have already one this <a href=\"http:\/\/www.bin-co.com\/blog\/2008\/12\/wordpress-plugin-week\/\">one time<\/a> &#8211; so this is Plugin Week 2. The plugins released so far&#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.bin-co.com\/blog\/2009\/07\/plugin-week-2-wordpress-plugin-weather-man\/\">Weather Man<\/a><\/li>\n<li><a href=\"http:\/\/www.bin-co.com\/blog\/2009\/07\/minicart-wordpress-plugin-shopping-cart-for-wordpress\/\">MiniCart WordPress Plugin<\/a><\/li>\n<li><a href=\"http:\/\/www.bin-co.com\/blog\/2009\/07\/gallifrey-image-gallery-wordpress-plugin\/\">Gallifrey WordPress Plugin<\/a><\/li>\n<li><a href=\"http:\/\/www.bin-co.com\/blog\/2009\/07\/gimp-plugin-web-2-0-shadows\/\">GIMP Plugin \u2013 Web 2.0 Shadows<\/a><\/li>\n<\/ul>\n<p>If you want to get news about the upcoming plugin releases(remember, 1 per day), please <strong class=\"highlight\"><a href=\"http:\/\/feeds2.feedburner.com\/bin-blog\">subscribe to this site<\/a>.<\/strong><\/p>\n<p><a href=\"http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2009\/07\/druplicon-1-1.png\"><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>This is my first Drupal plugin &#8211; so I&#8217;m not sure how much mistakes I have made in creating this. Page Ad module allows the admin to <strong class=\"highlight\">add advertisement specific to a page<\/strong>. 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.<\/p>\n<\/div>","protected":false},"author":1,"featured_media":329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,30],"tags":[100,185,200,201,215],"class_list":["post-327","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripts","category-web-development","tag-drupal","tag-module","tag-page","tag-page-ad","tag-plugin-week-2"],"_links":{"self":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":0,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/media\/329"}],"wp:attachment":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}