Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
10 Random Banners (Or Other HTML Objects) Details »»
10 Random Banners (Or Other HTML Objects)
Version: 1.1, by EWGF EWGF is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

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)

Download Now

File Type: xml 20110802 product-10randombanners.xml (8.7 KB, 96 views)
File Type: xml 20110802 cmps-10randombanners.xml (2.3 KB, 48 views)

Screenshots

File Type: jpg 20110802 screenshot-10randombanners.jpg (82.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
Abu2, BGObsession, bskr84

Comments
  #12  
Old 03-29-2010, 06:07 PM
EWGF EWGF is offline
 
Join Date: May 2007
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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> 
Reply With Quote
  #13  
Old 04-11-2010, 10:44 PM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this! :up:

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?
Reply With Quote
  #14  
Old 04-11-2010, 11:47 PM
xoxstugotsxox xoxstugotsxox is offline
 
Join Date: Jun 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to add this to CMPS?
Reply With Quote
  #15  
Old 04-18-2010, 10:56 PM
EWGF EWGF is offline
 
Join Date: May 2007
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MagicThemeParks View Post
Thanks for this! :up:

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

Quote:
Originally Posted by xoxstugotsxox View Post
Is it possible to add this to CMPS?
Yes
Reply With Quote
  #16  
Old 07-21-2011, 11:21 AM
Scyther's Avatar
Scyther Scyther is offline
 
Join Date: Jul 2009
Location: Planet Earth
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod..

marked installed....thanks..
Reply With Quote
  #17  
Old 07-30-2011, 04:41 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Idea?
Reply With Quote
  #18  
Old 08-02-2011, 12:50 AM
EWGF EWGF is offline
 
Join Date: May 2007
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You probably added $tenrandombanners as a BBcode in the module. That variable only works in templates

I made a CMPS module which does exactly what you're looking for. I also updated the code of the plugin for better rotation.
Reply With Quote
  #19  
Old 08-05-2011, 03:22 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I knew the template code wouldn't work, just wasn't sure where to go from there. Awesome - I'm going to give it a try - thanks for the effort!
Reply With Quote
  #20  
Old 08-05-2011, 08:40 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
EWGF
  #21  
Old 06-03-2013, 05:27 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work on vbulletin version 4??? Anyone tried it?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07894 seconds
  • Memory Usage 2,343KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (4)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete