Is anyone familiar with syntax?

20 replies
Found 7th Sep 2007
Hi all

ive messed up with trying to edit some wording on my website and im getting a syntax error

does anyone know anything bout this that could point out to me where ive gone wrong?

TIA :-D

  1. Misc
Groups
  1. Misc
21 Comments

Let me see... what exactly is the problem?

Original Poster

I get this message after trying to change the text on my main page:

Parse error: syntax error, unexpected T_STRING in then the name of the index page i was trying to edit

dreamhost have emailed this:

Here at
Dreamhost, we keep automatic snapshots (or backups) of all your files.
You can access them by manually changing the directory into the hidden
".snapshot" folder set up within each of your folders.

There are usually six subfolders within the .snapshot folder, each with
backups from different times:

hourly.0/ (one hour ago)
hourly.1/ (two hours ago)
nightly.0/ (one day ago)
nightly.1/ (two days ago)
weekly.0/ (one week ago)
weekly.1/ (two weeks ago)

but i do not see where i can find them

thanks by the way

If you show me the page with the error I can help more... it's probably a missing or surplus " ; or )

Original Poster

how can i do that, as it just displays the error above, theres nothing else on the page?

Original Poster

or do you mean the syntax?

sorry im not that good at this kinda stuff lol

if you give me the url I can go and look.. or you can paste the part of the code you edited in this thread

Original Poster

ok well this is the code:

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license zen-cart.com/lic…txt GNU Public License V2.0
* @version $Id: index.php 3027 2006-02-13 17:15:51Z drbyte $
*/

define('TEXT_MAIN','This is the main define statement for the page for english when no template defined file exists. It is located in: /includes/languages/english/index.php');

// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome Guest! Would you like to log yourself in?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}

define('TEXT_GREETING_PERSONAL', 'Hello %s! Would you like to see our newest additions?');

define('TEXT_INFORMATION', 'Define your main Index page copy here.');

//moved to english
//define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products');

//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') || (zen_check_url_get_terms()) ) {
// This section deals with product-listing page contents
define('HEADING_TITLE', 'Available Products');
define('TABLE_HEADING_IMAGE', 'Product 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', 'Filter Results by:');
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') {
// This section deals with the "home" page at the top level with no options/products selected
/*Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.');
} elseif ($category_depth == 'nested') {
// This section deals with displaying a subcategory
/*Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
define('HEADING_TITLE', 'Welcome to our store,it's free,so knock yourself out!');
}
?>

it was the last section, the welcome text

try adding [COLOR="Red"]/[/COLOR] or [COLOR="Red"]\[/COLOR] infront of all the [COLOR="Red"]'[/COLOR] in the sentance you added.

Original Poster

ok i'll try that now, thank you

Very quick glance at the code:

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', 'Filter Results by:');
define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]);
define('TEXT_NOW', '\' now');

Why are there two single primes, '' there, where else has just a single ' ?

That'd be what i'd change 1st anyways.
Delete one of the two ''

to make it clearer...

define('HEADING_TITLE', 'Welcome to our store, it[COLOR="Red"]/[/COLOR]'s free,so knock yourself out!');

or

define('HEADING_TITLE', 'Welcome to our store, it[COLOR="Red"]\[/COLOR]'s free,so knock yourself out!');

boydent999

Very quick glance at the code: define('TEXT_NUMBER_OF_PRODUCTS', 'Number … Very quick glance at the code: define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', 'Filter Results by:'); define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]); define('TEXT_NOW', '\' now');Why are there two single primes, '' there, where else has just a single ' ?That'd be what i'd change 1st anyways.Delete one of the two ''



Well spotted, lol... that could well be the problem, I was just looking at the last part with the welcome text, i assumed that's all that had been changed... :P

Original Poster

nope :-( , that just changes the error to 'an unexpected /'

Original Poster

boydent999

Very quick glance at the code: define('TEXT_NUMBER_OF_PRODUCTS', 'Number … Very quick glance at the code: define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', 'Filter Results by:'); define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]); define('TEXT_NOW', '\' now');Why are there two single primes, '' there, where else has just a single ' ?That'd be what i'd change 1st anyways.Delete one of the two ''



ok i'll change that thank you

Original Poster

nope still no luck, think i might have to uninstall and re install

have you tried re-uploading it binary mode?

Just as a simple test then, undo the 2 changes that TheDoc and i have suggested
Change:
define('HEADING_TITLE', 'Welcome to our store,it's free,so knock yourself out!');

to be
define('HEADING_TITLE', 'Hello');

Just summat simple with no unnecessary text in there......

Original Poster

ok ty i'll try that, yes ive tried Binary

Original Poster

Sorry guys, had to sort kids out, dreamhost have rectified it for me, thanks for the help, still not ameded the text, too scared to try again

lol

rep left

No need to be scared, this is how you learn - carry on editing but make one change at a time and always keep a local copy of code that you know works which makes it easy for you to rollback if you make a mistake. As long as you only make one change at a time you'll always know where the problem is and be able to fix it or at least get more precise help.

John

Good shout John
Post a comment
Avatar
@
    Text
    Top Discussions
    1. I want to talk about the WEATHER no politics no religion19247634
    2. The never ending counting with pictures thread !4604811
    3. South Park: The Fractured Butt Hole Preorders - Ubisoft Store (Free Season …34
    4. Just heard this...2 ★★★★★★★★★★★★★★ congrats to all on 392k ★★★★★★★★★★★★★★7769471

    See more discussions