Info
- 14 posts
- 4 voices
- Started 4 years ago by ganzua
- Latest reply from qlister
- This topic is not resolved
"Add new" link in forum frontpage working wrong
-
- Posted 4 years ago #
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.
-
- Posted 4 years ago #
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 theendif;are what executes to make the?new=1page. Looking at my theme in comparison, I think that the</div>underneath theelse : ... 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. -
- Posted 4 years ago #
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 -->
:)
-
- Posted 4 years ago #
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. :(
-
- Posted 4 years ago #
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. -
- Posted 4 years ago #
if splitted;
Parse error: syntax error, unexpected T_ELSE
for <?php else : ?>
-
- Posted 4 years ago #
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 betweenbackticks.</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
-
- Posted 4 years ago #
sorry, it is the same div that we were talking before
-
- Posted 4 years ago #
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
-
- Posted 4 years ago #
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
-
- Posted 4 years ago #
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"> -
- Posted 3 years ago #
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 screwedhow should i go about doing this?
-
You must log in to post.