Firefox PHP

Module: Search Engine Friendly URL's

Re: Module: Search Engine Friendly URL's
March 15, 2010 06:16PM
The whole idea of the str_replace looks okay to me. Maybe test that code snippet in a separate php script with some test string that you provide to see if it really works.

The htmlentities example is a nice method to strip a lot of the basic accents in one go and without having to specify a character for each variant of a given accent. What you can play with, is making the decode call complete, to keep the UTF-8 characters intact: html_entity_decode($str, ENT_COMPAT, 'UTF-8').
You'd still have to take care of the characters that you cannot catch this way though. One strategy could be to lookup the html entities for those characters and add a separate str_replace() for those entities to get everything converted.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Search Engine Friendly URL's
March 15, 2010 06:45PM
I've edited the php file in it's original encoding than saved it as utf-8, maybe that caused a problem... I've copied and pasted a similar code from someone else and it worked... Possibly I got a character encoding problem.

Now I need to fix those urls in the main page which look like

blah blah... /list/43
blah blah... /list/41

I'm not sure what exactly does html_entity_decode so I can't comment on it though it would be nice if it could be solved with a built-in php function... .net for example have such a culture setting as InvariantCulture.. So issuing lowercase on a string using invariant culture you can get it's English friendly equivalent... So I guess all accented characters are already defined and mapped to their english equivalent to accomplish this... Still it's very culture oriented actually... since for exampe Ç character maybe used in two different languages but for example lowercase version is still culture dependent... in a specific language it may map to ç and for another language maybe who knows to x (literally)

Forums are places where everyone can contribute something so this is possible actually...
Re: Module: Search Engine Friendly URL's
March 29, 2010 12:11PM

I'm just going through getting phorum working correctly with my Drupal site. I've got the Drupal sign on working with the external authentication mod. I'm trying to get the SEF mod working now but when I enabled it I get the following error:

Cannot redeclare phorum_custom_get_url() previously declared in ....phorum_module_external_authentication.module:205.

Could anyone suggest how I go about fixing the problem (note I'm not suggesting the issue lies with SEF)?

Re: Module: Search Engine Friendly URL's
March 29, 2010 12:12PM
The external authentication module is rewriting urls already, you can't have two modules rewriting urls, hence you won't be able to use the SEF module.

Thomas Seifert
Re: Module: Search Engine Friendly URL's
March 29, 2010 12:39PM
Oh. Out of all the answers I was expecting that wasn't one of them! I suppose I was expecting there to be some kind of chaining of the phorum_custom_get_url calls. I'm only a few days into my phorum learning curve.

Looks like I'm going to be re-working one of the modules to stop them conflicting - not being able to get the single sign on and friendly urls would be a bit of a show stopper.

Thanks for your help,
Re: Module: Search Engine Friendly URL's
March 30, 2010 03:10PM
Just to note, I've disabled this module on my forum... search result links directing user to a specific message stopped working, some users complained about pm's not working... so...

Edited 1 time(s). Last edit at 03/30/2010 03:11PM by WiiCrazy.
Re: Module: Search Engine Friendly URL's
April 05, 2010 05:51AM
I just tried this on my phorum install and I loved how it changed my thread urls however it broke my ability to send PM and it even broke my posts it would 404 as it attempted to redirect but still post the new thread.

The problem appears to be it breaking the ability to use redirect.php, is there any simple work around for this?

Edited 1 time(s). Last edit at 04/06/2010 04:40PM by linuxuser.
Re: Module: Search Engine Friendly URL's
July 09, 2010 12:03PM
exact same thing happened to me a while back so I had to abandon this module :(

Sad because its very useful.
Re: Module: Search Engine Friendly URL's
August 05, 2011 03:54AM
Just read this entire thread...big round of applause for Martijn whose done a sh*%load of work!!

I just want to check one thing before going ahead with this install. will there be any issues if my site already uses an SEO-friendly .htaccess file in a different folder? I have integrated Phorum into my existing site, which has its own SEO-friendly URL rewrite addon. My existing .htaccess file is located in >public_html. I was thinking of installing and activating Martijn's module and putting this .htaccess in >public_html>phorum. Would this be ok, or would this cause come catastrophic clash that will bring an end to all of humanity?

Thanks, in advance, for your reply.


Re: Module: Search Engine Friendly URL's
August 27, 2011 11:19AM
nice work
Sorry, only registered users may post in this forum.

Click here to login