[MODDB] Search Engine Friendly (SEO) URLs 1.0.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
oscar alexander
Registered User
Posts: 7
Joined: Tue May 29, 2007 4:56 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by oscar alexander »

Great to see someone working on an SEO mod for Olympus! Excellent. I would recommend using dashes instead of underscores however. Matt Cutts tells you why. Also, wouldn't /topics/123-topic-title.html look much sexier? ;)
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

oscar alexander wrote:Great to see someone working on an SEO mod for Olympus! Excellent. I would recommend using dashes instead of underscores however. Matt Cutts tells you why. Also, wouldn't /topics/123-topic-title.html look much sexier? ;)
Yes, my new version uses dashes… I didn't read it anywhere, but it looks better 8-) and a few other much cooler additions… I hope I'll be able to release it by the weekend… I have it all written, I just need to install it on a fresh install and make 2 tweaks and it's ready to go.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
oscar alexander
Registered User
Posts: 7
Joined: Tue May 29, 2007 4:56 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by oscar alexander »

GroovePlugs wrote:Yes, my new version uses dashes… I didn't read it anywhere, but it looks better 8-) and a few other much cooler additions… I hope I'll be able to release it by the weekend… I have it all written, I just need to install it on a fresh install and make 2 tweaks and it's ready to go.
Excellent! If you need any help code-wise, let me know. Perhaps I can help.

Good luck!
toni.marmol
Registered User
Posts: 1
Joined: Wed May 30, 2007 9:50 am

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by toni.marmol »

Hello,

I have a small code to translate some special chars used in spanish (for example, also in french and german) to normal ascii chars.

I tried to modify your format_url function but I haven't success, because I've some problems with utf8. :evil:

I copy the code, I think it can be useful.

Code: Select all

        $url = strtr($url,
                'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ',
                'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

toni.marmol wrote:Hello,

I have a small code to translate some special chars used in spanish (for example, also in french and german) to normal ascii chars.

I tried to modify your format_url function but I haven't success, because I've some problems with utf8. :evil:

I copy the code, I think it can be useful.

Code: Select all

        $url = strtr($url,
                'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ',
                'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
Hmm… I wasn't planning on replacing them, but it seems the bbcode converter can't handle them… so I may have to.
I wasn't going to because there are so many languages with characters that could be converted… it's just insane to try and get them all … best to just leave it up to utf8.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
oscar alexander
Registered User
Posts: 7
Joined: Tue May 29, 2007 4:56 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by oscar alexander »

Oh, nice addition! To make sure you're covering the entire range, you might want to consider the following though:

Code: Select all

function remove_accents($string) {
    $string =  htmlentities($string);
    $string = preg_replace('/&([a-z])(acute|cedil|circ|grave|ring|tilde|uml);/i', '$1', $string);
    return html_entity_decode($string);
}
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

Thanks Oscar… see that it's that easy, I'll include that for sure :)
btw, somebody found a fault with that code and posted a fix for it later on.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
TheInvisible
Registered User
Posts: 25
Joined: Thu May 31, 2007 2:10 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by TheInvisible »

Hi,
I have a problem with this mod.
I did everything like in instalation file and it doesn't work. When I try to click on any topic i have 404 error.
You can see also this on:
What must I do to repair that?
Greetings
Last edited by TheInvisible on Tue Jun 05, 2007 3:00 pm, edited 1 time in total.
Sorry of my nationals but many Polish are cool people. :)
oscar alexander
Registered User
Posts: 7
Joined: Tue May 29, 2007 4:56 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by oscar alexander »

GroovePlugs wrote:Thanks Oscar… see that it's that easy, I'll include that for sure :)
btw, somebody found a fault with that code and posted a fix for it later on.
Right! You probably found this extended version, which is what I use myself. Can't wait for the mod to be finished :D

Code: Select all

function get_rewrite_string($string) {
   $string = htmlentities(strtolower($string));
   $string = preg_replace("/&([a-z])(acute|cedil|circ|ring|tilde|uml);/", '$1', $string);
   $string = preg_replace('/([^a-z0-9]+)/', '-', html_entity_decode($string));
   $string = trim($string, '-');
   return $string;
}
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

TheInvisible wrote:Hi,
I have a problem with this mod.
I did everything like in instalation file and it doesn't work. When I try to click on any topic i have 404 error.
You can see also this on: http://forum.e-medycyna.org
What must I do to repair that?
Greetings
did you install the changes into the .htaccess file?
does your apache support mod_rewrite?
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
TheInvisible
Registered User
Posts: 25
Joined: Thu May 31, 2007 2:10 pm

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by TheInvisible »

Yes, I tried this on localhost and server home.pl
Sorry of my nationals but many Polish are cool people. :)
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

TheInvisible wrote:Yes, I tried this on localhost and server home.pl
and does it work on your localhost?
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
coppro
Registered User
Posts: 84
Joined: Wed May 16, 2007 3:10 am

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by coppro »

This seems cool. I should try it out.
ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by ecwpa »

im not a pro on this but....why dont you use .htaccess for that instead?

since i know there isnt any function to convert something like "ÁÉÍÓÚ" to "AEIOU"

check this 2.0 mod
http://www.phpbb.com/community/viewtopic.php?t=407141

you can even switch on/off seo urls by simply renaming/deleting .htaccess file
carefull, not english speaker native here
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [BETA] Search Engine Friendly (SEO) URLs

Post by Handyman` »

ecwpa wrote:im not a pro on this but....why dont you use .htaccess for that instead?

since i know there isnt any function to convert something like "ÁÉÍÓÚ" to "AEIOU"

check this 2.0 mod
http://www.phpbb.com/community/viewtopic.php?t=407141

you can even switch on/off seo urls by simply renaming/deleting .htaccess file
switching off seo urls is a good way to create broken links… you either want it on or don't install it in the first place.
Also, Oscar posted the code to change that, it's going to be changed when I release the next version.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
Locked

Return to “[3.0.x] MODs in Development”