Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 276 through 300 (of 32,315 total)
  • Author
    Search Results
  • #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

    #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?

    #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

    #238882
    Robin W
    Moderator

    I’d suspect that php 8.x is the issue.

    New versions of php get more strict in code requirements, and arrays are one that php 8.x got nasty with.

    I’d suggest (if you can) changing to php 7.x whilst you do the import – after that you can revert to php 8.x.

    #238818
    prokops
    Participant

    Here is a functions / snippet code version for anyone else looking:

    function my_forums_dropdown_shortcode() {
        // Start buffering output
        ob_start();
    
        // Dropdown container
        echo '<select id="forums-dropdown" onchange="location = this.value;">';
        
        // Forum loop
        if ( bbp_has_forums() ) :
            while ( bbp_forums() ) : bbp_the_forum();
                $forum_permalink = bbp_get_forum_permalink();
                $forum_title = bbp_get_forum_title();
                echo "<option value='{$forum_permalink}'>{$forum_title}</option>";
            endwhile;
        else :
            // No forums found
            bbp_get_template_part( 'feedback', 'no-forums' );
        endif;
    
        // Close the dropdown
        echo '</select>';
    
        // Return the buffer contents
        return ob_get_clean();
    }
    add_shortcode('forums_dropdown', 'my_forums_dropdown_shortcode');
    

    Just paste in [forums_dropdown] where you want output.

    #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?

    #238776

    In reply to: Using iframe tags?

    meetarnav
    Participant

    How can I get the “participant” role to post iframes please? It is quite critical for my forum. If not that, I tried a plugin that achieves the same effect – however that is only working for Admins not for any other member – how do I enable “participants” to use the same short codes as admin or post iframes? Thanks.

    #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.

    #238755
    peq42
    Participant

    I’m running BBPress on wordpress 6.4.2 and PHP 8.3 and I’ve been getting the following deprecation warning:

    PHP Deprecated: Creation of dynamic property BBP_Admin::$forums is deprecated in /home/peq42/www/wp-content/plugins/bbpress/includes/admin/forums.php on line 793

    if possible, I’d like the devs to look into it

    #238712
    Robin W
    Moderator

    Thanks.

    Whilst I am not a bbpress author, adding fixes for themes which do not work with bbpress would require adding code for 200,000 bbpress users of whom only very small proportion use Hello Elementor, and then supporting this against any changes that Elementor do. There are other themes that also don’t work with bbpress and doing this for all these could add a mountain of work.

    But yes, I’m glad to add the link to this thread to help others

    Hello Elementor bbPress fix

    I will also be adding support for this into my style pack plugin in the new year

    bbp style pack

    #238711
    Robin W
    Moderator

    Thanks.

    Whilst I am not a bbpress author, adding fixes for themes which do not work with bbpress would require adding code for 200,000 bbpress users of whom only very small proportion use Hello Elementor, and then supporting this against any changes that Elementor do. There are other themes that also don’t work with bbpress and doing this for all these could add a mountain of work.

    But yes, I’m glad to add the link to this thread to help others

    Hello Elementor bbPress fix

    I will also be adding support for this into my style pack plugin in the new year

    bbp style pack

    #238706
    fasirathore
    Participant

    I’m using Hello Theme, unfortunately hello theme is not showing forums on my page by using forums index shortcode.
    When I switch to Astra theme or Nova themes, forum index displays properly.

    (I might be changing themes temporarily so forums might display if im on other themes but https://forextradingcommunity.com/forums/ is my forums link on my site.)

    I have contacted Hello Theme Support and they have responded as below:
    “I will have this raised but we suggest you report this issue to the plugin authors so they can check and they can open an issue on our Github account, so our developers and the plugin author can communicate”

    How can we resolve it?

    #238705
    fasirathore
    Participant

    I’m using Hello Theme, unfortunately hello theme is not showing forums on my page by using forums index shortcode.
    When I switch to Astra theme or Nova themes, forum index displays properly.

    (I might be changing themes temporarily so forums might display if im on other themes but https://forextradingcommunity.com/forums/ is my forums link on my site.)

    I have contacted Hello Theme Support and they have responded as below:
    “I will have this raised but we suggest you report this issue to the plugin authors so they can check and they can open an issue on our Github account, so our developers and the plugin author can communicate”

    How can we resolve it?

    #238676

    In reply to: Abandoned?

    Swiss-Cheese
    Participant

    Thank you @robin-w for your kind answer. I appreciate your time to look into this question and your diligence in answering people’s questions. It seemed this topic went in a different direction than I was expecting/asking, but perhaps I’m misunderstanding everyone’s answers? According to the security plugin WordFence documentation on their knowledge base it says the issue with bbPress is:

    Plugin appears to be abandoned
    This scan result means that a plugin has not been updated in 2 years or more. This can be a problem because it means that the plugin author has not made any changes for a long period of time. Sometimes that means it will not be fully compatible with newer WordPress versions, reported bugs may not be fixed, and new security issues might not be addressed.

    The scan result also shows if this plugin has a known security issue that has not been fixed. If that is the case, it is recommended that you remove the plugin as soon as possible, and replace it with a different plugin if you need the same functionality.

    There are two types of alerts for abandoned plugins, “Medium” and “Critical”. An abandoned plugin will generate a Medium alert. If the plugin also has unpatched security vulnerabilities, the scan result will be Critical. Plugins that are abandoned should be evaluated in terms of what risk they may pose. Unless you know that the code in the plugin is safe, you should start looking for a replacement. Plugins with unpatched vulnerabilities should always be removed.

    When I read this guideline from WordFence and look at the bbPress website, as well as reading what WordPress says about it and what information about bbPRess displays inside my dashboard of the install, I’m not certain which instruction to follow. Should I consider it abandoned? Well, someone came here and answered my question named moderator and other people also visited this thread and commented who seemed to assume my question was a PHP compatibility question (i don’t know, is my question a PHP compatibility issue i’ve yet to discover?) so if people are actively reading a support thread that’s not “abandoned” in the sense people are here interacting still. But abandoned where coders who are behind the coding of bbPress watching developments and using the best security practices and applying them? I’m not certain and am not sure how to decide that info without posting again to ask. As a non-coding person I have no way of knowing without asking.

    Is bbPress still in development, being monitored and updated by careful coders who look over it, or is the core code maintenance abandoned with some core enthusiasts who are still using it here interacting but not coders who know what’s what in the code? Unfortunately, I don’t read code. I am not a coder. So i have no way of knowing.

    #238590
    artmuns
    Participant

    @lmstearn: Thanks for that info on the php code.

    Here’s some info I found previously on this error (but you probably already knew this).

    The ‘Are you sure you want to do this? ‘ error usually appears when nonce verification fails, and the most likely candidates for causing this error are plugins and themes not using this feature properly. Nonces are unique keys that add a security layer to protect WordPress URLs, forms, and Ajax calls from abuse.

    https://www.google.com/search?q=are+you+sure+you+want+to+do+that+error+wordpress

    #238588
    robfaich
    Participant

    There’s bbP last post, bbP private groups, bbP Quote, bbP shortcodes as well as bbp style pack.

    #238585
    robfaich
    Participant

    Thanks for that. But this is quite confusing, the form I used was copied from dashboard>settings>shortcodes>additional shortcodes.

    #238582
    Robin W
    Moderator

    that shortcode is from bbp-style-pack plugin and should read

    [bsp-display-topic-index show='5' forum ='10,11,12']

    note bsp-display… not bbp-display…

    bbp style pack

    for details, go to

    dashboard>settings>bbp style pack>shortcodes

    #238571
    lmstearn
    Participant

    @artmuns: Totally acknowledge the user problem with expired pages causing this over here, and certainly copying the post-text is the first line of defence, just curious as to what it was in the superseded code that cached the text.

    Maybe the following,

    add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
    function my_bbp_verify_nonce_request_url( $requested_url )
    {
        return 'your_URI' . $_SERVER['REQUEST_URI'];
    }

    Now the functions.php has been dropped from Twenty Twenty Two and onwards, so might not be possible in the theme, could be a separate plugin, or a request for a cache module.

    For caching, use LiteSpeed over here, just added into the ESI Cache section these:

    bbp_verify_nonce_request
    wp_verify_nonce

    Not sure if they are correct, will post back if not. 🙂

    #238559
    robfaich
    Participant

    Shortcode actually used: [bbp-display-topic-index show=’15’ forum =’283,285,515,523,1159,21099′]

    #238558
    robfaich
    Participant

    OK so I found the shortcode [bbp-display-topic-index show=’5′ forum =’10,11,12′] which should have done what we want if we’d specified all forums except the one we want excluded.

    However, this doesn’t seem to work properly, only two of the six forums specified have topics displayed despite all six being represented in the default view (15 topics, using [bbp-topic-index]).

    jesoh
    Participant

    As said in the title, I want the options to choose Topic Type and Topic Status gone for normal users. When posting a topic, it would post them with Topic Type as Open by default, and Topic Status as Normal by default.

    It’s just to simplify the process of posting topics. I know not enough PHP to make my own form, so I’ll be grateful for any help customizing the Topic Form (that you get from the shortcode [bbp-topic-form forum_id=$forum_id]

    #238484
    gameinpost
    Participant

    Corrected: the photos vanish as soon as I publish the page. However, they are seen in the preview.

    And I added the bbpress shortcode, the images, and everything else to a newly created page before doing this. No images when using the bbpress shortcode. Absent the photos bbpress shortcode.

    How to Upgrade Windows 7 to Windows 10 for Free

    #238478
    user8472
    Participant

    Correction – as soon as I publish the page, the images disappear. But they are visible in preview.

    And this was on a new page I created by adding the bbpress shortcode first, then the images and everything else. With bbpress shortcode – no images. Without bbpress shortcode – images.

Viewing 25 results - 276 through 300 (of 32,315 total)
Skip to toolbar