Manage', 'Manage Banners', 'manage_options', 'adrotate', 'adrotate_manage'); add_submenu_page('adrotate', 'AdRotate > Banner Wizard', 'Banner Wizard', 'manage_options', 'adrotate2', 'adrotate_wizard'); add_submenu_page('adrotate', 'AdRotate > Add/Edit (Advanced)', 'Add|Edit Banner', 'manage_options', 'adrotate3', 'adrotate_edit'); add_submenu_page('adrotate', 'AdRotate > Groups', 'manage Groups', 'manage_options', 'adrotate4', 'adrotate_manage_group'); add_options_page('AdRotate', 'AdRotate', 'manage_options', 'adrotate5', 'adrotate_options'); } /*------------------------------------------------------------- Name: adrotate_manage Purpose: Admin management page Receive: -none- Return: -none- -------------------------------------------------------------*/ function adrotate_manage() { global $wpdb, $userdata; $message = $_GET['message']; $magic_id = $_GET['magic_id']; $cancel = $_GET['cancel']; if(isset($_POST['adrotate_order'])) { $order = $_POST['adrotate_order']; } else { $order = 'thetime ASC'; } if($cancel AND $magic_id > 0) adrotate_delete($magic_id, 'banner'); ?>

Manage Banners

Banner deleted

Banner created

Banner(s) statistics reset

Banner(s) deactivated

Banner(s) activated

Action prohibited

Sort by

prefix.'adrotate')) { $now = current_time('timestamp'); $banners = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."adrotate` WHERE `magic` < 2 ORDER BY ".$order); if ($banners) { foreach($banners as $banner) { $group = $wpdb->get_row("SELECT `name` FROM `" . $wpdb->prefix . "adrotate_groups` WHERE `id` = '".$banner->group."'"); $expired = $wpdb->get_var("SELECT `id` FROM `".$wpdb->prefix."adrotate` WHERE `id` = $banner->id AND `active` = 'yes' AND `endshow` <= $now"); if($expired == $banner->id) { $expiredclass = ' error'; } else { $expiredclass = ''; } if($class != 'alternate') { $class = 'alternate'; } else { $class = ''; } ?> tracker == "Y") { ?> shown == 0) $banner->shown = 1; ?>
 
ID
Show from Show until
Active
Group Title
Shown
Clicks
CTR
No banners yet!
There was an error locating the main database table for AdRotate. Please deactivate and re-activate AdRotate from the plugin page!!
If this does not solve the issue please seek support at http://forum.at.meandmymac.net

Add banner

Edit banner

get_row("SELECT * FROM `".$wpdb->prefix."adrotate` WHERE `id` = '$banner_edit_id'"); $startshow = $edit_banner->startshow; $endshow = $edit_banner->endshow; } list($sday, $smonth, $syear) = split(" ", gmdate("d m Y", $startshow)); list($eday, $emonth, $eyear) = split(" ", gmdate("d m Y", $endshow)); if ($message == 'created') { ?>

Banner created | manage banners

Banner updated | manage banners

Action prohibited

Not all fields met the requirements

banner statistics reset

get_results("SELECT * FROM `".$wpdb->prefix."adrotate_groups` ORDER BY `id`"); if($groups) { ?>
magic == 0) { ?> shown == 0) $edit_banner->shown = 1; ?>
Create your banner, all fields are required!
Title:
Code:
magic == 0) { ?>Options: %image%, %link%. HTML/JavaScript allowed, use with care!
Group:
Advanced (Everything below is optional)
Display From: / / Until: / /
Max Clicks: Disable after clicks! Leave empty or 0 to skip this.
Max Shown: Disable after views! Leave empty or 0 to skip this.
Banner image:
Use %image% in the code. Accepted files are: jpg, jpeg, gif, png, swf and flv.
Clicktracking: Enable? tracker == 'Y') { ?>checked="checked" /> url:
Use %link% in the code. Do not check the box if you cannot specify an url (eg, you do not use <a href="http://somelink">).
Activate the banner:
Preview
group, $banner_edit_id, null, true); ?>
Note: While this preview is an accurate one, it might look different then it does on the website.
This is because of CSS differences. Your themes CSS file is not active here!
Statistics
Added: thetime); ?> Updated: updated); ?>
Clicked: tracker == "Y") { echo $edit_banner->clicks; } else { echo 'N/A'; } ?> Shown: shown; ?>
CTR: tracker == "Y") { echo round((100/$edit_banner->shown)*$edit_banner->clicks,2).' %'; } else { echo 'N/A'; } ?> Reset stats:

Cancel

Error!
You should create atleast one group before adding banners! Add a group now.

Banner groups

Group created

Group updated

Group deleted

prefix.'adrotate_groups')) { $groups = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix . "adrotate_groups` ORDER BY `id`"); if ($groups) { foreach($groups as $group) { $banners_in_group = $wpdb->get_var("SELECT COUNT(*) FROM `" . $wpdb->prefix . "adrotate` WHERE `group` = $group->id"); $class = ('alternate' != $class) ? 'alternate' : ''; ?>
 
ID
Name
Banners
id;?>
name;?>
There was an error locating the database table for the AdRotate groups. Please deactivate and re-activate AdRotate from the plugin page!!
If this does not solve the issue please seek support at http://forum.at.meandmymac.net
 

get_row("SELECT * FROM `".$wpdb->prefix."adrotate_groups` WHERE `id` = '$group_edit_id'"); if ($message == 'field_error') { ?>

Please fill in a name for your group!

0) { ?>
You can change the name of the group here. The ID stays the same!
ID: id;?>
Name:

Cancel

Error!
No valid group ID specified! Continue.
get_var("SELECT COUNT(*) FROM `".$wpdb->prefix."adrotate_groups`"); if($groupcheck > 0) { ?> prefix."adrotate` WHERE (`title` = '' AND `bannercode` = '') OR `magic` = 2 ORDER BY `id` DESC LIMIT 1"; $empty = $wpdb->get_var($SQL); if($empty == 0) { $wpdb->query("INSERT INTO `".$wpdb->prefix."adrotate` (`title`, `bannercode`, `thetime`, `updated`, `author`, `active`, `startshow`, `endshow`, `group`, `image`, `link`, `tracker`, `clicks`, `maxclicks`, `shown`, `magic`) VALUES ('', '', '$thetime', '$thetime', '$userdata->display_name', 'no', '$thetime', '$endtime', '', 'none', '', 'N', 0, 0, 0, 2)"); } $magic_id = $wpdb->get_var($SQL); } else { $edit = $wpdb->get_row("SELECT `title`, `bannercode` FROM `".$wpdb->prefix."adrotate` WHERE `id` = '$magic_id'"); } ?>

Banner Wizard - Step 1 of 3 - Create the banner

Not all fields met the requirements

Use this step by step guide to create referrer banners, for example from Google AdSense.
Fill in the title as a reference for the banner manager.
The code field holds your referrer code. This can be a snippet of JavaScript or simply an HTML link. That depends on your banner program.
Title:
Code:
HTML/JavaScript allowed, use with care!

Cancel

get_row("SELECT `id`, `group`, `startshow`, `endshow`, `maxclicks`, `maxshown` FROM `".$wpdb->prefix."adrotate` WHERE `id` = '$magic_id'"); list($sday, $smonth, $syear) = split(" ", gmdate("d m Y", $edit->startshow)); list($eday, $emonth, $eyear) = split(" ", gmdate("d m Y", $edit->endshow)); ?>

Banner Wizard - Step 2 of 3 - Setting some options

Not all fields met the requirements

Pick a group where you banner will be in. Groups of banners are useful and relate to locations on your website. You can put multiple banners in a group and show that group somewhere on your website. Thus restricting banners to that one location.
Optionally, set a date from when to when the banner should be shown. You will be alerted when the time has run out.
Select a group:
Or make a group:
Leave this field empty if you select a group from the dropdown menu!
Display From: / / Until: / /
Max Clicks: The banner should no longer show after clicks! Leave empty or 0 to skip this.
Max Shown: The banner should no longer show after views! Leave empty or 0 to skip this.

Back Cancel

get_row("SELECT * FROM `".$wpdb->prefix."adrotate` WHERE `id` = '$magic_id'"); $group = $wpdb->get_var("SELECT `name` FROM `".$wpdb->prefix."adrotate_groups` WHERE `id` = '$edit->group'"); list($sday, $smonth, $syear) = split(" ", gmdate("d m Y", $edit->startshow)); list($eday, $emonth, $eyear) = split(" ", gmdate("d m Y", $edit->endshow)); ?>

Banner Wizard - Step 3 of 3 - Preview and implement your banner

Note: While this preview is an accurate one, it might look different as it would on the website.
This is because of CSS differences. Your themes CSS file is not active here!
If you are not happy with the result just press back and edit the appropriate fields.
group, $edit->id, null, true); ?>
How do i use this banner? Paste the following example code where you want the ad to show:
In a post or page: [adrotate group="group; ?>" banner="id; ?>"] Directly in a theme: <?php echo adrotate_banner('group; ?>', 'id; ?>'); ?>
  [adrotate group="group; ?>"]   <?php echo adrotate_banner('group; ?>'); ?>
Some specifications
This banner, 'title; ?>' (ID: id; ?>)
Is to be shown from startshow); ?> to endshow); ?>
Attached to group '' (ID: group; ?>).
The max clicks is set to maxclicks; ?> and max views/shown to maxshown; ?>. 0 means disabled!

Back Cancel

Error!
Stop messing about and follow the right procedure! Try again.
Error!
You should create atleast one group before adding banners! Add a group now.

AdRotate options

Credits checked="checked" /> Show a simple token that you're using AdRotate in the themes Meta part.

AdRotate Uninstall

AdRotate installs a few tables in MySQL. When you disable the plugin the tables (and contents) will not be deleted. To delete the tables use the button below.
WARNING! This process is irreversible and will delete ALL ads and stats related to AdRotate!