bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

Create a new Custom Page (Like Wordpress)?

(6 posts)
  • Started 1 year ago by macwise
  • Latest reply from macwise
  • This topic is not resolved

Tags:

  1. Hello,

    I need to add a custom page to my forum that acts like any other page, but with custom content I have added. It's actually going to be a "Contest Status" page, where users can check to see if they have completed the steps necessary to enter the contest, and once they have to track the contest's progress. I know how to create a custom page in wordpress that just points to:

    www.myurl.com/chosen-page-name

    but I can't quite wrap my brain around this in bbpress. I want the most elegant, simplest, and most unobtrusive solution I can find. I would love the page to resolve to:

    www.myurl.com/forum/contest

    Is this functionality built in? Is it plugin-able? (I've never built a plugin). Is there a simple workaround?
    Any tips or information is greatly appreciated.

    Posted 1 year ago #
  2. This is a forum!!!!!!! Not a CMS or something else........

    Posted 1 year ago #
  3. Why not just make a wordpress page? People would still be logged in to see it if you have an integrated installation.

    Posted 1 year ago #
  4. bbolman,

    thanks for the idea. I would probably prefer to do this. However, I have a few bbpress functions being called in the code on the page, and though I could probably dig about and find out how to replace it with wp code, it was not the most pleasant thought. I figured I'd just throw a page up on the bbpress side, and have it resolve at a myurl.com/directory/ as is common with wordpress. I found out how to take care of this...I achieved this by adding two lines in the .htaccess file...

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    I'm not trying to start a battle here, but I think your response, Null, might be a bit short-sighted and aggressive. After all, if I feel my software needs a static page, that may just be what it in fact does need.

    I agree with bbolman that this would probably be more efficiently handled by wordpress. However, since bbpress is still in it's infancy, and it's not integrated fully yet with wordpress, (this is my way of trying to sound like I'm not a completely right-brained individual), I think it's fair to say that these decisions aren't so cut and dried. Anyway, I appreciate the responses all the same, and will post any further findings here...

    Posted 1 year ago #
  5. macwise..

    if you are ok hacking the code.. create a page contest.php in the root forum folder

    add require_once('./bb-load.php'); on the top of the page. and write whatever code you want in the page.. that should create a static page with bbpress functions..

    as far as rewrite is concerned.. im not 100% sure but i think multiviews will automatically translate /contest.php to /contest/. test it and see.

    Posted 1 year ago #
  6. Ok, this is the solution that worked for me. I did have to add the rewrite rule, as multiviews isn't working on my server??? (I think I'm running on php4, is that why?) So, for others who want a wal-mart type bb build ;) here's a recap of what I did:

    I created a page in my bbpress root called contest.php. Inside of that page I put:

    <?php
    require('./bb-load.php');
    bb_load_template( 'contest.php' );
    ?>

    I then created my contest.php page with the content I needed (the template)

    The last thing I did was to put these two lines in my .htaccess file IN MY FORUM ROOT FOLDER, (not my wordpress root folder):

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    This basically says that myurl.com/my/forum/directory/contest (without the trailing backslash)
    and myurl.com/my/forum/directory/contest (with the trailing backslash)

    will both point to the contest.php page in the root forum directory.

    As so1o said, this last part in .htaccess may be unnecessary if you have multiviews enabled (if your .htaccess file in your FORUM directory has this line: "Options +MultiViews"). Maybe someone else can confirm/deny this, as my configuration is different.

    Hope this helps someone else who needs some custom functionality out of bbpress.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.