Skip to:
Content
Pages
Categories
Search
Top
Bottom

“Add new” link in forum frontpage working wrong

  • Hi;

    The “Add new” link that is just below “Latest Discussions” title in bbpress frontpage messes my bbpress theme.

    Latest Discussions

    Topic — Add New »

    Whenever you click that “add new” you are taken to a new page with this link; …/bbpress/?new=1 and I can see the header and footer ok but sidebar and post-form are messed.

    Which template files are used to create the ?new=1 page? I can’t locate my mistake.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Front-page.php I believe is used to create the ?new=1 page.

    Near the very bottom, look for a <?php endif; else : ?> line. Below this it should have code for <h3 class="bbcrumb"> ... and then <?php post_form(); endif; ?>

    The code between the else : and the endif; are what executes to make the ?new=1 page. Looking at my theme in comparison, I think that the </div> underneath the else : ... endif; should actually be above it. Try it. If it works, come back and tell us please, because then we should probably make a trac ticket. Never noticed this before – I hacked up kakumei into my template straight away and assumed it to be a fault of mine in rewriting the horrible if : endif; method into nice braces.

    [Edit] Just tested it myself, and there are five </div> in the page source in kakumei and only four <div. Pretty sure that’ll be your problem.

    Thanks a lot fel64!

    “Try it. If it works, come back and tell us please, because then we should probably make a trac ticket.”

    It works! Code should be;

    </div> <!– this div now is here –>

    <?php endif; else : // $forums ?>

    <h3 class=”bbcrumb”>“><?php bb_option(‘name’); ?></h3>

    <?php post_form(); endif; ?>

    <!– </div> and before was here –>

    :)

    Cool, glad to help. :)

    Ticket #656

    WARNING!!!!!! new error!

    I’ve just realized that after moving that div and when the user logouts the front page is messed.

    I moved the div to the former place and front page displays ok again.

    So;

    * div in former place + logged out user = front-page ok but add new link not working

    * div above <?php endif; else : // $forums ?> + logged in user = add new link working but frontpage messed. :(

    I copied this warning in Ticket #656

    Alright. Split up the <?php endif; else : // $forums ?> into <?php endif; ?> and <?php else : ?> and put the </div> we were moving around between them. Could work.

    if splitted;

    Parse error: syntax error, unexpected T_ELSE

    for <?php else : ?>

    I’ve been watching the resulting code with fire fox and I notice that

    a </div> appears and this one was not opened before;

    <p>Allowed markup: a blockquote br code em strong ul ol li.
    Put code in between backticks.</p>

    <input type=”hidden” name=”_wpnonce” value=”9e88410df1″ /><input type=”hidden” name=”_wp_http_referer”

    value=”/wordpress/bbpress/?new=1″ />

    </form>

    </div>

    but in post form there is not any div

    sorry, it is the same div that we were talking before

    well, I moved that div before the viwdiv thing;

    </div> <!– moved here –>

    <?php if ( bb_is_user_logged_in() ) : ?>

    <div id=”viewdiv”>

    and now it seems to work, but I’ll have to check further

    Try this one:

    <?php endif; else : ?> line. Below this it should have code for <h3 class=”bbcrumb”> … and then <?php post_form(); endif; ?>

    It will help!

    Greetz

    Thank you very much Schmuck :-)

    this one is working ok so far as well;

    </div> <!– moved here –>

    <?php if ( bb_is_user_logged_in() ) : ?>

    <div id=”viewdiv”>

    sorry, i still don’t quite understand how it works

    i don’t see the viewdiv on my frontpage, was following the instructions halfway and the page to adding new topic got fixed but the home page got screwed

    how should i go about doing this?

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