View Single Post
  #3  
Old 02-17-2011, 08:43 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Adding Javascript to the frontpage

OK wait.

I put this in the skin1\customer\meta.tpl
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="{$SkinDir}/fp_images/fadeslideshow.js"></script>

Is there a way to turn "/demos/xcart/skin1" into {$SkinDir} that's in the javascript?

Code:
{* +----------------------------------------------------------------------+ Front Page +----------------------------------------------------------------------+ *} <script type="text/javascript"> {literal} var mygallery1=new fadeSlideShow({ wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow dimensions: [480, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image imagearray: [ ["/demos/xcart/skin1/fp_images/images/Apples.jpg", "", "", "Creative Additions to the Classic Candy Apple"], ["/demos/xcart/skin1/fp_images/images/Chocolate_Covered_Potato_Chips.jpg", "", "", "Making Chocolate Covered Potato Chips"], ["/demos/xcart/skin1/fp_images/images/Party_Room.jpg", "", "", "Celebrate Your Birthday or Special Occasion With The Peanut Man"], ["/demos/xcart/skin1/fp_images/images/Strawberries.jpg", "", "", "Beautiful Fresh Strawberries Dipped in Chocolates"], ["/demos/xcart/skin1/fp_images/images/Popcorn.jpg", "", "", "Stop By for Freshly Popped Popcorn Everyday"], ["/demos/xcart/skin1/fp_images/images/Gift_Backets.jpg", "", "", "Custom Made Gift Baskets For Your Friends or Your Employees"], ["/demos/xcart/skin1/fp_images/images/Chocolate_Covered_Pecan_Clusters.jpg", "", "", "Order Your Pecans Any Way You Like Them"], ["/demos/xcart/skin1/fp_images/images/Peanut_Girl.jpg", "", "", "Children Enjoy Picking Through Our Traditional and Custom Candies"] //<--no trailing comma after very last image element! ], displaymode: {type:'auto', pause:3800, cycles:0, wraparound:false, randomize:true}, persist: true, //remember last viewed slide and recall within same session? fadeduration: 500, //transition duration (milliseconds) descreveal: "always", togglerid: "" }) {/literal} </script> <table width="600" border="0" cellspacing="0" cellpadding="1"> <tr> <td rowspan="3">asdfasdfasdf</td> <td colspan="2"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href="http://www.facebook.com/#!/pages/Savannahs-Candy-Kitchen/173098054471" show_faces="false" width="450" float: center></fb:like></td> </tr> <tr> <td><div id="fadeshow1"> </div></td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table>
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote