Find programmers and grapic design experts at ScriptLance.com
<? DEW-CODE.COM  
Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:SEO friendly (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:SEO friendly
#270
D_Jay (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Re:SEO friendly 7 Months, 1 Week ago Karma: 0  
Okay, here's the error still appearing on my directory page:

QUOTE:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/.../public_html/perthbusiness/directory on line 87


I've attached the directory.php file.
File Attachment:
File Name: directory.txt
File Size: 5770
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/06/01 17:33 By D_Jay.
  The administrator has disabled public write access.
#272
Dewed (User)
Administrator
Posts: 250
graph
User Offline Click here to see the profile of this user
Dew-Code.com
Re:SEO friendly 7 Months, 1 Week ago Karma: 7  
Ok, I see the problem... essentially you have something like

Code:

echo $variable .'Perth's '.$variable;
The apostrophe in "Perth's" is confusing PHP. To tell PHP you'd like to actually print the apostrophe, put a backslash in front of it.
Code:

echo $variable .'Perth\'s '.$variable;
The same problem can happen with quotes when they are used with echo... but the nuances between using quotes and single quotes/apostrophes with the echo function could fill a 5 page article.. which I should probably write at some point, like tomorrow.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#273
D_Jay (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Re:SEO friendly 7 Months, 1 Week ago Karma: 0  
Thanks, that error looks to be solved now. But it has decided to display a new error:

Fatal error: Call to undefined function get_cat() in /home/.../public_html/perthbusiness/directory on line 75
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#274
Dewed (User)
Administrator
Posts: 250
graph
User Offline Click here to see the profile of this user
Dew-Code.com
Re:SEO friendly 7 Months, 1 Week ago Karma: 7  
But it was defined honest !!!

You added the 2 functions near the top of functions.php , the first of which is get_cat{}

Code:

function get_cat($PID){ global $tb_categories; $gc_query = sql_query(" select $tb_categories.Category as cat_name from $tb_categories where ID=$PID"); while($gc_array = sql_fetch_array($gc_query)){ $cat = $gc_array[cat_name]; } return $cat; }
Right ?
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#275
D_Jay (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Re:SEO friendly 7 Months, 1 Week ago Karma: 0  
Yep, the functions.php files begins like this:

Code:

<? // ******************************************************************* // include/functions.php // ******************************************************************* ///SEO goods - ADDED FOR TITLE AND KEYWORDS CUSTOMIZATION ///submitted by users of the pre-2008 dew-code.com forum function get_cat($PID){ global $tb_categories; $gc_query = sql_query(" select $tb_categories.Category as cat_name from $tb_categories where ID=$PID"); while($gc_array = sql_fetch_array($gc_query)){ $cat = $gc_array[cat_name]; } return $cat; } function get_ParentCats($PID){ global $tb_categories; $gcid = $PID; while($gcid > 0){ $query_str = "select $tb_categories.Category, $tb_categories.ID, $tb_categories.PID from $tb_categories where $tb_categories.ID = $gcid"; $mlc_query = sql_query($query_str); $mlc_array = sql_fetch_array($mlc_query); $cat_array[] = $mlc_array["Category"]; $pid_array[] = $mlc_array["ID"]; $gcid = $mlc_array["PID"]; } $count = sizeof($pid_array); for($depth=$count;$depth>=0;$depth--){ if($pid_array[$depth]){ if($PID == $pid_array[$depth]){ $htmlsrc .= ereg_replace("_"," ",($cat_array[$depth])); $htmlsrc .= ""; } else { $htmlsrc .= ereg_replace("_"," ",($cat_array[$depth])); $htmlsrc .= ", "; } } } return $htmlsrc; } //END ADDED FOR TITLE AND KEYWORD CUSTOMIZATION
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Newsflash

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008