I use the blank_sidebox 2.0
My arborescence :
Code:
> /www
> /includes
> /templates
> /classic
> /jscript/jscript_slide.js
> /sideboxes/tpl_blank_sidebox.php
> /images
> /slideshow/pub_concours.jpg et pub_sondage.jpg
jscript_slide.js
Code:
> NewImg = new Array (
> new Array("/includes/templates/classic/images/slideshow/pub_concours.jpg",
> "http://www.bricoleurre.com/atelier/viewtopic.php?id=299"),
> new Array("/includes/templates/classic/images/slideshow/pub_sondage.jpg",
> "http://www.bricoleurre.com/index.php?main_page=peinture"),
> //new Array("/images/slideshow/3.gif", "link3")
> );
> var ImgNum = 0;
> var ImgLength = NewImg.length - 1;
>
> //Time delay between Slides in milliseconds
> var delay = 1000;
>
> var lock = false;
> var run;
> function chgImg(direction) {
> if (document.images) {
> ImgNum = ImgNum + direction;
> if (ImgNum > ImgLength) {
> ImgNum = 0;
> }
> if (ImgNum < 0) {
> ImgNum = ImgLength;
> }
> document.getElementById('slideshowImg').src = NewImg[ImgNum][0];
> document.getElementById('slideshowLink').href = NewImg[ImgNum][1];
> }
> }
>
> function auto() {
> if (lock == true) {
> lock = false;
> window.clearInterval(run);
> }
> else if (lock == false) {
> lock = true;
> run = setInterval("chgImg(1)", delay);
> }
> }
>
> auto();
tpl_blank_sidebox.php
Code:
> <?php
> /**
> * blank sidebox - allows a blank sidebox to be added to your site
> *
> * @package templateSystem
> * @copyright 2007 Kuroi Web Design
> * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
> * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
> * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
> */
>
> $content = '';
> $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '"
> class="sideBoxContent">';
> $content .= '<script type="text/javascript" language="javascript"
> src="/includes/templates/classic/jscript/jscript_slide.js"></script>';
> $content .= '<a
> href="http://www.bricoleurre.com/atelier/viewtopic.php?id=299"
> id="slideshowLink"><img
> src="/includes/templates/classic/images/slideshow/pub_concours.jpg"
> width="117px" height="252px" id="slideshowImg"/></a>';
> $content .= '</div>';
> ?>
My slideshow don't work, only first image is shown.
Bookmarks