The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
I had a client who wanted a rotating logo system that allowed them to have fancy transitions and have each logo link to a specific page. No mod I could find allowed this so, utilizing a jQuery app called Nivo Slider, I've managed to create exactly what they wanted.
Please note that I've only attempted this with a fixed theme. I do not know how it will behave with a fluid one. If someone wants to test it and let me know I'll make changes to the instructions as necessary. DEMO Special Thanks: Lynne for helping me get the plug-in portion working properly. Requirement: Nivo Slider 1. Download and decompress the Nivo Slider archive. 2. Upload the files jquery.nivo.slider.pack.js and nivo-slider.css to your forums 'clientscript' folder. 3. Go to vB AdminCP --> Plugins & Products --> Plugin Manager --> Add New Plugin. Enter the following information: Product: vBulletin Hook Location: template_register_var Title: Nivo Logo Rotator Execution Order: 5 Plugin PHP Code: Code:
$templater = vB_Template::create('banner_rotator'); $templatevalues['banner_rotator'] = $templater->render(); vB_Template::preRegister('header', $templatevalues); 5. Go to vB AdminCP --> Styles & Templates --> Style Manager --> Add New Template. Enter the following information: Title: banner_rotator Template: Code:
<link rel="stylesheet" href="clientscript/nivo-slider.css" type="text/css" media="screen" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="clientscript/jquery.nivo.slider.pack.js" type="text/javascript"></script> <div id="slider"> <a href="your URL"><img src="link to your image file" /></a> </div> <vb:literal> <script type="text/javascript"> $(window).load(function() { var total = $('#slider img').length; var rand = Math.floor(Math.random()*total); $('#slider').nivoSlider({ effect:'random', slices:15, animSpeed:500, pauseTime:7000, startSlide:rand, directionNav:false, directionNavHide:true, controlNav:false, controlNavThumbs:false, controlNavThumbsFromRel:false, keyboardNav:true, pauseOnHover:true, manualAdvance:false, captionOpacity:0.8, beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){} }); }); </script> </vb:literal> 6. Save. 7. Edit the additional.css template. Add at the bottom: Code:
/* CSS for Banner_Rotator */ .banner_rotator #slider { position:relative; background:url(images/loading.gif) no-repeat 50% 50%; } #slider img { position:absolute; top:0px; left:0px; display:none; } #slider a{ display:block; } 9. Edit the header template. Find: Code:
<div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div> Code:
<div style="width:XXXpx; height:XXXpx;"> {vb:raw banner_rotator} </div> 10. Save. You should now have a rotating logo in the header of your vB forum. Version History 0.7: Added code at step 9 to help lock the header dimensions for your logo. 0.6: Fixed IE bug 0.5: Initial Release Show Your Support
|
Comments |
#52
|
|||
|
|||
![]() Quote:
http://i46.tinypic.com/14vnxp5.jpg |
#53
|
|||
|
|||
![]() Quote:
|
#54
|
||||
|
||||
![]()
is this working for 4.2?
|
#55
|
|||
|
|||
![]()
I've spent hours trying and failed miserably.
I would really appreciate it if anyone who has nailed this for 4.2 would mind sharing their success ![]() |
#56
|
|||
|
|||
![]()
While I don't really support the plug-in as I'm not a programmer by any means (had a lot of help from the community getting it working) I can say it does work with vB 4.2 PL1. That's what we run on our site and the plug-in works fine.
|
#57
|
|||
|
|||
![]() Quote:
I've just started again from the very beginning and I have the exact same problem. The problem for me seems still to be in the plugin as it kills my forum with the 503 error. Can you confirm the details of the hook location as I've tried the two you've suggested to no avail. Everything else seems fine and it just looks as though it's waiting on the details of the banner rotator in order to work. If you want to see choose the Rotator TNT67 style on my forum: twistsnturns.net and you'll see what I mean. When I get it working I will be using it where my normal banner is, and not in the header, but I'll sort that once it's working ![]() Thanks again for your time, Liffey |
#58
|
|||
|
|||
![]()
I run two sites and those are the took hook locations that work for me. It's possible another plug-in is causing a conflict. Not sure but, again, not a programmer so... *shrugs*
Not sure what else to tell you. Sorry. Have you tried this mod? |
#59
|
|||
|
|||
![]() Quote:
I'm kinda hoping someone else looking in might be able to explain what's going on.. I disabled a bunch of products I no longer use and got it working (Yay!) and then all of a sudden it stopped working in Chrome, but works fine in FF & Safari. I've cleared my cache etc.., in Chrome but nothing... Does anyone have any ideas as this is starting to drive me crazy ![]() http://twistsnturns.net Style: Slider TNT67 |
#60
|
|||
|
|||
![]()
[Edit] I seem to be getting somewhere.. When I use the 'Parse_Templates' as hook location it works fine on the forum listing page, but not within the forum.
I understand TC might not be able to do this but is there any way to bypass the plug-in requirement of this modification in order to make it work regardless? I do run a lot of mods on my forum and it's probable that one of them is clashing, but I'm very close to having this work and feel that just a little more and I'll be there ![]() [Edit again] OK.. When I disable the parse_templates plug in modification for the Chiplove thumbnails it works fine.. The code for his is a little more complicated than the one for this modification and I would love to run both.. Does anyone have any ideas? This is the code for the thumbnails hook in: PHP Code:
|
#61
|
||||
|
||||
![]()
it is working well for me in parse_templates, on vB 4.2 pl3
You can see it here - http://www.lonestarcamaro.com/forums/ |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|