vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Add Banner Rotator Widget To CMS (https://vborg.vbsupport.ru/showthread.php?t=272725)

metalguy639 10-24-2011 10:00 PM

Add Banner Rotator Widget To CMS
 
1 Attachment(s)
THIS TEMPLATE EDIT BROUGHT TO YOU BY:

https://vborg.vbsupport.ru/
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.

macrocamaleon 12-31-2011 10:55 PM

Working great in 4.1.9

Thx for share...

Regards

Tri@de 04-06-2012 04:43 PM

Correction:
you wrote:
<div align="center">@vbbanners:4@</div><br />
is wrong.
have to be <div align="center"><!--@vbbanners:4@--></div><br />

metalguy639 04-09-2012 03:50 AM

Quote:

Originally Posted by Tri@de (Post 2317440)
Correction:
you wrote:
<div align="center">@vbbanners:4@</div><br />
is wrong.
have to be <div align="center"><!--@vbbanners:4@--></div><br />

Nope that is right if you are using vBSEO. As I said in the first post if you had read it all that code would be somewhat different for some than what I put there. But I will edit the original post and put that in there.

Tri@de 04-09-2012 08:24 AM

I'm not using vbseo.
Perhaps some other hack could change...

metalguy639 04-09-2012 08:55 PM

Quote:

Originally Posted by Tri@de (Post 2318258)
I'm not using vbseo.
Perhaps some other hack could change...


???? I changed the original instructions to reflect members not using vBSEO.

Tri@de 04-10-2012 04:28 AM

ok, but you are using it now?

metalguy639 04-10-2012 12:30 PM

Quote:

Originally Posted by Tri@de (Post 2318560)
ok, but you are using it now?

Not sure what that has to do with anything. The site I had it on is no longer available. But it did work just fine. If you are having an issue with it working properly let me know what problem you are having and I can help.

diyautoftw 05-16-2012 02:19 AM

Hey, I have a question.
I want to specify what ads go where by CMS section or catagory. Like if I have articles in the Food section I can specify articles to go there. Is this capable of doing that? Thanks!

metalguy639 05-17-2012 11:03 PM

Quote:

Originally Posted by diyautoftw (Post 2329761)
Hey, I have a question.
I want to specify what ads go where by CMS section or catagory. Like if I have articles in the Food section I can specify articles to go there. Is this capable of doing that? Thanks!

Sorry for the late reply. I suppose you could do that with the positions and several widgets. But it does not do it automatically.

hamdanikcung 05-28-2012 09:32 AM

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

metalguy639 05-28-2012 09:22 PM

The position numbers have to correspond with where you added banner in the hack. Please click installed to gain support.

Palmcone 06-03-2012 10:44 PM

Fast and easy. Works perfectly.

Thank you.

One question, how can I add a 3px border around the banners in the widget?

metalguy639 07-06-2012 12:41 AM

Quote:

Originally Posted by Palmcone (Post 2336305)
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.

doraj 07-26-2012 08:56 PM

Hello,

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

Thanks

metalguy639 07-27-2012 05:28 AM

Quote:

Originally Posted by doraj (Post 2351724)
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

tacklebox joe 03-14-2013 02:39 AM

?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

metalguy639 03-14-2013 02:48 AM

Quote:

Originally Posted by tacklebox joe (Post 2409854)
?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.

tacklebox joe 03-17-2013 10:08 PM

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!

metalguy639 03-18-2013 11:19 AM

Quote:

Originally Posted by tacklebox joe (Post 2410669)
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.

tacklebox joe 04-16-2013 08:25 PM

<a href="http://www.njfishreports.com" target="_blank">www.njfishreports.com</a>

metalguy639 04-16-2013 11:19 PM

Quote:

Originally Posted by tacklebox joe (Post 2416755)

Did you enable it for guests? I do not even see the forum block. So that tells me that you have not enabled the actual forum block in your admincp.

Toorak Times 06-11-2013 11:37 AM

Hi,

I installed this a while ago and haven't used, just going to start I'm pretty sure I have the up to date version. Is this all good to go in vB 4.2.1?

Judith2 06-11-2013 09:19 PM

Quote:

Originally Posted by Toorak Times (Post 2427331)
Hi,

I installed this a while ago and haven't used, just going to start I'm pretty sure I have the up to date version. Is this all good to go in vB 4.2.1?

Yes, it work with vb 4.2.1

d4rkm4nx99 01-08-2014 11:23 AM

update the vbulletin version i dont understen this tutorial.

metalguy639 01-20-2014 08:57 AM

Quote:

Originally Posted by d4rkm4nx99 (Post 2472964)
update the vbulletin version i dont understen this tutorial.

Sorry I no longer have time to upgrade anything within this.

CQ2 12-09-2016 08:13 PM

im relative new at this but im not locating this
vBulletin CMS>Widgets in my acp

The Realist 07-25-2017 04:40 PM

This might sound like a stupid question but where does this software pick up the banner from?

HM666 09-28-2017 01:47 AM

Quote:

Originally Posted by The Realist (Post 2588874)
This might sound like a stupid question but where does this software pick up the banner from?

You need to have the banner hack installed from the original post. The link is in the description. Then it grabs the banners from the hack once you add them.


All times are GMT. The time now is 06:27 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.01228 seconds
  • Memory Usage 1,805KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete