PDA

View Full Version : Innovative Buy Sell Ads - Asynchronous version



PhucSD
13-06-2011, 09:23 AM
This modification will insert the required Asynchrous Ad Code from Buy Sell ads into all styles after the opening <body> tag as specified on the Buy Sell Ads Blog by Todd Garland. The benefits are also listed on the blog along with more in-depth instructions for review here:
http://blog.buysellads.com/2010/02/n...onous-ad-code/ (http://blog.buysellads.com/2010/02/new-feature-non-blocking-asynchronous-ad-code/) and this modification can be easily disabled or enabled at any time thus showing and respectively hiding the ad codes if required.

What is Buy Sell Ads?
http://buysellads.com/
http://buysellads.com/sell/overview

*This modification is auto-template therefor if enabled the asynch google code will always be there, no need for manual template edits in one or multiple styles as it's handled automatically via a plugin and rendered in all styles!

Import the product.
AdminCP > Settings > Options > Buy Sell Ads
Enable the modification and save.
Utilize the Ad Manager to insert your ads throughout vBulletin where desired.
Enjoy!

This modification ads the initialization script per say for Buy Sell Ads into each style after the opening <body> tag:

Example:
Code:

<!-- BuySellAds.com Ad Code --><script type="text/javascript">(function(){ var bsa = document.createElement('script'); bsa.type = 'text/javascript'; bsa.async = true; bsa.src = '//s3.buysellads.com/ac/bsa.js'; (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);})();</script><!-- End BuySellAds.com Ad Code -->
Now the above code is contained within the plugin your going to install, the only thing you'll need from Buy Sell Ads is the corresponding ad codes for each zone of your site.

Example:
Code:

<!-- BuySellAds.com Zone Code --><div id="bsap_1234567" class="bsarocks bsap_1a23456789b10"></div><!-- End BuySellAds.com Zone Code -->
Where 1234567 is the Zone
&
Where 1a23456789b10 is the Site Key

Each of these will be provided by Buy Sell Ads, please refer to their example here using [zone] and [site key] if my initial example is not sufficient, that information is also on the blog by Todd Garland that I linked to above.

Now the only thing your required to do is utilize the "Ad Manager" in vBulletin which is located at:

AdminCP > Advertising > Manage Ads > Add New Ad

Now insert the corresponding Buy Sell Ad code with the Zone and Site Key, once you save and refresh the forum page check for your ad http://www.vbulletin.org/forum/images/smilies/biggrin.gif, if for some reason it does not display remember to disable any anti-ad blocking scripts or programs you have running in your browser if any.

*Please note on Buy Sell Ads you label each area per say so if your selling a ad assumed to be at the top of your site please try to insert it at the top of your site in the header or at least navbar area this way the ad being sold is represented accurately and sold as such.

Demo: http://www.gamegavel.com/forum/forum.php