Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Rotate Ad Banners Based Upon Clock Seconds Details »
Rotate Ad Banners Based Upon Clock Seconds
Mod Version: 1.00, by Dan Druff (Coder/Designer) Dan Druff is offline
Developer Last Online: Nov 2020 I like it Show Printable Version Email this Page

vB Version: 4.1.12 Rating: (0 vote - 0 average) Installs: 6
Released: 19 Sep 2012 Last Update: Never Downloads: 0
Supported Code Changes  

One feature sorely missing from vBulletin 4 is the ability to "rotate" ad banners.

I have found other mods that allow you to do this, but they were overly complicated and cumbersome for what I needed.

This is a little hack that allows you to convert the mostly-useless "Display ad when PM storage is between X and X percent" into a rotating ad banner system.

After this mod is implemented, you will be able to specify the time on the clock secondhand when a specific banner is displayed. For example, if you had two banners, you could rotate them equally by displaying one between 0 and 29 seconds, and the other between 30 and 59 seconds.

This requires one code change and one phrase change.

For the code change, go to the includes directory and find functions_ad.php.

Search for:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Directly BELOW it, delete the following two lines:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In their place, put the following two lines:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


So the block should now look like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Now, just for aesthetics, go to Search in Phrases in the Admin Control Panel. Enter pm_storage_x_percent_full_criteria in the Search for Text box. Then click Phrase Variable Name Only under Search in. Then press the Find button.

It should find pm_storage_x_percent_full_criteria. Click the Edit button.

On the edit screen, enter the following in the "Translation" text box:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then press Save and you are all done!


Now you will have a choice to select the seconds on the clock when certain ads are displayed. You set this on the Edit Ad screen. You can rotate up to 60 ads this way. You can even designate certain ads to come up more often than others, by giving some more time than others. For example, if you have Ad #1 display between 0 and 49 seconds, and Ad #2 display between 50 and 59 seconds, Ad #1 will display on average 5 times more often as Ad #2.

I have attached a screen shot of the Edit Ad screen. Notice that I checked the box labeled "Display ad between ____ and ____ seconds". You need to do that in order to enable this modification on any ad you display.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	editad.png
Views:	145
Size:	126.6 KB
ID:	141320  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:13.

Layout Options | Width: Wide Color: