Documentation

Expand / Collapse

Overview

AdVert for WordPress in its simplest form creates a “bucket” of Advertisements to display on your website.

That bucket is governed by four different groups:

  • Advertisers
  • Banners
  • Campaigns
  • Locations

These four groups are essentially post types, similar to the standard WordPress post type, but modified to work as as Advertisement Post Types. From these groups, you can create, modify and archive. Deleting items from these groups is not recommended, unless there is no data attached (transactions, clicks, impressions etc.). With this in mind, only Admins have the ability to delete items from these four groups.

In order to facilitate order and chaos, you can archive old or expired items; but don’t fret, most of the time, AdVert knows when to archive something automatically. The archival process is solely to benefit you and your advertisers in order to provide historical data and analysis.

There can be three active types of users for AdVert:

  • Admin
  • AdVert Manager
  • Advertiser

AdVert Manager and Advertiser are roles created by AdVert, and compliment the current roles and capabilities used by WordPress. Each of the created roles have their own capabilities and permissions specific to AdVert.

You can choose to allow your advertisers to control a certain aspect of the advertising process, lessening the amount of work involved and allowing you or one of your AdVert Managers to review and publish.

To make things a little simpler, AdVert includes a standard payment system, PayPal to process and track transactions. If you like, you can always create your own payment system or supplement the standard payment system to work with AdVert.

AdVert can display different advertisement types, depending on your needs and can be used at the same time. You can continue to use your current 3rd party advertisements, affiliate links, self-host and much more. All this can be viewed, tracked and managed on your website.

The Analysis section provides you up to the minute data, to help manage your adverts, monetization, tracking, performance and feedback. If allowed, Advertisers can view their performance and feedback as well.

Top

Features

  • Track affiliates
  • Get feedback from visitors (for example: whether they like or dislike particular ads)
  • Display “Advertisement” above advertisements
  • Display a custom message for empty Ad Locations
  • Click and Impression tracking
  • Detailed and robust analysis tool
  • Group Advertisements into Campaigns
  • Virtually an unlimited number of advertisements can be displayed, created and managed
  • Use Widgets and Shortcodes to display ads
  • Self-hosted ads (removes the middle man – image, video or text)
  • 3rd party ads (AdVert can even track some 3rd party ads)
  • Works with Caching plugins
  • Lock rates
  • Prevent spammed clicks
  • Designed to work with almost any theme
  • Designed to work with multiple currencies
  • Allow users to register to become advertisers
  • Registered advertisers can purchase AdCredits automatically
  • Registered advertisers can create their own advertisement and campaigns
  • AdVert for WordPress is Free
  • Designed to for desktop, mobile and tablets
  • Encrypted links
  • Includes a default payment method
  • Tons of settings and options to help manage advertisements
  • Assign AdVert managers to control your advertisements
  • Standard Locations preinstalled
  • Email notifications
  • Dashboard notifications
  • Let Advertisers view analysis (no more worrying about sending emails about performance)
  • Payment hooks for developers to create their own payment methods
  • Detect if a visitor is blocking ads
  • Display a custom message to visitors blocking ads
  • Disable Ad tracking for logged in users
  • View transaction history
  • Onscreen help tabs
  • Translation ready
  • Schedule campaigns to start or stop
  • Multiple pricing models
  • Campaign and Banner priority (weight)
  • Bot filtering
  • And so much more…

Oh, one last thing, there is no Pro or Upgrades everyone will get future updates and improved features

Top

Requirements

WordPress version – 4.2 or higher

MYSQL version – 5.1.72 or higher

PHP version – 5.4.24 or higher

Tested Web Browsers – Firefox, Chrome, IE9+, Safari

Top

Installation

Brief Description:

Install AdVert for WordPress in the plugin repository

How To:

To install AdVert, navigate to the WordPress dashboard > Plugins > Add New

In the search field, enter AdVert or AdVert for WordPress to search for the plugin.

Once you have found AdVert, click Install Now.

Lastly, active AdVert

Additional Reads:

  1. Quick Start Guide
  2. Advertisement Process Flow
  3. Manual Installation

Top

Manual Installation

Brief Description:

Install AdVert for WordPress manually

How To:

Download AdVert for WordPress

To install AdVert, navigate to the WordPress dashboard > Plugins > Add New

Click Upload Plugin.

Find the downloaded AdVert zip by clicking Choose File, then click Install Now.

Lastly, active AdVert

Additional Reads:

  1. Quick Start Guide
  2. Advertisement Process Flow
  3. Installation

Top

Updating AdVert

Brief Description:

Update AdVert for WordPress

How To:

To update AdVert, navigate to the WordPress dashboard > Plugins.

Find AdVert, and then click Update Now.

Additional Reads:

  1. Quick Start Guide

Top

Uninstalling AdVert

Brief Description:

Uninstall AdVert for WordPress

How To:

To uninstall AdVert, navigate to the WordPress dashboard > Plugins.

Find AdVert, and then click Deactivate (if not already).

Finally, click Delete.

Remember, once you delete AdVert, all data will be removed.

Top

Quick Start Guide

In order to display an advertisement, you need to publish a Location, Advertiser, Banner and Campaign. Once you have created your location or locations, make sure you have at least one Advertiser, then create a Banner and a Campaign. Lastly, ensure all required information fields are filled out when creating or publishing a Location, Advertiser, Banner or Campaign.

Step 1: Create a Location

Create a new Location or you can use one of the standard locations that come preinstalled. If you created a new Location, you will need to link that Location to your website by using a shortcode or widget (dependent on theme support).

Step 2: Create an Advertiser

Create or publish a pending Advertiser.

Step 3: Create a Banner

Create or publish a pending Advertiser Banner.

Step 4: Create a Campaign

Create or publish a pending Advertiser Campaign.

Top

Analysis and Drilldown

 

Brief Description:

Displays analytical data of advertisements

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

The Analysis and Drilldown sections are available to research and analyze performance of the advertisements. There are two sections that perform similar tasks under the Analysis menu, with the former giving a more thorough analysis.

Analysis Overview

This is a brief overview of how your advertisements are performing, number of Advertisers and Campaigns. You can specify a range of performance using the filter.

Analysis Drilldown

This is an in-depth analysis of your advertisements, with the ability to Drilldown to a specific Advertiser, Banner, Campaign or Location. Date range can be set within the query to limit the results.

Analysis Drilldown Export Report

Once you have entered your query, you have the option to export the report (CSV) or open the analysis in a new window. You can find both these links below the data table and above User Feedback.

Tips:

If you need to Drilldown to the hour, make the start and stop dates the same.

Click Analysis Options to access the options for the query.

How To:

To access Analysis, navigate to the Analysis section under the AdVert menu.

Additional Reads:

  1. User Feedback
  2. Transactions

Top

Ad Categories

Brief Description:

Display advertisements based on content tags.

Capabilities Needed:

Admin or AdVert Manager

Description:

This is a proposed implementation with some of the code already established and functional.

Top

Ad Types: Image, Video, Text or 3rd Party

Brief Description:

AdVert can produce various types of advertisements.

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

You have access to four different types of advertisements:

  • Image
  • Video
  • Text
  • 3rd Party

When you create a Banner, you have to choose either self-hosted (image, video and text) or use the custom code section for 3rd Party advertisements. The Location specifies what type of self-hosted advertisement is available for the Location. 3rd Party advertisements can be placed into the “Custom HTML” container on any Banner page without having to modify the Location.

Image

Allowable file types include: jpg, jpeg, png and gif.

You can require a specific height and/or width for an image in Locations using the enforce width and height checkbox. If you want to specify a maximum with and/or height, leave enforce width and height unchecked and enter the dimensions using pixels (px). As long as you don’t use enforce width and height, the image will be responsive.

Video

Allowable file type: mp4.

If you want to specify a maximum with and/or height, leave enforce width and height unchecked and enter the dimensions using pixels (px). The video player is browser dependent and will be responsive if available.

Text

Allowable text: Plain Text.

With text, you have two blocks of text that you can enter a phrase or other combinations. In Locations, you can add custom code before and after each block of text in order to make it look and flow better. You can also add a character limit to each block of text.

Custom HTML

This container is only available to Admin or AdVert Managers. Paste 3rd Party code provided into this container. You can also use this container for other purposes such as affiliates, a new book that you’re writing, wanting to promote another website, linking to post content etc.

How To:

To create an image, video or text, make sure the “Allow (Image, Video or Text) Ads” for the Location is checked, review the height and width, then create a new Banner.

To use Custom HTML, simply paste your code into the container.

Additional Reads:

  1. Locations
  2. Control Panel
  3. Advertisement Process Flow

Top

Advertisers

For information about the actual role, view: AdVert Roles

Brief Description:

An Advertiser is the main component that links the Banner and Campaign together.

Capabilities Needed:

Admin or AdVert Manager

Description:

An Advertiser is the focal point of the Advertisement Process Flow and allows for creation of Banners and Campaigns.

After you have created or published an Advertiser, you will see additional options:

  • Add or Remove AdCredits
  • Disable AdCredits
  • Change Control
  • Recent Transactions

How To:

To create or edit an Advertiser, navigate to the Advertisers section under the AdVert menu.

Additional Reads:

  1. Add/Remove AdCredits
  2. Disable AdCredits
  3. Change Control
  4. Publishing Tools

Top

AdCredits

Brief Description:

A number that represents a monetary value within AdVert

Capabilities Needed:

Admin, AdVert Managers or Advertisers

Description:

AdCredits is a number that can represent many currencies around the world. You set the cost of the AdCredits per Location; this number can reflect whatever you want. When someone buys AdCredits with the standard payment system or other payment alternative, they are added to the Advertisers AdCredits balance and then able to start creating Banners and Campaigns.

Some may want to opt out of allowing Advertisers to buy AdCredits, and that’s ok. You are able to adjust your comfortability in the Control Panel.

How To:

To allow Advertisers to buy AdCredits you will need to select a payment method in the Control Panel Settings under the general tab. Once you have selected your payment method, and there are available Advertisers, they will then be able to purchase on the AdVert Dashboard page.

If you do not want to allow Advertisers to purchase AdCredits, simply select none in the Control Panel Settings under the general tab.

Additional Reads:

  1. Payment Methods
  2. Transactions
  3. Advertisers
  4. Developers

Top

Archive

Brief Description:

Adds an option to archive an Advertisement Post Type, instead of deleting it.

Capabilities Needed:

Admin or AdVert Manager

Description:

Archiving an Advertisement Post Type is beneficial to review and view historical aspects of each. Archiving is available to both Admin and AdVert Managers, though Admins are the only ones allowed to delete.

How To:

On the main page of the Advertisement Post Type, select the post that you want to Archive and click Archive. If you are in the post itself, under Publishing Tools, click the edit link beside the status, select Archive and click update. This same process can be used to Unarchive (if needed).

Additional Reads:

  1. Advertisement Process Flow

Top

Backend

Brief Description:

What goes on behind the scenes is the Backend.

Capabilities Needed:

System Administrator, Web Designer, WordPress Admin, AdVert Manager or Advertiser

Description:

There are two main areas for the Backend:

  • WordPress admin area
  • The server

Managing AdVert is solely done in the WordPress admin area, however, depending on your theme, other plugins or Location requirement; you may need to access the actual files on the server.

Additional Reads:

  1. Frontend
  2. Control Panel (Settings)
  3. Locations
  4. Dashboard
  5. User Dashboard

Top

Banners

Brief Description:

Banners are the actual advertisement displayed on the website

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

A Banner renders the information fields to produce an advertisement on your website and is part of the Advertisement Process Flow. Depending on the information you provide and the location selected, an advertisement can be either:

  • Image, Video or Text (self-hosted)
  • Custom HTML (3rd party Ad scripts, Affiliate scripts etc.)

During the creation process, an Advertiser will need to be set in order to start the Advertisement Process Flow. Once the Advertiser is set, additional options will be available to specify how your Banner will work and display.

A Location will also need to be set in order to see the Location settings that are available.

Definitions:

Title – A unique name for the Banner.

Banner Owner – Links the Banner to an Advertiser. This cannot be changed once created.

Banner Target Location – Selects the location where the Banner will be displayed.

Priority – Sets a priority for the Banner. This only applies if you have multiple Banners attached to a Campaign. This number will prioritize the Banners for a Campaign; the higher the number, the more times that particular Banner will be shown when the Campaign is displayed.

Link – Adds a URL to the Banner being displayed.

Target Window – Specify the browser action when the Banner is clicked.

  • Blank – Opens the linked Banner in a new window or tab
  • Self – Opens the linked Banner in the same frame/window as it was clicked
  • Parent – Opens the linked Banner in the parent frame
  • Top – Opens the linked Banner in the full body of the window

Custom HTML – 3rd party Ad scripts, Affiliate scripts or other customizable code to be displayed for this Banner. AdVert will attempt to get the number of clicks from iframes. You will need to rely on 3rd party analytics for other scripts that are not displayed in iframes. This overrides any self-hosted images, video or text.

Banner Image – Select an Image to be displayed to the end user.

Banner Video – Select a Video to be displayed to the end user.

Banner Text – Add Text to be displayed to the end user.

Change Ownership – Changes the author of this particular Banner. If you allow Advertisers to manage their Banners and Campaigns, they must be the author of the corresponding Banner or Campaign.

How To:

To create or edit a Banner, navigate to the Banners section under the AdVert menu.

Additional Reads:

  1. Advertisers
  2. Locations
  3. Change Control
  4. Publishing Tools

Top

Campaigns

Brief Description:

A campaign is a defined way of displaying Banners.

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

The Campaign essentially pieces everything together, taking the information from the Advertiser and Banners and presenting it into the queue of what will be displayed on the website. This queue can change depending on the Banner priority, Campaign priority and Location flow. The Campaign is part of the Advertisement Process Flow.

During the creation process, an Advertiser will need to be set in order to start the Advertisement Process Flow. Once the Advertiser is set, additional options will be available to specify how your Campaign will function.

Definitions:

Current Rates – Displays the current rate information based on the Location price.

Budget

  • Fixed: a fixed rate
  • Per Day: A daily budget

Pricing Model

  • CPC: When a click occurs, a transaction is processed based on the Location price.
  • CPM: For every 1,000 impressions, a transaction is processed based on the Location price.
  • CPP: Cost per period, an agreed upon length of time to display an advertisement. The transaction is processed as soon as this pricing model starts.

Choose Locations – Select from a list of available Locations based on Banner Locations.

Schedule – Schedule the Campaign to start or stop at specified times.

Priority – Sets a priority for the Campaign. This number will prioritize the Campaign over other Campaigns with lower prioritization; the higher the number, the more times that particular Campaign will be shown.

Total Impressions – Sets a limit for total number of Campaign impressions. Once the limit is reached, the Campaign will not display.

Per Person Impressions – Sets a limit for total number of Campaign impressions by individual. Once the limit is reached, the Campaign will not display to that individual.

How To:

To create or edit a Campaign, navigate to the Campaigns section under the AdVert menu.

Additional Reads:

  1. Advertisers
  2. Locations
  3. Banners
  4. Change Control
  5. Publishing Tools

Top

Change Ownership

Brief Description:

Change the person that responsible for the Campaign, Banner or Advertiser

Capabilities Needed:

Admin or AdVert Manager

Description:

This function allows Admin or AdVert Managers to create new group types (Categories, Banners or Advertisers) and assign them to an existing user or Advertiser. This also can act as a takeover feature for the Admin and AdVert Managers.

How To:

Create and assign

You can help your Advertisers by creating their Banners, Campaigns and even create a new Advertiser. To do this, create a new Campaign, Banner or Advertiser. After the information is filled out, find the available user in the dropdown menu and click update or publish.

Restrict access

To remove editing/viewable rights for an Advertiser or Advertisers Campaign/Banner, simply select the Admin or an AdVert Manager username from the dropdown menu and click update.

Additional Reads:

  1. Advertisement Process Flow
  2. Banners
  3. Advertisers
  4. Campaigns

Top

Control Panel (Settings)

Brief Description:

A group of settings to help manage AdVert

Capabilities Needed:

Admin or AdVert Manager

Description:

The Control Panel consists of three groups of settings:

  • General
  • Users
  • Ads

There are advanced settings within each group that are only accessible to Admin’s; everything else is accessible by AdVert Managers. It’s recommended before anything else, you review and update these settings.

General:

Email Notifications – Sends notification emails for pending and published items.

Payments – Sets the standard payment method (default is PayPal).

Restore Standard Locations – Attempts to restore standard Locations that come preinstalled.

Turn off Locked Rates – Turns off Locked Rates.

Turn off AdVert – Turns off AdVert (similar to deactivating, without all the hassle).

Empty AdVert Database – Empties the AdVert database (this cannot be undone).

Display about AdVert link below feedback – Displays an AdVert link below feedback, if feedback is turned on.

Make a Donation – Allows you to donate for continued plugin support and updates.

Users

Users = Advertisers

Allow users to register – Allows a logged in user to register to become an Advertiser.

Text that is displayed to the user who wants to start advertising – Allows you to create your own custom message to a future advertiser.

Allow users to view analysis – Allows the Advertisers to view the Analysis section. Only there data will be displayed.

Allow users to select pricing model – Enable pricing models for Advertisers.

AdVert Managers

Add/Remove AdCredits – Allows AdVert Managers to add or remove AdCredits.

Add a new Location – Allows AdVert Managers to add new Locations.

Ads

Allow Ad Feedback – Gives your visitors a way to provide feedback about the ads being displayed.

Hide Ads that have negative user feedback – If an ad received negative feedback, hide that particular ad from that user who gave negative feedback.

Display Advertisement about Banner – Displays the word “Advertisement” about the ad.

Prevent Spammed clicks – Prevent multiple clicks from visitors.

Display Notice for empty Ad spaces – If checked, complete the next section to display a custom notice to visitors.

Notice for empty Ad spaces – A custom message to display a notice to visitors.

Allow Editors to turn off ads by post/page – Does what the title says.

Turn off ads by post type – AdVert checks all public post types, which you can disable ads for.

Hide Videos after played – Hides a video when is finishes playing.

Display notice if visitor is blocking Ads – If checked, complete the next sections to display a custom message to visitors that are blocking your Ads.

Message to display to visitors blocking Ads – A custom message to display a notice to visitors blocking ads.

Disable Ad Tracking for logged in users – Prevents AdVert from logging clicks and impressions for logged in users.

Disable Ad Tracking – This disables writing to the AdVert database. Clicks, Impressions and other data will not be logged to the database.

How To:

To access the Control Panel, navigate to the Control Panel section under the AdVert menu.

Top

Dashboard

Brief Description:

AdVert Information Hub

Capabilities Needed:

Admin or AdVert Manager

Description:

The Dashboard shows the latest AdVert news, provides an option for suggestions or feedback, displays the latest updates and lets you subscribe to AdVert. A welcome panel is also included for people new to AdVert, which helps walk you through the process of creating a new advertisement from start to finish.

Additional Reads:

  1. Roles

Top

Developers

Brief Description:

There are a several hooks, filters and payment plugins that developers can utilize or create (keep in mind I’m still learning so let me know if something is wonky).

Hooks

These are the current hooks available for use and what they do:

do_action(‘calc_adcredits’, $advertiser_id);

  • Calculates the AdCredits added or removed and updates the Advertisers AdCedits available.

do_action(‘advert_send_emails’, $to,$subject,$message,$headers);

  • Sends an HTML email.

do_action(‘advert_auto_archive_post’, $post_id);

  • Archives an AdVert group (Advertiser, Banner or Campaign) by ID.

apply_filters(‘check_advertiser’, $userid);

  • Checks how many posts are linked to an Advertiser (precautionary). There should be only one.

apply_filters(‘get_advertiser_id’, $userid);

  • Gets the advertiser ID based on the user ID.

apply_filters(‘add_adcredits’, $id, $amount, $timestamp = ”, $reason = ”, $transaction_id = ”);

  • Adds AdCredits to an Advertiser based on ID and the amount. Timestamp if not provided will be auto generated. Reason lets you provide some information about the transaction. Transaction ID is available for tracking purposes.

apply_filters(‘remove_adcredits’, $id, $amount, $timestamp = ”, $reason = ”, $transaction_id = ”);

  • Removes AdCredits to an Advertiser based on ID and the amount. Timestamp if not provided will be auto generated. Reason lets you provide some information about the transaction. Transaction ID is available for tracking purposes.

apply_filters(‘trans_adcredits’, $advertiser_id = ”, $howmany = ”, $exclude_ads = ”, $exclude_payments = ”);

  • This will allow you to access an Advertisers Transaction history. exclude either ads or payments by passing ‘on’ through the filter.

apply_filters(‘advert_get_transaction_id’, $advertiser_id);

  • Auto generates a transaction ID which is random and includes the Advertiser ID.

apply_filters(‘advert_check_transaction_id’, $transaction_id);

  • Checks the auto generated transaction ID for possible dupplication. Returns true if found.

add_action(‘advert_lightbox’, ‘YOUR_FUNCTION_NAME’);

  • Available for payment plugin authors. The lightbox is displayed with content provided by the payment plugin. When added, the Advertisement Dashboard displayed the lightbox.

add_action(‘advert_payment_type’, ‘YOUR_FUNCTION_NAME’);

  • Embeds a payment plugin into the Advertiser Dashboard.

Payment Plugins

In the beginning I knew that many people would want to use various payment methods, not just a standard payment system. With this in mind, I followed what WordPress does and created a way to implement either custom code or a full blown payment plugin that supports AdVert.

Let’s get on with it…

We will use the AdVert Custom classes as an example going forward.

The first thing you will need to do is create a folder, with the name of your plugin, for example:

  • Your payment plugin name is: Custom
  • You will need to create a folder (lowercase) called: custom

After you have created your folder, it’s time to understand the logic and start coding away. The AdVert Custom Actions and AdVert Custom Settings are classes used; with the AdVert Custom Settings extending the functionality of the AdVert Control Panel (which is another class). Extending this class is a crucial part if you need any additional options/settings for the AdVert Admin or AdVert Managers.

In your folder that you created, create a new PHP file with your plugin name.

  • It should look like this: custom.php

This will be the main file that AdVert looks for in order to render the payment method. Next let’s setup a new PHP file for your plugin actions.

  • It should look like this: class-advert-custom-actions

After you have created your files, let’s set up the two classes we will use in the actions file. The first class will be what is displayed to the Advertiser.

class AdVert_Custom_Actions {

//some functions will go here

}

The payment plugin class that is displayed to the Advertiser will be called using a do_action() on the Advertiser Dashboard (advert/inc/advert-dashboard-user.php) in the construct. So let’s initiate that do_action() using an add_action(). The add_action(‘advert_payment_type’) is the action name used for the do_action(); we can then tie it to a function in our class we just created.

class AdVert_Custom_Actions {

public function __construct(){

add_action('advert_payment_type', array($this, 'advert_create_custom'));

}

public function advert_create_custom(){

//do something here

}

}

Now that we are setup with the first class, let’s create the settings class so that we can use some options set by the Admin or AdVert Managers (if applicable).

In the same file we created the actions class, let’s add another class at the bottom.

class AdVert_Custom_Settings extends AdVert_Control_Panel {

//some functions will go here

}

Remember, it’s important to extend the AdVert Control Panel in order to hook into the settings, to provide options that can be used. Next, we will add our constructor:

class AdVert_Custom_Settings extends AdVert_Control_Panel {

public function __construct(){

//some actions or filters can go here

}

}

In order to tie into the AdVert Control Panel, you will need specific setting field options. Here is a basic settings field used within AdVert:

add_settings_field(

'advert_custom_textbox1', // ID

__( 'Custom 1', 'ADVERT_TEXTDOMAIN' ), // Title

array( $this, 'textarea_callback' ), // Callback

'advert-cp-general', // Page

'advert_options_cp_general_s2', // Section

$selectOptions = array ('label_for' =>; 'advert_custom_textbox1')

);
  • ID – should be lowercase and start with “advert_” and include your plugin name and identifier
  • Title – The name of the option
  • Callback – What type of input element you want to display (see below for available input elements)
  • Page – must remain the same, “advert_options_cp_general”
  • Section – must remain the same, “advert_options_general_s2”
  • $selectOptions -> label_for – identifies the ID of the settings field and allows additional options to be passed to various input elements.

Input elements available:

  • textbox_callback
  • textarea_callback
  • select_callback
  • checkbox_callback
  • radio_callback

To use a different element, all you need to do is change the callback

Here is an example:

array( $this, ‘textarea_callback’ ), // Callback

to

array( $this, ‘select_callback’ ), // Callback

How to use the Select Callback

To use, under $selectOptions alter the array to this:

array (‘label_for’ => ‘THE ID’, ‘option1’ => ‘CHOICE1’, ‘option2’ => ‘CHOICE2’);

Now let’s create our settings fields to use for the custom payment type. We will need to add an action in the construct to initiate the settings fields:

class AdVert_Custom_Settings extends AdVert_Control_Panel {

public function __construct(){

//add action for advert settings page

add_action('advert_add_payment_settings_custom', array($this, 'advert_add_custom_payment_settings'));

}

public function advert_add_custom_payment_settings(){

add_settings_field(

'advert_custom_textbox1', // ID

__( 'Custom 1', 'ADVERT_TEXTDOMAIN' ), // Title

array( $this, 'textarea_callback' ), // Callback

'advert-cp-general', // Page

'advert_options_cp_general_s2', // Section

$selectOptions = array ('label_for' => 'advert_custom_textbox1')

);

add_settings_field(

'advert_custom_textbox2', // ID

__( 'Custom 2', 'ADVERT_TEXTDOMAIN' ), // Title

array( $this, 'textarea_callback' ), // Callback

'advert-cp-general', // Page

'advert_options_cp_general_s2', // Section

$selectOptions = array ('label_for' => 'advert_custom_textbox2')

);

}

}

Now that we have our settings in place for the custom plugin, you might need to allow html. In order to do this, there is a filter in place to allow HTML in certain settings IDs.

To do this we will need to add a filter:

add_filter(‘advert_no_sanitize’, array( $this, ‘advert_no_sanitize’ ), 1 );

This filter will hook to a function and return an array list of IDs that will be allowed to have HTML. Here is the full class:

class AdVert_Custom_Settings extends AdVert_Control_Panel {

public function __construct() {

//add action for advert settings page

add_action('advert_add_payment_settings_custom', array($this, 'advert_add_custom_payment_settings'));

//array for verification

add_filter('advert_no_sanitize', array( $this, 'advert_no_sanitize' ), 1 );

}

public function advert_no_sanitize(){

$plugnosanitize = array(

'advert_custom_textbox1',

'advert_custom_textbox2'

);

return $plugnosanitize;

}

public function advert_add_custom_payment_settings(){

add_settings_field(

'advert_custom_textbox1', // ID

__( 'Custom 1', 'ADVERT_TEXTDOMAIN' ), // Title

array( $this, 'textarea_callback' ), // Callback

'advert-cp-general', // Page

'advert_options_cp_general_s2', // Section

$selectOptions = array ('label_for' => 'advert_custom_textbox1')

);

add_settings_field(

'advert_custom_textbox2', // ID

__( 'Custom 2', 'ADVERT_TEXTDOMAIN' ), // Title

array( $this, 'textarea_callback' ), // Callback

'advert-cp-general', // Page

'advert_options_cp_general_s2', // Section

$selectOptions = array ('label_for' => 'advert_custom_textbox2')

);

}

}// End AdVert_Custom_Settings Class

We are now finished with the settings class and can go back to the actions class we created first and the function advert_create_custom. We will grab the options from the settings and use them to render the textarea input.

In order to do this, we will grab the $advert_options array, then print the results. Remember this function is called by the add_action(), which is told to do the action by a do_action().

class AdVert_Custom_Actions {

public function __construct() {

//add an action to display the payment to the advertiser

add_action('advert_payment_type', array($this, 'advert_create_custom'));

}

public function advert_create_custom(){

global $advert_options;

//advert payment plugins

//advert payment plugins
$custom1 = '';
$custom2 = '';

if(array_key_exists('advert_custom_textbox1',$advert_options)){

$custom1 = htmlspecialchars_decode($advert_options['advert_custom_textbox1']);

}

if(array_key_exists('advert_custom_textbox2',$advert_options)){

$custom2 = htmlspecialchars_decode($advert_options['advert_custom_textbox2']);

}

printf( $custom1 . $custom2 );

}

}// End AdVert_Custom_Actions Class

We now have two classes, Actions and Settings. The final step is to initiate the classes in the main file we created, the plugin name (custom.php).

require_once( ADVERT_PLUGIN_DIR . 'plugins/custom/class-advert-custom-actions.php' );

new AdVert_Custom_Actions();

new AdVert_Custom_Settings();

We require the file to be included once, and then startup the classes we created.

And that’s it, in its simplest form. If you want to look at something a bit more complicated, check out the PayPal plugin thats the standard payment method for AdVert.

 

Top

Feedback

Brief Description:

A simple way for users to let you and the advertiser know what they think about the ads being displayed.

Capabilities Needed:

NA

Description:

Ad Feedback is a frontend service (if turned on) that allows users to give their two cents about the ad being displayed. There are three categories that the user can choose:

  • Relevant
  • Not Relevant
  • Displayed Too Much

Relevant and Not Relevant are basically a way for users to communicate with the advertiser, letting them know of their interest or lack thereof. With that said, you can tell AdVert to hide an ad that receives a “Displayed Too Much” feedback. This option is located in the Control Panel, under the Ads Tab.

You can also turn off Feedback in the Control Panel.

Definitions:

Relevant – The ad being displayed is relevant to the user’s interests.

Not Relevant – The ad being displayed is not relevant to the user’s interests.

Displayed Too Much –  The ad being displayed is displayed too often as perceived by the user.

How To:

To turn on/off Feedback, navigate to the AdVert Control Panel, under the Ads tab review Feedback options.

  1. Additional Reads:
  2. Frontend
  3. Control Panel (Settings)

Top

Frontend

Brief Description:

The Frontend is what is displayed to the user.

Capabilities Needed:

NA

Description:

When someone accesses your website they see what is called the Frontend. Everything is formatted and streamlined for viewing. Before the website is sent to the user, AdVert prepares a new advertisement to be displayed based on criteria from Campaigns, Banners, Locations and Control Panel Settings.

Additional Reads:

  1. Backend
  2. Advertisement Process Flow
  3. Feedback

Top

Locations

Brief Description:

Where your advertisement will be displayed

Capabilities Needed:

Admin or AdVert Manager

Description:

The Location is the primary starter for the Advertisement Process Flow, allowing Locations to be assigned a shortcode to perform all the necessary tasks to display a Campaign. There are several options for Locations, which determine the type and flow of Campaigns and there attached Banners.

The three main options for a Location:

  • Width and Height requirements
  • Price
  • Type of Banners to display (image, video or Text)

During the creation process, a Location will need to be published in order to start the Advertisement Process Flow.

Definitions:

Width – Specifies a width for the Location.

Height – Specifies a height for the Location.

Enforce height and width for this location – Enforces the width and height for new Banners. If the Image is not the correct size, it will display an error. Video and Text are resize automatically.

Price of this location – The Location price, what you charge for an Ad to be displayed.

Location flow

  • Priority: Applies the Campaigns priority while creating the queue.
  • Random: Selects a Campaign at random, discarding a Campaigns priority.

Image Ads – Allow image ads to be displayed at this Location.

Video Ads – Allow video ads to be displayed at this Location.

Text Ads – Allow text ads to be displayed at this Location.

How To:

To create or edit a Location, navigate to the Locations section under the AdVert menu.

To add a Location to your website, you will need to use a Standard Location, Widgets or a Shortcodes.

Additional Reads:

  1. Advertisers
  2. Banners
  3. Campaigns
  4. Publishing Tools
  5. Shortcodes

Top

Locked Rates

Brief Description:

Location rates are locked by default when a Campaign starts

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

When an Advertiser submits or starts a Campaign the rate of the Location is locked in at the time the Campaign is sent to be reviewed or if its created and published by an Admin or AdVert Manager. This prevents issues between you and the Advertiser when the Location rate is changed.

How To:

Locked rates are on by default but can be turned off in the Control Panel Settings under the Ads tab.

Scenario: If an Advertiser sets a fixed Campaign at $50 (CPC) for a Location that charges $1 per click, there is nothing to prevent you from changing that Location rate after you reviewed and published the Campaign (unknowingly or otherwise). Needless to say, that Advertiser would probably not advertise with you again.

Additional Reads:

  1. Advertising ethics
  2. Transactions
  3. AdCredits
  4. Control Panel (Settings)

Top

Multisite

Brief Description:

Manage how AdVert works across all your sites in your network.

Capabilities Needed:

Manage Network

Description:

AdVert can be used as a Connected or Independent Network depending on your needs. Within a Connected Network, one site will control all advertisements and the Advertisement Process Flow for all sites. An Independent Network allows each site/blog to manage advertisements without control of the network. There are additional settings for Independent Networks that can help tailor AdVert for individual sites/blogs.

Definitions:

Connected AdVert Network – One site to rule them all.

Independent AdVert Network – Similar to a single install on WordPress, each site/blog allowed to use AdVert will be self-managed and have all capabilities of AdVert.

Default site for your Network – If you don’t want to use the main site to control your network, that’s ok, you can set the default site ID in this field.

Disable AdVert for the following sites – If you don’t want AdVert to be shown on a site/blog, select the site you wish to disable.

Use Connected AdVert Network for sites that are disabled – Pretty much self-explanatory.

Use Connected AdVert Network for sites that have no active Campaigns – Pretty much self-explanatory.

How To:

Connected AdVert Network – Your main site will be used as your default site, if you chose to change this, then you will need to manage AdVert from that site – everything will be linked to this site. Review the sites Control Panel Settings, then start the Advertisement Process Flow.

Independent AdVert Network – Each site will be able to use AdVert (unless disabled). For each site, review the sites Control Panel Settings, then start the Advertisement Process Flow.

Tip: You can also setup an AdVert Manager to assist with your day-to-day operations

Additional Reads:

  1. Advertisement Process Flow
  2. AdVert Roles
  3. Quick Start Guide

Top

Payment Methods

Brief Description:

Allows you to add a payment method for Advertisers to use to add AdCredits.

Capabilities Needed:

Admin

Description:

By default there are three options to select from: None, Custom or PayPal.

Selecting none will not allow advertisers to automatically add AdCredits.

Using the custom option, you can add code into the available input fields to process payments.

The available PayPal plugin is the standard payment method with AdVert.

How To:

Follow this guide on PayPal to retrieve your API username, password and signature.

If using custom code, for example something from Stripe, you can follow an example here. Copy the embed Checkout code and paste it into one of the input fields provided. You will need to obviously alter the embed code to fit your needs.

Top

Shortcodes

Brief Description:

A shortcode is a built in WordPress function that executes another function.

Capabilities Needed:

Admin or AdVert Manager

Description:

AdVert uses shortcodes to streamline the advertisement process and makes things a bit easier. In order to create a new location for your advertisement, you will need to use the shortcode that is generated on the Locations page.

How To:

To use a shortcode to create a new advertisement Location, you will first need the shortcode that is associated with the Location you created. There are typically two types of shortcodes that you will use;

  • Frontend
  • Backend

Here is an example Location shortcode generated by AdVert:

To use this code on the frontend, simply copy and paste where you want the advertisement to show.

To use this code on the backend, you will need to modify the code just a bit. Copy the bracketed shortcode and place it into the function name “do_shortcode”.

Here is an example for the backend:

<?php echo do_shortcode(‘‘); ?>

Additional Reads:

  1. Shortcode API
  2. do_shortcode
  3. Locations

Top

Timezone

Brief Description:

AdVert uses your websites timezone defined in WordPress under General Settings to store information into the database.

Capabilities Needed:

Admin

How To:

When you login to the admin area, navigate to Settings / General and select your timezone.

Additional Reads:

  1. WordPress General Settings

Top

Transactions

Brief Description:

Transaction history

Capabilities Needed:

Admin, AdVert Manager or Advertiser

Description:

A detailed look at the transaction history for each Advertiser, with several groupings to identify the date, reason and amount removed or added. The groupings:

  • Advertiser
  • Transaction ID
  • AdCredits
  • Action
  • Reason
  • Timestamp

You can sort the transactions by using the filter options, or hide specific types of transactions to narrow your search.

Definitions:

Advertiser – The Advertiser associated with the transaction.

Transaction ID – A unique transaction ID.

AdCredits – The AdCredit amount added or removed.

Action – Type of action, removed or added.

Reason – Can either be a custom or system generated reason.

Timestamp – The time that the transaction happened.

How To:

To access Transactions, navigate to the Transactions section under the AdVert menu.

Additional Reads:

  1. Advertisers
  2. Payment Methods
  3. For Developers

Top

User Dashboard

Brief Description:

AdVert Information Hub

Capabilities Needed:

Advertiser

Description:

The Dashboard allows Advertisers to add AdCredits, view recent transaction history and update their advertising information. A welcome panel is also included for people new to AdVert, which helps walk you through the process of creating a new advertisement from start to finish.

Additional Reads:

  1. Roles

Top

Widgets

Brief Description:

Adds a Location via widget if your theme supports widgets.

Capabilities needed:

Admin

Description:

Once you have Locations published, you can then add an AdVert Location widget. The Location widget simplifies the process of adding a new Location on your website, with a simple drag and drop interface.

How To:

Navigate to the admin panel->Appearance->Widgets.

Click on AdVert Location and select the area you want the widget to appear. Finally, on the AdVert Location widget just added, select the Location and click save.

Top

Expand / Collapse