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

Reply
 
Thread Tools
Add Banner Rotator Widget To CMS Details »»
Add Banner Rotator Widget To CMS
Version: 1.00, by metalguy639 metalguy639 is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.1.3 Rating:
Released: 10-24-2011 Last Update: Never Installs: 43
Template Edits
 
No support by the author.

THIS TEMPLATE EDIT BROUGHT TO YOU BY:


www.skinsnstyles.com

First if you plan on using this hack you must download & install y2Ksw's Banner Rotator hack found here: https://vborg.vbsupport.ru/showthread.php?t=188328. This little mod is only for use with that hack.

CLICK INSTALLED TO GET SUPPORT FOR THIS ADD-ON. IF YOU DO NOT CLICK INSTALLED I CANNOT HELP YOU.

Here is a simple way to add your banners in a CMS widget.

You will need to create a PHP Execution by doing the following:

Step 1:

1. In the admincp go to vBulletin CMS>Widgets
2. Click on "Create New Widget" at the bottom.
3. Choose "PHP Direct Execution" in the Widget Type drop down at the top.
4. Give your widget a title - do not make it too long as your box will be whatever size you have in your CMS.
5. Now click the "Save" button.

Step 2:

1. Go to vBulletin CMS>Widgets and select the widget you just made.
2. Click on the "Configure" link all the way to the right.
3. Delete all the test inside the box when it pops up.
4. Place this code in the box:

Code:
$templater = vB_Template::create('banner_sidebar');
$output = $templater->render();
5. Now click the "Save" button.

Step 3:

1. Go to Styles & Templates>Style Manager click the drop down box on the right side and choose "Add New Template".
2. In the "Title" box put "banner_sidebar" without the quotes.
3. Now in the large box below place your code for your banners like you would any other template. For instance I put this:

vBSEO ONLY!!!

Code:
<div align="center">@vbbanners:4@</div><br />
<div align="center">@vbbanners:5@</div><br />
<div align="center">@vbbanners:6@</div><br />
<div align="center">@vbbanners:7@</div><br />
<div align="center">@vbbanners:8@</div><br />
<div align="center">@vbbanners:9@</div>
I'm using vBSEO so that is why it may look different from yours.

If you are not using vBSEO it will look like this:

NOT USING vBSEO!!!!

Code:
<div align="center"><!--@vbbanners:4@--></div><br />
<div align="center"><!--@vbbanners:5@--></div><br />
<div align="center"><!--@vbbanners:6@--></div><br />
<div align="center"><!--@vbbanners:7@--></div><br />
<div align="center"><!--@vbbanners:8@--></div><br />
<div align="center"><!--@vbbanners:9@--></div>
4. Now click the "Save" button.

Step 4:

1. Enter your banner info using the positions that you put code to in your new template and save the banners.

Screenshots

File Type: png cmsbanners.png (9.1 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
fxdigi-cash, RichieBoy67

Comments
  #12  
Old 05-28-2012, 09:32 AM
hamdanikcung hamdanikcung is offline
 
Join Date: May 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't get it, I already follow the tutorial
and when I add the banner, only shown in add selector the page i can put the banner
(Achieve, blog sidebar, blog middle, blog entry and etc )
in the tutorial
Enter your banner info using the positions that you put code to in your new template and save the banners. in where ??
i using the 4.1.12 vbulletin
Reply With Quote
  #13  
Old 05-28-2012, 09:22 PM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The position numbers have to correspond with where you added banner in the hack. Please click installed to gain support.
Reply With Quote
  #14  
Old 06-03-2012, 10:44 PM
Palmcone Palmcone is offline
 
Join Date: Mar 2012
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fast and easy. Works perfectly.

Thank you.

One question, how can I add a 3px border around the banners in the widget?
Reply With Quote
  #15  
Old 07-06-2012, 12:41 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Palmcone View Post
Fast and easy. Works perfectly.

Thank you.

One question, how can I add a 3px border around the banners in the widget?
Sorry I did not get a notification on this topic that you had posted. In the case of adding a 3px border around each ad you would need to change up the code a bit to include some css. So your code would look something like this instead of the default code already presented in the thread:

Code:
<div align="center" style="border:3px solid #000000;"><!--@vbbanners:4@--></div>
Do that for each banner and change the hex color number "#000000" to the desired hex color number you want. You can find lists of hex colors just by doing a google search. You will be adding the red portion of the code to the code you have already in your template.
Reply With Quote
  #16  
Old 07-26-2012, 08:56 PM
doraj doraj is offline
 
Join Date: Nov 2005
Location: Italy
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

is possible use the Hack as Forum Sidebar instead on the CMS?

Thanks
Reply With Quote
  #17  
Old 07-27-2012, 05:28 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by doraj View Post
Hello,

is possible use the Hack as Forum Sidebar instead on the CMS?

Thanks
Yes you use the same code it should work just fine.

Instructions on adding this to the forum blocks sidebar can be found here: https://vborg.vbsupport.ru/showthread.php?t=285991
Reply With Quote
  #18  
Old 03-14-2013, 02:39 AM
tacklebox joe's Avatar
tacklebox joe tacklebox joe is offline
 
Join Date: Feb 2013
Location: New Jersey
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

?help a newbie, i have installed this butnow iam stuck on how toinsert a banner.....i can see the widget in my cms...how do i add the banner...in the code? befor, after postion number?
thanks joe
Reply With Quote
  #19  
Old 03-14-2013, 02:48 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tacklebox joe View Post
?help a newbie, i have installed this butnow iam stuck on how toinsert a banner.....i can see the widget in my cms...how do i add the banner...in the code? befor, after postion number?
thanks joe
Help for placing banners is found here: https://vborg.vbsupport.ru/showthread.php?t=188328 You use the same code as you would anywhere else on the forum. That is within the banner hack that you need help. There was good documentation that comes with the banner hack when its installed there is a PDF that you can refer to on how to use the hack.
Reply With Quote
Благодарность от:
tacklebox joe
  #20  
Old 03-17-2013, 10:08 PM
tacklebox joe's Avatar
tacklebox joe tacklebox joe is offline
 
Join Date: Feb 2013
Location: New Jersey
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry metal, i've did everything to the book and read the pdf file but still can not get my banners to show in the widget i created. i put the banners in positions 4,5,6 etc.....nothing showing....what did i do wrong? thanks!
Reply With Quote
  #21  
Old 03-18-2013, 11:19 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tacklebox joe View Post
sorry metal, i've did everything to the book and read the pdf file but still can not get my banners to show in the widget i created. i put the banners in positions 4,5,6 etc.....nothing showing....what did i do wrong? thanks!
What is you url to the site you are trying to get it working on? I'll have a look and see if I can tell what the issue may be. Make sure that Guest can see the widget box for the banners.
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 01:41 AM.


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.06045 seconds
  • Memory Usage 2,326KB
  • 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
  • (4)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (3)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
  • (1)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