Version: 1.1, by EWGF
Developer Last Online: Nov 2022
Category: Miscellaneous Hacks -
Version: 3.8.x
Rating:
Released: 01-02-2010
Last Update: 08-01-2011
Installs: 33
Uses Plugins Template Edits
Re-useable Code
No support by the author.
Note: This product is not limited to 10 random banners since it drives on HTML. You can tune it to showing 10 defined YouTube video's which will be displayed randomly. It's up to you.
Description
This lightweight product allows you to place $tenrandombanners on your template(s), which will randomly pick one of the 10 admin-defined banners. Every refresh of the page gives you another banner, unless the same banner is randomly chosen again.
Setting the banners (or any other object you want to display) is completely done with HTML (and not with millions of settings), so you can have full control over the height, width, alt, target, etc. per banner. You could use any other kind of HTML or conditional statements (if usergroup, if forum, if script, etc.) too.
Details
Works for 3.7.X and 3.8.X, not build for 4.X or higher
Adds one plugin and 22 phrases.
The CMPS module adds one template and one .php module.
Install product
- Upload product-10randombanners.xml in the Admin CP through the section Products And Plugins.
- Adjust settings at vBulletin Options > 10 Random Banners
Install CMPS-module (optional)
- Upload cmps-10randombanners.xml in the Admin CP through Upload Module at the section vBadvanced.
- Set on which page the module should appear.
Notes
- Fill in from 1 to 10, the script won't pick up gaps between fields. You're not obligated to use all 10 fields. Just fill in the fields chronologically: 1, 2, 3, 4, etc.
- Not likely to work on vBulletin 4.X or higher
History
1.0 - initial release (january 2010)
1.1 - added CMPS module and changed product for better rotation between banners (august 2011)
I believe this code provides in showing the banner after the third post in forums 1, 2 and 3. In your case, this code should be placed in the "postbit" or "postbit_legacy" template
PHP Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 3 AND in_array($GLOBALS[forumid], array(1,2,3))">$tenrandombanners</if>
How do you increase this to more than ten banners or how do you run a 2nd instance of this same mod on the same page?
More than ten banners can be done by manually adjusting the plugin, although the settings in vBulletin Options only support ten fields.
You can place the variable more than once
I understand we can edit our CMPS template and add this, but what I want to be able to do on CMPS is to have this set as a center 'module' so I can rotate a series of images that change with every refresh. I've played with it, but can't figure out how to make that work.
Working like a charm. Took me a bit to figure out I had to upload the first xml as a 'product', then upload the other xml in the CMPS section as a module, but I got it going. Thanks! Not often you ask for very specific help and get it. Truly appreciated.