Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Location
    UPstate NY
    Posts
    440
    Plugin Contributions
    0

    help question blank_sidebox mod define, how to put in HTML??

    I am working with the current version of the blank_sidebox mod, and I have in the *defines.php the following:

    <?php
    /**
    * blank sidebox definitions - text for inclusion in a new blank sidebox
    *
    * @package templateSystem
    * @copyright 2007 Kuroi Web Design
    * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
    * // 10/28/08 modified by tom lyczko
    */

    define('BOX_HEADING_SSL_BOX', 'SSL / Credit Cards');

    define('TEXT_SSL_BOX','<div class="centered"><a href="http://www.instantssl.com" target="_blank" title="Essex Industries' SSL certificate provider."><img src="includes/templates/crhei2/images/secure_site.gif" alt="Essex Industries' SSL certificate provider." border="0" height="85" width="100"></a><br /><br /><img src="includes/templates/crhei2/images/mc_accpt_023_gif.gif" title="We accept MasterCard." alt="We accept MasterCard." border="0" height="23" width="37"> <img src="includes/templates/crhei2/images/visa1_37x23_a.gif" title="We accept Visa." alt="We accept Visa." border="0" height="23" width="37"></div>');

    ?>

    I keep getting a syntax error unexpected T_STRING for the TEXT_SSL_BOX constant.

    What is the correct way to include valid html code into a PHP constant??

    I tried escaping all the double quotes with \ but that did not fix it.

    Could not find anything on Google about the proper way to put html code into a PHP constant.

    BTW I am taking blank_sidebox and renaming everything to ssl_box.

    Thank you, Tom

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: blank_sidebox mod define, how to put in HTML??

    The HTML string you are using has single quotes (') in it, which are interpreted by PHP as terminating the string. You need to escape those with a backslash \' so they are seen correctly as part of the text string.

  3. #3
    Join Date
    Dec 2003
    Location
    UPstate NY
    Posts
    440
    Plugin Contributions
    0

    Default Re: blank_sidebox mod define, how to put in HTML??

    I escaped the single quotes before and after the div tags and I'll see what happens.

    Thank you, Tom

  4. #4
    Join Date
    Dec 2003
    Location
    UPstate NY
    Posts
    440
    Plugin Contributions
    0

    Default Re: blank_sidebox mod define, how to put in HTML??

    This did not really work -- the new sidebox etc. installs properly, but then the test site does not display at all!!

    Thank you, Tom

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: blank_sidebox mod define, how to put in HTML??

    The quotes before and after the <div> tags are the ones that are supposed to be there. This is causing the problem:
    alt="Essex Industries' SSL certificate provider."
    Make it
    alt="Essex Industries\' SSL certificate provider."

    Check for all such instances inside the text string.

  6. #6
    Join Date
    Dec 2003
    Location
    UPstate NY
    Posts
    440
    Plugin Contributions
    0

    Default Re: blank_sidebox mod define, how to put in HTML??

    Quote Originally Posted by gjh42 View Post
    alt="Essex Industries' SSL certificate provider."
    Make it
    alt="Essex Industries\' SSL certificate provider."
    OIC!!! :) :) :)

    You are a genius, I completely missed those.

    Thank you, Tom

 

 

Similar Threads

  1. Newsletters not allowing my to put in pictures.. Put the html code via rich text..
    By bobmundo123 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 18
    Last Post: 26 Dec 2012, 10:32 PM
  2. how to put more Define Page?
    By kobra8 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Dec 2011, 08:05 PM
  3. how to put other define on main page?
    By MB1 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Jun 2010, 07:49 PM
  4. Javascript within blank_sidebox mod
    By skyegospel in forum Addon Sideboxes
    Replies: 5
    Last Post: 29 Oct 2008, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg