Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 351 through 375 (of 32,429 total)
  • Author
    Search Results
  • #239360
    getfree
    Participant

    yes, on bbpress forums.

    I got the code from Chat GPT which ensured me that it would work (ie. clicking send would call the function and execute it) and gave me a few other pieces of more or less similar type of code. As you can see I am quite clueless on this stuff albeit I used to know some Python.

    How to proceed..

    This is related to this https://bbpress.org/forums/topic/poker-hand-histories-not-converted/#post-237481
    We have some freelance developers helping out but they didn’t understand at all what I was trying to accomplish, so I am set to do this “alone” for now, with not much success :/

    #239359
    Robin W
    Moderator

    ok so unless you have some further code, nothing is calling that function.

    I presume this is content on bbpress topics and replies – yes?

    #239358
    getfree
    Participant

    hi,
    I am trying to parse pasted text into something else, where the simplest thing is to change :spade: :club: :diamond: and :heart: to be visualized as ♠♣♦ and ♥ but my solution is not working.

    In the Theme files I edited functions.php by adding the following code (in the staging environment)

    // Function to replace suit representations with symbols
    function replace_suit_symbols($hand_history) {
        // Replace suit representations with symbols
        $hand_history = str_replace(':spade:', '♠', $hand_history);
        $hand_history = str_replace(':heart:', '♥', $hand_history);
        $hand_history = str_replace(':diamond:', '♦', $hand_history);
        $hand_history = str_replace(':club:', '♣', $hand_history);
        
        // Return the modified hand history
        return $hand_history;
    }

    But when I write “:spade”, for instance, nothing changes. What am I missing?
    Hello Theme, WP 6.4.3, bbPress 2.6.9.

    #239304
    Robin W
    Moderator

    it needs a template change – if you know how to FTP

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-topics.php

    transfer this to your pc and edit

    change:

    <li class="bbp-topic-voice-count"><?php esc_html_e( 'Voices', 'bbpress' ); ?></li>
    			<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic()
    				? esc_html_e( 'Replies', 'bbpress' )
    				: esc_html_e( 'Posts',   'bbpress' );
    			?></li>

    to

    <li class="bbp-topic-voice-count"></li>
    <li class="bbp-topic-reply-count"></li>

    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-topics.php

    bbPress will now use this template instead of the original

    Repeat this for the file loop-forums.php

    #239303
    jemar707
    Participant

    I am trying to replace the titles for Voice and Replies with dashicons like the WordPress forums are styled. I am using the code below, and it works in that it adds the dashicon, but it doesn’t remove the words.

    
    /*topic titles*/
    .bbpress .forum-titles {
    	overflow: hidden;
    }
    .bbpress .forum-titles .bbp-topic-voice-count::before,
    .bbpress .forum-titles .bbp-topic-reply-count::before {
    	font: 400 16px/1 dashicons;
    	margin-right: 100px;
    	-moz-osx-font-smoothing: grayscale;
    	-webkit-font-smoothing: antialiased;
    }
    
    	.bbpress .forum-titles .bbp-topic-voice-count::before,
    	.bbpress .forum-titles .bbp-topic-reply-count::before {
    		font: 400 21px/1 dashicons;
    		margin-left: 20px;
    	}
    
    .bbpress .forum-titles .bbp-topic-voice-count::before {
    	content: "\f307";
    }
    .bbpress .forum-titles .bbp-topic-reply-count::before {
    	content: "\f125";
    }
    
    .bbpress li.bbp-header li.bbp-forum-info,
    .bbpress li.bbp-header li.bbp-topic-title {
    	text-align: left !important;
    }
    
    /*forum titles*/
    
    .bbpress .forum-titles {
    	overflow: hidden;
    }
    .bbpress .forum-titles .bbp-forum-topic-count::before,
    .bbpress .forum-titles .bbp-forum-reply-count::before {
    	font: 400 16px/1 dashicons;
    	margin-right: 100px;
    	-moz-osx-font-smoothing: grayscale;
    	-webkit-font-smoothing: antialiased;
    }
    
    	.bbpress .forum-titles .bbp-forum-topic-count::before,
    	.bbpress .forum-titles .bbp-forum-reply-count::before {
    		font: 400 21px/1 dashicons;
    		margin-left: 20px;
    	}
    
    .bbpress .forum-titles .bbp-forum-topic-count::before {
    	content: "\f307";
    }
    .bbpress .forum-titles .bbp-forum-reply-count::before {
    	content: "\f125";
    }
    
    .bbpress li.bbp-header li.bbp-forum-info,
    .bbpress li.bbp-header li.bbp-topic-title {
    	text-align: left !important;
    }
    
    #239293
    Robin W
    Moderator

    I think in your code the function no_reply_email needs a my_bbp in front of it

    so

    function no_reply_email(){
        $email = 'no-reply@sitename.com'; // any email you want
        return $email;
    }
    add_filter('bbp_get_do_not_reply_address','my_bbp_no_reply_email');

    shoudl read this

    function my_bbp_no_reply_email(){
        $email = 'no-reply@sitename.com'; // any email you want
        return $email;
    }
    add_filter('bbp_get_do_not_reply_address','my_bbp_no_reply_email');
    #239281
    demonboy
    Participant

    Sorry, forgot the function and end part.

    function add_custom_role( $bbp_roles ) {
    	
    $bbp_roles['deckhand'] = array(
    'name' => 'Deckhand',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    	
    $bbp_roles['admiral'] = array(
    'name' => 'Admiral',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    	
    return $bbp_roles;
    }
    
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    And the more I think about it, the more I think this was either something I have over-written in the past, or a feature I had another website, not something your plugin has done. On another website I use the pro version of User Role Editor and I think that is how I am able to force custom forum roles. I think the code I posted above relates to this plugin.

    #239280
    demonboy
    Participant

    Hi Robin,

    My apologies, I’d said it was User Role Editor. It wasn’t, I used the Members plugin. Unfortunately, I can’t provide a link as everything is behind a login but here is my Members admin page. You can see the additional member roles I created.

    Members roles

    All that said, however, I am wondering if this is a theme update that caused this. Previously I’d themed my forum to display this user role, not bbp-author-role, so it is possible this was over-written by a theme update instead (my theme includes bbpress). Honestly, it’s been over four years since I styled my forum so I’m clutching at straws here, but is there any way your plugin could have over-written any custom code I wrote?

    I think if I add this to my child functions file I may be able to re-introduce the forum role:

    		$bbp_roles['oyster-owner'] = array(
    'name' => 'Oyster Owner',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    #239275
    jemar707
    Participant

    I have this in a plugin that we use for a lot of our changes that we want separate from child theme functions.php I don’t know if related.

    function no_reply_email(){
        $email = 'no-reply@sitename.com'; // any email you want
        return $email;
    }
    add_filter('bbp_get_do_not_reply_address','my_bbp_no_reply_email');
    
    function my_bbp_subscription_to_email(){
        $email = 'no-reply@sitename.com'; // any email you want
        return $email;
    }
    add_filter('bbp_subscription_to_email','my_bbp_subscription_to_email');
    
    #239258
    osheta
    Participant

    Hi,

    I’m been seeing some post with HTML code when the teacher answers the questions. We are integrated with Learndash and they told me to comment this with you too. Error HTML

    Thanks,
    Maria

    #239256
    enkoes
    Participant

    Thanks again. Can you look into the second issue as well?

    The bullet point (*) is wrongly used in title “Forum” & “Posts”. I just feel that title should not apply bullet point.

    Regards.

    #239243
    enkoes
    Participant

    I deleted all other widgets, and started with this Forum List widget first, followed by others. Overlapping issue persists. One thing to note is that all other widgets have not caused this problem, including those from Bbp Style Pack. This make me think that the issue is not from the theme itself (probably something missing within the codes?)

    #239233
    enkoes
    Participant

    Thanks for your effort @robin-w.

    I want to highlight two issues with this widget:

    1) If I position it as the first widget in the sidebar, it overlaps with other widgets which supposed to move down and give way to this widget;

    2) The bullet point (*) is wrongly used in title “Forum” & “Posts”. I just feel that title should not apply bullet point.

    * Forum                  * Posts
    * Development & Updates   * 93
    * Installation            * 28,139
    * Troubleshooting         * 61,540
    * Themes                  * 10,285
    * Plugins                 * 15,193
    * Requests & Feedback     * 14,798
    * Showcase                * 3,252

    Other than these two, the widget looks great! 🙂

    #239231
    anutgc
    Participant

    On this page – https://thebakersjunction.com/forums/
    the footer code comes up as text.

    I disabled all plugins one by one. When i disabled G5 Core plugin the problem on this page disappeared but my entire site template got broken.

    I guess it is a conflict between bbpress and g5 core.

    Pls help

    #239212
    Robin W
    Moderator

    ok, that is not the correct place to put it. Can you remove it from there.

    I see you have bbp style pack active, so can you put the code in

    dashboard>settings>bbp syle pack>custom css

    #239209
    patcg
    Participant

    @robin-w i added the above code in my style.css file by accessing
    Dashboard > Tools > Theme File Editor > style.css

    But it hasn’t worked for me.

    #239204
    Robin W
    Moderator

    try adding this to your theme’s additional css

    .bbpress .wp-block-group-is-layout-flex {
    	width: 100%;
    	max-width: 100%;
    	padding-left: 200px;
    }
    Robin W
    Moderator

    probably (untested)

    add_action ('plugins_loaded' , 'rew_move_reply_button' ) ;
    
    function rew_move_reply_button () {
    	remove_action ( 'bbp_template_before_single_topic', 'bsp_display_reply_button' );
    	add_action ( 'bbp_theme_after_topic_content', 'bsp_display_reply_button' );
    }

    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

    #239189
    enkoes
    Participant

    Hi, sorry for the confusion. I don’t know why I can’t post a screenshot link in this forum. Never mind, I just typed it out. Below is the widget I mean:

    Forum                   Posts
    Development & Updates   93
    Installation            28,139
    Troubleshooting         61,540
    Themes                  10,285
    Plugins                 15,193
    Requests & Feedback     14,798
    Showcase                3,252

    Regards.

    #239143
    kyle_conrad
    Participant

    Pulling my hair out on this one – Forums and Topics work just fine in the admin and in the front-end. However, Replies totally crash the site – on the front-end, they just fail quietly, but Add New on the Replies page in admin causes WordPress to fail. Trying to track down what could possibly cause this, because it feels really strange!

    Copying over the first 100 lines or so of the stack trace to see if ANYONE has any idea what could be causing this.

    Error:
    Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '1024' frames
    
      at /www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-object-cache.php:141
      at WP_Object_Cache->is_valid_key()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-object-cache.php:364)
      at WP_Object_Cache->get()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/cache.php:154)
      at wp_cache_get()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-post.php:240)
      at WP_Post::get_instance()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post.php:1036)
      at get_post()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post.php:1495)
      at get_post_type()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/common/template.php:454)
      at bbp_is_reply()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:544)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
      at bbp_get_reply_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549)
      at bbp_get_reply_title_fallback()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324)
      at WP_Hook->apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205)
      at apply_filters()
         (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174)
      at get_the_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603)
      at bbp_get_topic_title()
         (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
    #239032

    In reply to: Add required fields

    Robin W
    Moderator

    they are saved in the database post_meta table against the thread

    update_post_meta( $topic_id, 'bbp_extra_field1', $_POST['bbp_extra_field1'] );

    and you would need to define what you mean by

    I don’t know how to move the various fields

    #239029
    kioubizin
    Participant

    Hello,

    While trying to access users from admin menu, I am getting a fatal error and when enabling the debug mode, I am getting this error message:

    Fatal error: Uncaught Error: Call to undefined function bp_core_get_user_domain() in /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php:229 Stack trace: #0 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php(100): BBP_BuddyPress_Members->get_profile_url(2) #1 /home/islandbnb/public_html/wp-includes/class-wp-hook.php(324): BBP_BuddyPress_Members->get_user_profile_url(2) #2 /home/islandbnb/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(2, Array) #3 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/core/abstraction.php(471): apply_filters('bbp_pre_get_use...', 2) #4 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/users/template.php(560): bbp_maybe_intercept('bbp_pre_get_use...', Array) #5 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/admin/users.php(260): bbp_get_user_profile_url(2) #6 /home/islandbnb/public_html/wp-includes/class-wp-hook.php(324): BBP_Users_Admin->user_row_actions(Array, Object(WP_User)) #7 /home/islandbnb/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #8 /home/islandbnb/public_html/wp-admin/includes/class-wp-users-list-table.php(520): apply_filters('user_row_action...', Array, Object(WP_User)) #9 /home/islandbnb/public_html/wp-admin/includes/class-wp-users-list-table.php(415): WP_Users_List_Table->single_row(Object(WP_User), '', '', 0) #10 /home/islandbnb/public_html/wp-admin/includes/class-wp-list-table.php(1709): WP_Users_List_Table->display_rows() #11 /home/islandbnb/public_html/wp-admin/includes/class-wp-list-table.php(1636): WP_List_Table->display_rows_or_placeholder() #12 /home/islandbnb/public_html/wp-admin/users.php(814): WP_List_Table->display() #13 {main} thrown in /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php on line 229

    #239016

    In reply to: Shortcode

    checmark
    Participant

    Thanks. Yes, I found that somewhere after posting here and that works. One thing I’m still struggling with is that the forum is restricted to members. I added a sidebar with the shortcodes for login, register and forgot password, but the member forum still shows. I installed the Paid Membership Pro plugin but then it shows nothing. I’m not sure what is the best way to show the forum. I also installed Popup Maker which shows on the home page and then sends the visitor to the contact page which shows their membership number to join.

    This is a website that I am proposing to the Legion, not one I’m getting paid for, so I’ve spent weeks building it. I do hope that it might be adopted by the National Headquarters to be used as a template by the 1,367 branches in Canada.

    Appreciate your thoughts and your help.

    #239015

    In reply to: Shortcode

    Robin W
    Moderator

    that shortcode shows the full list of forums, not topics.

    if that is your only forum, and you want to display all the topics of that forum, then use

    [bbp-single-forum id=$forum_id]

    #239014

    In reply to: Shortcode

    checmark
    Participant

    Thanks for responding. What shows is just the image I added for the Members Forum, not the full list of topics as the shortcode suggests.

Viewing 25 results - 351 through 375 (of 32,429 total)
Skip to toolbar