Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Just cant get dynamicDrive scripts to work

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-26-2010, 09:07 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Angry Just cant get dynamicDrive scripts to work

I have been struggling to get the dynamic drive scripts from working on my portal on 4.2.2 x-cart pro.

The script in question is located at -
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

I have followed all instructions of using {literal} and {\literal} before and after the scripts which need to be placed in the <head> section of customer/home.tpl

I get no errors at all and I can't see the image transition on my portal.

I am still debugging, but just can't seem to see what is wrong.

Can you please guide me as to what I could be missing?

Here is an excerpt from the home.tpl file:
Quote:
<head>
{include file="customer/service_head.tpl"}
{literal}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="{$SkinDir}/fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [180, 300], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["ad_banner_images/ad_banner53.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["ad_banner_images/ad_banner56.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})


var mygallery2=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
["http://i30.tinypic.com/531q3n.jpg"],
["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
],
displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: "fadeshow2toggler"
})
</script>
{/literal}
</head>


Any help from you guys is greatly appreciated.

Thanks so much for your time.
__________________
X-Cart: 4.2.1
Reply With Quote
  #2  
Old 02-26-2010, 09:28 AM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Re: Just cant get dynamicDrive scripts to work

There is a line in the code that says:
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow

Do you have a blank div on your home page? Something similar to:

<div id="fadeshow1"></div>

This is required, since that defines where the slideshow appears. That's the best I can do without a link.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #3  
Old 02-26-2010, 09:55 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

Where exactly is your > fadeslideshow.js ?
can you name the folder
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #4  
Old 02-26-2010, 09:55 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Originally Posted by jdiehl
There is a line in the code that says:
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow

Do you have a blank div on your home page? Something similar to:

<div id="fadeshow1"></div>

This is required, since that defines where the slideshow appears. That's the best I can do without a link.

Thanks so much for taking the time to read through and replying so promptly.

I have added <div id="fadeshow1"></div> such that the image transition appears in the right hand section right above the news.

Just a thought, but is this related to $SkinDir not available in the javascript section, which I have used to fetch the custom javaScript?
__________________
X-Cart: 4.2.1
Reply With Quote
  #5  
Old 02-26-2010, 10:01 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Originally Posted by gizmo
Where exactly is your > fadeslideshow.js ?
can you name the folder

It's located here- \xcart\skin1\fadeslideshow.js

In Firebug, I can see that this JavaScript is NOT even loaded in the Script section. So may be its unable to find this script. Using the path as - "\xcart\skin1\fadeslideshow.js" also doesn't work.
__________________
X-Cart: 4.2.1
Reply With Quote
  #6  
Old 02-26-2010, 10:13 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

Trying to help, can you give me exact url of script I will test it on my local machine.
That is url from dynamicdrive.

Maybe better for me to see how it operates
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #7  
Old 02-26-2010, 10:14 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Just cant get dynamicDrive scripts to work

Anything within {literal}{/literal} is not interpreted by Smarty. You normally put this around code that has snytax (like javascript) that smarty also uses.

So - smarty will not interpret a variable inside {literal} and {/literal} tags. So - $SkinDir will not be interpreted. You can hardcode the path to the files in question or take the {literal} after where you are using the variable.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #8  
Old 02-26-2010, 10:18 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

Just realised after gb2worlds post like he said.
You have literal start tag calling the scripts, so it should be
<head>
{include file="customer/service_head.tpl"}

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="{$SkinDir}/fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>
{literal}
<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [180, 300], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["ad_banner_images/ad_banner53.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["ad_banner_images/ad_banner56.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})


var mygallery2=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
["http://i30.tinypic.com/531q3n.jpg"],
["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
],
displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: "fadeshow2toggler"
})
</script>
{/literal}
</head>
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #9  
Old 02-26-2010, 10:31 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Thank you "gizmo" and "gb2World" for helping me out.

This takes care of the script loading on my server, however, i still dont see the transition effects on the right panel on my test server.

I am testing this on a local virtual machine and so don't have the direct link for you guys to see and get to the bottom of the issue.

The only thing i can think now is that the images can't be found. Since I am following the {literal} tags approach, does this mean i have to give the entire path of the images like http:\www.myserver...images.jpg? or can i still access it using a relative path?

Thanks again for all your help and guidance.
__________________
X-Cart: 4.2.1
Reply With Quote
  #10  
Old 02-26-2010, 11:05 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

If you can give me link to the script at dynamicdrive, Like I said I can see what's happening and test it on my xampp!!!!

Then maybe get you going..
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:24 AM.

   

 
X-Cart forums © 2001-2020