www.webdeveloper.com
Results 1 to 3 of 3

Thread: Help: Adding Slideshow ruining homepage

  1. #1
    Join Date
    Aug 2013
    Posts
    2

    Help: Adding Slideshow ruining homepage

    Firstly, thank you all in advance for your help. I'm by no means well versed in code or HTML for that matter. I'm simply a graphic designer whose business wants him to do some updates for the website.

    Essentially, I'm trying to add a slideshow to our homepage. Every time I try to add it, the website basically ceases to function and says the following:

    "Parse error: syntax error, unexpected T_STRING in......"

    I know the slideshow code is good so I'm not sure what the problem is. I've even added it to a blank products page and it worked fine. I'm not sure if there are restrictions on the homepage that don't allow me to add it that are different on the products page, or that it's simply a coding error.

    The homepage code (without slideshow):

    Code:
    <?php
    /*
      $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2007 osCommerce
    
      Released under the GNU General Public License
    */
    
    define('TEXT_MAIN', '<p style="text-align:center; height:116px;">' . tep_image(DIR_WS_IMAGES . 'w101animbanner.gif ') . '</p> <B><font size="2">Welcome to Windows101! </B>We offer high-quality, professional, window cleaning tools that make the job easy! <b>Great selection</b> and <b>low prices</b>. Shop here for all your Window Cleaning Supplies! In stock and ready to ship. We deliver <b> EVERYWHERE</b>! Since 1993. </font><BR><BR>
    <BR><BR>
    
    
    
    
    <P><CENTER><a href="http://windows101.com/shop/new_location_maps.html" target="_blank" /><img src="http://windows101.com/shop/images/shopmap.jpg" alt="Windows101 Moved!" border="0" </a></center><BR>
    
    <P> <center><a href="http://windows101.com/shop/shipping.php"><img src="http://windows101.com/shop/images/freeshipping.jpg" alt="Free Shipping Terms" border ="0" </a></center>
    
    <p>&nbsp;</p>');
    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', 'Let\'s See What We Have Here');
      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');
    }
    ?>
    The Slideshow:

    Code:
    <div id="comslider_in_point_29158"></div><script type="text/javascript">var oCOMScript29158=document.createElement('script');oCOMScript29158.src="http://www.comslider.com/target/users/1377125137x50f0e29968caf4bfe6a4e3520967b18b/comslider.js?timestamp=1377189231";oCOMScript29158.type='text/javascript';document.getElementsByTagName("head").item(0).appendChild(oCOMScript29158);</script>
    Thanks again everyone,

    V

  2. #2
    Join Date
    Mar 2012
    Posts
    1,188
    I suspect that the problem is that the whole of the extract you have given of the existing page is in PHP not HTML. Therefore to add the slideshow "as is" the solution might be to enclose the slideshow code as follows:

    a) Insert "?>" (without the quotes) where you want to break out of PHP mode.
    b) Then the slideshow code.
    c) Add "<?php" (without the quotes) to re-enter PHP mode.

    I have not tested this, so you may need to experiment with where to put the code that will work, but I hope that it gives you some pointers...

  3. #3
    Join Date
    Aug 2013
    Posts
    2
    Quote Originally Posted by jedaisoul View Post
    I suspect that the problem is that the whole of the extract you have given of the existing page is in PHP not HTML. Therefore to add the slideshow "as is" the solution might be to enclose the slideshow code as follows:

    a) Insert "?>" (without the quotes) where you want to break out of PHP mode.
    b) Then the slideshow code.
    c) Add "<?php" (without the quotes) to re-enter PHP mode.

    I have not tested this, so you may need to experiment with where to put the code that will work, but I hope that it gives you some pointers...
    Thanks a lot sir!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles