<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Tag: slug</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Tag: slug</description>
<language>en</language>
<pubDate>Sun, 07 Sep 2008 07:02:56 +0000</pubDate>

<item>
<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18221</link>
<pubDate>Tue, 12 Aug 2008 22:26:29 +0000</pubDate>
<dc:creator>flywitness</dc:creator>
<guid isPermaLink="false">18221@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;got it working by doing this&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://bbpress.org/forums/topic/admin-link-not-working-solution&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/forums/topic/admin-link-not-working-solution&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18142</link>
<pubDate>Mon, 11 Aug 2008 13:09:26 +0000</pubDate>
<dc:creator>flywitness</dc:creator>
<guid isPermaLink="false">18142@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;actually, the admin link only works if you login on the bbpress page.&#60;/p&#62;
&#60;p&#62;bummer
&#60;/p&#62;</description>
</item>
<item>
<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18139</link>
<pubDate>Mon, 11 Aug 2008 11:19:48 +0000</pubDate>
<dc:creator>flywitness</dc:creator>
<guid isPermaLink="false">18139@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;the admin link can be brought to life by adding this:&#60;/p&#62;
&#60;p&#62;RewriteRule ^bb-admin/$ - [L]&#60;/p&#62;
&#60;p&#62;before this line:&#60;/p&#62;
&#60;p&#62;RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$  topic.php?id=$2&#38;#38;page=$3 [L,QSA]&#60;/p&#62;
&#60;p&#62;and to resurrect login, remove or comment out the line:&#60;/p&#62;
&#60;p&#62;RewriteRule ^bb-login.php$ index.php&#60;/p&#62;
&#60;p&#62;i don't know why its there. perhaps its for something important that i don't get.
&#60;/p&#62;</description>
</item>
<item>
<title>_ck_ on "Permalink and slug rebuild?"</title>
<link>http://bbpress.org/forums/topic/permalink-and-slug-rebuild#post-17658</link>
<pubDate>Fri, 25 Jul 2008 20:56:05 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">17658@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Yes I am familiar with that WP redirect plugin - it saves the old permalink in meta and checks the meta when a url is not found.&#60;/p&#62;
&#60;p&#62;It would be an interesting port for bbPress but I am too burnt out on bbPress stuff right now to give it a go.  I highly suggest the phpmyadmin method for now to just manually edit the permalink since it's a one-time deal.
&#60;/p&#62;</description>
</item>
<item>
<title>gio500000 on "Permalink and slug rebuild?"</title>
<link>http://bbpress.org/forums/topic/permalink-and-slug-rebuild#post-17643</link>
<pubDate>Fri, 25 Jul 2008 13:50:57 +0000</pubDate>
<dc:creator>gio500000</dc:creator>
<guid isPermaLink="false">17643@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;There's a great redirection plugin I use with wordpress to fix that issue.  Maybe if this became a feature a plugin could be created to fix the old links indexed in the search engines.&#60;/p&#62;
&#60;p&#62;Thank you,&#60;br /&#62;
Gio
&#60;/p&#62;</description>
</item>
<item>
<title>_ck_ on "Permalink and slug rebuild?"</title>
<link>http://bbpress.org/forums/topic/permalink-and-slug-rebuild#post-17639</link>
<pubDate>Fri, 25 Jul 2008 07:10:20 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">17639@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;That's an interesting idea (doesn't exist but interesting).&#60;br /&#62;
However it would break any links you have in search engines.&#60;/p&#62;
&#60;p&#62;If you have access to phpmyadmin you could edit the forum permalinks directly if need be.
&#60;/p&#62;</description>
</item>
<item>
<title>gio500000 on "Permalink and slug rebuild?"</title>
<link>http://bbpress.org/forums/topic/permalink-and-slug-rebuild#post-17617</link>
<pubDate>Thu, 24 Jul 2008 20:34:06 +0000</pubDate>
<dc:creator>gio500000</dc:creator>
<guid isPermaLink="false">17617@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I'm using the name based permalinks.  After renaming a forum title the slug or permalink did not change.  Is there a rebuild permalink feature similar to wordpress?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Gio
&#60;/p&#62;</description>
</item>
<item>
<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16164</link>
<pubDate>Mon, 12 May 2008 18:01:29 +0000</pubDate>
<dc:creator>mrhoratio</dc:creator>
<guid isPermaLink="false">16164@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Nevermind my last post. You can just swap the positions of line 43 and 45, in bb-post.php, and it works. Not sure why, but it does.
&#60;/p&#62;</description>
</item>
<item>
<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16145</link>
<pubDate>Mon, 12 May 2008 05:27:24 +0000</pubDate>
<dc:creator>mrhoratio</dc:creator>
<guid isPermaLink="false">16145@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I discovered another issue with this hack. If you write a new post in a new topic, after the submitting the form, you are redirected back to the forum's front page, instead of the forum you were on. I spent some time digging around the get_post_link() related functions, and couldn't figure out exactly what was going on. However, I was able to make this modification to the bb-post.php file to get it to redirect properly.&#60;/p&#62;
&#60;p&#62;Paste this after line 43, in bb-post.php of bbPress 0.9.0.2&#60;br /&#62;
&#60;code&#62;$link = str_replace(&#38;#39;forums/&#38;#39;, &#38;quot;forums/&#38;quot;. $forum-&#38;gt;$topic_slug, $link);&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16042</link>
<pubDate>Wed, 07 May 2008 21:31:39 +0000</pubDate>
<dc:creator>mrhoratio</dc:creator>
<guid isPermaLink="false">16042@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I just found a blog post about this, where the author has made the code into a plugin. It's available for download here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/&#34; rel=&#34;nofollow&#34;&#62;http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The author lists two minor issues here, which hopefully someone here can suggest a fix for:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
• The Link to BBpress admin board link does not work from main site. It redirects to home page. You will need to manually type the link to go inside.&#60;/p&#62;
&#60;p&#62;• In case you type something which does not exists as &#60;a href=&#34;http://sitename.com/&#38;lt;bbpress-directory&#38;gt;/sdaksda&#34; rel=&#34;nofollow&#34;&#62;http://sitename.com/&#38;lt;bbpress-directory&#38;gt;/sdaksda&#60;/a&#62; it returns &#60;a href=&#34;http://sitename.com/&#38;lt;bbpress-directory&#38;gt;//&#34; rel=&#34;nofollow&#34;&#62;http://sitename.com/&#38;lt;bbpress-directory&#38;gt;//&#60;/a&#62; . An extra slash.&#60;/p&#62;
&#60;/blockquote&#62;</description>
</item>
<item>
<title>_ck_ on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14701</link>
<pubDate>Wed, 26 Mar 2008 18:33:47 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">14701@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;If this is known working, it's useful as a few people have requested the ability to remove /forum/ and /topic/&#60;/p&#62;
&#60;p&#62;The author should be encouraged to add this to the plugin browser:&#60;br /&#62;
&#60;a href=&#34;http://bbpress.org/plugins/requests/&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/plugins/requests/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>motaboy21 on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14697</link>
<pubDate>Wed, 26 Mar 2008 15:00:34 +0000</pubDate>
<dc:creator>motaboy21</dc:creator>
<guid isPermaLink="false">14697@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;should i add the first code before the ?&#38;gt; right? because that didnt worked out for me... and the mod rewrite rules i added to the .htacess file, i have some coding there:&#60;/p&#62;
&#60;p&#62;Options +FollowSymLinks +ExecCGI&#60;/p&#62;
&#60;p&#62;&#38;lt;IfModule mod_rewrite.c&#38;gt;&#60;br /&#62;
  RewriteEngine On&#60;br /&#62;
  RewriteBase /&#60;/p&#62;
&#60;p&#62;  RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/([^/]+)/?$ /tags.php?tag=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/?$ /tags.php [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&#38;#38;tab=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&#38;#38;tab=$2&#38;#38;page=$3 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/?$ /rss.php [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]&#60;br /&#62;
&#38;lt;/IfModule&#38;gt;&#60;/p&#62;
&#60;p&#62;should i delete this and copy the one you gave me?
&#60;/p&#62;</description>
</item>
<item>
<title>steward on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14442</link>
<pubDate>Thu, 13 Mar 2008 06:31:37 +0000</pubDate>
<dc:creator>steward</dc:creator>
<guid isPermaLink="false">14442@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Yesssss I did it!!!&#60;br /&#62;
Instructions for Apache users:&#60;br /&#62;
1. Append to &#38;lt;bbpress-root&#38;gt;/bb-includes/template-functions.php before &#34;?&#38;gt;&#34; code from first message in this topic.&#60;br /&#62;
2. Create or edit .htaccess file in &#38;lt;bbpress-root&#38;gt; directory and put into then next code&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Options +FollowSymlinks

RewriteEngine On

RewriteBase /!!!!!! your bbpress root dir!!!!!!!/ #edit this!!!!

RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ 		tags.php?tag=$1&#38;#38;page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ 				tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ 					tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ 		profile.php?id=$1&#38;#38;page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ 		profile.php?id=$1&#38;#38;tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ 	profile.php?id=$1&#38;#38;tab=$2&#38;#38;page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ 			profile.php?id=$1 [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ 		view.php?view=$1&#38;#38;page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ 				view.php?view=$1 [L,QSA]
RewriteRule ^rss/?$ 					rss.php [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ 			rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ 			rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ 			rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ 			rss.php?profile=$1 [L,QSA]

RewriteRule ^bb-login.php$ index.php

RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ 		topic.php?id=$2&#38;#38;page=$3 [L,QSA]
RewriteRule ^([^/.]+)/([^.]+)/?$ 			topic.php?id=$2 [L,QSA]

RewriteRule ^([^/.]+)/page/([0-9]+)/?$ 			forum.php?id=$1&#38;#38;page=$2 [L,QSA]
RewriteRule ^([^/.]+)/?$ 				forum.php?id=$1 [L,QSA]&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>steward on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14399</link>
<pubDate>Tue, 11 Mar 2008 12:26:47 +0000</pubDate>
<dc:creator>steward</dc:creator>
<guid isPermaLink="false">14399@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Help... I don't understand anything :(.&#60;br /&#62;
I read step by step your instruction and do all what do you wrote.&#60;br /&#62;
But at the and I got: &#34;The requested URL /&#38;lt;forum-home-dir&#38;gt;/&#38;lt;forum-slug&#38;gt; was not found on this server.&#34;&#60;/p&#62;
&#60;p&#62;What I do wrong?
&#60;/p&#62;</description>
</item>
<item>
<title>gusext on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-13090</link>
<pubDate>Thu, 10 Jan 2008 16:06:55 +0000</pubDate>
<dc:creator>gusext</dc:creator>
<guid isPermaLink="false">13090@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;it is currently active on tour2000.it/forum (it's a BIG forum with multiple domains names (~20)  and forum names).
&#60;/p&#62;</description>
</item>
<item>
<title>kaolin on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-12905</link>
<pubDate>Thu, 27 Dec 2007 09:14:10 +0000</pubDate>
<dc:creator>kaolin</dc:creator>
<guid isPermaLink="false">12905@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;haven't, but it looks reasonable.
&#60;/p&#62;</description>
</item>
<item>
<title>mvh on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-12843</link>
<pubDate>Sat, 22 Dec 2007 10:06:59 +0000</pubDate>
<dc:creator>mvh</dc:creator>
<guid isPermaLink="false">12843@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Has anyone tried this?
&#60;/p&#62;</description>
</item>
<item>
<title>gusext on "nicer slug url rewrite plugin (done!)"</title>
<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-10610</link>
<pubDate>Thu, 30 Aug 2007 15:54:43 +0000</pubDate>
<dc:creator>gusext</dc:creator>
<guid isPermaLink="false">10610@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hi all. &#60;/p&#62;
&#60;p&#62;(Sorry for my bad english. I tried to be verbose in order to avoid my bad english affect your understanding)&#60;/p&#62;
&#60;p&#62;I wrote a plug-in, in order to have the best rewrite rules (in my opinion :p ) in the world.&#60;/p&#62;
&#60;p&#62;this plugin achieves two things:&#60;/p&#62;
&#60;p&#62;One: I need to show, in the URL, the logical parent-to-child relation between forums and topics, so&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/topic/my-sweet-dog&#60;/a&#62;&#60;br /&#62;
URL has to show the forum that contains the topic, and become&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;when performing the rewrite, the rules totally ignore the forum part, so it's only a visual thing.&#60;/p&#62;
&#60;p&#62;and, more difficult, &#60;/p&#62;
&#60;p&#62;Two: I need to shorten the URL and have fewer subdirectories, so&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#60;/a&#62;&#60;br /&#62;
has to lose the useless &#34;/forum/&#34; and the useless &#34;/topic/&#34; parts, and become&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/pets-discussions/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/pets-discussions/my-sweet-dog&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;ATTENTION: you cannot do the second thing without the first thing. you must be able, in rewrite rules, to discriminate between a topic and a forum. you then will have that forums have one string (the forum slugged name), while topics have two strings (the forum slugged name and the topic slugged name), so you can do that, and /pets-discussion/my-sweet-dog will belong to &#34;My Sweet Dog&#34; topic in &#34;Pets Discussions&#34; forum&#60;/p&#62;
&#60;p&#62;In order to do so, I need to&#60;br /&#62;
- modify forum link creation&#60;br /&#62;
- modify topic link creation&#60;br /&#62;
- modify rewrite rules&#60;br /&#62;
- avoid a forum to have a reserved name, as using bbpressfolder/forumname to reach a forum is risky! I have to prevent a forum from having a slugged name like &#34;bb-admin&#34;!!!	here's a list of reserved words:&#60;br /&#62;
- all words with a dot. those are files, like style.css and so on. the slugged names never have a dot. I have only to avoid rewrite of dotted words.&#60;br /&#62;
	- all bbpress subfolders and special folders. these are all that start with&#60;br /&#62;
		bb-* , 	my-*&#60;br /&#62;
	- every other reserved word already used by rewrite engine:&#60;br /&#62;
		tag, profiles, view, rss&#60;/p&#62;
&#60;p&#62;All this is achieved adding a &#34;r-&#34; string in front of the slugged string. so a forum named &#34;My Forum!&#34; will have &#34;r-my-forum&#34; as slugged name. Unfortunately, this filter operates also for topic names and maybe other things. this mean that a topic named &#34;rss&#34; will have &#34;r-rss&#34; as slugged name. Not so bad, in facts.&#60;/p&#62;
&#60;p&#62;So these are the operations:&#60;br /&#62;
- add a filter to get_forum_link (delete the &#34;/forum&#34; part)&#60;br /&#62;
- add a filter to get_topic_link (add the &#34;forum/slug-forum-name&#34; in the link, and eliminate the &#34;/forum&#34; and &#34;/topic&#34; parts)&#60;br /&#62;
- modify the rewrite rules (I used IIS isapirewrite, but apache is pretty the same)&#60;br /&#62;
- add a filter to bb_slug_sanitize (avoid a forum to have a reserved word as slugged-name, like &#34;rss&#34;, &#34;profiles&#34;, &#34;my-plugins&#34;, etc&#60;/p&#62;
&#60;p&#62;And there is the code for these operations:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_get_forum_link_filter( $link , $forum_id = 0 ) {
	//retrieve the forum object
    $forum = get_forum( get_forum_id( $forum_id ));

    //check for rewrite
	$rewrite = bb_get_option( &#38;#39;mod_rewrite&#38;#39; );
	if ( $rewrite ) {
		//what kind of rewrite there is? slug use &#38;quot;forum_slug&#38;quot; column, else the column is &#38;quot;forum_id&#38;quot;
		$column = ($rewrite === &#38;#39;slugs&#38;#39;)?(&#38;#39;forum_slug&#38;#39;):(&#38;#39;forum_id&#38;#39;);

		//	change /forum/pets-discussions in /pets-discussions
		//		this work only if the rewrite module is modded!
		//		and this work only if the slugged name will NEVER
		//		be a reserved word like &#38;quot;rss&#38;quot; or &#38;quot;bb-images&#38;quot;
		//		and this is achieved by a filter on bb_slug_sanitize
		$link = str_replace(&#38;#39;forum/&#38;#39; . $forum-&#38;gt;$column , $forum-&#38;gt;$column, $link);
	}
    return $link; // Very important line!
}

add_filter( &#38;#39;get_forum_link&#38;#39;, &#38;#39;my_get_forum_link_filter&#38;#39; );

function my_get_topic_link_filter( $link, $topic_id = 0) {
	//retrieve the topic object
	$topic = get_topic( get_topic_id( $topic_id ));

	//retrieve the forum object that is the topic container
	$forum = get_forum( get_forum_id( $topic-&#38;gt;forum_id ));

	//check for rewrite
	$rewrite = bb_get_option( &#38;#39;mod_rewrite&#38;#39; );
	if ( $rewrite ) {
		//what kind of rewrite there is? slug use &#38;quot;forum_slug&#38;quot; column, else the column is &#38;quot;forum_id&#38;quot;
		$column = ($rewrite === &#38;#39;slugs&#38;#39;)?(&#38;#39;forum_slug&#38;#39;):(&#38;#39;forum_id&#38;#39;);

		//create the &#38;quot;forum/pets-discussions&#38;quot; chunk to show the hierarchical relation forum-&#38;gt;topic
		$forum_nice_uri = &#38;quot;forum/&#38;quot; . $forum-&#38;gt;$column . &#38;quot;/&#38;quot;;

		//attach the hierarchical chunk to the link
		$link = str_replace(bb_get_option(&#38;#39;uri&#38;#39;), bb_get_option(&#38;#39;uri&#38;#39;) . $forum_nice_uri, $link);

		//	change /forum/pets-discussions/topic/my-sweet-dog in /pets-discussions/my-sweet-dog
		//		this work only if the rewrite module is modded!
		//		and this work only if the slugged name will NEVER
		//		be a reserved word like &#38;quot;rss&#38;quot; or &#38;quot;bb-images&#38;quot;
		//		and this is achieved by a filter on bb_slug_sanitize
		$link = str_replace(&#38;#39;forum/&#38;#39; . $forum-&#38;gt;$column , $forum-&#38;gt;$column, $link);
		$link = str_replace(&#38;#39;topic/&#38;#39; . $topic-&#38;gt;$column , $topic-&#38;gt;$column, $link);
	}

    return $link; // Very important line!
}

add_filter( &#38;#39;get_topic_link&#38;#39;, &#38;#39;my_get_topic_link_filter&#38;#39; );

function my_bb_slug_sanitize_filter( $text_slug, $text_original = &#38;#39;&#38;#39;, $length = 0 ) {
	// add &#38;quot;r-&#38;quot; by regex when the string begins with &#38;quot;bb-&#38;quot; or &#38;quot;my-&#38;quot; or is a reserved word
	return preg_replace(&#38;#39;/^(my-.*&#124;bb-.*&#124;rss&#124;tags&#124;view&#124;profiles)$/&#38;#39;, &#38;#39;r-$1&#38;#39;, $text_slug);
}

add_filter( &#38;#39;bb_slug_sanitize&#38;#39;, &#38;#39;my_bb_slug_sanitize_filter&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And there's the rewrite rules! ATTENTION!!!!! these rules are for IIS isapirewrite, so these are to be modded to work with apache! sorry but I don't have any apache installation to play with. It's a simple task, anyway. Every regex guru and regex accolite can do that. Even a regex wannabe can find out googling.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;#	first we rewrite the pages for normal slug-rewrite usage

RewriteRule /bbpress/tags/([^/\?]+)/page/([0-9]+)(?:\?(.*))? 					/forum2/tags.php\?tag=$1&#38;#38;page=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/tags/([^/\?]+)/?(?:\?(.*))? 								/forum2/tags.php\?tag=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/tags/?(?:\?(.*))? 									/forum2/tags.php(?1\?$1:) [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/page/([0-9]+)(?:\?(.*))? 				/forum2/profile.php\?id=$1&#38;#38;page=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/([a-z-]+)(?:\?(.*))? 					/forum2/profile.php\?id=$1&#38;#38;tab=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/([a-z-]+)/page/([0-9]+)(?:\?(.*))? 	/forum2/profile.php\?id=$1&#38;#38;tab=$2&#38;#38;page=$3?4&#38;#38;$4: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/?(?:\?(.*))? 							/forum2/profile.php\?id=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/view/([a-z-]+)/page/([0-9]+)(?:\?(.*))? 			/forum2/view.php\?view=$1&#38;#38;page=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/view/([a-z-]+)(?:\?(.*))? 							/forum2/view.php\?view=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/rss/(?:\?(.*))? 									/forum2/rss.php\?1&#38;#38;$1: [I,L]
RewriteRule /bbpress/rss/forum/([0-9]+)(?:\?(.*))? 						/forum2/rss.php\?forum=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/rss/topic/([0-9]+)(?:\?(.*))? 						/forum2/rss.php\?topic=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/rss/tags/([a-z-]+)(?:\?(.*))? 						/forum2/rss.php\?tag=$1?2&#38;#38;$2: [I,L]
RewriteRule /bbpress/rss/profile/([0-9]+)(?:\?(.*))? 					/forum2/rss.php\?profile=$1?2&#38;#38;$2: [I,L]

#	then we have a rule for special words, so they are left as they are, and the isapi module does not proceed further

RewriteRule /bbpress/(my-.*&#124;bb-.*&#124;rss&#124;tags&#124;view&#124;profiles)(/.*)?		/forum2/$1$2 [I,L]

#	then we have the forum and topic rules.
#	ATTENTION: we DO NOT rewrite a dottet word, because dotted words can be files like style.css and so on

#	before there are the topic rewrites, that are longer
#	ATTENTION: note that the forum name is totally skipped trough ?: notation. In facts, bbpress doesn&#38;#39;t need the forum name when reading a topic
RewriteRule /bbpress/(?:[^\./\?]+)/([^\./\?]+)/page/([0-9]+)(?:\?(.*))? 	/forum2/topic.php\?id=$1&#38;#38;page=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/(?:[^\./\?]+)/([^\./\?]+)/?(?:\?(.*))? 				/forum2/topic.php\?id=$1?2&#38;#38;$2: [I,L]

#	and after there are the forum rewrites, that are shorter
RewriteRule /bbpress/([^\./\?]+)/page/([0-9]+)(?:\?(.*))? 				/forum2/forum.php\?id=$1&#38;#38;page=$2?3&#38;#38;$3: [I,L]
RewriteRule /bbpress/([^\./\?]+)/?(?:\?(.*))? 							/forum2/forum.php\?id=$1?2&#38;#38;$2: [I,L]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And that's all. I hope someone can use this plugin :)&#60;/p&#62;
&#60;p&#62;Gus&#60;br /&#62;
email: shiawase at gmail dot com
&#60;/p&#62;</description>
</item>
<item>
<title>mdawaffe on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8605</link>
<pubDate>Fri, 29 Jun 2007 07:18:05 +0000</pubDate>
<dc:creator>mdawaffe</dc:creator>
<guid isPermaLink="false">8605@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;You can use the script attached to that ticket: &#60;a href=&#34;http://trac.bbpress.org/ticket/671&#34; rel=&#34;nofollow&#34;&#62;http://trac.bbpress.org/ticket/671&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It will only work once you upgrade to the next version of bbPress (it's not out yet :) ) or if you're running the &#34;unstable&#34; code in the repository.&#60;/p&#62;
&#60;p&#62;Follow the instructions in the &#60;a href=&#34;http://trac.bbpress.org/ticket/671#comment:4&#34;&#62;last comment&#60;/a&#62;.
&#60;/p&#62;</description>
</item>
<item>
<title>marky on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8496</link>
<pubDate>Tue, 26 Jun 2007 18:34:58 +0000</pubDate>
<dc:creator>marky</dc:creator>
<guid isPermaLink="false">8496@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Wonderful, thank you!&#60;/p&#62;
&#60;p&#62;Is there a utility that will re-generate the slugs for me? Manually changing the database isn't really a viable option for me, I'm afraid. I have thousands of posts and no way of immediately knowing which were affected by this issue.
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8492</link>
<pubDate>Tue, 26 Jun 2007 03:51:36 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">8492@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Now fixed in Subversion repository.
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8421</link>
<pubDate>Sun, 24 Jun 2007 01:21:06 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">8421@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Ticket here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://trac.bbpress.org/ticket/671&#34; rel=&#34;nofollow&#34;&#62;http://trac.bbpress.org/ticket/671&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8420</link>
<pubDate>Sun, 24 Jun 2007 01:16:08 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">8420@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I think there is a problem with the upgrade script that causes this. There is no problem creating new topics.&#60;/p&#62;
&#60;p&#62;You can manually edit the slugs in the database if you have this problem on a production site.&#60;/p&#62;
&#60;p&#62;I'll raise a ticket about this though.
&#60;/p&#62;</description>
</item>
<item>
<title>marky on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8356</link>
<pubDate>Thu, 21 Jun 2007 13:40:39 +0000</pubDate>
<dc:creator>marky</dc:creator>
<guid isPermaLink="false">8356@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;During the upgrade. Admittedly, I haven't tried it when making new topics with duplicate names yet.
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8337</link>
<pubDate>Thu, 21 Jun 2007 01:27:10 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">8337@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Did this happen during the upgrade? Or when making the topics?
&#60;/p&#62;</description>
</item>
<item>
<title>marky on "Slugs and Duplicates"</title>
<link>http://bbpress.org/forums/topic/slugs-and-duplicates#post-8312</link>
<pubDate>Wed, 20 Jun 2007 13:45:11 +0000</pubDate>
<dc:creator>marky</dc:creator>
<guid isPermaLink="false">8312@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I've noticed when multiple topics share the same topic name, the slug gets modified a little strangely. For example, if I have four topics named &#34;Test&#34; the slugs would be:&#60;/p&#62;
&#60;ul&#62;
&#60;li&#62;&#60;a href=&#34;http://www.example.com/topic/test&#34; rel=&#34;nofollow&#34;&#62;www.example.com/topic/test&#60;/a&#62;&#60;/li&#62;
&#60;li&#62;&#60;a href=&#34;http://www.example.com/topic/test-1-2&#34; rel=&#34;nofollow&#34;&#62;www.example.com/topic/test-1-2&#60;/a&#62;&#60;/li&#62;
&#60;li&#62;&#60;a href=&#34;http://www.example.com/topic/test-1-2-3&#34; rel=&#34;nofollow&#34;&#62;www.example.com/topic/test-1-2-3&#60;/a&#62;&#60;/li&#62;
&#60;li&#62;&#60;a href=&#34;http://www.example.com/topic/test-1-2-3-4&#34; rel=&#34;nofollow&#34;&#62;www.example.com/topic/test-1-2-3-4&#60;/a&#62;&#60;/li&#62;
&#60;li&#62;And so forth...&#60;/li&#62;
&#60;/ul&#62;
&#60;p&#62;I'd imagine by the 50th topic, the URL would become quite unwieldy. Surely only the last slug number is necessary. Is there any way to fix this? Since these are supposed to be permalinks, it's somewhat urgent.
&#60;/p&#62;</description>
</item>
<item>
<title>karaboga on "Changing the slug of permalinks like topic, profile"</title>
<link>http://bbpress.org/forums/topic/changing-the-slug-of-permalinks-like-topic-profile#post-8234</link>
<pubDate>Tue, 19 Jun 2007 06:48:20 +0000</pubDate>
<dc:creator>karaboga</dc:creator>
<guid isPermaLink="false">8234@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Thank you very much, but I am not able to write any plugin. :)
&#60;/p&#62;</description>
</item>
<item>
<title>mdawaffe on "Changing the slug of permalinks like topic, profile"</title>
<link>http://bbpress.org/forums/topic/changing-the-slug-of-permalinks-like-topic-profile#post-8224</link>
<pubDate>Tue, 19 Jun 2007 04:24:41 +0000</pubDate>
<dc:creator>mdawaffe</dc:creator>
<guid isPermaLink="false">8224@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;You can change some of the views (untagged,  no-replies, ...) with a plugin filtering on &#60;code&#62;bb_views&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;For the rest, you'll have to use rewrite rules.  You'll also have write a plugin that filters on &#60;code&#62;get_topic_link&#60;/code&#62;, &#60;code&#62;get_forum_link&#60;/code&#62;, and so on or bbPress will end up in an infinite redirect loop.
&#60;/p&#62;</description>
</item>
<item>
<title>karaboga on "Changing the slug of permalinks like topic, profile"</title>
<link>http://bbpress.org/forums/topic/changing-the-slug-of-permalinks-like-topic-profile#post-8220</link>
<pubDate>Tue, 19 Jun 2007 04:11:25 +0000</pubDate>
<dc:creator>karaboga</dc:creator>
<guid isPermaLink="false">8220@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hi, my request will be useful especially for people using non-English bbPress versions.&#60;/p&#62;
&#60;p&#62;There are some permalinks which are not translateable or changeable in bbPress. For example, in WordPress, we can change the slug of the permalinks for &#34;category&#34;.&#60;/p&#62;
&#60;p&#62;I think it will be very appropriate if that kind of property is added to bbPress. These are some of that slugs:&#60;/p&#62;
&#60;p&#62;topic, profile, forum, view, no-replies, untagged, tags, replies&#60;/p&#62;
&#60;p&#62;(By the way, can we change these slugs by any hack?)
&#60;/p&#62;</description>
</item>

</channel>
</rss>
