| |
|
| :: |
| Author |
Message |
eMWu
Joined: 15 Mar 2007 Posts: 5
|
Posted: Thu Mar 15, 2007 1:35 pm Post subject: SEO URL V2 tweak |
|
|
Hi there,
I'm trying to use your sitemap mod along with SEO URLs V2 by mgutt.
So far I figured out I had to switch to Advanced rewriting type and replace | Code: | $this->seo_delim = array('cat' => '-vc',
'forum' => '-vf',
'topic' => '-vt',
'user' => '-u' |
with | Code: | $this->seo_delim = array('cat' => '-c',
'forum' => '-f',
'topic' => '-t',
'user' => '-u' |
I think I only have one small problem left. In sitemap the character ’ (html code: ’) is replaced by - while my mod just removes it. I want sitemap to remove it too.
So I want a topic with title My dog's bone
use url my-dogs-bone-t123.html
instead of my-dog-s-bone-t123.html |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Fri Mar 16, 2007 11:49 am Post subject: Re: SEO URL V2 tweak |
|
|
And welcome
You did well in understanding where to tweak the urls
The problem with SEO urlV2 mod is that it's not really designed to be easily extended, as there is no equivalent to format_url function, the title filtering is just performed straight in the append_sid code.
So, you'll have to mod a bit the format_url function to fit your needs.
If the ' is the only character to casue problem, juste open ggs_function.php and find :
| Code: | | $url = str_replace ('ß', 'ss', $url); |
Before add :
| Code: | | $url = str_replace ("'", '', $url); |
About the url standard itself, I think you'd need to additionnaly change :
with :
| Code: |
'start' => ',start,', |
as seo url is building urls like : topic-title,start,15.html if I recall well.
To conclude, I think you could consider migrating to our rewriting method, to be able to use the zero duplicate mod
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
eMWu
Joined: 15 Mar 2007 Posts: 5
|
Posted: Sun Mar 18, 2007 9:35 pm Post subject: Re: SEO URL V2 tweak |
|
|
thanks for the reply!
I had successfully fixed the issue with character
But trying to do the same for character didn't work.
I tried various ways of trying to disable replacing that character with a dash. I added these lines:
| Code: | $url = str_replace ("’", '', $url);
$url = str_replace ("’", '', $url);
$url = str_replace ("’", '', $url); |
But still the character ’ is being replaced with -
I also added this line: | Code: | | $url = str_replace ("&", 'and', $url); | since SEO URLs V2 replaces character & with -and- but there's no change  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Mon Mar 19, 2007 10:14 pm Post subject: Re: SEO URL V2 tweak |
|
|
& (& amp;) is dealt with at this stage :
| Code: | | $find = array('"','&','<','>','\r\n','\n',); |
So the easiest would eb to deal with your extra filtering before this one, and delete :
in this line.
It does not work with the ’ if you replace :
| Code: | | $url = str_replace ("'", '', $url); |
with :
| Code: | | $url = str_replace (array("'", "’"), '', $url); |
? |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
eMWu
Joined: 15 Mar 2007 Posts: 5
|
Posted: Mon Mar 19, 2007 10:54 pm Post subject: Re: SEO URL V2 tweak |
|
|
thanks again for taking your time to reply!
The & issue is now solved by removing the part you suggested and adding line | Code: | | $url = str_replace ('&', 'and', $url); |
But for some reason the ’ character is a tricky one!
I replaced my previous additions with your line: | Code: | | $url = str_replace (array("'", "’"), '', $url); | and ' gets replaced properly but ’ doesn't  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
eMWu
Joined: 15 Mar 2007 Posts: 5
|
Posted: Tue Mar 20, 2007 12:34 am Post subject: Re: SEO URL V2 tweak |
|
|
I tried that before.
I gave it another try now, using:
| Code: | | $url = str_replace (array("’", "'"), '', $url); |
but it still doesn't work
But thanks for trying to help. |
|
|
| Back to top |
|
 |
eMWu
Joined: 15 Mar 2007 Posts: 5
|
Posted: Tue Mar 20, 2007 10:01 pm Post subject: Re: SEO URL V2 tweak |
|
|
yay I finally managed to find a solution!
the correct code should be:
| Code: | | $url = str_replace (array("'", chr(146)), '', $url); |
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
|
|
|
|
|