Configure, Add, Remove and Track Banners
The Banner module can be used for placing and tracking clicks on banner advertisements (or other types of sidebar images that the administrators want to track the clicks for).
First Configuration Step for Administrators:
Click administer » settings » banner and the system will create for you the folder that will store banner images and/or text files.
If you see an error saying File copy failed: no directory configured, or it could not be accessed. when uploading a banner image (see below for instructions), this step will fix that, or if you haven't yet uploaded an image, it will prevent that error from occurring.
To Create a Banner (Users):
- Login
- Click my banners on the sidebar navigation block.
- Click the add tab.
- Type in a banner title. This will show up in the banners administration list.
- Type or paste in a click-through destination URL. This is the link to the (either internal to your site or external) that you are highlighting.
- Select a banner image to upload.
- Click "Browse" to find the file.
- Click "Upload" to upload the graphic to the server.
- It is a good idea to keep the "Notify site administrator" box checked.
You will then see a list of your banners, and the banners may need to be approved by an administrator.
Adding or Editing the Settings of an Individual Banner
Banners have several settings making it a very flexible feature of some Drupal sites.
- Login.
- Click administer » banners
- If you are adding a banner, click the add tab. If you are editing an existing banner, click the "edit" link next to the banner you wish to change the settings for.
- If necessary, change the title and status of the banner.
- (optional) Give ownership of the banner to someone else. To do this, you need to know the numeric user ID of the potential owner. If you have permission to administer users, you can find out user ID's by clicking administer » users. The user you give ownership to the banner will be able to view the statistics for the banner.
- (optional) select a banner group ID.
- This useful when it comes time to paste the code that will display the banners (see the "Add the Banner to a Sidebar Block" and "Add the Banner Directly to Your Theme" sections below), you can use that number to select from banners belonging only to that group.
- (optional) Type in a date to automatically start publishing the banner. There is no specific format to the date, except that it can be typed in a common English-language format.
- (optional) Write in a date to automatically publish the banner.
- This is useful for when a banner has been uploaded but not ready to show up on the site, for example, if the ad campaign has not yet begun.
- You can use English-language dates for this box.
- (optional) Write in a date to automatically unpublish the banner.
- You can use English-language dates for this box.
- Choose whether the owner of the banner receives email notification, either daily, weekly, or both.
- Choose whether the owner of the banner receives expiry notification.
- Select the chance the banner will appear relative to the other banners. This is useful if you want some ads to appear more often than others.
- (optional) Set the maximum number of clicks the banner receives before being unpublished.
- This enables site owners to allocate ads based on the number of successful clicks rather than (or in addition to) the number of views or the chance of it appearing.
- (optional) Set the maximum number of times the banner is shown (views).
- (optional) Set the maximum number of times per week and per day the banner is shown.
- (optional) To reset views and clicks statistics, check the box in the row for the period being shown.
- Select the file (whether a graphic file or a HTML or text file) to use as the banner. This only needs to be done once and will not be required to make changest to any of the above settings.
- Click the "Save" button.
Add the Banner to a Sidebar Block
- Click administer » blocks then the add tab.
- Type in a title. This will be shown to the user as the heading for the block.
- Choose "PHP code".
- To display a banner chosen from all enabled banners, use the following code:
<?php return banner_display(); ?>- To display a banner chosen from only from a certain group of banners, use the following code, replacing the number with the group ID of the banners:
<?php return banner_display(5); /* replace 5 with the group ID */ ?>- Type in a block discription. Only administrators will see this.
- Click the "Save block" button.
- Follow the instructions on enabling and placing blocks.
Add the Banner Directly to Your Theme
- See our instructions on how to edit a them using the in-browser theme editor.
- In your theme's page.tpl.php file, go to where you want the banner to appear.
- To display a banner chosen from all enabled banners, use the following code:
<?php print banner_display(); ?>- To display a banner chosen from only from a certain group of banners, use the following code, replacing the number with the group ID of the banners:
<?php print banner_display(5); /* replace 5 with the group ID */ ?>- Important note: the code is slightly different than that for a block, in that it uses 'print' instead of 'return'.
- Save your theme.
Approving, Blocking, or Denying Banners
- If you receive notification of new banners, a direct link to the list of banners pending approval will appear in the email. Otherwise, click administer » banners.
- You may need to sort the banners by status to see which ones are pending. Click the status column header.
- Find the banner you wish to approve. Click on the edit link for the row of that banner.
- Change the status in the drop-down menu.
To View Banner Statistics
- Login
- Click my banners on the sidebar You will be first shown a list of the banners you've created and statistics for them.