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
  #12  
Old 11-22-2012, 09:43 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

Quote:
Originally Posted by legiondadon View Post
the issue i was having with this is when members had a zoomed in browser...the images wouldnt zoom with the rest of the forum and caused them to overlap over forum content for sum members...had to disable although this is a great idea
Hey legion easy fix for that. Use the following in your additional.css instead:

Code:
div.left-banner {
 
display:block;
height:435px;
width:140px;
position:fixed;
left:5px;
top:50px;
z-index:-1000
}
div.right-banner {

display:block;
height:435px;
width:140px;
position:fixed;
right:5px;
top:50px;
z-index:-1000;
}
The z-index:-1000 will make the banners sit behind your forum's content when zoomed in.
Reply With Quote
  #13  
Old 12-06-2012, 01:49 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Genius! I have the RBs installed, but had some crashes and trying to rebuild. Seriously...this will allow rotating ads in the spaces of the fixed themes? Have I got this right? Does it work in 4.2pl3?
Reply With Quote
  #14  
Old 12-07-2012, 07:45 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

Yes it should work with 4.2...and yes It will allow the rotating adds if you use the mod I listed in the description, here is the link:


https://vborg.vbsupport.ru/showthrea...mages&page=137

If you need help installing it or if you are still having problems let me know.
Reply With Quote
  #15  
Old 03-12-2013, 02:48 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply, I lost the thread...

I'm going to put this into action shortly for paid ads on www.tooraktimes.com.au
Reply With Quote
  #16  
Old 07-29-2013, 03:47 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Liked CAG CheechDogg, Awesome Product, and Congrats Mate! Sadly I am not allowed to VOTE. But from 4 to 5 Stars for your work and support for your product..

I was just checking who gave me the last LIKE on my Product, And ofcourse it was from you, Once again! You are one of the greatest and honest members on here, and now as a Developer I congratulate you with your first and awesome Product! Just as you have showen your support towards myself and everyone else on here, I am now here to show my gratitude and support for your awesome work and great attitude along the time we been members on here! Good luck!

Ps, Hopefully you will be creating a few vB3.8 Products too! I mean not many are using vB3.8, but I do and I know many others does at well! Keep up your good work! And God bless!

By CM aka ChiNa-Man
Reply With Quote
Благодарность от:
CAG CheechDogg
  #17  
Old 03-22-2014, 12:25 PM
aaronhaul aaronhaul is offline
 
Join Date: Mar 2014
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
For easier banner management you guys can use the following Mod together with this one:

https://vborg.vbsupport.ru/showthrea...mages&page=137

This will allow you to set up to 10 different banners per side. To do this you do the following:

Open up your header template and do the following small edit if you already installed this Mod:

Find this:

Code:
<div class="left-banner"></div>
<div class="right-banner"></div>
Replace with this:

Code:
<div class="left-banner"><!--@vbbanners:0@--></div>
<div class="right-banner"><!--@vbbanners:2@--></div>
Note, there are 10 positions for the banners starting with 0 through 9, the 2 positions I used here are position 0 for the left side banners and position 2 for the right side banners. You can use any position you want for yours, just replace the red highlighted numbers with your positions.

This also gives you a better rotation of the your banners than using the left_banner_rotate.php and right_banner_rotate.php files, so you can remove those from your additional.css.


Change the code in additional.css to the following:

Code:
div.left-banner {
display:block;
height:435px;
width:140px;
position:fixed;
left:5px;
top:50px;
}
div.right-banner {
display:block;
height:435px;
width:140px;
position:fixed;
right:5px;
top:50px;
}
Thank you for the "Random Side Banners Outside Main Body in Fixed Position". I have installed and it worked for just a second there with the use of the images you provided for the left and right fixed position. Then it no longer displays. Don't know why. I checked and double checked to make sure everything is ok.

After installing the above Random Side Banners, I also installed the Rotating Banner System v2.4.2 to rotate the banners as you indicated in your later post with left-banner and right banner images and the div tags:

<div class="left-banner"><!--@vbbanners:0@--></div>
<div class="right-banner"><!--@vbbanners:1@--></div>

Can you help me check what am missing out and why its not working as expected? Is it possible that there is a conflict with

I will really appreciate your effort.

Thanks.
Reply With Quote
  #18  
Old 03-23-2014, 02:42 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

A link to your site ? ..

Possible conflict with what? ...

Are you sure the banners are on those positions you indicated ? ...
Reply With Quote
  #19  
Old 03-23-2014, 03:07 AM
aaronhaul aaronhaul is offline
 
Join Date: Mar 2014
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
A link to your site ? ..

Possible conflict with what? ...

Are you sure the banners are on those positions you indicated ? ...
Hello,

Yes, the banners are on both the left and right positions as I have followed your directions closely.

But I do not know whether I mistakenly broke something or some of the scripts conflicting.

Please help me check?

I'm sending you a Link to the Website including Logging Information via my inbox.

Thanks a lot.
Reply With Quote
  #20  
Old 03-23-2014, 04:27 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

Ok buddy, I got it going ...now all you have to do is add more banners to the positions that you have in the banner rotator, follow the examples for the ones you have now ....

Right now you only have the image I use for the template, but you can replace that with what ever images you upload to any folder, just make sure they are the dimensions you specify ...
Reply With Quote
  #21  
Old 03-23-2014, 04:35 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

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>
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 02:05 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.04600 seconds
  • Memory Usage 2,354KB
  • Queries Executed 28 (?)
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
  • (6)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (6)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
  • (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_postinfo_query
  • fetch_postinfo
  • 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