|Rotate Ad Banners Based Upon Clock Seconds Details »»|
Rotate Ad Banners Based Upon Clock Seconds
Developer Last Online: May 2013
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.
Directly BELOW it, delete the following two lines:
In their place, put the following two lines:
So the block should now look like:
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:
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.
Only licensed members can download files, Click Here for more information.
No members have liked this post.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|New To Site?||Need Help?|
All times are GMT. The time now is 07:11.