Guest Posted May 20, 2004 Posted May 20, 2004 I have installed contribution define_mainpage. If I make the slightest change to the content in english/define_mainpage file, I receive a T_string error. Based on looking at the forum, T-string errors are caused by text outside of the ' ''s but even if I just change one letter of your text I receive the error. I found this post http://www.oscommerce.com/forums/index.php?showtopic=92772 which indicates it is syntax. What gives? OH...... This is the code: <!-- MAIN PAGE EXAMPLE START //--> <table width="100%" cellpadding="5" cellspacing="0" border=0> <tr> <td class="main" width=50% valign="top" align="right"> <?php $mainpage_title = "We've just installed the "Define Mainpage" module!"; $mainpage_info = " "Define Mainpage" module v1.3 by Matthijs ([email protected]) <p> This module demonstrates how easy it can be to adapt existing code in OSC.<br> All I had to do was add one single line to define_languages.php (admin) to make sure it always looks for the mainpage.php file. Obviously I had to then implement it in the Admin & Catalog side, but that's not a big deal as you've just found out.<p> You can edit the contents of this file from within the Admin ( -> CATALOG -> DEFINE MAINPAGE)<br> For other, less advanced layouts choose either German or Spanish from the language menu. (Provided you've installed those languages)<p>If you can't open/edit the /[language]/mainpage.php file you should probably set the right permissions. You'll get a warning anyway. <p>Todo? Future plans? World peace through superior fire power... ehmm.. <br>no I mean a preview option ;)<br> And perhaps make a few templates for the layout...<p> I'd appreciate an e-mail if you use this, I'm curious...<br> Later,<br> Mattice "; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $mainpage_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $mainpage_info); new infoBox($info_box_contents); ?> </td> <td width=30% valign="top" align="center"> <? $somebox_title = "Ratings."; $somebox_info = tep_image(DIR_WS_IMAGES . 'stars_1.gif') . ' Sucks!<br>' . tep_image(DIR_WS_IMAGES . 'stars_2.gif') . ' Mwoah<br>' . tep_image(DIR_WS_IMAGES . 'stars_3.gif') . ' Okay<br>' . tep_image(DIR_WS_IMAGES . 'stars_4.gif') . ' Cool!'; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $somebox_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $somebox_info); new infoBox($info_box_contents); ?> <p> <? $somebox_title = "Anouncement:"; $somebox_info = "<center>This website is powered by the best OpenSource e-commerce solution available on the market today:<p>" . tep_image(DIR_WS_IMAGES . 'oscommerce.gif') . '<p>Please contribute to this fantastic project!<br>Visit http://www.oscommerce.com for more details.</center>'; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $somebox_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $somebox_info); new infoBox($info_box_contents); ?> </td> </table> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.