Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you add a slide show to $content


afinity

Recommended Posts

Hi, I've been working on trying to input an html/javascript slideshow where i call $content onto the template, but it either messes up the .php code or won't work.

I know I could use flash, but I'm trying to avoid that and fear it might cause just as much of a problem.

 

Can anyone help?

 

define('TEXT_MAIN', 'This site is currently under construction. <br />Please visit back soon. <br /><table width="509" height="225" border="0"><tr><td width="251" align="left" valign="top"><p class="style1">Father's Day Specials </p><p class="style2">Remember dad, he brought you life and he can  take it back.</p></td><td width="248"><a href="java script:jump2url()" onmouseover="displayStatusMsg();return document.returnValue"><img src="slides/slide1.jpg" name="bannerADrotator" border="0" id="bannerADrotator" style="filter:revealTrans(duration=2,transition=20)" /></a></td>
 </tr>
</table>
<BANNERAD><a href="java script:jump2url()" onMouseOver="displayStatusMsg();return document.returnValue"></a>
   <script language="JavaScript">nextAd()</script>
</BANNERAD>');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', '');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', '');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

<script LANGUAGE="JavaScript">
<!-- // BannerAD

  var bannerAD=new Array();
  var bannerADlink=new Array();
  var adNum=0;

  bannerAD[0]="slides/slide1.jpg";
  bannerADlink[0]="";
  bannerAD[1]="slides/slide2.jpg";
  bannerADlink[1]="";
  bannerAD[2]="slides/slide3.jpg";
  bannerADlink[2]="";
  bannerAD[3]="slides/slide4.jpg";
  bannerADlink[3]="";
  bannerAD[4]="slides/slide5.jpg";
  bannerADlink[4]="";

  var preloadedimages=new Array();
  for (i=1;i<bannerAD.length;i++){
     preloadedimages[i]=new Image();
     preloadedimages[i].src=bannerAD[i];
  }

function setTransition(){
  if (document.all){
     bannerADrotator.filters.revealTrans.Transition=12;
     bannerADrotator.filters.revealTrans.apply();
  }
}

function playTransition(){
  if (document.all)
     bannerADrotator.filters.revealTrans.play()
}

function nextAd(){
  if(adNum<bannerAD.length-1)adNum++ ;
     else adNum=0;
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  playTransition();
  theTimer=setTimeout("nextAd()", 4000);
}

function jump2url(){
  jumpUrl=bannerADlink[adNum];
  jumpTarget='';
  if (jumpUrl != ''){
     if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
     else location.href=jumpUrl;
  }
}
function displayStatusMsg() { 
  status=bannerADlink[adNum];
  document.returnValue = true;
}

//-->
</script>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...