Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #42  
Old 05-03-2016, 12:25 PM
deltamarkets deltamarkets is offline
 
Join Date: Apr 2016
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

We are the new oweners of a vbulletin board. I try install your mod but I m stuck in uploading the xml file. Can you or someone help me with this?
Reply With Quote
  #43  
Old 05-03-2016, 12:49 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

There is no xml file for this mod ....
Reply With Quote
  #44  
Old 05-03-2016, 02:57 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
Go ahead and handle business Mark ... release it for all to enjoy my Man ...
I wanted you to retain authorship of this, since you put everything together. I have simply taken your work and made it into a product, where no manual template edits are needed.

The user has the option to disable it, and to define the dimensions of the banners, and the margins between the banners and the body.

Please review this, let me know of any changes you would like, and then when you are happy with it, release it as a mod rather than a template modification.
Attached Files
File Type: zip CAG Cheechdogg - Random Side Banners v1.0.zip (68.0 KB, 5 views)
Reply With Quote
Благодарность от:
CAG CheechDogg
  #45  
Old 05-03-2016, 07:13 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 MarkFL View Post
I wanted you to retain authorship of this, since you put everything together. I have simply taken your work and made it into a product, where no manual template edits are needed.

The user has the option to disable it, and to define the dimensions of the banners, and the margins between the banners and the body.

Please review this, let me know of any changes you would like, and then when you are happy with it, release it as a mod rather than a template modification.
Did you put the option to use this mod as well so that they could use it more easily?

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

So they could do the following?

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>
Reply With Quote
  #46  
Old 05-03-2016, 09:17 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I didn't know about that...I just used the HTML from the first post in the thread. It looks like an HTML comment, so I could simply add it to the HTML already being added, and it they need it it's there, if not it doesn't hurt anything...right?
Reply With Quote
  #47  
Old 05-03-2016, 09:35 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In order to offer the greatest flexibility, I added two settings, consisting of textareas into which the user can enter the exact HTML they want for the left and right banners. The default values are what you have given in your first post, and then they can add to that or edit it as they see fit.
Attached Files
File Type: zip CAG Cheechdogg - Random Side Banners v1.0.zip (68.1 KB, 23 views)
Reply With Quote
  #48  
Old 06-09-2017, 12:02 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this modification is going to allow me to re-design the look of my site entirely

Love this!
Reply With Quote
Благодарность от:
CAG CheechDogg
  #49  
Old 06-11-2017, 07:50 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

Glad you like it ... post your site's link so we can see the before and after ... if you don't mind that is lol ...
Reply With Quote
  #50  
Old 06-23-2017, 01:27 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will do - I have start work on my dev enviroment

dev.sportscardforum.com - still needs work in order to get it ready to move over...
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:44 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.05128 seconds
  • Memory Usage 2,349KB
  • Queries Executed 27 (?)
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
  • (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
  • (10)post_thanks_box
  • (7)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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