Forums

Join
bbPress Support ForumsTroubleshootingCutting /forum/forum/ down to /forum/

Info

Tags

Cutting /forum/forum/ down to /forum/

  1. The base URL of my forum is example.com/forum/

    If I then browse to a specific forum the URL is:
    example.com/forum/forum/forumname

    But I'd rather it was:
    example.com/forum/forumname

    Is there anything I can do to make it follow the later format?

  2. Looks like you have a directory titled "forum" within your forum directory.

  3. No, that's expected behavior:
    http://bbpress.org/forums/forum/installation

  4. That is standard core behavior right now. You would have to hack the core files or come up with a plugin to go around it.

  5. I couldn't find where is it described as expected behaviour. This does seem pretty weird?

  6. It would be more accurate if it read "forums/sub-forum/topic" but it really is just a minor cosmetic issue.

  7. It's actually a pretty simple hack, though I caution you that I worked it out in the last five minutes.

    First, modify the following three lines of your bbpress .htaccess;

    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /bbpress/forum.php?id=&page= [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ /bbpress/forum.php?id= [L,QSA]
    RewriteRule ^forum/?$ /bbpress/ [R=302,L,QSA]

    change ^forum/ to whatever you want the permalink to be, such as ^sub/ or ^purplepolkadots/, whatever works for you. Then open functions.bb-template.php and go to line 711 inside function get_forum_link() (line numbers may vary). It should look something like:

    $link = bb_get_uri('forum/' . $forum->$column . $page, null, $context);

    ...and change 'forum/' to whatever you put in your .htaccess - this seemed to work for me immediately, however as I mentioned, I haven't done any thorough testing of it.

  8. Sam told me this is a throwback to some of the older versions of the software. Hopefully it will be fixed in a future version of bbPress.

  9. You must log in to post.