Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 2,576 through 2,600 (of 64,430 total)
  • Author
    Search Results
  • #224125
    quilp
    Participant

    WordPress version 5.8.1
    bbPress version, 2.6.6
    bbp user rankin 3.5

    link to site. http://www.kingdompen.org

    Theme: Divi Version: 4.12.0

    We’ve been experiencing periodic site instability that is temporarily resolved by deactivating and reactivating bbpress plugins. Instability includes all site pages returning “No Results Found” and/or global header being stretched across half the page.

    Error log is showing errors for bbp user ranking

    error log example:

    [29-Oct-2021 14:34:43 UTC] PHP Fatal error: Uncaught Error: Call to undefined function bbp_get_user_topic_count_raw() in /home2/kingdqj0/public_html/wp-content/plugins/bbp-user-ranking/includes/functions.php:63
    Stack trace:
    #0 /home2/kingdqj0/public_html/wp-content/plugins/bbp-user-ranking/includes/functions.php(35): bur_display_counts(12415, ‘yes’)

    Robin W
    Moderator

    I am nit a bbpress author, just someine who tries to help out here.

    bbpress has never worked well with threaded replies, sorry that’s just the way it is.

    it is really hard to do pagination with nested replies and make the display work intelligibly.

    If you know js well, then you could do some hide/show in css maybe, not my strong point.

    #224121

    In reply to: Shortcodes in Sidebar

    Robin W
    Moderator

    suspect that as bbpress has custom post types, your sidebar manager is responsible

    so standard testing advice is

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    gerryj
    Participant

    Hello bbpress Support

    I have two separate problems but for convenience sake, I’ll just open one topic.
    I am currently in the process of building a Forum for an already existing website.
    The Owner of this website wants threaded replies to be active for this forum so that users can reply to comments more directly. The problem is that as soon as the threaded replies are active the Page pagination just disappears and everything is displayed on one page. I’ve read online that those two features don’t work together on purpose, but why would that be? Nothing in the plugin mentions or even hints to it that these two features wouldn’t work together. Is there any kind of workaround for this or a custom script maybe? I have knowledge of PHP and JS so any kind of help would be appreciated.

    The Next issue is that there seems to be no way to collapse/expand threaded replies. Since the pagination didn’t seem to work I thought collapsing threaded replies would help or else the topic pages would just get crazy long. Is there any code out there that would help me achieve this?

    Any kind of help on even one of these issues would be appreciated.
    I Would like to avoid working in the plugin itself if possible for obvious reasons.

    Thanks in advance
    Gerry Zeller

    #224107
    Robin W
    Moderator

    untested, but this should take out newlines and change the excerpt length to 150 – just change the 150 in the code to whatever length you want.

    so firstly you need to alter the default in wordpress which is 55 so

    add_filter( 'excerpt_length', 'rew_change_default_length' ) ;
    
    function rew_change_default_length () {
        return 150;
    }

    then alter it in the bbpress function, and change to take out line breaks

    add_filter ('bbp_get_topic_excerpt' , 'rew_remove_line_breaks', 10 , 3) ;
    
    function rew_remove_line_breaks ($excerpt, $topic_id, $length){
    		$topic_id = bbp_get_topic_id( $topic_id );
    		//change length here
    		$length   = 150 ;
    		$excerpt  = get_post_field( 'post_excerpt', $topic_id );
    
    		if ( empty( $excerpt ) ) {
    			$excerpt = bbp_get_topic_content( $topic_id );
    		}
    
    		$excerpt = trim( strip_tags( $excerpt ) );
    		
    		//take out line breaks
    		$excerpt = preg_replace("/\r|\n/", "", $excerpt);
    
    		// Multibyte support
    		if ( function_exists( 'mb_strlen' ) ) {
    			$excerpt_length = mb_strlen( $excerpt );
    		} else {
    			$excerpt_length = strlen( $excerpt );
    		}
    
    		if ( ! empty( $length ) && ( $excerpt_length > $length ) ) {
    			$excerpt  = mb_substr( $excerpt, 0, $length - 1 );
    			$excerpt .= '…';
    		}
    		
    		
    		// Filter & return
    		return apply_filters( 'rew_get_topic_excerpt', $excerpt, $topic_id, $length );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    #224097
    aaronmckeon
    Participant

    I’ve noticed that any shortcodes in my sidebar are not rendering on bbPress pages. Is there a way to make it so shortcodes are rendering properly? I’ve been searching the forums and can’t seem to find an answer to this. Thanks for any help.

    – Aaron

    #224096
    elliesatt
    Participant

    Ah OK – I’ve just found out that RankMath simply extracts the bbpress topic excerpt and uses that for the meta description, i.e. bbp_topic_excerpt()

    Is there a way to make bbp_topic_excerpt() ignore line breaks and increase character limit?

    #224093
    Robin W
    Moderator

    @joel-mohanraj
    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php

    transfer this to your pc and edit

    so you will want to take the link out of line 34

    <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php

    bbPress will now use this template instead of the original

    amending the freshness will require you to amend the bbp_get_forum_freshness_link function. if you are familiar with filters you can use the filter on line 585 of \includes\forums and a str_replace to take out the link

    #224092
    Joel mohanraj
    Participant

    Yes, for example, on this page https://bbpress.org/forums/ I want to remove all topics links. So it will just have a dummy # link

    #224044
    lumisdev
    Participant

    Hello everyone!

    I’m a new user of bbpress and I’m looking for a way for logged in users to subscribe/unsubscribe to all forums by clicking a button.

    I’ve managed to do it by myself, but I’d like to know if there is an easier way to do it.

    Here is the code in my loop-forums.php file:

    
    <?php
    
    /**
     * Forums Loop
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined('ABSPATH') || exit;
    
    do_action('bbp_template_before_forums_loop'); ?>
    
    <?php
    $current_user = get_userdata(get_current_user_id());
    
    if (isset($current_user) && $current_user->ID > 0) :
      $user_subscribed_forum_ids = bbp_get_user_subscribed_forum_ids($current_user->ID);
      $forum_ids_list = array();
    
      while (bbp_forums()) : bbp_the_forum();
        if (bbp_get_forum_type() === 'category') :
    
          foreach (bbp_forum_get_subforums() as $subforum) :
            $forum_ids_list[] = $subforum->ID;
          endforeach;
        else :
          $forum_ids_list[] = bbp_get_forum_id();
        endif;
      endwhile;
    
      $check = sizeof($forum_ids_list) === sizeof($user_subscribed_forum_ids);
      $bbp_action = $check ? "bbp_unsubscribe" : 'bbp_subscribe';
      $label = $check ? "Unsubscribe of all forums" : "Subscribe of all forums";
      $label .= bbp_get_forum_type() === 'category' ? " of this category" : "";
    
      if (isset($_POST) && $_POST['action']) :
        foreach ($forum_ids_list as $forum_id) :
          $q_args = array(
            'action'      => $bbp_action,
            'object_id'   => $forum_id,
            'object_type' => 'post'
          );
    
          $permalink = bbp_get_forum_permalink($forum_id);
          $wp_nonce_url = esc_url(wp_nonce_url(add_query_arg($q_args), 'toggle-subscription_' . $forum_id));
          $wp_nonce_url = substr($wp_nonce_url, strlen('/'));
          $url = html_entity_decode($permalink . $wp_nonce_url);
    
          $ch = curl_init($url);
          curl_setopt($ch, CURLOPT_COOKIE, LOGGED_IN_COOKIE . '=' . $_COOKIE[LOGGED_IN_COOKIE]);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
          $response = curl_exec($ch);
          curl_close($ch);
        endforeach;
    
        $user_subscribed_forum_ids = bbp_get_user_subscribed_forum_ids($current_user->ID);
        $check = sizeof($forum_ids_list) === sizeof($user_subscribed_forum_ids);
        $bbp_action = $check ? "bbp_unsubscribe" : 'bbp_subscribe';
        $label = $check ? "Unsubscribe of all forums" : "Subscribe of all forums";
        $label .= bbp_get_forum_type() === 'category' ? " of this category" : "";
      endif; // isset($_POST) && $_POST['action']
    endif; // isset($current_user) && $current_user->ID > 0
    ?>
    
    <?php if (isset($_POST) && $_POST['action']) : ?>
      <script id="prevent-form-resubmission-when-page-is-refreshed" type="text/javascript">
        // source: https://stackoverflow.com/questions/6320113/how-to-prevent-form-resubmission-when-page-is-refreshed-f5-ctrlr
        if (window.history.replaceState) {
          window.history.replaceState(null, null, window.location.href);
          document.getElementById('prevent-form-resubmission-when-page-is-refreshed').remove();
        }
      </script>
    <?php endif; ?>
    
    <?php if (isset($current_user) && $current_user->ID > 0 && !bbp_is_single_user()) : ?>
      <form action="" method="POST">
        <input type="hidden" name="action" value="<?= $bbp_action ?>">
        <button type="submit" style="color: black;"><?= __($label, 'ls') ?></button>
      </form>
    <?php endif; ?>
    
    <table id="forums-list-<?php bbp_forum_id(); ?>" class="table table-bordered forums-list">
    
      <thead>
        <tr>
    
          <th class="forum-title-column">
            <?php esc_html_e('Forum', 'ls'); ?>
          </th>
    
          <th class="posts-count-column">
            <?php bbp_show_lead_topic() ? esc_html_e('Replies', 'ls') : esc_html_e('Posts', 'ls'); ?>
          </th>
    
          <th class="last-post-column">
            <?php esc_html_e('Last Post', 'ls'); ?>
          </th>
    
        </tr>
      </thead>
    
      <tbody>
    
        <?php while (bbp_forums()) : bbp_the_forum(); ?>
          <?php bbp_get_template_part('loop', 'single-forum'); ?>
        <?php endwhile; ?>
    
      </tbody>
    
    </table>
    
    <?php do_action('bbp_template_after_forums_loop');
    
    #224026

    Topic: Forum layout

    in forum Themes
    robert-s
    Participant

    We would like to get a forum layout on our website almost exactly how the forums are laid out here on bbpress.org/forums

    Does bbpress offer this? if not, how would I go about this?

    Thanks!

    #224021
    Robin W
    Moderator

    just looked at this – sorry, as you say I don’t get to every item, and this is bespoke code which means something to someone, but without a heavy investment of time, it is hard to debug why it is not working 🙂

    the function bbp_add_user_forum_subscription is still valid, and should work fine, so the actual change to the way bbpress works should not affect it.

    I have little knowledge of buddypress, so I cannot say whether that code is still valid.

    Have you turned debugging on ? and is it showing anything ?

    #224002

    In reply to: Thumbs up and down

    Robin W
    Moderator

    this add-on plugin to bbpress does that. Whilst old, it still works

    #223994
    Robin W
    Moderator

    Just had a thought and dug in the code further, the duplicate check doesn’t apply to those roles/users that can ‘throttle’

    // No duplicate checks for those who can throttle
    	if ( user_can( (int) $r['post_author'], 'throttle' ) ) {
    		return true;
    	}

    bbPress User Roles and Capabilities

    so default Keymaster and Moderator can post duplicates

    #223988
    Robin W
    Moderator

    I am not a bbpress author, just someone who helps out here.

    Every website is unique, and this doesn’t happen on my test site – I have not seen this reported elsewhere as an issue, and the code has a duplicate function check in it.

    line 307 of includes/replies/functions

    /** Reply Duplicate *******************************************************/
    
    	if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
    		bbp_add_error( 'bbp_reply_duplicate', __( '<strong>Error</strong>: Duplicate reply detected; it looks as though you’ve already said that.', 'bbpress' ) );
    	}

    I am not able to say why you are getting this.

    #223985
    maksanse
    Participant

    Hello Robin and thank you for your answer.
    I made a test with only bbpress and twenty twenty one theme activated and the issue still occurs :

    1) Create a post and double click on the “send” button
    2) Your action creates 2 posts instead of one (the situation doesn’t seem handled by bbpress ?).

    Please have a look at the following video :
    http://www.loom.com/share/b5e083721cea47409a8c7c0ad769329f

    I guess anyone can encounter this situation because no theme or function was active in my test. Shouldn’t that be handled by the core ?

    Best regards

    #223983
    Robin W
    Moderator

    bbpress just uses wordpress registration and login, so you can use any wordpress plugin that would do that.

    I googled and got this list

    8 Best Age Verification Plugins for WordPress

    #223976
    Robin W
    Moderator

    this is the ‘tiny mce’ editor that comes bundled with WordPress which bbpress just uses.

    from a quick google it doesn’t look that easy to change what is there.

    #223974
    Robin W
    Moderator

    ok, so

    I understand from this threat that the layout of search results or topic-tag pages can be customized based on the template files stored in the bbpress/templates/default/bbpress folder.

    In order to retain the customization during updates of the bbpress plugin, I have created the same folder structure inside the directory of my child theme (see screenshot).

    yes that is correct and should work, BUT you would do better to only copy those templates you are changing/altering – bbpress will then use those you have changed from your child theme directory and use the unchanged from the plugin directory..

    so what are users clicking to get the topic tags page ?

    #223971

    In reply to: Embedded images

    Robin W
    Moderator

    But now they show a warning and it has to be viewed by clicking a link.

    Given that bbpress hasn’t changed, then something else is presumably now adding that warning ?

    #223964
    Jan
    Participant

    Hi there,

    I understand from this threat that the layout of search results or topic-tag pages can be customized based on the template files stored in the bbpress/templates/default/bbpress folder.

    In order to retain the customization during updates of the bbpress plugin, I have created the same folder structure inside the directory of my child theme (see screenshot).

    The only change I’d like to make is for the topic-tag page to look exactly like the search-result page (see screenshot) –> list of forum threats in full length rather than list of titles only.

    In order to realize that I need to…

    1) copy a ?-search.php file from the plugin directory into the respective subfolder of the child theme and
    2) rename it into a ?-topic-tag.php file.

    Is this correct? If so, which ?-search and ?-topic-tag file do I need to consider?

    Many thanks for your support in advance.

    Best regards,
    Jan

    #223961
    Ricsca2
    Participant
    #223954
    hislordshipuk
    Participant

    We use ‘Image Upload for BBPress’

    #223931
    maksanse
    Participant

    Hello,
    I looked around for a solution about this issue, but couldn’t find it.

    My problem : When my users double click on “send” button, their post is sent twice.

    In my opinon, preventing that double post should be included in core, but I guess it isn’t (throttling is on with 10 seconds but don’t change anything).

    Do you have a suggestion or know a post that could help me here ?
    Could you consider adding this feature in bbpress core ? (Who wants this issue to be possible ?)

    Thank you !

    #223898
    Robin W
    Moderator

    bbpress just uses wordpress registration.

    I suspect that emails from your site may be being seen as spam.

    try the ideas in here

    BBpress: Registration mails fail

Viewing 25 results - 2,576 through 2,600 (of 64,430 total)
Skip to toolbar