Advertising


PostNuke includes a number of features to help you advertise your own site as well as host the ads of others. Banners are an Internet standard for generating ad revenue, and PostNuke includes a core module that easily satisfies that need. PostNuke also includes a word-of-mouth advertising module for your own site called Recommend Us. Both modules are described fully in the following sections.

Banners

PostNuke includes a modest but standard advertising banner system as part of its core module set. The system's features provide ad display and impression management tools. Banners are managed through client accounts you create on your site.

The Banners module is a core component of PostNuke, but by default, the module is disabled. Browse to your site's Modules Administration page and activate the Banners module. Return to the Admin icons and click the new Banners links in the table. Activating the module grants you access to manage the banners for your site, but the actual display of the banners must also be turned on from within the Banners Administration page.

When you first browse the page (see Figure 13.1), a message explaining the need to activate banner display is posted at the top, and a direct link to the settings section is provided to make the change. Click the Settings Section link, and toggle the Active Banners radio buttons to "yes." The other field on the Settings page allows you to input your local IP to help maintain the accuracy of your ad views.

Figure 13.1. Getting started with PostNuke banners.


To see how the Banners module works, you can create a new client and add some ads. For this example, use the fictitious company "Mike's Music Shop." Use the data in Table 13.1 to complete the client form.

Table 13.1. Sample Client Data

FIELD

DATA

Client's name

Mike's Music Shop

Contact's name

Mike Smith

Contact's email address

mike@mikesmusicshop.com

Client's username

msmith

Client's password

password


Now add a few banners. A set of simple demonstration ad images are available with the book materials. These images are referenced throughout the examples, but you can use any ad images.

PostNuke's Banner module supports any ad dimensions you want to use, not just the traditional horizontal banner style. For standard image dimensions recommended for use on the Internet, consult the information in Table 13.2.

Table 13.2. Web Marketing Standard Ad Types

AD TYPE

DIMENSIONS (IN PIXELS)

Banners

 

Full banner

468x60

Half banner

234x60

Leaderboard

728x90

Micro bar

88x31

Vertical banner

120x240

Blocks and Buttons

 

Square button

25x125

Button 90

20x90

Button 60

20x60

Skyscrapers

 

Skyscraper

120x600

Wide skyscraper

160x600

Half page ad

300x600


After you have your ads together, place them in the PostNuke banners directory:

 /images/banners/ 

Use the Add a New Banner form to enter your images into the system. The form does not place images on your pages; it only tells the Banners module about the image object and assigns it an ID number. Using this number, you can reference specific ads to place them where you want them to appear on your site.

The Purchased Impressions field sets a counter for display of an ad. The business that places an ad on your site can purchase a specific number of views, after which the ad is removed from display. Enter in a larger number here while testing, such as 100.

Banner Type is an important field. It's not really a type so much as an ID number. The number 1 is reserved for header ads, and similarly, you should use the number 2 for banners placed in your site footer. These numbers define the type as they are referenced in the theme. Other numbers, 3 and up, can be used with blocks to display anywhere on your site. If you do not want to incorporate banners into your theme, you do not have to use type 1 or 2 and can begin with 3 or any other number.

Tip

Add multiple banner ads using the same type ID to rotate between ads. Ads of a given ID are displayed randomly.


For this example, make the block ads first, so use "3" and "4" for your first couple of ad entries. Remember the size is connected to the type ID, so that when you make a block, you should know if it's a wide banner image or a tall skyscraper.

The Image URL field must contain a valid path relative to the server. For local images you've placed in the banners directory, the field should contain this kind of entry:

 /images/banners/banner1.gif 

where the name of your image is typed at the end of the path. The full uniform resource locator (URL) handling of the field also gives you the ability to display ads hosted from external servers. The path for remote ads would look something like this:

 http://www.mikesmusicshop.com/ads/banner1.gif 

Click URL is simply the address to which you are linking the banner. When a visitor clicks the ad, he is sent to that URL. The Banners module is designed to open a new window for all ad clicks, so the user does not actually leave your site.

Complete the addition of a few ads and your list will look similar to Figure 13.2. The two Impressions columns count off the current total and remaining views. The Impressions Left column will go negative if a banner is left active and viewed past its amount of Purchased Impressions. When a user clicks through an ad, the count is tallied in the Clicks column, and the percentage of clicks per view is calculated and displayed in the % Clicks column.

Figure 13.2. Managing ad banners to display on your site.


Now add the banners first using blocks. This is the easiest way to add ads with the Banners module because it does not require editing templates. In addition, if your site does not carry ads all the time, using blocks solely is preferable to manual code changes.

Under Blocks Administration, select a Core/Custom Banner Display block. Select a position for your ad, and keep in mind its dimensions. Tall vertical ads and small block ads are traditionally placed on the sides, whereas horizontal banners appear at the tops and bottoms of pages. The Title field can hold anything you want, such as the name of the business running the ads or a simple "Advertisement" works fine.

After you submit the block for the first time, it displays whatever ad you have set to a type ID of 1. This happens because the block does not yet know what ID you want to show. So before you commit the block, add in the ID of the real ad you are setting up. Create more blocks to try out multiple block locations (see Figure 13.3).

Figure 13.3. Displaying ad banners on your site.


A more permanent application of banners can be done in your theme's template files. The ads need to be in the Banner module system, just like the blocks, but you can use a reference like this in your Extensible Hypertext Markup Language (XHTML):

 <!--[nocache]--><!--[pnbannerdisplay id=1]--><!--[/nocache]--> 

The line displays banners with an ID of 1, and the nocache tags make certain new images are consistently pulled by users' browsers.

Tip

Reload your Xanthia theme's templates in the Xanthia Administration module to apply your template file changes.


You can also call the ads using the function pnBannerDisplay() directly with PHP. A reference like this:

 pnBannerDisplay('5'); 

randomly displays ads with the type ID of 5.

Recommend Us

Another core PostNuke module is Recommend Us. This module does not provide support for others' ads; it supplies a method of advertising your own website. Through Recommend Us, a site visitor can send an email to people she knows and notify them personally that your site exists. The action is meant to be an automated "I know you'd like this site" type of service, and you might have seen similar systems on websites under the moniker "Send to a Friend." The module is included with PostNuke and it is installed by default. There is nothing to administer with this module; you need only provide a link for users to click. This is done using a menu-style link with

 [Recommend_Us] 

or by directly linking to the module with

 http://www.mysite.com/modules.php?op=modload&name=Recommend_Us&file=index 

An example menu link is also automatically created for you in the default Main Menu block. Click the link to view the Recommend Us form (see Figure 13.4).

Figure 13.4. Sending a site link to a friend.


The Your Name and Your E-mail Address fields are populated automatically by the user account information, but if you allow anonymous users to use the Recommend Us feature, they need to type in those fields too.

The email that is sent looks like this by default:

 Hello Kevin: Your friend test considered our site mysite.com interesting and wanted to send it to you. Site name: mysite.com Amazing Article Site URL: http://www.mysite.com/article/ 

The Recommend Us module pulls the URL of the page the user is viewing when the module is activated. So if the user is reading an article and wants to tell someone about it, the email is created with a direct link to that file.

You can also change the wording sent in the file by editing the text definitions in this file:

 /modules/Recommend_Us/lang/eng/global.php 



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net