Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 16,151 through 16,175 (of 32,506 total)
  • Author
    Search Results
  • #108142
    Lynq
    Participant
    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.

    #113557
    Lynq
    Participant

    I just commented out the sidebar from all my bbpress template files, worked perfectly.

    #113556
    softechnos
    Member

    Did you add this in the main theme or in the bbpress twenty ten directory?

    #113446
    Lynq
    Participant

    I think bbp-forum-template is a core file?

    You would be better off using something like this inside loop-single-forum:

    bbp_list_forums(array ('count_sep' => ''));

    Good luck.

    Jarret
    Participant

    Sure thing, if you do find out a solution please post it here so I as well as others can learn from it for potential future situations :)

    JenniferNM
    Member

    I think it’s still some kind of caching issue. We’ve got WP Super Cache installed and there may be issues with that, as well as the need to edit something in our .htaccess file, which i can’t find!

    Will be talking to our hosting company tomorrow and hopefully we can pinpoint the problem! Thanks again…. :-)

    JenniferNM
    Member

    We had gConverter do it. They did a good job, except for the fact that we had to hire someone else to assign roles to all of the users because participants couldn’t see any of the topics.

    Also, in order to make the forums work, we had to first make them public, then private, then public again.

    Good times. ;-)

    Miniflowers
    Member

    It’s hard to say. I noticed it reverted back after I would go into the forum and edit a topic or reply. for example, it was showing the most recent on the forum front page, but then I went in and someone had posted the same comment 3 times, so I deleted the first 2, leaving the third, and went back to the main page and it was reverted back to the 35 day old post.

    We’ve had multiple problems with caching. Our server shut us down b/c something was causing our site to show major traffic. We changed the settings on our caching plugin and that seemed to fix that problem. I sure hope it’s the caching plugin that’s causing this. :)

    JenniferNM
    Member

    In our cafe, newer posts will show up, then somehow it keeps reverting back to a post that’s 35 days old, by the same person!

    I finally just added a test reply to her post, so it would stop.

    It’s only happening in the forum.

    We just ported the whole thing over from vBulletin to bbpress and are obviously still working out the kinks. :-)

    Jarret
    Participant

    Awesome, good to hear :)

    JenniferNM
    Member

    Sorry to sound like an idiot, but when I open different php files or CSS files, I’m doing a search inside the code by using Command F to find it. Is there another way to find the code I need to change?

    JenniferNM
    Member

    Thanks for your help, JarretC!

    We’re using the Genesis theme with the Serenity child theme.

    Which file should this go into, exactly? There are a ton of php files and then two CSS files, which don’t seem to have anything in them.

    I looked in Theme Functions and did a search for the first line of code you mentioned, but couldn’t find it.

    Also, not sure how I would have my own theme made… :-)

    Jarret
    Participant

    Go into your theme for bbPress and look for loop-single-forum.php. On line 24 you will see

    <?php bbp_list_forums(); ?>

    Modify that line to look like

    <?php bbp_list_forums( array ( 'separator' => '<br />' ) ); ?>

    #113487
    New Joerg
    Member

    Hi Jenna (Miniflowers), congratulations :-) But my troubles with bbPress seem to be different: I never used Vbulletin or BuddyPress. As will_c wrote: the error occurs by changing the visibility.

    #44834
    stuartmchugh
    Member

    Just installed the bbpress 2.02 plugin on my site which is WP v3.3.1 – seemed to work ok but on trying to create a new topic (on the site i.e. as a user would) I get the following:

    “Fatal error: Call to undefined function akismet_test_mode() in /mypath/wp-content/plugins/bbpress/bbp-includes/bbp-extend-akismet.php on line 350”

    Not really too sure of the etiquette or whatever of posting links or code but I though this was such a show-stopper that someone else would have come across it – but nothing to be found here or elsewhere… I am also aware that ‘test mode’ may be a major clue, but to what I really don’t know…

    Thanks for any advice

    S

    #113555
    pimarts
    Participant

    I don’t know if this is of any help but to get what I did at SWNK (http://www.swnk.org/forums/) I added the following code to my functions.php:

    function disable_all_widgets( $sidebars_widgets ) {

    // if ( bbp_is_forum() ) {

    if (is_bbpress()) {

    $sidebars_widgets = array(false);

    remove_all_actions(‘bp_register_widgets’);

    unregister_sidebar( ‘bp_core_widgets’ );

    }

    return $sidebars_widgets;

    }

    add_filter(‘sidebars_widgets’, ‘disable_all_widgets’, 1, 1);

    Then I added some CSS to put the login widget above the forum.

    This list needs to be updated, but some are here:

    https://codex.bbpress.org/showcase/

    #113554

    You will need to do some custom development on your end. This isn’t implemented in core (at least not yet) because at the moment each theme/framework handles their layout options differently – so there is no easy way to cover them all.

    You can probably use the code in https://wordpress.org/extend/plugins/bbpress-genesis-extend/ as an example.

    Basically you will want to check for is_bbpress() and if that comes back true then run your code that forces the full width layout.

    #113624
    george1313
    Member

    Resolved. Disregard.

    #44833
    george1313
    Member

    Hoping someone here has the knowledge to help.

    I’m using the bbpress plugin with buddypress/wordpress install. I installed the bbcode plugin to let users use bbcode in the forums. Everything worked great, but now when you insert a youtube video on the forum with the bbpress post toolbar, I get this error:

    YOUTUBE

    Warning: Cannot modify header information – headers already sent by (output started at /home/highhob/public_html/ridecbr/wp-content/plugins/bbpress-bbcode/class_bbpress2-bbcode.php:268) in /home/highhob/public_html/ridecbr/wp-includes/pluggable.php on line 866

    The video DOES POST, but this error comes up first and I need to get it removed and resolved. Also, above any youtube video, the word YOUTUBE shows up.

    Please let me know if you can help.

    Thank you so much,

    -George

    #113553
    Nate
    Participant

    Guys,

    I’d hate to be a pest, but can this be addressed by the powers-that-be? I’d handle a ‘It isn’t possible’ or even a ‘It will require considerable code work, you might want to outsource a developer’.

    I have pored through this forum’s previous posts, without much luck finding a thread where it is discussed.

    And, to me, it seems like a fairly common question – especially with regards to aesthetics.

    Again, I think this forum software is nothing but excellent, especially for smaller (or, in our case, a nonprofit) businesses that are looking for a solution that isn’t gaudy or bloated.

    Looking forward to the responses …

    Nate

    Lynq
    Participant

    http://teamoverpowered.com/

    The forum is still WIP though, but I am liking how it is coming along :)

    #108141
    Lynq
    Participant

    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.

    #113552
    elnicole
    Member

    Me too. I want to be able to tell bbPress which layout in my theme to use. The default layout has a skinny column and 2 side columns. I don’t want this for the forum.

    #113567

    I hear you. I often forget that everyone else isn’t using 2.1. It will be out soon though and then we will start work on 2.2 :)

Viewing 25 results - 16,151 through 16,175 (of 32,506 total)
Skip to toolbar