[bbDev] Custom permalinks patch

Sam Bauers sam at viveka.net.au
Mon Feb 19 13:07:02 GMT 2007


I've been working on a patch to enable custom permalinks ( http:// 
trac.bbpress.org/ticket/579 ) and I've hit a few architectural  
decision making points which I'd like to throw out there for input.

The new methodology is basically going to require people to use  
mod_rewrite instead of having the choice between mod_rewrite and  
Options +MultiViews

Options +MultiViews requires the first directory name to be the same  
as the script it calls, e.g.:
* forum/123 will resolve to forum.php using MultiViews
* mygreatforums/123 will never resolve to forum.php using MultiViews

What do we think about breaking Options +MultiViews support?  
WordPress does not use it, it uses mod_rewrite only AFAIK.

Also, I'm assuming that it would be safe to leave RSS feeds in their  
current uncustomisable state, although I don't mind adding them (it  
just makes the admin page a bit long). Does anyone have a differing  
opinion?

Also, I have limited the support for custom permalinks to include the  
following defaults and variables:

Forums
   Default
   » http://www.example.org/bbpress/forum.php?id=123
   Numeric
   » http://www.example.org/bbpress/forum/123
   Custom
   » %id% = Forum ID

Topics
   Default
   » http://www.example.org/bbpress/topic.php?id=123
   Numeric
   » http://www.example.org/bbpress/topic/123
   Custom
   » %id% = Topic ID

Profiles
   Default
   » http://www.example.org/bbpress/profile.php?id=123
   Numeric
   » http://www.example.org/bbpress/profile/123
   Custom
   » %id% = User ID

Tags
   Default
   » http://www.example.org/bbpress/tags.php?tag=example
   Name
   » http://www.example.org/bbpress/tags/example
   Custom
   » %tag% = Tag name

Views
   Default
   » http://www.example.org/bbpress/view.php?view=example
   Name
   » http://www.example.org/bbpress/view/example
   Custom
   » %view% = View name

Page numbers
   Default
   » ...?page=6
   Numeric
   » .../page/6
   Custom
   » %page% = Page number

I.e., there is no ability on forums and topics and members to create  
permalinks utilising their name or date created. These run into  
deeper issues like UTF-8 and character escaping, some insight into  
how to deal with this mght be found in the WordPress code though.

Thoughts anyone?

Sam


More information about the bbDev mailing list