Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Random Side Banners Outside Main Body in Fixed Position Details »»
Random Side Banners Outside Main Body in Fixed Position
Version: 1.00, by CAG CheechDogg CAG CheechDogg is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.0 Rating:
Released: 11-08-2012 Last Update: Never Installs: 20
Supported Template Edits
Re-useable Code Additional Files Translations  

Random Side Banners

Quite a few people have asked how do you add side banners outside of your forum's main body and no one has offered a solution that I know of.

This mod allows you to have random banners outside of your forums main body in a fixed position. The banners will rotate with every unique visit to your forums similar to the dszuecs's "New way to force guests to register" Mod. The php code to make the banners rotate could possibly be written better, right now you don't always get a different random banner unless you completely close your browser and come back with a new session it seems.

The rotate.php code is not mine I found it not only in dszuecs's New way to force guests to register Mod but also online. I did however use his Mod as a base to get this Mod done.

If anyone can fix the rotate.php file so that you get a random with every page load that would be great.

The banners used in this mod have the dimensions of height:435px width:140px but you can change them to any size you want.

Included are the files to upload to your FORUMROOT using FTP:

Files included are:

1. left_banner_rotate.php
2. right_banner_rotate.php
3. images (includes 1 png file you can use as a template for your banners)
4. additional_css.txt (code to add to your additional_css)
5. header_template.txt (code to add to your header template)

You will need to make 2 manual template edits to your additional.css and your header template.

The code included in the additional_css file can be added at the very end of your additional.css file.

Code:
div.left-banner {
background:url(left_banner_rotate.php);
background-repeat: no-repeat; 
display:block;
height:435px;
width:140px;
position:fixed;
left:5px;
top:50px;
}
div.right-banner {
background:url(right_banner_rotate.php);
background-repeat: no-repeat; 
display:block;
height:435px;
width:140px;
position:fixed;
right:5px;
top:50px;
}
The code included in the header_template file must be added at the very top before all other code in your header template.

Code:
<div class="left-banner"></div>
<div class="right-banner"></div>
This is my first Mod contribution you guys so be gentle with me. I am just learning vBulletin's way of doing things and hopefully I can contribute other small Mods in the future.

Download Now

File Type: zip random_side_banners.zip (249.0 KB, 197 views)

Screenshots

File Type: jpg attachment_1.jpg (201.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
5 благодарности(ей) от:
aaronhaul, ChiNa, Max Taxable, RichieBoy67, Toorak Times

Comments
  #22  
Old 03-25-2014, 07:26 AM
aaronhaul aaronhaul is offline
 
Join Date: Mar 2014
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
If you need to add a banner with a link in it use the following:

<a href="http://naijafrontpage.hugeicon.com/forum.php" title="tittle for your link"><img src="http://naijafrontpage.hugeicon.com/path_to/image" border="0" alt="your choice" title="your choice" width="140" height="435" /></a>
Yes I tried that. I think I'll stick to not putting a banner on the header_1 and header_2 of this custom theme as it makes it looks ugly.

Nevertheless, I'm trying to add Random Side Banner with Add Banner Rotators on Blog Sidebar, but it's not working.

It doesn't show up the banner on the Blog Sidebar although the Blog Sidebar banners are active.

I've checked the position of the templates, the RBS and Advertisement positions. Everything looks OK. But the banner do not display in the Side Bar of Blog.

Please advise.
Reply With Quote
  #23  
Old 03-26-2014, 12:59 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I tried the positions you suggested and the banners appeared at the top of the page not the sides, not sure at all how the positioning of these works.
www.tooraktimes.com.au

Is there an explanation anywhere that tells you where all these positions directly relate to in the advertisinf grids on the site?
Reply With Quote
  #24  
Old 04-03-2014, 12:19 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Cheech! I was just working on this very thing! Now I don't have too.
Reply With Quote
  #25  
Old 04-07-2014, 08:36 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
Thanks Cheech! I was just working on this very thing! Now I don't have too.
Nice Richie ! Did it do the job for you?
Reply With Quote
  #26  
Old 03-23-2015, 11:55 AM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Cheech,

Can I get you to give me some help please, I can only get these to appear at the top of the skin mate
Reply With Quote
  #27  
Old 03-26-2015, 07:36 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which option did you use? A link to your site?
Reply With Quote
  #28  
Old 03-28-2015, 01:00 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
Which option did you use? A link to your site?
http://www.tooraktimes.com.au/conten...uide-Australia

I see the adds appearing above the header instead of beside the fixed skin
Reply With Quote
  #29  
Old 03-29-2015, 12:25 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the code at the top of your page ... you uploaded the files to your forum root and added the code to the header template and additional.css file?
Reply With Quote
  #30  
Old 10-05-2015, 10:05 AM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
I see the code at the top of your page ... you uploaded the files to your forum root and added the code to the header template and additional.css file?
I tried again today but it drops the ads above the Navbar on the same side. I believe I have done everything as required mate, I used the rotating banner option
Reply With Quote
  #31  
Old 10-06-2015, 12:57 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have a link to your site so I can take a look?
Reply With Quote
Reply

Thread Tools

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 03:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04610 seconds
  • Memory Usage 2,332KB
  • 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
  • (2)bbcode_code
  • (4)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)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