Module: Search Engine Friendly URL's
Posted by Martijn van Maasakkers
Re: Module: Search Engine Friendly URL's November 13, 2009 02:12AM |
Registered: 14 years ago Posts: 18 |
Re: Module: Search Engine Friendly URL's November 19, 2009 12:58AM |
Registered: 15 years ago Posts: 46 |
Hello,
I still have the same iproblem as mentioned by timqui. When I post a message in my forum, I get an error:
"The requested URL /redirect/phorum_redirect_to=http://www.xyz.com/204/578/948/_subject_#msg-948 was not found on this server."
I have installed the SEF mod and also the Virtual Hosting mod which might cause the problem. It's also strange that the message title isn't used in the URL but _subject_. I noticed the same in auto-follow email notifications where I receive such links which aren't working:
[www.xyz.com]
I have updated the forum script and this mod to the latest version but still have the same issues. My forums are already setup and I use both mods as outlined and I can't switch them off.
Can someone help or has an idea how to fix this?
Many thanks,
Philip
I still have the same iproblem as mentioned by timqui. When I post a message in my forum, I get an error:
"The requested URL /redirect/phorum_redirect_to=http://www.xyz.com/204/578/948/_subject_#msg-948 was not found on this server."
I have installed the SEF mod and also the Virtual Hosting mod which might cause the problem. It's also strange that the message title isn't used in the URL but _subject_. I noticed the same in auto-follow email notifications where I receive such links which aren't working:
[www.xyz.com]
I have updated the forum script and this mod to the latest version but still have the same issues. My forums are already setup and I use both mods as outlined and I can't switch them off.
Can someone help or has an idea how to fix this?
Many thanks,
Philip
Re: Module: Search Engine Friendly URL's November 19, 2009 01:04AM |
Registered: 15 years ago Posts: 46 |
One more thing I have to add:
When I open a thread on my forum and click on REPLY, and I'm not logged in, I will see a brief message to login:
"Sorry, you do not have permission to post/reply in this forum. For your protection, you are required to confirm your login information when you have been away from the site.
Click here to login"
When I click on login, I get the following message:
"Not Found
The requested URL /login/206/redir=http://www.xyz.com/206/435/584/_subject_#REPLY was not found on this server."
There is also the _subject_ part in the URL. Probably the URL rewrite doesn't work and causes some issues.
Does anyone have the same issues and knows how to fix them?
When I open a thread on my forum and click on REPLY, and I'm not logged in, I will see a brief message to login:
"Sorry, you do not have permission to post/reply in this forum. For your protection, you are required to confirm your login information when you have been away from the site.
Click here to login"
When I click on login, I get the following message:
"Not Found
The requested URL /login/206/redir=http://www.xyz.com/206/435/584/_subject_#REPLY was not found on this server."
There is also the _subject_ part in the URL. Probably the URL rewrite doesn't work and causes some issues.
Does anyone have the same issues and knows how to fix them?
Re: Module: Search Engine Friendly URL's November 22, 2009 05:36AM |
Registered: 15 years ago Posts: 46 |
Re: Module: Search Engine Friendly URL's December 02, 2009 08:21PM |
Registered: 14 years ago Posts: 115 |
Hello,
In function sef_urls_breadcrumbs() I threw a couple of isset() checks on your 'BREADCRUMBS' index. No big deal but when I am debugging and I have php report notices and warnings, might as well eliminate these.
You'll see the spot in the code where I bracketed the change with
// Begin BosonHack
...
// End BosonHack
regards,
-phil.
In function sef_urls_breadcrumbs() I threw a couple of isset() checks on your 'BREADCRUMBS' index. No big deal but when I am debugging and I have php report notices and warnings, might as well eliminate these.
You'll see the spot in the code where I bracketed the change with
// Begin BosonHack
...
// End BosonHack
regards,
-phil.
Re: Module: Search Engine Friendly URL's December 05, 2009 06:25AM |
Registered: 14 years ago Posts: 18 |
Re: Module: Search Engine Friendly URL's December 05, 2009 06:37AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Module: Search Engine Friendly URL's March 15, 2010 05:18PM |
Registered: 14 years ago Posts: 10 |
I have a problem with this module, my forum is in Turkish so most of the topics of course in Turkish... There are a lot of non-url friendly characters in Turkish like
original character - equivalent in a url
ç -> c
ğ -> g
ı -> i
ö-> o
ş-> s
ü-> u
their uppercase versions
Ç->C
Ğ->G
İ->I
Ö->O
Ş->S
Ü->U
so with the sef_url module an original word such as "çalıştırma" becomes "_al__t_rma", not so search engine or user friendly... there are a lot of cases like this.
I'm a developer too with skills in c, c#, java but I lack the necessary knowledge regarding phorum, php and all this. I'm not expecting an update to this module since it seems to be abandoned long ago but at least I need a guidance as to how I can accomplish to integrate this change I need. Above example will become "calistirma" which google can already understand that it's the crippled form of the construct "çalıştırma".
Any clues?
original character - equivalent in a url
ç -> c
ğ -> g
ı -> i
ö-> o
ş-> s
ü-> u
their uppercase versions
Ç->C
Ğ->G
İ->I
Ö->O
Ş->S
Ü->U
so with the sef_url module an original word such as "çalıştırma" becomes "_al__t_rma", not so search engine or user friendly... there are a lot of cases like this.
I'm a developer too with skills in c, c#, java but I lack the necessary knowledge regarding phorum, php and all this. I'm not expecting an update to this module since it seems to be abandoned long ago but at least I need a guidance as to how I can accomplish to integrate this change I need. Above example will become "calistirma" which google can already understand that it's the crippled form of the construct "çalıştırma".
Any clues?
Re: Module: Search Engine Friendly URL's March 15, 2010 05:39PM |
Admin Registered: 20 years ago Posts: 8,532 |
I doubt that the module is really abandoned, since the people who wrote it are using it on their website.
The difficulty with special characters is that there might be different character sets in play. So for implementing any real solid solution as part of the core module, some thinking and work would have to be done. Or support could be added for UTF-8 sites only, which should help all recent Phorum installations and the ones that started out with UTF-8 in the past.
You could always do a hack in the current module for your own situation. If you already are a programmer, then this should not be too hard for you to handle. Take a look at the code in mods/sef_urls/sef_urls.php. That one should contain the translation of topics to URLs. There you will also find the code that translates all special characters to underscores. Right before the underscoring code, you can add your own code to change the special characters into ASCII characters.
Your functional PHP friend is str_replace()
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
The difficulty with special characters is that there might be different character sets in play. So for implementing any real solid solution as part of the core module, some thinking and work would have to be done. Or support could be added for UTF-8 sites only, which should help all recent Phorum installations and the ones that started out with UTF-8 in the past.
You could always do a hack in the current module for your own situation. If you already are a programmer, then this should not be too hard for you to handle. Take a look at the code in mods/sef_urls/sef_urls.php. That one should contain the translation of topics to URLs. There you will also find the code that translates all special characters to underscores. Right before the underscoring code, you can add your own code to change the special characters into ASCII characters.
Your functional PHP friend is str_replace()
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Search Engine Friendly URL's March 15, 2010 06:04PM |
Registered: 14 years ago Posts: 10 |
Hmm sorry, I actually wrote my message accidentally in the first page, looked at the last message probably, seen it was in 2008.. so I though it's abandoned.. shame on me.
Actually I was just staring at the str_replace function since the regex function used there not accepting utf-8 characters without all bells and whistles.
I've tried below code to no avail... most probably missing something (saved the php file as utf-8 by the way)
And I've found a code snippet to convert accents in the php manual for str_replace
This works for international characters but not for all of them (mainly characters like ö, ü which are already in 1252 codepage) and the output is I guess is not utf-8 hence some characters show up as a strange question mark.
Thanks for answering by the way, I should this dig up more...
Is it enough to convert these characters only in the function sef_urls_convert without touching any regex in the .htaccess.. logically it seems to be enough but I'm expecting the worst...
ps: I've found a working code btw.
Edited 1 time(s). Last edit at 03/15/2010 06:20PM by WiiCrazy.
Actually I was just staring at the str_replace function since the regex function used there not accepting utf-8 characters without all bells and whistles.
I've tried below code to no avail... most probably missing something (saved the php file as utf-8 by the way)
Language: PHP$search = array(';ç';, ';ğ';, ';ı';, ';ö';, ';ş';, ';ü';, ';Ç';, ';Ğ';, ';İ';, ';Ö';, ';Ş';, ';Ü';); $replace = array(';c';, ';g';, ';i';, ';o';, ';s';, ';u';, ';C';, ';G';, ';I';, ';O';, ';S';, ';U';); echo("$strValue <br>"); $strValue = str_replace($search, $replace, $strValue); echo("$strValue <br>");
And I've found a code snippet to convert accents in the php manual for str_replace
Language: PHP<?php function replace_accents($str) { $str = htmlentities($str, ENT_COMPAT, "UTF-8"); $str = preg_replace( ';/&([a-zA-Z])(uml|acute|grave|circ|tilde);/';, ';$1';,$str); return html_entity_decode($str); } ?>
This works for international characters but not for all of them (mainly characters like ö, ü which are already in 1252 codepage) and the output is I guess is not utf-8 hence some characters show up as a strange question mark.
Thanks for answering by the way, I should this dig up more...
Is it enough to convert these characters only in the function sef_urls_convert without touching any regex in the .htaccess.. logically it seems to be enough but I'm expecting the worst...
ps: I've found a working code btw.
Edited 1 time(s). Last edit at 03/15/2010 06:20PM by WiiCrazy.
Sorry, only registered users may post in this forum.