X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Code for fading pictures in welcome page (https://forum.x-cart.com/showthread.php?t=36533)

antonywalsh 01-04-2008 07:24 PM

Code for fading pictures in welcome page
 
Does any one have some simple code to be about to do a fading slideshow on the main page that I can enter in a static page.

Many thanks

carpeperdiem 01-05-2008 05:34 AM

Re: Code for fading pictures in welcome page
 
I've always liked http://www.jeroenwijering.com/?item=JW_Image_Rotator

antonywalsh 01-05-2008 05:53 AM

Re: Code for fading pictures in welcome page
 
Sorry maybe I did not explain right, I just want a series of 3 or 4 pictures that fade from 1 to another, not a customer controlled slideshow.

Thanks

PhilJ 01-05-2008 06:12 AM

Re: Code for fading pictures in welcome page
 
1 Attachment(s)
Here's one which uses jquery (see attached), can't quite remember where I found it...

PhilJ 01-05-2008 06:40 AM

Re: Code for fading pictures in welcome page
 
Another one - http://medienfreunde.com/lab/innerfade/

balinor 01-05-2008 07:34 AM

Re: Code for fading pictures in welcome page
 
I use this one a lot (the second image is optional):

http://dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

antonywalsh 01-05-2008 08:49 AM

Re: Code for fading pictures in welcome page
 
I hate to ask this and probably know the answer, is it a case of just cut and paste in the code. I have done this and it has come up with error, error, error.

Does this code have to be modified to be able to work? more than just the filenames of the images to be displayed?

antonywalsh 01-05-2008 09:05 AM

Re: Code for fading pictures in welcome page
 
This is the error that I am getting displayed.

Error: Smarty error: [in ./pages/US/welcome.html line 34]: syntax error: unrecognized tag: this.pausecheck=pause this.mouseovercheck=0 this.delay=delay this.degree=10 //initial opacity degree (10%) this.curimageindex=0 this.nextimageindex=1 fadearray[fadearray.length]=this this.slideshowid=fadearray.length-1 this.canvasbase="canvas"+this.slideshowid this.curcanvas=this.canvasbase+"_0" if (typeof displayorder!="undefined") theimages.sort(function() {return 0.5 - Math.random(); (Smarty_Compiler.class.php, line 436) in /home/www/antonywalsh/pinkandcream.com/docs/Smarty-2.6.12/Smarty.class.php on line 1095

balinor 01-06-2008 10:36 AM

Re: Code for fading pictures in welcome page
 
You need to surround JavaScript with {literal} tags, so Smarty doesn't try to read it:

{literal}

JavaScript here

{/literal}

antonywalsh 01-06-2008 01:21 PM

Re: Code for fading pictures in welcome page
 
Ok. And does that mean put {literal} at the beginning and then {/literal} at the end of the whole thing?

Or just in the body part or head part or just where it says <script type="text/javascript">?

Many thanks for your help.

balinor 01-07-2008 04:18 AM

Re: Code for fading pictures in welcome page
 
You need to surround anything that has javascript IN the code. If it references an external file you don't have to worry about it, but if the code is in the template, you need to surround the whole thing with the tags.

antonywalsh 01-07-2008 03:27 PM

Re: Code for fading pictures in welcome page
 
Thanks I got the pictures to show but how do I get rid of showing the {literal} tags on the screen at the top and the bottom?

balinor 01-07-2008 03:48 PM

Re: Code for fading pictures in welcome page
 
You mean in the code? Or are they actually showing on the site?

antonywalsh 01-11-2008 10:22 AM

Re: Code for fading pictures in welcome page
 
Thanks Balinor got it working and it looks great, thankyou so much for your help. Without you the x-cart standard template would be very boring.

ARW VISIONS 07-20-2008 05:16 PM

Re: Code for fading pictures in welcome page
 
Quote:

Originally Posted by balinor
I use this one a lot (the second image is optional):

http://dynamicdrive.com/dynamicindex14/fadeinslideshow.htm


what is the second image for?

balinor 07-20-2008 07:01 PM

Re: Code for fading pictures in welcome page
 
You can have two images fading in and out at once.


All times are GMT -8. The time now is 02:58 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.