Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 801 through 825 (of 64,471 total)
  • Author
    Search Results
  • #238915
    rilliencot
    Participant

    WordPress Version: 6.4.2
    bbPress Version: 2.6.9
    Link to site: Unavailable (Site created using LocalWP and still hosted locally)

    When I create topics through the standard frontend or backend, the new topic shows up in the forum perfectly.

    However, if I create a new topic using a plugin extension I’ve cobbled together, the new topic does not show up on the front end of the website (despite it being created and visible on the back end).

    The plugin written in php is as follows (thanks to work from here and here):

    
    <?php
    /**
     * Plugin Name:       bbPress API
     * Description:       Exposing the bbPress post types to WP API.
     * Author:            Rillien Cot
     * Version:           1.3.0
     */
    
    /**
     * Add REST API support to an already registered post type.
     */
    add_action('init', 'register_bbp_post_types', 25);
    
    function register_bbp_post_types() {
        global $wp_post_types;
    
        $post_type_name =  bbp_get_reply_post_type();
        if (isset($wp_post_types[$post_type_name])) {
            $wp_post_types[$post_type_name]->show_in_rest = true;
            $wp_post_types[$post_type_name]->rest_base = $post_type_name;
            $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
        }
        $post_type_name =  bbp_get_topic_post_type();
        if (isset($wp_post_types[$post_type_name])) {
            $wp_post_types[$post_type_name]->show_in_rest = true;
            $wp_post_types[$post_type_name]->rest_base = $post_type_name;
            $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
        }
        $post_type_name =  bbp_get_forum_post_type();
        if (isset($wp_post_types[$post_type_name])) {
            $wp_post_types[$post_type_name]->show_in_rest = true;
            $wp_post_types[$post_type_name]->rest_base = $post_type_name;
            $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
        }
    
        // Add custom REST API endpoint for creating bbPress topic
        add_action('rest_api_init', 'create_bill_endpoint');
    }
    
    function create_bill_endpoint() {
        register_rest_route('pnyx/v2', '/bill/', array(
            'methods' => 'POST',
            'callback' => 'create_bill',
        ));
    }
    
    function create_bill($data) {
        // Extract necessary data from the request
        $forum_id = $data['forum_id'];
        $topic_title = $data['topic_title'];
        $topic_content = $data['topic_content'];
        $bill_id = $data['bill_id'];
    
        // Create a new bbPress topic
        $topic_args = array(
            'post_title' => $topic_title,
            'post_content' => $topic_content,
            'post_type' => bbp_get_topic_post_type(),
            'post_status' => 'publish',
            'post_parent' => $forum_id, // Set the post_parent to the forum ID
        );
    
        $topic_id = wp_insert_post($topic_args);
    ?>
    

    Basically, it exposes the Forum, Topic, and Reply post types from bbPress to standard wp-json/v2 namespace and then adds an additional endpoint (‘create_bill’) which allows me to add a new topic and associate it with a forum via ‘post_parent’. (I wonder if this is where the problem is?)

    I create a new topic using the following python script:

    
    import requests
    import json
    
    # Set WordPress API authentication details
    username = "*******"
    password = "**********************"
    auth = requests.auth.HTTPBasicAuth(username, password)
    
    # Values for new post data
    new_post_data = {
        "forum_id": 40, # <- This is a valid post id of a forum.
        "topic_title": "New API Topic Title",
        "topic_content": "Lorem ipsum content for the new topic"
    }
    
    # Make the POST request to create a new post
    wordpress_api_url = "http://pnyx.local/wp-json/pnyx/v2/bill/"
    response = requests.post(
        wordpress_api_url,
        auth=auth,
        headers={
            'Content-Type': 'application/json',
        },
        data=json.dumps(new_post_data)
    )
    

    The topic is created, and I can see it in Dashboard>>Topics>>All Topics. And I can view it by going directly to the link associated with it, but I can’t see it on the actual frontend of the forum.

    I’ve deactived all other plugins and I’m still getting this issue. The only differences between the two (as far as I can tell) are the Author IP (API created topics leave this field blank, standard fills it with 127.0.0.1) and the number of voices (API created topics have 0, standard created topics have 1). All the other settings seem identical (visibilty = public, type = normal, status = open).

    Any insights as to what I’m missing and how to rectify the situation are greatly appreciated, thanks!

    #238914
    Robin W
    Moderator

    Thanks, I’ve just tested your scenario above, and yes that is a bug.

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

    Strangely that metabox doesn’t actually let you change the subscribers, it simply lists them, not sure why 🙂

    if you are using

    bbp style pack


    then I’ve included a fix for this in version 5.7.8.

    You can also add comprehensive subscription management functionality for the backend from the ‘subscriptions management’ tab.

    Otherwise you could add this code:

    
    add_action ('bbp_subscriptions_metabox' , 'rew_set_hidden_subscribers' ) ;
    add_action ('bbp_topic_attributes_metabox_save' , 'rew_save_subscriptions', 10 , 2) ;
    
    function rew_set_hidden_subscribers ($post) {
    	// Get user IDs
    	$user_ids = bbp_get_subscribers( $post->ID );
    	$list = implode(",",$user_ids); 
    
    	// Output
    	?>
    	<input name="rew_topic_subscription" id="rew_topic_subscription" type="hidden" value="<?php echo $list; ?>" />
    	<?php
    }
    
    function rew_save_subscriptions ( $topic_id, $forum_id ) {
    	// Handle Subscriptions
    	if ( bbp_is_subscriptions_active() && ! empty( $_POST['rew_topic_subscription'] )) {
    		//update_option ($subscriptions)
    		$subscriptions = explode(",", $_POST['rew_topic_subscription']);
    		foreach ($subscriptions as $subscription_id ) {
    			// Check if subscribed and if so do nothing
    			if (bbp_is_user_subscribed( $subscription_id, $topic_id )) continue;
    			else {
    			bbp_add_user_subscription( $subscription_id, $topic_id );
    			}
    		}
    	}
    }

    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

    #238912
    Tory
    Participant

    Here’s the link if that helps: https://camperfaqs.com/community. I disabled the RankMath plugin and the <title> is still “Forums”. It’s like the default bbPress terminology is still being used for the page title and breadcrumbs, even though I have renamed the forum root slug to “community”.

    #238906
    Tory
    Participant

    Hello, I am using the latest version of bbPress along with the generatepress theme. I used Method 2 on the getting started instructions and set the forum root slug to “community”, and created a page titled “Community”, with the slug “community”. I used [bbp-forum-index] on the page.

    My only issues are the page title (in the <title> tag) is “Forums Archive”, and I can’t seem to change it. And my breadcrumb trail is Home >> Forums. Somewhere, my site is pulling the term “Forums” for the <title> and breadcrumb (it’s a Rankmath breadcrumb).

    Any ideas?

    #238904

    In reply to: Abandoned?

    Robin W
    Moderator

    To understand that you need to understand that bbpress is a sister project to WordPress.

    Wordpress development (and therefore bbpress development) is funded by

    1. the commercial arm of wordpress – Automattic
    2. Donations and sponsorship from paid plugins and theme organizations who have a commercial interest in ensuring that WordPress continues

    At the moment no-one is sponsoring bbpress development, so no developer is currently being paid to maintain it.

    Hence no-one is updating even the tested to value.

    You could write to the board of wordpress.org, but beyond that not much we can do – I have tried !

    #238896
    itdahdev
    Participant

    Next issue, found a missing import field “_bbp_topic_voice_count” and i’m pretty sure, thats counted participants were ment. But in woltlap db thread tbl is no colum, so i think, i’ve could du it with a sql query like this:

    SELECT COUNT(DISTINCT po.userID) as participants
    FROM wbb1_thread th
    INNER JOIN wbb1_post po
    ON th.threadID = po.threadID
    WHERE th.threadID = 2086

    The sql query in phpmyadmin works as mentioned. So i copied a piece of code from another importer and customized it like this (? for parts i have no clou):

    $this->field_map[] = array(
    ‘from_tablename’ => ‘wbb1_thread’,
    ‘from_fieldname’ => ‘?’,
    ‘join_tablename’ => ‘wbb1_post’,
    ‘join_type’ => ‘INNER’,
    ‘join_expression’ => ‘USING (?) WHERE wbb1_thread.?= wbb1_post.?’,
    ‘to_type’ => ‘topic’,
    ‘to_fieldname’ => ‘_bbp_topic_voice_count’
    );

    But i’ve no clou, how to bring the sql in the right way for the import, missing manuals from bbPress, to understand he possibilities.

    Anybody firm in this?

    #238889
    Robin W
    Moderator

    This is one of the new FSE themes, so you need a fix to work with bbpress.
    install

    bbp style pack

    once activated, navigate to

    dashboard>settings>bbp style pack, and you should see the first tab called ‘Theme Support’ – if you don’t see this, come back.

    In that tab, select

    Enable Theme Support

    and save

    The forums should then display

    #238888
    milimo1
    Participant

    I added codes on a page for my forum and included topics and a forum that displays just fine. The problem or headache starts when I click on any of the links to the shortcodes. Just a blank page is all that shows. I’ve tried searching for help but to no avail. I’ve seen in tutorials that the links shown work and lead you to more info when you click on topics or the forums. Kindly help me.

    WordPress version 6.4.2, bbPress Version 2.6.9

    Links to Problem Pages
    Link to blank page after clicking forum
    Link to forum and topics page

    #238887
    Robin W
    Moderator

    bbpress stores entries as WordPress posts within the database.

    My test site has over 8,000 posts and the whole database takes up 155MB.

    It is not something you probably need to worry about – most hosters offer storage in the multiple GB realms.

    Plugins, media and themes take file space (rather than database).

    If you want to keep an eye on it go to

    dashboard>tools>site Health>info>directories and size and you can see what is being used

    #238880
    itdahdev
    Participant

    I took a import skript from “https://gist.github.com/ntwb/0bb069e5994c0ee8e85e&#8221;, copied the remote db to local db, setup the import panel. I works well for 33% of the import, then it stucks/hang.

    Got this from WP debug:
    Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in C:\htdocs\kunden\klemmer\forum\wp\wp-content\plugins\bbpress\includes\admin\parser.php:166

    So i paused the import, tried to resume, then i get errors in the browser console.

    Then i removed the forum data and tried to start in a incognito browser, to skip potentially problems with browser extensions. Did not help, same issues.

    System: WP 6.4.2, bbPress 2.6.9, Woltlap 5.x DB content, PHP 8.2, 10.4.32-MariaDB

    Would be great to get some handsome help to get this done 😉

    Greets Alex

    #238873
    n3wjack
    Participant

    Just an update to confirm that this issue is fixed if you use the bbp style pack plugin mentioned above, with the latest version of bbpress. 👍

    #238850
    andrewshu
    Participant

    Hi @robin-w

    I have only one active plugin – bbPress.
    Please see my screencast – https://jam.dev/c/62cd5543-8fc6-43d6-8a9e-eeeac388594a
    Try checking the subscription is not from the admin.

    Regards.

    #238849
    nickymit
    Participant

    Hi there

    My logo and widget disappear when I go to my forum page. This makes it impossible for my users to head back to my home page from the forum page. In the sidebar where the widget is supposed to be I get this message:
    There is no widget. You should add your widgets into Default sidebar area on Appearance => Widgets of your dashboard.

    Page link: https://www.temp.soulistic.co.za/forum-list/
    Wordpress version: 6.4.2
    bbpress version: 2.6.9

    Many thanks

    #238846

    In reply to: Abandoned?

    TreeTrail
    Participant

    This is great question and answer. Thank you Robin. I’m always impressed by the care and time you give to the WP community! @swiss_cheese, I highly recommend that you give “bbPress Style Pack” a try. It has so much functionality, that it can seem a little overwhelming. But just try a little at a time, until you get the gist.

    #238840
    allyhouston
    Participant

    Hello,

    WordPress 6.4.2, bbPress version 2.6.9, metpsy.com

    I’d like to allow only paid users through MemberPress to post (and maybe to reply, though I might allow free users to reply). I would like free users to be able to view all topics though.

    What is the easiest way to do this?

    Very best,

    Ally.

    #238827
    Milan Petrovic
    Participant

    Hello,

    My GD bbPress Toolbox Pro plugin: plugins.dev4press.com/gd-bbpress-toolbox has Private Topics and Replies, so user can create private topic, only moderators can read these, and reply, and later can make public. Your request is a bit different, so I may look into implementing that for future versions of the plugin. And, GD bbPress Toolbox Pro has new notifications for keymasters and moderators when new topic or reply is posted.

    Regards
    Milan

    #238819
    mariadp
    Participant

    The view user kept on showing the page in a weird format – not within the theme. But bbpress is the one that must be creating the ‘view user’ page – as when I deactivate it says:
    colonictraining.com.au/forums/users/colont/

    I found a note in the bbp style pack that said that there was a problem with Divi child themes and I followed the instructions – which made it better but did not fix it completely
    Now at least the top and bottom menu is showing. but still not within the theme and the footer menu is not complete and also says ‘designed by elegant themes… which should not show

    Robin W
    Moderator

    spectra one is a block theme.

    This is one of the new FSE themes, so you need a fix to work with bbpress.
    install

    bbp style pack

    once activated, navigate to

    dashboard>settings>bbp style pack, and you should see the first tab called ‘Theme Support’ – if you don’t see this, come back.

    In that tab, select

    Enable Theme Support

    and save

    The forums should then display

    andrevanberlo2015
    Participant

    Hi,

    My name is André and I’m running into some issues I hope some of you can solve. Good to know is that links to mentioned pages are at the bottom of this post.

    The Issues
    When I create a bbpress forum, the forum index won’t display on the default page I created ( /forums/ ) but displays a blank page.

    The forum index will display on any other different page like this one /forums-2/

    When I visit a test forum I get a blank page again.

    So I thought I would create a new forum slug in bbpress and page accordingly, named guitar-forums as I was sure no other plugin will have claimed that url. But here the same issues. Nothing works on /guitar-forums/ but the index does show on /guitar-forums-2/


    What I’ve done first

    I have had previously installed asgaros forum but have removed the plugin and removed the asgaros data tables from the database. I also deleted the old forums page and emptied the trash.

    I then did:
    switching to default twenty x theme
    purged all cache incl server side caching
    disabling all other plugins
    reset bbpress

    Links
    Default website forum index link: https://vpbex8y4m8.onrocket.site/forums/
    Forum index on a different page: https://vpbex8y4m8.onrocket.site/forums-2/
    Forum link: https://vpbex8y4m8.onrocket.site/forums/forum/test-forum/

    Other Info
    Theme: spectra one
    wordpress version 6.4.2
    bbpress version 2.6.9

    #238794
    apinnt
    Participant

    No that error is happening on bbpress.org. Not on my site.

    It appears to not be doing it now though.

    Weirdly enough, if I try to logout though, that doesn’t work. I stayed logged in forever.

    #238793
    nitrameon
    Participant

    Hello everyone,

    I use the Divi theme builder with BBPress and Buddypress to create a forum.

    I created pages and used shortcodes to customize the visual aspect of my forum.

    I’ve created numerous sub-forums (over 100) that are supposed to appear in the main forum. (I have limited the display to 50).

    However, when I go to the main forum, the first 50 are displayed, but no pagination allows me to see the other 50! I’ve searched all over the internet but haven’t found any answers.

    Thank you for your help.

    Nono

    #238792
    Robin W
    Moderator

    I’ve done a bit more investigation

    It looks like this code is only used if you have passwords that are not to the WordPress encryption, which would usually be after you have done an conversion to bbpress from a previous forum.

    Is this the case?

    schulte79
    Participant

    Hello,

    after we switched ton PHP 8.2 we get the Message:

    “There was a critical error on your website. Please check the inbox of your website administrator email address for further instructions.
    Learn more about troubleshooting in WordPress.”

    WordPress-Version 6.4.2
    Aktuelles Plugin: bbPress (Version 2.6.9)
    PHP-Version 8.1.27

    web/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php verursacht. Fehlermeldung: Uncaught TypeError: register_shutdown_function(): Argument #1 ($callback) must be a valid callback, class BBP_Converter_DB does not have a method “__destruct”

    Can someone help me, please.

    #238781
    apinnt
    Participant

    Wordpress 6.4.2
    Theme Bam 1.3.0 (https://wordpress.org/themes/bam/)
    bbPress 2.6.9

    I copied the default bbpress.css file from wp-content/plugins/bbpress/template/default/css/
    and installed it in wp-content/themes/bam/css/bbpress.css

    I had to make the css folder as it didn’t exist in the theme. No matter what I do it seems bbPress doesn’t look at that css file.

    The only way I could make it work was to add all the css from the bbpress.css file to the theme css file found at wp-content/themes/bam/style.css – which isn’t what I want because it will break on the next theme update. I did notice the theme uses sass so that could be a conflict?

    Unsure why this won’t work otherwise.

    #238760
    meetarnav
    Participant

    Was this ever resolved. I have the same combination RPB and bbPress. The codes work for Keymaster but not foe Participant. Also, they don’t show pgn and fen as tags in the options on the editor – one has to type them in manually.

Viewing 25 results - 801 through 825 (of 64,471 total)
Skip to toolbar