Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin area on topic.php – default Kakumei theme

  • The admin functions on the topic.php page (where one can delete, close, stick or move a post) takes up three lines. View source:

    <div class="admin">

    [Delete Entire Topic]

    [Close topic]

    [Stick topic (to front)]

    [<form id="topic-move" method="post" action="http://domain/bbpress/topic-move.php">

    <fieldset>

    <div>

    <input type="hidden" name="topic_id" value="5" />

    <label for="forum-id">Move to</label>

    <select name="forum_id" id="forum-id"">

    <option value="4"></option>

    <option value="1"></option>

    <option value="2"></option>

    <option value="3"></option>

    <option value="5" selected="selected"></option>

    </select>

    <input type="hidden" id="_wpnonce" name="_wpnonce" value="(number)" /><input type="submit" name="Submit" value="Move" />

    </div>

    </fieldset>

    </form>]</div>

    </div>

    The first line ends with a ”.

    I’ve examined the topics.php page, found the ‘<?php bb_topic_admin(): ?>’, and found the function in bbpress/bb-includes/functions.bb-templates.php.

    if ( !$dropdown )

    return;

    $r = $before . ‘<form id=”topic-move” method=”post” action=”‘ . bb_get_uri( ‘bb-admin/topic-move.php’, null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN ) . ‘”>’ . “n”;

    $r .= ‘<fieldset>’ . “n”;

    $r .= ‘<div>’ . “n”;

    $r .= ‘<input type=”hidden” name=”topic_id” value=”‘ . $topic->topic_id . ‘” />’ . “n”;

    $r .= ‘<label for=”forum-id”>’. __( ‘Move to’ ) . ‘</label>’ . “n”;

    $r .= $dropdown . “n”;

    $r .= bb_nonce_field( ‘move-topic_’ . $topic->topic_id, ‘_wpnonce’, true , false );

    $r .= ‘<input type=”submit” name=”Submit” value=”‘ . __( ‘Move’ ) . ‘” />’ . “n”;

    $r .= ‘</div>’ . “n”;

    $r .= ‘</fieldset>’ . “n”;

    $r .= ‘</form>’ . $after;

    I thought the problem might be the div after the fieldset, so I changed it to span, but that did not correct the problem. I can not read or understand the function.

    Is it possible to get the move option on the same line as the delete, close and stick options?

Viewing 14 replies - 1 through 14 (of 14 total)
  • I found a work around which I’m not totally satisfied with. I created a style for the admin class called in the div but which did not exist in the style sheet, and removed the brackets around the move drop down from the function call. There are still two lines, but it’s all on one.


    chrishajer
    Participant

    @chrishajer

    What version of bbPress are you using? The bracket problem was fixed a while ago, and right now in the default theme it all appears on one line, not multiples.

    http://chrishajer.com/bbpress/single-line-move.png

    The link colors are changed but this is otherwise Kakumei default, running r2518 trunk.

    Version 1.0.2.

    @chrishajer – you got me to thinking, so this morning I downloaded both the zip and tar files from this site replaced all of my core files with each of these (just to insure that there was no difference between the zip and tar); same problem. I’m no developer; I figured this was some problem on my end and not with the core files. It doesn’t seem to have affected the function, just the appearance, so it is not a huge deal. Should I report this as a bug or what? (And if so can you tell me where to do that?)


    mr_pelle
    Participant

    @mr_pelle

    Did you download the archive from here or from the Download page on this site? The former is trunk, the latter 1.0.2…

    I downloaded from https://bbpress.org/download/, not from https://trac.bbpress.org/browser/trunk. I did not know about “trunk”. If the link at the bottom of the page to zip format is what I need then I’ve got it. Thanks. I’ll give it a try.


    mr_pelle
    Participant

    @mr_pelle

    Note that the archive you can find on TRAC does not include BackPress: I suggest you to upgrade via SVN.

    Man, I hate to be so ignorant, but I did not know what SVN is. So I went to Docs and did not find anything helpful, then to google and found http://svn.automattic.com/bbpress/trunk/. I do not find a zip archive there so I take it that one simply chooses the file(s) one wants and does a copy/paste?


    mr_pelle
    Participant

    @mr_pelle

    It’s a bit hard to explain… :P

    I suppose you may try to download bbPress trunk and then BackPress trunk from here and extract the /includes folder into /bb-includes/backpress folder…

    EDIT: you’ll need this too.

    Well, you’ve introduced me to subversion. I had no idea. I don’t know whether to thank or cuss you! :) I’ve downloaded svn packages (I run the Ubuntu distribution of Linux on my computers) and am working through documentation. I’ll get it sooner or later. Thanks!

    Checked out r2540 from http://svn.automattic.com/backpress/trunk and I’m still getting the problem that was fixed in r2518.

    I find all this SCN TRAC TRUNK all a bit gibberish and well beyond what I need to know.

    I find the version control of bbPress also confusing and always thought that the most stable version was on the main download page.

    The “bug” being discussed is not a show stopper (there are more irritating things) but it is fairly obvious in the code what is breaking this.

    Two things in functions.bb-template.php

    The use of <fieldset> and <div> inside the form – comment them out in bb_get_topic_move_dropdown() and add the lines

    $r .= bb_get_topic_delete_link($args);

    $r .= bb_get_topic_close_link($args);

    $r .= bb_get_topic_sticky_link($args);

    after the initial <form> line.

    commenting out the original lines in the bb_topic_admin() as

    // ‘delete’ => bb_get_topic_delete_link($args),

    // ‘close’ => bb_get_topic_close_link($args),

    // ‘sticky’ => bb_get_topic_sticky_link($args),

    This is by no means an elegant solution but it appears to work.

    I’m sure something more elegant could have been done in css.


    Gautam Gupta
    Participant

    @gautamgupta

    All you need to fix this is to have a display:inline; for the select box.

    [g][a=http://www.allsogood.com]friendship jewelry[/a][/g]

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