Forums

Join
bbPress Support ForumsThemesNeed to fix a couple of things in theme

Info

Tags

Need to fix a couple of things in theme

  1. Hello!
    I am working on a bbPress theme which can be seen at http://bbpress.ashfame.com/
    I have a problem that when I click the "Add new" link on the front page, the page is broken in markup (also returns invalid markup - http://bbpress.ashfame.com/?new=1 )
    Which template file does it use to generate?
    And the login code doesn't spit out the code in the sidebar when on register page ( http://bbpress.ashfame.com/register.php ) or on lost password page ( http://bbpress.ashfame.com/bb-login.php )

  2. The new post template is stored under post-form.php. register.php and bb-login.php are seperate pages that only include header.php and footer.php, so you'd need to include the sidebar either manually or in the header or footer respectively. Hope that helps!

  3. I fixed the second & third issue but I am still stuck at the first one.
    Looking at the markup I found <select name="forum_id" id="forum-id""> is being generated by bbPress codebut the same works in default theme flawlessly so this isn't the cause. Can I have the complete lookup order for file required to generate the "Add new" page.

  4. Hmm... as far as I can work out, (at least with pretty links on) a forum link redirects to forum.php which invokes post_form() towards the end of the page. That's found in functions.bb-template.php (under bb-includes) and as well as running the respective pre/during/post actions, it loads the post-form.php template from the theme's directory.

    Could you post your theme's post-form.php here?

  5. <?php bb_new_topic_link(); ?> the code to add new.

    The first one I know is in front-page.php

    you have
    <?php if ( $forums ) : ?>
    then the Latest Discussion
    then Forum
    <?php endif; // bb_forums() ?>
    Then Views
    and the part you're missing

    <?php else : // $forums ?>
    
    <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Add New Topic'); ?></div>
    
    <?php post_form(); endif; // $forums ?>
  6. @kawauso
    Mine post-form.php is exactly the same as that of Kakumei.
    I can trace the problem to an unclosed anchor tag <a> which is in bbcrumb DIV.
    http://validator.w3.org/check?uri=http%3A%2F%2Fbbpress.ashfame.com%2F%3Fnew%3D1&charset=(detect+automatically)&doctype=Inline&group=1&ss=1#line-86
    Where does this code comes from? I mean which file?

    Username:demo
    Password:demo

    @gerikg
    I don't get any of what you are trying to tel me. Probably you misunderstood my question.

  7. Maybe you can hardcode the URL like this http://domain/forum.php?id=9#postform

  8. ashfame,

    Is this what you're trying to generate? http://bbpress.org/forums/?new=1

    Then continue reading.

    The template file is front-page.php that does the "new?=1"

    look at line 84-88
    http://trac.bbpress.org/browser/trunk/bb-templates/kakumei/front-page.php

  9. @gerikg he's trying to fix an additional <a> with no closing tag in the new post form, not generate a link to it :)

  10. @ashfame have a look at the bottom of front-page.php, it should read <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Add New Topic'); ?></div>. Your code seems to have somehow dropped everything between the last two PHP snippets and the trailing </div> too. That's not being returned by the breadcrumb function though at least, so it should be easier to fix :) if it doesn't work with your template's front-page.php deleted/renamed though, there might be something wrong with your core files.

  11. Kawauso, you just said the same thing I did.

    If hes trying to generate this page (go to the link and look) http://bbpress.org/forums/?new=1

    then he's missing the bottom half of the front-page.php

    that is why I said look at :

    look at line 84-88
    http://trac.bbpress.org/browser/trunk/bb-templates/kakumei/front-page.php

    the same line you just brought up.

  12. Sorry about that! :)

  13. Replacing a line from Kakumei did the job. may be I accidentally removed that closing div tag. anyways. thanks for your help so far.
    Also I want to fix an IE thing.
    The sizes of input type text of login are not equal in IE even though I have defined their size="20"

  14. That double quote issue is there in the core file. Even the Kakumei produces invalid markup with it.
    I have reported it to trac #1191

  15. It's IE, I'm not suprised. Try setting the width using CSS rather than the size attribute.
    form.login input { width: 100px; } in the stylesheet

  16. Using CSS, I managed to do it with little weirdness. God, kill IE asap ;)
    Thanks buddy!

  17. You must log in to post.