Firefox PHP

Module: Search Engine Friendly URL's

All files from this thread

File Name File Size   Posted by Date  
sef_urls_1.0.7.tar.gz 4.6 KB open | download Martijn van Maasakkers 06/15/2009 Read message
ss.JPG 135.4 KB open | download jeem 12/06/2008 Read message
sef_urls.php 14.5 KB open | download Phil Connolly 12/02/2009 Read message
Module: Search Engine Friendly URL's
December 05, 2008 07:16AM
I excluded the addons prefix from the rewrite because of issues with modules like embedded_images. I did this as a quickfix because I'm still looking how I can fix this nicely.




This modules creates search engine friendly urls for almost (except search) every url in phorum. The subject of messages are in all the message links. The forum name and the username replacements are temporarily removed because of unfound url creations.

This module requires Apache rewrite rules. Apache is a widely used
web server software package. If your webserver is not an Apache server,
then you will not be able to use this module. If you are unsure, then
check with your hosting provider.

To setup the rewrite rules, create or update the file ".htaccess" inside
your Phorum installation directory (mind the starting dot).
The rewrite rules that have to be added to this file are:

 RewriteEngine On

 # READ RULES
 RewriteRule ^([0-9]*)/([0-9]*)/([0-9]*)/([0-9a-zA-Z\-_=]*)/(.*)$ read.php?$1,$2,$3,$4
 RewriteRule ^([0-9]*)/([0-9]*)/([0-9]*)/(.*)$ read.php?$1,$2,$3
 
 RewriteRule ^([0-9]*)/([0-9]*)/([0-9a-zA-Z\-_=]*)/(.*)$ read.php?$1,$2,$3
 RewriteRule ^([0-9]*)/([0-9]*)/(.*)$ read.php?$1,$2
 RewriteRule ^([0-9]*)/([0-9]*)$ read.php?$1,$2
 
 # DEFAULT RULES
 RewriteRule ^([a-z]*)/([0-9]*)/([0-9a-zA-Z=_\-]*)/([0-9a-zA-Z=_\-]*)/([0-9a-zA-Z=_\-]*)$ $1.php?$2,$3,$4,$5
 RewriteRule ^([a-z]*)/([0-9]*)/([0-9a-zA-Z=_\-]*)/([0-9a-zA-Z=_\-]*)$ $1.php?$2,$3,$4
 RewriteRule ^([a-z]*)/([0-9]*)/([0-9a-zA-Z=_\-/:\.?]*)$ $1.php?$2,$3
 RewriteRule ^([a-z]*)/([0-9]*)$ $1.php?$2
 RewriteRule ^([a-z]+)$ $1.php

Changelog:
----------
2009-06-15 v1.0.7
	- Excluded addon prefix from sef_url because of problems with modules like embedded_images

2009-03-04 v1.0.6
	- Removed multiple php notice generators 

2009-03-04 v1.0.5
	- Changed default rule to one that makes sure the
	- Updated the version number in the info file
	- Added check to breadcrumbs so when there are none the is no php notice of warning...

2008-12-08 v1.0.4
	- Replaced all % to _ to make sure all links will still work, even if translations are not entirely correct

2008-12-08 v1.0.3
	- Added check if page list exists

2008-12-07 v1.0.2
	- Removed css from url translation because of broken url structures
	- Temporarily removed %username% from url's because of issues with unfound links
	- Temporarily removed forum %name% from url's because of issues with unfound links

2008-12-05 v1.0.1
	- Used old url structure for search queries to make sure it won't use too much data from the 
	  mod_rewrite rules
	- Changed all function names from phorum_mod_sef_urls to sef_urls
	- Added the name of the forum after the list url
	- Added the username int the profile url
	- Added message subject replacement int prev/next urls
	- Removed several deprecated functions 

2008-12-04 v1.0.0
	- Initial development release



Edited 7 time(s). Last edit at 06/15/2009 11:11AM by Martijn van Maasakkers.
Attachments:
open | download - sef_urls_1.0.7.tar.gz (4.6 KB)
Re: Module: Search Engine Friendly URL's
December 05, 2008 08:05AM
Hmm, I was about to thank you for this module as many have requested it, but then I noticed you simply teased us with the possibility of a great module and didn't upload the actual files ;-P


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Search Engine Friendly URL's
December 05, 2008 08:07AM
Ah... that was my bad... now i did :D
Re: Module: Search Engine Friendly URL's
December 06, 2008 03:53PM
I tried your module but it messed up my template. I sent a screenshot.

And there's a problem with some links. The link for an user profile is like this: [www.justicia.gen.tr]%

Thanks.


Re: Module: Search Engine Friendly URL's
December 07, 2008 06:52AM
I fixed the issues you stated in 1.0.2. The forum name and username are temporarily stripped 'cause i need to look for more places these are generated. The bug that your images didn't load came from the fact that the css linked were also translated to css/0/css structures, and the browser interpreted that as a directory. That is fixed now...
Re: Module: Search Engine Friendly URL's
December 07, 2008 02:37PM
I'm afraid image links are still incorrect. Like this:
phorum_root/css/6/templates/orangeonolive/images/bgana.gif
Thanks for the effort.



Edited 2 time(s). Last edit at 12/07/2008 02:38PM by jeem.
Re: Module: Search Engine Friendly URL's
December 08, 2008 02:22AM
That's strange, are you sure you updated the code with the new version? It should exclude all css url transformations.
Re: Module: Search Engine Friendly URL's
December 08, 2008 05:00AM
damn, I feel so stupid. I re-downloaded and then re-uploaded the old version. =P Maybe you should delete the old version.

Anyway, there are still some problems. Some images still won't show because their links are like this:
<img src=templates/{TEMPLATE}/x.gif>

These are shown when I'm in www.mysite.com/phorum. But they won't in www.mysite.com/phorum/index (or read, list instead of index). Any idea how to fix that?
Re: Module: Search Engine Friendly URL's
December 08, 2008 05:37AM
relative links won't work with SEF-urls as the browser thinks these are directories.
you will have to change those images to full urls (http:// ... )


Thomas Seifert
Re: Module: Search Engine Friendly URL's
December 08, 2008 05:41AM
Or in this case you could put /phorum/ in front of them...
Sorry, only registered users may post in this forum.

Click here to login