![]() |
FREE Banner Rotator with Links
Hi Guys,
I found this very useful banner rotator online and thought the right thing to do would be to share it. Useful things about this banner rotator: - Your banners do not all have to be the same size as it allows you to specify a background and you can set the background to be the size of your largest banner. - You can have as many banners as you like and you can specify where they link to. - You can set the cycles of your rotator for as many times as you want or you can just set it continuous. - You can set the rotator to randomize your banners or have them display in order. - You can also set the time before the next banner must display. - You can set it to pre-load all your banners or not. **Hope someone would find this useful, you can display it anywhere on your site or even within a language variable. Quote:
|
Re: FREE Banner Rotator with Links
Nice:
Yea I use to use this script, think it was on Dynamic drive, when I was on asp server. It use to work well.. |
Re: FREE Banner Rotator with Links
You have no idea how long I have searched online to find it! All I was really interested in was the clickable links because you can have all your manufacturer logo's rotate in a banner with links to that manufacturers products and it does not slow your site down either not even if the image pre load is activated
Quote:
|
Re: FREE Banner Rotator with Links
Lol..........Glad you got what you wanted, BTW was it the one from Dynamicdrive?
|
Re: FREE Banner Rotator with Links
Almost sure it was, but it was freeware and that's ok with me...lol
Still not sure where I will use it on my site, done some testing with it and must say no problems there Quote:
|
Re: FREE Banner Rotator with Links
I'm looking for banner rotation script for affiliate banners, to limit the number of banners visible to the customers at any one time to 2.
I've tried this script for rotating those affiliate banners but it doesn't show. Has anyone tried it successfully with affiliate links? |
Re: FREE Banner Rotator with Links
Quote:
Have not tried it for what you are trying to do, but. I would use something like ad http://www.adpeeps.com/ I have always used it, It has lots of functions for what you need, takes a while to get use to but works very well (Yep it's paid for) But well worth the money. Another one I am just getting use to is this > http://www.flashxml.net/banner-rotator.html And this one has different possibilities, The only downfall is that it's caching images, so any changes to your images and the user has to clear there cache for new changes to take place, but the Author, has fixed this for my file. I hope this helps you a little, your best option is adpeeps, Give it a try, there is a trial... |
Re: FREE Banner Rotator with Links
Hi,
I tried to use the script on my welcome.tpl page and did not work. Any ideas why? |
Re: FREE Banner Rotator with Links
Quote:
Which one did you try? The one I suggested? |
Re: FREE Banner Rotator with Links
This is the code I entered in my welcome.tpl and it failed...
<script type="text/javascript"> var ultimateshow=new Array() //ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"] ultimateshow[0]=['http://www.bellabeachwear.com/skin1/images/customer_images/welcome-slides-1.jpg', 'http://www.bellabeachwear.com/offers.php?mode=offer&offerid=11', '_self'] ultimateshow[1]=['http://www.bellabeachwear.com/skin1/images/customer_images/welcome-slides-2.jpg', 'http://www.bellabeachwear.com/pages.php?pageid=24', '_self'] ultimateshow[1]=['http://www.bellabeachwear.com/skin1/images/customer_images/welcome-slides-3.jpg', 'http://www.bellabeachwear.com/all-brazilian-bikinis-thong-and-micro-bikinis/', '_new'] //ultimateshow[3]=['image3.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[4]=['image4.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[5]=['image5.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[6]=['image6.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[7]=['image7.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[8]=['image8.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[9]=['image9.gif', 'http://www.linkhere.com', '_new'] //ultimateshow[10]=['image10.gif', 'http://www.linkhere.com', '_new'] //configure the below 3 variables to set the dimension/background color of the slideshow var slidewidth="550px" //set to width of LARGEST image in your slideshow var slideheight="275px" //set to height of LARGEST iamge in your slideshow var slidecycles="continuos" //number of cycles before slideshow stops (ie: "2" or "continous") var randomorder="yes" //randomize the order in which images are displayed? "yes" or "no" var preloadimages="yes" //preload images? "yes" or "no" var slidebgcolor='white' //configure the below variable to determine the delay between image rotations (in miliseconds) var slidedelay=3000 ////Do not edit pass this line//////////////// var ie=document.all var dom=document.getElementById var curcycle=0 if (preloadimages=="yes"){ for (i=0;i<ultimateshow.length;i++){ var cacheimage=new Image() cacheimage.src=ultimateshow[i][0] } } var currentslide=0 function randomize(targetarray){ ultimateshowCopy=new Array() var the_one var z=0 while (z<targetarray.length){ the_one=Math.floor(Math.random()*targetarray.lengt h) if (targetarray[the_one]!="_selected!"){ ultimateshowCopy[z]=targetarray[the_one] targetarray[the_one]="_selected!" z++ } } } if (randomorder=="yes") randomize(ultimateshow) else ultimateshowCopy=ultimateshow function rotateimages(){ curcycle=(currentslide==0)? curcycle+1 : curcycle ultcontainer='<center>' if (ultimateshowCopy[currentslide][1]!="") ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">' ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">' if (ultimateshowCopy[currentslide][1]!="") ultcontainer+='</a>' ultcontainer+='</center>' if (ie||dom) crossrotateobj.innerHTML=ultcontainer if (currentslide==ultimateshow.length-1) currentslide=0 else currentslide++ if (curcycle==parseInt(slidecycles) && currentslide==0) return setTimeout("rotateimages()",slidedelay) } if (ie||dom) document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+' ; background-color:'+slidebgcolor+'"></div>') function start_slider(){ crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom rotateimages() } if (ie||dom) window.onload=start_slider </script> |
Re: FREE Banner Rotator with Links
For some reason the code will not work if you have any other Java script on the same page as they seem to conflict with each other.
Secondly, what I did was to create a language variable and then place the code in the variable and then just call the variable where you want the banner rotator to display Create a variable lbl_banner_rotator Place the below code where you want the banner rotator to display {$lng.lbl_banner_rotator} Also ensure that your image path ways are specified correctly |
Re: FREE Banner Rotator with Links
I created a language variable and added the {$lng.lbl_banner_rotator} to my welcome.tpl. it shows on my page source, but does not work. may be because i have other JS on the same page...
:-( |
Re: FREE Banner Rotator with Links
Try to put {$lng.lbl_banner_rotator} on another page just to check if it works, even if you have to create a temp static page just for testing purposes. If it does then it confirms that you had conflict with other JS. If it still not working then your issue lies elsewhere
|
Re: FREE Banner Rotator with Links
I tried into another static page and still does not work. I added a text label before just to see if it shows on the static page and it does show, but it does not show the images after the text...
|
Re: FREE Banner Rotator with Links
Try to put the full code not {$lng.lbl_banner_rotator} in a static page and if it still does not work then it is definitely a conflict with JS
|
Re: FREE Banner Rotator with Links
Quote:
:-). Now it works. BTW. MUST Install in the welcome.tpl or any other tpl file. not in the language section |
Re: FREE Banner Rotator with Links
Well spotted! I have tried to edit my post but the WYSIWYG editor in this forum displays it without the space. Not sure I understand why this space appears.
A forum moderator should maybe look into this? |
Re: FREE Banner Rotator with Links
Got this working using your language variable idea, and removing the space in "length" :)
Thanks for this! |
Re: FREE Banner Rotator with Links
Glad you are sorted! Like your site by the way, looking good!
BellaBeachwear spotted the space in "length", although I did try and edit my post to fix it but the WYSIWYG in this forum is not having it for some reason? Regarding language variables, I always try and test most code in them first because it makes it so much easier to modify things. You will notice that they are handy for allot of things e.g. if you look on my site you will see on my left and right hand side columns I have a string of banners. These banners are placed in 2 language variables, one named lbl_left_column and lbl_right_column. This makes life so much easier if you wish to change your banners because instead of trying to remember which tpl to edit you just keep record of all your language variables and BOB's YOUR UNCLE! |
Re: FREE Banner Rotator with Links
Dan,
I tried the code (fixing the space in length issue) and placed it on a static page to get it working before I add it to my welcom page, but I consisatntly get a syntax error in the same spot. In the code I have (as per youtr post): if (preloadimages=="yes"){But in the source code when the page loads all it has is: if (preloadimages=="yes")}Which the creates a syntax error on floating "}". I have tried retyping these sections add, subtracting, etc. But still nothing is showing up in the source code. Have you seen anything like this before or have any ideas? Thanks Chris |
Re: FREE Banner Rotator with Links
Chris
I'm afraid this is new to me. I have no idea how to sort this issue. Have you tried placing the code direct into the tpl where you want the banner to display without making use of a language variable? |
Re: FREE Banner Rotator with Links
I figured it out, you need to wrap {literal}{/literal} around any code that includes braces - I did that with all the code within {'s and the banner worked perfectly in my static pages.
I cant' get it to work on my welcome page yet because of some conflict with other javascript on the page - but I'm trying to work that out. Cheers, Chris |
Re: FREE Banner Rotator with Links
I resolved the conflicts - it relates to the window.onload function - you can only have one of these. I found the following code that works perfectly in stacking the onloads into a single command. If you replace all your onloads on a page with this function it works perfectly with multiple JS:
CODE function addOnloadEvent(fnc){ if ( typeof window.addEventListener != "undefined" ) window.addEventListener( "load", fnc, false ); else if ( typeof window.attachEvent != "undefined" ) { window.attachEvent( "onload", fnc ); } else { if ( window.onload != null ) { var oldOnload = window.onload; window.onload = function ( e ) { oldOnload( e ); window[fnc](); }; } else window.onload = fnc; } } Example: CODE addOnloadEvent(myFunctionName); // Or to pass arguments addOnloadEvent(function(){ myFunctionName('myArgument') }); |
Re: FREE Banner Rotator with Links
Hey everybody,
I have this useful little program working on my site at the moment.... www.everten.com.au . And it works but seems to load really really slowly. Anybody know if this is normal or there is something wrong. Cheers |
Re: FREE Banner Rotator with Links
If anyone is still having problems with this, I fixed mine due to the gap between the "t" and the "h" in the word "length" in the middle of the script!
|
Re: FREE Banner Rotator with Links
I am realy desperate for this banner, I copied the code into my welcome.tpl and I deleted the space that caused the issue, but it did not work, I got:
Error: Smarty error: [in customer/main/welcome.tpl line 48]: syntax error: unrecognized tag 'for' (Smarty_Compiler.class.php, line 590) in /home/easyqura/public_html/include/lib/smarty/Smarty.class.php on line 1093 Anyone can help? please? |
Re: FREE Banner Rotator with Links
YOu have to surround the script code with {litral} code here {/literal}
|
Re: FREE Banner Rotator with Links
Thanks for the reply Steve, but it did not work, same error again, any idea?
If you are aware of a working up to date rotating banner I would realy appreciate if you give me a link, thanks! |
Re: FREE Banner Rotator with Links
Then you are doing somehting wrong.
Tons of image rotators - just google "jquery image rotator" for example and you will get a lot of them |
Re: FREE Banner Rotator with Links
I was told that the smarty code needs modification to get it to work. Thanks
|
Re: FREE Banner Rotator with Links
Quote:
Smarty is telling you the problem.. somewhere in the .tpl (on line 48 ) there is a "for" statement that isn't recognized. It may or may not have anything to do with the code that was added. |
Re: FREE Banner Rotator with Links
Just wanted to share a modification I made - so that the slideshow was FLUID WIDTH:
1. Created a new language label: lbl_banner_rotator and added the code from the original post (deleted space in "length") 2. placed a div tag around the code in the language label: Code:
<div id="slideshow"> 3. Added the following CSS to my altskin.css file: Code:
#slideshow { 4. In /common_files/customer/main/welcome.tpl I placed this: Code:
{$lng.lbl_banner_rotator} just before this: Code:
{$lng.txt_welcome}<br /> I'm using XCART 4.4.3 - www.sanjuansports.com/index.php |
Re: FREE Banner Rotator with Links
Quote:
Looks good Dan, Just not sure how to embed this? Can you tell me how to embed it right where the welcome_image.jpg is? v 4.5 |
Re: FREE Banner Rotator with Links
hi.... On what page do i stick the block of code?
|
All times are GMT -8. The time now is 03:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.