Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Changing Mod Rewrite rules


Sam Bauers
Participant

@sambauers

All the magic happens in bb_repermalink() in bb-includes/function.php but the real problem here is that get_path() splits by “/” to find out the topic/forum/user id.

You could plugin to bb_repermalink() and change the value of $permalink that way.

e.g. if your permalinks were of the form, forum-12, topic-34 etc. (already setup in your .htaccess file)

You could make the following file…


function my_pre_permalink() {
$p = get_path(0);
$p = split('-', $p);
$p = $p[1];
return $p;
}

add_action('pre_permalink', 'my_pre_premalink');

Drop that into your plugins directory and it should work.

Of course I haven’t tested this, but it should work in theory.

Skip to toolbar