OK, I'm an "old school" html guy trying to learn a bit about PHP. I am using the OSCommerce script and I'm trying to insert a Javascript slideshow (much like the one at www.flipflopfoto.com) onto the front page.
I can get around and figure out where things go for the most part, and I've found out where the main text part of the front page is. That's where I want the script to go.
Here's the script of the image rotator
<script language="JavaScript">
<!-- begin script
pubs=new Array();
liens=new Array();
pubT=0;
pub = -1;
function AfficherPub(pubs,pubDelay1) {
pubDelay = pubDelay1;
pub = pub + 1;
if (pub == pubs.length)
pub = 0;
document.pubImg.src = pubs[pub];
pubT = setTimeout("AfficherPub(pubs,pubDelay)", pubDelay1);
}
// end script -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- begin script
function VersionNavigateur(Netscape, Explorer) {
if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||
(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
return true;
else return false;
}
// end script -->
</script>
#################################
Here's the PHP page script for the index in which I'm trying to insert the script. (I want it where it says Welcome Text)
<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $
Copyright (c) 2004 CBSTPhoto.com
*/
define('TEXT_MAIN', 'Welcome Text');
define('TABLE_HEADING_NEW_PRODUCTS', 'New For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Coming Soon');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'What\'s New?');
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', 'What`s New?');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
#################################
Is this possible and is this the best way to do it? Any help would be greately appreciated. If you have a better image script, by all means please tell me. I'll gladly use it.
Thank You