ToddW 0 Posted September 9, 2004 Hi, I recently installed Yasu .2 and want to change the + signs in the URL to -'s. I have gone through his code, and searched for %2B & %2b and %20 and + and I can't find where it's used to replace the space with a plus sign.... I just want to replace it with a dash.. Can anyone tell me where this occurs.? Thank You -Todd Share this post Link to post Share on other sites
ToddW 0 Posted September 10, 2004 Come on people... ANYONE? ?? Share this post Link to post Share on other sites
JCS 0 Posted September 11, 2004 Try contacting the Author Share this post Link to post Share on other sites
whaou 0 Posted November 9, 2004 i ve got the same pb that Toddw, it' impossible to contact the author Matt Fletcher, there isn't his e-mail in the install.txt ;) Share this post Link to post Share on other sites
WebPixie 0 Posted December 20, 2004 Come on people... ANYONE? ?? <{POST_SNAPBACK}> Incase anyone still needs the answer to this: To change + signs into dashes, change the following line from html_output.php $link .= preg_replace('/%2F/', '%20', implode('/', $cPath_list)); to $link .= preg_replace(array('/%2F/', '/+/'), array('%20', '-'), implode('/', $cPath_list)); In rewrite.php, change $piece = urldecode(preg_replace(array('/[+]/', '/%20/'), array(' ', '%2F'), $piece_encoded)); to $piece = urldecode(preg_replace(array('/-/', '/%20/'), array(' ', '%2F'), $piece_encoded)); Or more generally, $piece = urldecode(preg_replace(array('/[+]/', '/%20/'), array('_', '%2F'), $piece_encoded)); and change the SQL queries to use LIKE rather than =. For example, $category_query = tep_db_query("select cd.categories_id from categories_description cd, categories c where cd.categories_id=c.categories_id and cd.categories_name='" . tep_db_input($piece) . "' and c.parent_id='" . (int)$current_category_id . "'"); would become $category_query = tep_db_query("select cd.categories_id from categories_description cd, categories c where cd.categories_id=c.categories_id and cd.categories_name like '" . tep_db_input($piece) . "' and c.parent_id='" . (int)$current_category_id . "'"); as the _ will match any character when used this way. Hth, Matt <{POST_SNAPBACK}> I used it, works fine :) Share this post Link to post Share on other sites