=== AdGear Ad Manager === Tags: ad, ads Requires at least: 2.9.2 Tested up to: 3.0.0 Stable tag: trunk Contributors: François Beausoleil [email protected]
Serve ads from your AdGear account automatically.
== Description ==
AdGear Ad Manager allows you to serve your ads without leaving your WordPress installation.
== Installation ==
- Ensure you use PHP5, for the json_decode() function and the CURL module
- Login to your AdGear account, click on your username to edit your settings, enable API access, and copy your API key
- Create a website for your WordPress blog
- Upload the plugin's ZIP file through WordPress' Plugins UI
- Activate the plugin
- Go to Settings, AdGear Settings, then set your username, paste your API key, and set the root API endpoint (should be http://api.admin.adgear.com/, which is filled in by default)
- Save the settings, then choose your site from the dropdown
- You're done!
== Adding an Ad in the sidebar ==
Use the AdGear Widget to put an ad. Click on Appearance, Widgets.
== Using the Shortcode tag ==
Anywhere in the body of your post, you may use the AdGear Shortcode:
[adgear_ad id=123]
This Shortcode will generate so-called Static AdSpot Tags.
Sometimes you want to show one set of AdSpots on single post pages vs list pages. You can do so with the single
option:
[adgear_ad name="List Sidebar" single=no]
[adgear_ad name="Sidebar for Article" single=yes]
The List Sidebar AdSpot would be generated only on list pages: archives, front page, etc. The Sidebar for Article AdSpot would be generated if the visitor is viewing a single post's page.
== Using the Shortcode tag with Dynamic AdSpots ==
Dynamic AdSpots are used when you want AdGear to learn about your site's hierarchy automatically. Please refer to Creating a Website With Dynamically Managed Ad Spots on the AdGear support site for details.
The Shortcode API is very similar to the Static AdSpot tags:
[adgear_ad format=3 single=yes path=by_categories]
[adgear_ad format=7 single=yes path=by_tags]
[adgear_ad format=9 single=no]
[adgear_ad format=4 single=no]
All options for the Shortcode API are:
format=[One of AdGear's format ID] (default: none)
name=[ignored] (default: ignored)
path_before="comma,separated,string" (default: "")
path=[by_categories | by_tags | "comma,separated,string"] (default: "")
path_middle="comma,separated,string" (default: "")
path_after="comma,separated,string" (default: "")
single=[yes | no | all] (default: all)
== Low-level access for use in themes ==
You can call the adgear_ad()
PHP function to generate the correct embed tag at a specific point in your layout. adgear_ad()
can be called in one of 2 modes:
adgear_ad($adspot_id); adgear_ad($format_id, $path)
$path
must be an array of strings. There are no convenience functions to generate using tags or such. Even the single vs list page is not taken care of.
== Frequently Asked Questions ==
= How do I guess the format IDs? =
Use the META box at the bottom of the post form to build a Shortcode for you.
== Contributors ==
- François Beausoleil [email protected]
== Upgrade Notice ==
The internal functions between 1.0 and 1.1 changed. The old adgear_ad() function was renamed to adgear_ad_internal(), and a new adgear_ad() function took it's place.
== Changelog ==
- v1.1.1 - Minor bug fixes
- v1.1.0 - Rewrote the internal API to expose a function for template consumers
- v1.0.0 - Initial release