Skip to:
Content
Pages
Categories
Search
Top
Bottom

Layout bbPress as Invision or phpBB or vBulletin


  • adv_user
    Member

    @adv_user

    Example:

    Invision: http://community.invisionpower.com/

    phpBB: http://www.phpbb.com/community/

    vBulletin: http://www.vbulletin.com/forum/

    I want to get this result with bbPress:

    http://blogame.com.br/forum/

    ############################################

    With the default structure of great forums:

    Category 1

    - Forum 1

    — Subforum 1, Subforum 2, Subforum 3

    - Forum 2

    - Forum 3

    Category 2

    - Forum 4

    - Forum 5

    — Subforum 4

    - Forum 6

    ############################################

    With a “friendly space” between category 1 and category 2.

    Because there are many forums.

    I Would like a theme that had it, I do not need to change anything, just add the categories, forums and the Subforums in admin panel WordPress.

    Tks.

Viewing 22 replies - 1 through 22 (of 22 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    This will probably come down the pipe eventually, and is something someone can do and contribute back to core also. Any takers?

    John, thanks for the reply.

    I’d like to contribute, but unfortunately do not have sufficient knowledge in PHP. But that is a important upgrade to the bbPress be used for large forums that have many categories.

    So will a great organization.

    Currently, to do this I believe that only with an own theme, right?


    Gautam Gupta
    Moderator

    @gautamgupta

    Yes, you’re right. :)


    Anointed
    Moderator

    @anointed

    It is currently possible with the default theme and does not really require any php knowledge. You will spend 90% of your time simply modifying the css in order to get the results you are asking for.

    There are a few functions to move around in order to get the exact layout, but that is simply a matter of moving functions around the templates and not writing new functions.

    *Now in order to get the full ‘functionality’ of the forums you are talking about, then yeah, that would take a considerable amount of coding work to write all the needed functionality. I fully expect to see many of those features coming in the form of plugins though.

    In fact, if you see my posts, two years ago, I sought it, at the time that the integration with WordPress was difficult:

    http://bbpress.org/forums/topic/sub-subforum-change-css

    Now bbPress has evolved a lot, because it has become plugin an easily integrated with the WordPress and BuddyPress.

    So I’m sure that soon this will be improved organization of categories.

    @anointed:

    http://bbpress.org/forums/topic/sub-sub-forums#post-11762

    Joining the contents of these two topics that I passed the link, you can get what they want (as you yourself said, tks), but let’s be honest…

    It is not easy for those who are only user

    (not even a beginning programmer)

    In other forums it is ready. Simply create categories and forums by default that the organization already does this separation. It should also be standard in bbPress.

    If you do not want the separation of categories, will not do it, but it uses different categories is because you want to be separated for better organization.

    So it is ideal to be implemented this improvement, and as you mentioned, many other features (as plugins).

    And preferably, as plugins for WordPress, which can be installed and automatically updated directly by the panel without having to use FTP, as are separate plugins bbPress.

    Suggestion:

    is that all plugins from bbPress and BuddyPress, stay in the WordPress directory, thus it will be much easier to use them.


    Anointed
    Moderator

    @anointed

    I didn’t play with it much, and can’t confirm that this works across all browsers, but from a quick test it only took me one line of css in order to achieve what you were after.

    .bbp-forums { border-collapse: separate; border-spacing: 2px 50px; float: left; width: 100%; }

    **This is going to be much easier when working with a theme that does not use tables, as you can’t apply margins to table cells like you would expect with normal divs.

    Thanks for this suggestion anointed.

    Unfortunately it is not so simple.

    With this CSS will space, but the layout of the subcategories will not be pleasant.

    And also a lot of spaces “tHead”. And do not appear the “Subforums” (need change the code of the theme)

    #####################################################

    Example:

    [START FORUM]

    [LARGE SPACE]

    “Forum | Topics | Posts | Freshness”

    [LARGE SPACE]

    | Category 1
    --- Forum 1 (0,0), Forum 2 (0,0), Forum 3 (0,0)

    [CORRECT SPACE]

    | Category 2
    --- Forum 4 (0,0), Forum 5 (0,0)

    [LARGE SPACE]

    [FOOTER]

    [END FORUM]

    #####################################################


    Anointed
    Moderator

    @anointed

    @adv_user

    I understand the problem. I only posted the snippet to show you that you can make the changes via simple css.

    Given enough time it would not be that difficult to use css in order to make all the changes you are after.

    I would suggest reading up on css a bit as it will really empower you to make the changes you are after. It’s actually rather easy to learn and quite fun to play around with.

    I wish you luck

    @adv_user

    please forgive me if this isn’t what you’re looking for, but im pretty sure i just created the forum @ http://www.USADriftTrikes.org the exact way you wanted to. it wasn’t too difficult, but took about a day of playing with to get where it is currently. let me know if i can help-

    john

    Hi John (do7d).

    Thank you for your attention.

    I’m interested in seeing what changes you made​​.

    Not exactly the model of Invision or other powerful forums, but their forum was better organized with subcategories.

    But still, I keep my critical: bbPress need to improve the hierarchy of sub-subforums to become a powerful forum and allow the creation of many subforums and well organized.

    Even the simple press allows this organization/separation of blocks with subforums:

    http://simple-press.com/support-forum/

    Thanks!


    Morgan Wick
    Member

    @morgan-wick

    For me, it wouldn’t be enough to simply display subforums of a category on the main page. I’d like them to actually display the same way they would if they were parent forums.


    OC2PS
    Participant

    @sooskriszta

    http://wordpress.org/support/topic/plugin-bbpress-help-me

    Tried this?

    .bbp-forum-info .bbp-forums li {display:block;}

    hey, so all we need is to edit bbp_list_forums function?

    can someone explain what exactly to do please?


    OC2PS
    Participant

    @sooskriszta

    Just add

    .bbp-forum-info .bbp-forums li {display:block;}

    to your stylesheet


    ExtremeSoccer
    Member

    @extremesoccer

    which stylesheet? the one in plugins/bbpress/plugins/themes/twentyten?


    spiritfly
    Member

    @spiritfly

    I can’t believe this still haven’t been resolved. What is going on with the bbpress community? This is a must have. It should be the forums default looks.

    I have tried playing with it, but I still don’t understand what really is going on.

    Can someone who made these kind of subcategories post the changes he made?

    Thanks

    I edit the template.php bbp-forum, although I do not sound right to modify the core.

    I changed bbp_list_forums function () original:

    function bbp_list_forums( $args = '' ) {

    [...]

    // Build this sub forums link

    $output .= $link_before . '' . $title . $counts . '' . $show_sep . $link_after;

    }

    // Output the list

    echo $before . $output . $after;

    }

    }

    by:

    function bbp_list_forums( $args = '' ) {

    [...]

    // Build this sub forums link

    //$output .= $link_before . '' . $title . $counts . '' . $show_sep . $link_after;

    $output[] = array(

    'permalink'=>$permalink,

    'title'=>$title,

    'count'=>$count

    );

    }

    // Output the list

    return $output;

    }

    }

    and I returned:

    Array

    (

    [0] => Array

    (

    [permalink] => http://localhost/wpv1/foros/seccion/dota2/torneos-y-competencias

    [title] => Torneos y competencias

    [count] => Array

    (

    [topic] => 1

    [reply] => 5

    )

    )

    [1] => Array

    (

    [permalink] => http://localhost/wpv1/foros/seccion/dota2/dota-chat

    [title] => Dota chat

    [count] => Array

    (

    [topic] => 0

    [reply] => 0

    )

    )

    )

    The only drawback is that I can not get the last comment of each forum.


    Lynq
    Participant

    @lynq

    Hey guys,

    I have been searching for this myself aswell, but couldn’t find anything anywhere.

    If anyone is interested I modified the bbp_list_forums function to have a flag for freshness (last poster) to be displayed or not.

    function bbp_list_forums( $args = '' ) {

    // Define used variables
    $output = $sub_forums = $topic_count = $reply_count = $counts = '';
    $i = 0;
    $count = array();

    // Defaults and arguments
    $defaults = array (
    'before' => '<ul class="bbp-forums">',
    'after' => '</ul>',
    'link_before' => '<li class="bbp-forum">',
    'link_after' => '</li>',
    'count_before' => ' (',
    'count_after' => ')',
    'count_sep' => ', ',
    'separator' => ', ',
    'forum_id' => '',
    'show_topic_count' => true,
    'show_reply_count' => true,
    'freshness_before' => '<td>',
    'freshness_after' => '</td>',
    'show_freshness_link' => true
    );
    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    // Bail if there are no subforums
    if ( !bbp_get_forum_subforum_count( $forum_id ) )
    return;

    // Loop through forums and create a list
    if ( $sub_forums = bbp_forum_get_subforums( $forum_id ) ) {

    // Total count (for separator)
    $total_subs = count( $sub_forums );
    foreach ( $sub_forums as $sub_forum ) {
    $i++; // Separator count

    // Get forum details
    $count = array();
    $show_sep = $total_subs > $i ? $separator : '';
    $permalink = bbp_get_forum_permalink( $sub_forum->ID );
    $title = bbp_get_forum_title( $sub_forum->ID );

    // Show topic count
    if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );

    // Show reply count
    if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );

    // Counts to show
    if ( !empty( $count ) )
    $counts = $count_before . implode( $count_sep, $count ) . $count_after;

    // Show topic count
    if ( !empty( $show_freshness_link ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
    $freshness_link = bbp_get_forum_freshness_link( $sub_forum->ID );
    $freshness_link = $freshness_before . $freshness_link . $freshness_after;
    }

    // Build this sub forums link
    $output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $counts . $freshness_link . '</a>' . $show_sep . $link_after;
    }

    // Output the list
    echo $before . $output . $after;
    }
    }

    Let me know if you would like any help with I am currently customising my theme to work with it, you will need to add an extra th to your forum tables other you just have a blank in place.

    Hope someone finds this helpful!

    p.s. you can also specify a before and after in the arguments of bbp_list_forums.

    All the best.

    Lynq.


    Lynq
    Participant

    @lynq

    function bbp_list_forums( $args = '' ) {

    // Define used variables
    $output = $sub_forums = $topic_count = $reply_count = $counts = '';
    $i = 0;
    $count = array();

    // Defaults and arguments
    $defaults = array (
    'before' => '<ul class="bbp-forums">',
    'after' => '</ul>',
    'link_before' => '<li class="bbp-forum">',
    'link_after' => '</li>',
    'count_before' => ' (',
    'count_after' => ')',
    'count_sep' => ', ',
    'separator' => ', ',
    'forum_id' => '',
    'show_topic_count' => true,
    'show_reply_count' => true,
    'freshness_before' => '<td class="last-posted-box">',
    'freshness_after' => '</td>',
    'show_freshness_link' => true,
    'freshness_author_before' => '<div class="author-box">',
    'freshness_author_after' => '</div>'
    );
    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    // Bail if there are no subforums
    if ( !bbp_get_forum_subforum_count( $forum_id ) )
    return;

    // Loop through forums and create a list
    if ( $sub_forums = bbp_forum_get_subforums( $forum_id ) ) {

    // Total count (for separator)
    $total_subs = count( $sub_forums );
    foreach ( $sub_forums as $sub_forum ) {
    $i++; // Separator count

    // Get forum details
    $count = array();
    $show_sep = $total_subs > $i ? $separator : '';
    $permalink = bbp_get_forum_permalink( $sub_forum->ID );
    $title = bbp_get_forum_title( $sub_forum->ID );

    // Show topic count
    if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );

    // Show reply count
    if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );

    // Counts to show
    if ( !empty( $count ) )
    $counts = $count_before . implode( $count_sep, $count ) . $count_after;

    // Show topic count
    if ( !empty( $show_freshness_link ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
    $freshness_link = bbp_get_forum_freshness_link( $sub_forum->ID );
    $freshness_author = $freshness_author_before . bbp_get_author_link( array( 'post_id' => bbp_get_forum_last_active_id( $sub_forum->ID ), 'size' => 14 ) ) . $freshness_author_after;
    $freshness_link = $freshness_before . $freshness_link . $freshness_author . $freshness_after;
    }

    // Build this sub forums link
    $output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $counts . $freshness_link . '</a>' . $show_sep . $link_after;
    }

    // Output the list
    echo $before . $output . $after;
    }
    }

    This will give you more control over creating a theme which looks like Invision or PHPBB.

    You will have to customize your theme as well to make sure it is compatible.

    Lynq: Thanks for sharing that. Incase there’s others like me who can play with the css and the html but don’t know knees from elbows about the php, can you maybe give a little advice on what would need to be customized in the theme to accommodate the changes you’ve made there?

    I can’t readily tell what that code would effect. It’d be really appreciated.


    Lynq
    Participant

    @lynq

    It does depend on the theme of course, but I will try my best. Also please remember that this involves editing the core and is not recommended (but I can’t see another way to achieve this?).

    If you set the show_freshness_link to true and then add a freshness before of <td> and freshness_after of </td> this will add an extra td tag inside the template.

    You will then need to add an extra <th> to the table heading, or it will break your table and you will have blank spaces inside the forum list.

    If you are using a non table layout, then you just need to give it a class and deal with it in css like the reply count and post count data.

    Inside loop-single-forum.php I changed my bbp_list_forums arguments to accept the changes inside the core function, for example…

    array( 'show_freshness_link' => true, 'freshness_author_before' => '<div class="author-box">', 'freshness_author_after' => '</div>')

    You can then change the freshness_author_before and the freshness_author_after values to change the html.

    Good luck!


    chibichiii
    Participant

    @chibichiii

    @do7d

    Your site looks amazing! Forum is very beautiful too.
    Is it truly a bbpress forum? I can’t seem to get mine to look even half as awesome :(
    I’d like to have my freshness column just like yours and my sub forums showing like that.

Viewing 22 replies - 1 through 22 (of 22 total)

You must be logged in to reply to this topic.