ToddW Posted September 9, 2004 Share 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 Quote Link to comment Share on other sites More sharing options...
ToddW Posted September 10, 2004 Author Share Posted September 10, 2004 Come on people... ANYONE? ?? Quote Link to comment Share on other sites More sharing options...
ToddW Posted September 11, 2004 Author Share Posted September 11, 2004 ??????? Quote Link to comment Share on other sites More sharing options...
JCS Posted September 11, 2004 Share Posted September 11, 2004 Try contacting the Author Quote Link to comment Share on other sites More sharing options...
whaou Posted November 9, 2004 Share 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 ;) Quote Link to comment Share on other sites More sharing options...
WebPixie Posted December 20, 2004 Share 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 :) Quote Link to comment Share on other sites More sharing options...
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.