Welcome to Ad Swapper {$sub_title} for
{$target_site_title}show/hide help
Ad Swapper allows you to
exchange ads with other WordPress
sites. So WordPress sites can do
unlimited free
advertising on each other (apart from the rediculously small
fees we charge for maintaining the Ad Swapper Central site and
associated plugins).
EOT;
// -------------------------------------------------------------------------
//
// From this screen, you can
manage all the Ad Swapper advertising
// related to this site. Ie;
//
// - Create and upload to Ad
// Swapper Central, the ads that you want to display on
// other Ad Swapper sites,
//
// - Select any Ad Swapper
// SITES you don't want to display this site's ads
// on.
NB: By default, this
// site's ads will be displayed on all other Ad Swapper
// sites,
//
// - Select any Ad Swapper
// ADS you don't want to display on this site.
NB: By default, all other
// Ad Swapper site ads will be displayed on this site,
//
// - Define the “Ad
// Slots” (on this site), to display the other Ad Swapper
// site ads in,
//
// - etc...
//
//
//
//
Good luck (and may your site's readership grow exponentially
// & explosively - or even better :)...
// -------------------------------------------------------------------------
$expander_title_style = <<
From this screen, you can
manage all the Ad Swapper
advertising related to the site that this Ad Swapper plugin is
installed on (
{$target_site_title}).
Click the following links, for
HELP on the specified task:-
Initial Plugin Setup
DO THIS FIRST (very little else will work
until you've done it)!
DO THIS FIRST! More specifically, do
this first - when you install the Ad Swapper
plugin for the very first time. (You
shouldn't need to do it for second and subsequent
"upgrade" installs.) But for the first
install, very little else will work, until you've
done the following two things:-
-
Run the Maintain Plugin Settings option (and follow
the instructions given).
-
Run the Maintain This Site's Profile / Settings
option. You can usually just accept the
defaults - and "Submit" the form. But
if you want to display ads (on either
your own and/or other Ads Swapper sites), you
MUST specify at least one GeoIP country or
continent code (to display the ads in).
The following help notes assume that you've done
this initial plugin setup.
Check Your Current Subscription Status
Check whether you have a "trial" or a
"paid" subscription. Also shows the
expiry date/time - and includes a link to
take out or renew your (paid) subscription...
Create Some Ads
You only need do this if you want to
advertise (on your own and/or other sites).
EOT;
// -------------------------------------------------------------------------
//
// Note! You only need do this if you want to
// advertise your site/business (or whatever), on
// your own and/or other Ad Swapper sites. If you
// just want to display OTHER site's Ad Swapper ads
// (on this site), skip to Prepare This Site To Display
// (Ad Swapper) Ads (next).
//
// -------------------------------------------------------------------------
$page_content_proper .= <<
Create your GIF, JPEG or PNG files.
This is done outside of the Ad Swapper plugin -
usually using standard desktop image creation
tools like MS Paint and Microsoft Word,
etc. See (How To) Create Ad Swapper Ad Images for
more options and details.
Upload the ads you've created to this site
(or whereever else on the Net you want to store
them). The easiest way is usually to store
them in your WordPress Media Library. See (How To) Upload Ad Swapper Ad Images (To Your
Site) for more options and details.
Tell Ad Swapper about the ads you want to
display - by running the Maintain This Site's Ads option.
This is quick and easy to do. Since
generally, all you need do is enter the
"Image URL", and the "Link
URL" (that the user is taken to when
they click the image), for each ad.
Get Your Ads Displaying - On This And/Or Other Sites
Once you've created the ads you want to display,
this is how you select the sites you want to
advertise on, and have your ads
auto-transferred there (the ads will start
displaying immediately the other site approves
them)...
-
Run the Synchronise option (to update this plugin's
list of sites that it can advertise on).
-
Run the Select Sites to Advertise On option - and
select some sites to advertise on
(including your own, if you want to advertise on
that). Note! Set the Sites To Show
dropdown (at the top of the page), to All
- to see ALL the sites that you can (potentially
at least,) advertise on.
-
Run the Synchronise option again (to transfer
details of the sites you want to advertise on -
and your ads - to Ad Swapper Central. So
that it can pass these on to the sites
concerned).
Note! Having done the above, your ads WON'T
instantly appear on the sites you've targeted.
Instead, they'll come live in random fashion. As
each targeted site:-
- Synchronises their
site with Ad Swapper Central (to discover that
you want to advertise on them).
- Approves the
display of your ads on their site.
- Synchronises
again (to download a list of the ads you
want to display). And finally;
- Approves the
display of each of your ads.
This will typically take a
few hours/days
(depending how active each targeted site is). And
of course, there's NO guarantee that every targeted site
will approve your site/ads (or just how quickly they
will do this). That's their right of course (just
as it's your right to select the sites and ads that
display on your site). So be cool; what happens
happens (when and if it happens) :)
Prepare This Site To Display (Ad Swapper™) Ads
You only need do this if you want to display
Ad Swapper ads on this site.
EOT;
// -------------------------------------------------------------------------
//
// Note! You only need do this if you want to
// display Ad Swapper ads (on this site).
// Which generally of course, you do (especially if other
// Ad Swapper sites are displaying YOUR ads).
// But if you're still evaluating Ad Swapper - and want to
// skip this step for now - that's quite OK.
//
// -------------------------------------------------------------------------
$page_content_proper .= <<
If you need an overview of what Ad Slots
are (and the various Ad Slot types
available, etc), then check out the Ad Slots page, first.
If you want to switch this site into Test
Mode (so that only YOU can see Ad Swapper
ads - while you're setting up your Ad Slots)
- then run the Maintain This Site's Profile / Settings
option. And set the Test Mode
field as required. (Don't forget to
switch Test Mode OFF, when you're ready
to go live.)
Run the Maintain This Site's Ad Slots option.
And create at least one Ad Slot (to
display Ad Swapper ads in).
Then add the Ad Slots you've created to your
site's pages. You can do this by either
WordPress Widget, PHP Function or
WordPress Shortcode. As described in more detail here.
Select/Obtain the Ads To Display (On This Site)
Once you've prepared your site to display (Ad
Swapper™) ads, this is how you select the
sites you want to advertise, download
their ad URLs, and pick those you want to
display (the ads will start displaying immediately
you approve them)...
-
Run the Synchronise option (to update this plugin's
list of sites that it can advertise).
-
Run the Select Sites to Advertise option - and
select some sites to advertise (including
your own, if you want to advertise that).
Note! Set the Sites To Show dropdown (at
the top of the page), to All - to see ALL
the sites that you can (potentially at least,)
advertise.
-
Run the Synchronise option again (to transfer
details of the sites you want to advertise to Ad
Swapper Central - and download their "available"
ads).
-
Run the Select the Ads to Display on This Site
option - and approve/dis-approve any newly
downloaded ads (that you do/don't want to
display).
-
Run the Reload Ads List option.
-
The next time any front-end page
(that contains Ad Swapper ads), is
displayed, the viewer should see the newly
downloaded and approved ads (along with any
other ads that were previously downloaded
and approved). View a front-end page (to check
this)...
EOT;
// -------------------------------------------------------------------------
// $page_content_proper .= <<
//
// Display THIS Site's Ads - On THIS Site
//
//
// Just some clarification about displaying THIS site's
// ads on THIS site.
//
//
//
//
//
// Do
BOTH:-
//
// - Display THIS Site's Ads - On OTHER Sites, and;
// - Display OTHER Site's Ads - On THIS Site
//
// (see above). And make sure that you both
select
// your site (to advertise on). And
approve
// your site (to advertise on itself).
//
//
//
//
//
// EOT;
// -------------------------------------------------------------------------
$page_content_proper .= <<
EOT;
// -------------------------------------------------------------------------
$page_content_proper .= <<
Initial Plugin Setup...
Site and Ad Maintenance...
View Subscription and Plugin Status
You can check your Ad Swapper subscription type - and
whether or not this plugin needs to be updated - from
here.
Maintain This Site's Profile / Settings
Lets you
configure how
Ad Swapper works on
this site. In particular:-
- The Test Mode field
lets you configure Ad Swapper so that only
you can see the Ad Swapper ads displayed on your
site (which is very useful when evaluating Ad
Swapper - and setting up it's Ad Slots).
And;
- The GeoIP field allows
you to select the countries/continents your ads
are displayed in (where your ads WON'T be
displayed at all - unless at least one such
country is selected).
Maintain This Site's Ad Slots
“Ad Slots” are the areas on your site's pages
where ads from other Ad Swapper sites are placed. You'll
need at least one Ad Slot (though you can create/use as many
as you like).
Maintain This Site's Ads
Add, edit and delete the ads that you want to display on
other sites (in the Ad Swapper network). This is where
you'll probably spend the bulk of your time with Ad Swapper
(once you've done the initial setup above).
Manual Site and Ad Selection...
Select Sites to Advertise
Here you can select the Ad Swapper sites (including your
own), whoose ads you want to display on your site.
Select Sites to Advertise On
Here you can select the Ad Swapper sites (including your
own), that you want to display your site's ads on.
Select the Ads to Display on This Site
By default, ALL the individual Ad Swapper ADS to be
displayed on this site are DISABLED (even if you've
approved the SITEs that own the ads concerned). So
once you've approved one or more sites (to display ads on
this site) - and Synchronised with Ad Swapper Central (to
download the URLs of the approved site ads), you must then
individually approve any newly downloaded ads.
EOT;
// -------------------------------------------------------------------------
// Web Site Collections (Targeted Marketing)...
//
//
//
Targeted Marketing is the Holy Grail of the advertising
// industry (you want to show your ads seen by everyone likely to be
// interested in your product). And Ad Swapper “Web Site
// Collections” are by far the most effective way to
gather
// all your potential customers together. Nothing else - not
// even major television events like the Superbowl, the Olympics or
// sporting World Cups, etc - can beat it. Better still, at just
// $20 per year (for your Ad Swapper subscription), you DON'T have to
// be Megabucks International to afford it. Anybody - including
// private individuals and non-profits - can have
the most effective
// advertising ever (virtually for free).
Click here for more...
//
//
//
//
//
//
Maintain Your Own Web Site Collections
// Create, edit and delete your own Web Site Collections (the
// magnets that will draw your potential customers to where
// they can see your ads). In general, you should only
// create a new collection if there's no existing collection
// that includes much the same web sites as you want your
// collection to contain.
//
//
//
//
Enable/Disable The Sites In Your Web Site Collections
// Select the sites in each of your (Web Site)
// Collections. You can set the collections you create to
// be either moderated or un-moderated. If you set a
// collection to be moderated, then you decide whether
// the other Ad Swapper sites that apply to join the collection
// may do so (though sites you've accepted can leave whenever
// they want). If you set a collection to be
// un-moderated, then other Ad Swapper sites can join
// (and leave) the collection whenever they want.
//
//
//
//
Select the Web Site Collections You Want This Site to Belong To
// This is another way of selecting the sites you want to
// advertise, and advertise on. Once you've joined a
// collection, you'll automatically advertise - and
// advertise on - all the sites in that collection.
// (Which is quicker than manually selecting those sites
// yourself.)
//
//
//
//
// -------------------------------------------------------------------------
$dont_use = <<DON'T USE THIS OPTION unless you know what you're doing. Use
Synchronise instead.
EOT;
// -------------------------------------------------------------------------
$page_content_proper .= <<Synchronisation (with Ad Swapper Central)...
Synchronise
Use this:-
- Whenever
you've made changes to your local site - ie;
created/deleted ads, or selected new sites to advertise
and/or advertise on, etc - and want to push those
changes to Ad Swapper Central and the other Ad
Swapper sites. Or;
- Whenever
you want to update your local Ad Swapper
plugin. And in particular, it's lists of sites
to advertise - and advertise on. And/or the ads
available for your site to display. Although you
should Synchronise for this reason as much as
possible, there's probably not much point in doing
it more than once a day.
NOTE! Synchronise does
Update Central
site,
Update Local Site and
Reload Ads
List - all in one hit.
We recommend that you
use Synchronise instead of it's individual
components. Because it gets your site sorted,
without you having to figure out exactly what
updating is required, when.
Update Central Site
Click this option to copy your site's details and ads to the
Ad Swapper Central site (so that other Ad Swapper sites can
see/display them). You should run this menu option every
time you change your site settings, ads or ad slots above
(as otherwise, other Ad Swapper sites will have no or
outdated information about these things).{$dont_use}
Update Local Site
Click this option to copy the currently enabled Ad Swapper
sites and ads, from Ad Swapper Central, down to this site.
This is how your site finds out about the other Ad Swapper
sites and ads to display.{$dont_use}
Reload Ads List
You should never need to run this option. But if Ad
Swapper ads aren't displaying correctly (or at all) - on the
site's front-end - then running this option may fix
things.{$dont_use}
Help and Support...
EOT;
// =========================================================================
// Create and return the full page...
// =========================================================================
$page_header =
\greatKiwi_byFernTec_adSwapper_local_v0x1x211_standardDatasetManager\get_page_header(
'Main Menu' ,
$core_plugapp_dirs['plugins_includes_dir'] ,
$question_front_end
) ;
// -------------------------------------------------------------------------
// Here we should have:-
// Ad Swapper Local 0.1.104 >> Main Menu
// -------------------------------------------------------------------------
//echo '' , htmlentities( $page_header ) , '
' ;
if ( function_exists( '\\is_adswapper_admanager_site' )
&&
\is_adswapper_admanager_site()
) {
$page_header = str_replace(
'Ad Swapper Local ' ,
'Ad Swapper Ad Manager v' ,
$page_header
) ;
$page_header = str_replace(
'Ad Swapper Local ' ,
'Ad Swapper Ad Manager v' ,
$page_header
) ;
}
// -------------------------------------------------------------------------
return <<{$page_header}
{$page_content_proper}
EOT;
// =========================================================================
// That's that!
// =========================================================================
}
// =============================================================================
// get_target_site_title_and_url()
// =============================================================================
function get_target_site_title_and_url() {
// -------------------------------------------------------------------------
// get_current_blog_id()
// - - - - - - - - - - -
// Retrieve the current blog id.
//
// PARAMETERS
// None.
//
// RETURN VALUES
// (integer) Blog id
//
// NOTES
// Uses global: (integer) $blog_id The Blog ID.
//
// CHANGE LOG
// Since: 3.1.0
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// get_blog_details( $fields, $get_all )
// - - - - - - - - - - - - - - - - - - -
// Retrieve the details for a blog from the blogs table and blog options.
//
// $fields
// (int|string|array) (optional) A blog ID, a blog slug, or an
// array of fields to query against. If not specified the current
// blog ID is used.
// Default: null
//
// $get_all
// (boolean) (optional) Whether to retrieve all details or only the
// details in the blogs table.
// Default: true
//
// RETURN VALUE
// (WP_Object_Cache object) Blog details
//
// Eg; get_blog_details(1) would return:
//
// [blog_id] => 1
// [site_id] => 1
// [domain] => foo-multi-site.com
// [path] => /site-path/
// [registered] => 2014-07-31 14:51:09
// [last_updated] => 2014-07-31 15:51:56
// [public] => 1
// [archived] => 0
// [mature] => 0
// [spam] => 0
// [deleted] => 0
// [lang_id] => 0
// [blogname] => Site Name
// [siteurl] => http://foo-multi-site.com/this-site
// [post_count] =>
//
// NOTES
// Uses global $wpdb
//
// CHANGELOG
// Since: 3.0.0
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// get_blog_option( $blog_id , $setting , $default )
// - - - - - - - - - - - - - - - - - - - - - - - - -
// Returns data relating to a specific blog.
//
// $blog_id
// (integer) (required) ID of blog queried.
// Default: None
//
// $setting
// (string) (required) Name of setting to fetch.
// Default: None
//
// $default
// (integer) (optional) Deprecated.
// Default: false
//
// Any settings in the wp_(blog_id)_options table can be fetched using this
// function including:
//
// siteurl
// Full URL of the blog queried (eg. http://www.example.com/blog).
//
// blogname
// Name of the blog queried.
//
// blogdescription
// Description of the blog queried.
//
// wp_#_user_roles
// Roles available in this blog (where # is the ID of the blog
// being queried).
//
// users_can_register
// Flag indicating if users can register on the queried blog.
//
// admin_email
// Email address of the admin user of the blog queried.
//
// start_of_week
// Day of the week set as the week start for the blog queried.
//
// use_balanceTags
// Flag indicating if the queried blog uses balanced tags.
//
// use_smilies
// Flag indicating if the queried blog converts text smilies to
// images.
//
// require_name_email
// Flag indicating if the queried blog requires names and emails in
// posted comments.
//
// comments_notify
// Flag indicating if the queried blog notifies the admin user when
// a new comment is posted.
//
// posts_per_rss
// Number of posts carried in the queried blog's RSS feed.
//
// rss_excerpt_length
// Length of excerpt carried in the queried blog's RSS feed.
//
// rss_use_excerpt
// Flag indicating if the queried blog's RSS feed carries a post's
// excerpt.
//
// mailserver_url
// URL of mail server used when sending email from the queried
// blog.
//
// mailserver_login
// Username used with the above mail server.
//
// mailserver_pass
// Password used with the above username and mail server.
//
// mailserver_port
// Port used with the above mail server.
//
// default_category
// ID of category in which blog posts are published by default.
//
// default_comment_status
// Status comments are set to when posted by default.
//
// default_ping_status
// Ping status set by default when new blog posts are published.
//
// default_pingback_flag
// Flag indicating the default status of pingbacks when new blog
// posts are published.
//
// default_post_edit_rows
// Default size of the post edit box.
//
// posts_per_page
// Number of posts displayed per page on the bog queried.
//
// what_to_show
// [unknown]
//
// date_format
// Format in which dates are disaplyed on the blog queried.
//
// time_format
// Format in which times are displayed on the blog queried.
//
// links_updated_date_format
// [unknown]
//
// links_recently_updated_append
// [unknown]
//
// RETURN VALUES
// (mixed)
// The value of the setting requested.
//
// NOTES
// Pulls the provided information from the wp_#_options table.
// -------------------------------------------------------------------------
$blog_id = get_current_blog_id() ;
// -------------------------------------------------------------------------
if ( ! is_int( $blog_id )
||
trim( (string) $blog_id ) === ''
||
! ctype_digit( (string) $blog_id )
||
$blog_id < 1
) {
return array(
'???' , // title
'' // url
) ;
}
// -------------------------------------------------------------------------
$setting = 'target_site_title' ;
$title = get_blog_option(
$blog_id ,
$setting
) ;
if ( ! is_string( $title ) ) {
$title = '' ;
} else {
$title = trim( $title ) ;
}
if ( $title === '' ) {
$title = '???' ;
}
// -------------------------------------------------------------------------
$setting = 'target_site_url' ;
$url = get_blog_option(
$blog_id ,
$setting
) ;
if ( ! is_string( $url ) ) {
$url = '' ;
} else {
$url = trim( $url ) ;
}
// -------------------------------------------------------------------------
return array(
$title ,
$url
) ;
// -------------------------------------------------------------------------
}
// =============================================================================
// That's that!
// =============================================================================