phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
SEO URL V2 tweak

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » GYM Sitemaps
::  
Author Message
eMWu



Joined: 15 Mar 2007
Posts: 5

SEO URL V2 tweakPosted: 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
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

SEO URL V2 tweakPosted: Fri Mar 16, 2007 11:49 am    Post subject: Re: SEO URL V2 tweak

And welcome Very Happy

You did well in understanding where to tweak the urls Wink

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 :

Code:
            'start' => '-',


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 Wink

++

_________________
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
Visit poster's website
eMWu



Joined: 15 Mar 2007
Posts: 5

SEO URL V2 tweakPosted: 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
Code:
'


But trying to do the same for character
Code:
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 - Sad

I also added this line:
Code:
$url = str_replace ("&", 'and', $url);
since SEO URLs V2 replaces character & with -and- but there's no change Sad
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

SEO URL V2 tweakPosted: 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 :
Code:
'&',

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
Visit poster's website
eMWu



Joined: 15 Mar 2007
Posts: 5

SEO URL V2 tweakPosted: 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 Shocked
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

SEO URL V2 tweakPosted: Mon Mar 19, 2007 11:49 pm    Post subject: Re: SEO URL V2 tweak

Try with ’ then, must be htmlspecialchared.

And make sure you do it where you first put the ' replacement.

Should work.

++

_________________
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
Visit poster's website
eMWu



Joined: 15 Mar 2007
Posts: 5

SEO URL V2 tweakPosted: 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 Sad

But thanks for trying to help.
Back to top
eMWu



Joined: 15 Mar 2007
Posts: 5

SEO URL V2 tweakPosted: Tue Mar 20, 2007 10:01 pm    Post subject: Re: SEO URL V2 tweak

yay I finally managed to find a solution! Smile
the correct code should be:
Code:
$url = str_replace (array("'", chr(146)), '', $url);
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

SEO URL V2 tweakPosted: Wed Mar 21, 2007 2:15 pm    Post subject: Re: SEO URL V2 tweak

So we have the clue about how to use GYM sitemaps with SEO url v2 Very Happy

_________________
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
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » GYM Sitemaps
Page 1 of 1

Navigation

Jump to: