Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create a new Custom Page (Like WordPress)?

  • 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:

    http://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:

    http://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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • This is a forum!!!!!!! Not a CMS or something else……..

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

    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…

    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.

    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.


    jurasiks
    Participant

    @jurasiks

    it’s possible to make uniq title for each of custom pages?


    Michael
    Participant

    @michael888

    Hi there :)

    I’m not 100% sure how it would work on a manual basis. There is a plugin called bbPages (https://bbpress.org/plugins/topic/bbpages/) that will have support for “pretty permalinks” in the near future.

    Some-one may have to take over the development of this plugin. It may happen in the next couple of months.


    sockmoney
    Member

    @sockmoney

    We use the bbpages plugin and simply do some url rewrites in htaccess to make the urls prettier.


    Michael
    Participant

    @michael888

    About that – I’m not sure exactly how it is done.

    I have two pages set up: FAQ and Rules. What do I need to add to the htaccess file, and which file do I use?


    Michael
    Participant

    @michael888

    Not to worry – I did some research and found what I was looking for. Simply integrated it into the existing htaccess file – all is working just fine. :)

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar