WP OpenAds

Posted by admin in Advertising Plugins,... | 07.13.2007 - 2:59 am

Plugin Author: Tim Trice

WP OpenAds is a Wordpress Plugin that allows website owners to easily integrate advertising into their posts and pages. Although WP OpenAds can be used with any advertising script, it was written with the idea of using OpenAds, formerly PHPAdsNew, as the main utility. OpenAds is a very powerful, focused advertising management system. If you are serious about delivering targeted advertising, you should not pass this open-source program up.

I decided to write WP OpenAds primarily because my site focuses on several different topics. Although website programming and marketing are my main topics, I do like to write about other things including football and baseball (as many of you have undoubtedly noticed). Marketers need the ability to deliver focused advertising dependent upon the situation. WP OpenAds does just that.

Installation:

You only need two pieces of information, a keyword, and your ad source code. Your keyword should accurately describe your ad, such as the location of the ad, what the ad is about, it’s size, etc. Though not currently done on this version, I may make future verisions of WP OpenAds keep a log of statistics depending on the keyword.

Add your advertisement source code where fielded. You do not need to add any escape characters. PHP coding is fine as is HTML. The information will be stored in the database and retrieved when asked.
Getting the Right Code:

After you’ve added the advertisement, you will see a table at the bottom of the page. The table lists all of your advertisements, along with an Ad ID, your Keywords, and three sets of code.

* Index Code: (Provides little direct control over what ads to display on what pages) This is the code you will place directly into your index.php page. WP OpenAds uses Custom Field tags from your individual Posts and Pages to determine what ad to display. As of this time, the Index page does not have that information (as you cannot add it). If you wish to have one ad appear at the top of all your website pages, you will need to ad this code in the appropriate section. NOTE: the integer passed to the wpOpenAdsGetKeyword function is your relevant Ad ID. If you change that number manually at any time, do not add quotes. Also, use caution about where you place the code. If you place this in a loop, the advertisement will appear numerous times on your index page.
* Script Code (PHP): (Provides moderate control over what ads to display) You will place this code in your single.php or page.php file. Here’s how:
1. When you write a Post or Page, you will need to add a custom tag to your Post or Page.

1. You can assign whatever variable you like as your Custom Field Key. For example, I used mainIndexHdr_Marketing. You may wish to make this tag equal to the keyword you assigned to your invidiual ad. So that you can easily know what the ad is for and where it is from, I would advise just that. For the value, you will enter the Ad Id of the advertisement you wish to display. Make a note of the size of the ad, as you do not want to put a 728X90 banner on your sidebar (I did during testing)!
2. After you’ve saved the Custom Field Tag for your Post or Page and Published it, go back to the WP OpenAds plugin page and copy the Script code for the advertisement you wish to display. For example:

ID, ‘Your Custom Field Key‘, $single = true)); ?>

You will replace Your Custom Field Key with the Custom Field Key you entered in the post. You do not need to add an Ad Id, as you already did in the post. WP Open Ads will find the Custom Field Key and retrieve the value automatically. It will then access the database and pull the corresponding advertising code.
3. Save your single.php or page.php and upload it to your server. If you have not attached a Custom Field Key to a Post or Page, WP Open Ads will not display an ad nor should it result in an error.

# Post/Page Code: (Provides accurate control over what ads to display) You will paste this code directly into the content of your Post or Page. When you insert this tag, WP OpenAds will replace this code with your advertising code. Using this code directly in your Post or Page will allow you to deliver specific advertising depending upon the topic of your Post or Page. NOTE: If you delete the advertisement that corresponds to the code, however, WordPress will display the code. No personal information, of course, is revealed; it simply shows up as it does when you are editing or writing your Post or Page. As of this time, WP OpenAds does not log where you use individual tags, so if you delete and advertisement, you should keep track of what Posts and Pages you have that advertisement appearing on. We’ll make this easier on future releases. Caution: Be careful of where you place this code in your Post or Page. Wherever your Post or Page appears on your website, the advertisement may, as well. With my setup, I use the More tag specifically for previews on my home page. If I were to place the code above that More tag, numerous advertisements will appear on my home page. This could violate terms and conditions if you use different sources of advertising for your different articles. Always test your website to make sure it is displaying as you want it to.

Download

WP Open Ads

Original post by admin

    Technorati Tags: