Helpful Information
 
 
Category: Programming Articles
Create easy way to manage Ads across multiple pages.

If this has already been discussed then i didnt see it :nervous:

Start by creating a template named "ads"
AdminCP - Style Manager - Add Template

Then add your Advertising code, such as google or yahoo. Should look similar to this(This is a made up one, dont use it)

<script type="text/javascript"><!--
google_ad_client = "pub-2111864921856687";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


Next create a plugin.(wooo hoo big time stuff now :rolleyes: )
AdminCP - Plugin System - Add New Plugin
Give it any name you please, I Used Easy Google Ads
Location: global_start
Active: Yes (unless you dont want it to be, but then why are you reading this far?)
Plugin Code:

eval('$ads= "' . fetch_template('ads') . '";');


Now you're ready to add $ads any where you wish your ads(or anything you put in the ads template) to appear.

I simply added mine in the navbar code, at the very bottom of it, for them to appear on everypage the navbar does :D

this is much easier then adding the ads to every page, then having to change it around, or different colors. Now you just update the ads template for your skin and you're done.

cool - I was using a slightly clunkier way of doing this - cheers










privacy (GDPR)