[[plugins:google-adsense]]
 

Google AdSense Plugin for Dokuwiki








Example

Other AD's should also be possible

Here an example of an other ads provided e.g. www.affili.net

Google AdSense into Dokuwiki templates

This plugin allows you to include Google Adsense advertisings into your wiki page. To use it, you'll have to insert the following code into your template:

<?php
if (file_exists(DOKU_PLUGIN.'googleads/code.php'))
               include_once(DOKU_PLUGIN.'googleads/code.php');
if (function_exists('gads_code'))
               gads_code('ads_tpl_top_linklist','100% left');
?>

This will include 'googleads:ads_tpl_top_linklist' in your site. This means you have to create a wiki page and insert (via copy and paste) your ads code.

Please note the Namespace „googleads“ is hardcoded and can't be changed.
Inserting the code above is optional and only needed if you want to include Google Adsense in templates areas..

Google AdSense into Dokuwiki wiki pages

To insert a ads into your wiki page use the following code

Wiki Syntax: {{googleads>WIKISITE | [options]}} 

Options are: WIDTH and or direction like LEFT and RIGHT e.g.

{{googleads>ads_under_sidebar_left|40% left}}

(you be able to build up your own directions by edit the css file

Howto use this plugin

Just create a wiki page like 'googleads:ads_tpl_top_linklist' and copy your ads code into it.

You may use some placeholder for your code like:

<default_client>, <default_border>, <default_bg>,
<default_link>, <default_text>, <default_utl>

This will be replaced on the fly into your configured values.

<script type="text/javascript"><!--
google_ad_client = "<default_client>";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel = "";
google_color_border = "<default_border>";
google_color_bg = "<default_bg>";
google_color_link = "<default_link>";
google_color_text = "<default_text>";
google_color_url = "<default_utl>";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Please try to use the following code. This will help Google to select the right content for your ADS:

<!– google_ads_section_start –>
 some content for your ADS
<!– google_ads_section_end –>

License

It's not required, but please consider linking to this page or the main page from your site if you like/use/modify this plugin. Also consider to link to Google Adsense for Dokuwiki and Google Analytics for Dokuwiki, which provided the codebase of this plugin.

Supported versions

The plugin was only tested with the development version of Dokuwiki, but it should work well with 2006-03-09 and 2006-11-06.

Changelog

  • Mon, 19 August 2007: Initial release
  • Wed, 02 January 2008: Some issues fixed

Download

  • Before downloading or using this plugin, make sure you understand and accept the terms of the license.
  • Either download the provided zip/tar.gz file and extract it in the lib/plugins directory of you wiki installation, or use the plugin manager to download and install the plugin.

GoogleADS.tar.gz

plugins/google-adsense.txt · Zuletzt geändert: 12.09.2009 12:46 (Externe Bearbeitung)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki No Bad-Bot!
Guestbook