Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 901 through 925 (of 32,468 total)
  • Author
    Search Results
  • #233423
    Robin W
    Moderator
    /*BBPRESS Favourite Filter*/
    function rkk_subscribe_link($args) {
      $args['favorite'] = esc_html__( 'Favourite',   'rkk' );
     $args['favorited'] = esc_html__( 'Unfavourite',   'rkk' );
      return $args;
    }
    add_filter('bbp_before_get_topic_favorite_link_parse_args', 'rkk_subscribe_link' );	
    #233420
    Robin W
    Moderator

    $args['Favorite'] should be$args['favorite'] no capital F !

    so

    /*BBPRESS Favourite Filter*/
    function rkk_subscribe_link($args) {
      $args['favorite'] = esc_html__( 'Favourite',   'rkk' );
     $args['favorited'] = esc_html__( 'Unfavourite',   'rkk' );
      return $args;
    }
    add_filter('bbp_before_get_topic_favorite_link_parse_args', 'rkk_subscribe_link' );	
    #233409

    In reply to: Repair tool with cron

    dralawady
    Participant

    @robin-w: I guess my problem is in adding the event to the cron. The function I’m trying to run is bbp_admin_repair_freshness and it’s declared in tools.php file, however there is no hook attached to it. I tried the this snippet code but it didn’t work:

    if ( ! wp_next_scheduled( 'bbp_sync_forum_topics_activity' ) ) {
    	wp_schedule_event( time(), 'hourly', 'bbp_sync_forum_topics_activity' );
    }
    
    add_action( 'bbp_sync_forum_topics_activity', 'bbp_admin_repair_freshness' );
    
    #233407
    areynoldsskm
    Participant

    Hey all, need some help with changing the favorite button text to Favourite (Canadian Spelling)

    So far I’ve tried:
    Switching to Canadian English in WP core, dosent change the button

    Js find and replace, has a visible delay

    functions.php code per this topic: https://bbpress.org/forums/topic/change-text-in-bbpress-subscribe-favorite-reply/

    /*BBPRESS Favourite Filter*/
    function rkk_subscribe_link() {
      $args['Favorite'] = esc_html__( 'Favourite',   'rkk' );
      return $args;
    }
     add_filter('bbp_before_get_topic_favorite_link_parse_args', 'rkk_subscribe_link' );
    

    Anyone able to change this?

    ewd910
    Participant
    add_filter('bbp_get_topic_stick_link',
        function ($link, $retval, $admin_links) {
            $splitLink = explode('a> <a', $link);
            $link = $splitLink[0] . 'a>';
            return $link;
        }, 10, 3
    );

    Here’s my solution in case anyone sees this

    #233399
    ewd910
    Participant

    What’s the correct way to override includes/topics/template.php? Seems I have to remove it from there

    #233397

    In reply to:

    uncodeio
    Participant

    No Code Platforms are going to fulfil the shortage of Developers in IT industry.

    #233385
    ewd910
    Participant

    Yes it looks like the default behavior is that the “sticky” link on the forum topic super stickies it, based on the super=1 query param I’m seeing. Any way to default it to 0, or do I have to make a custom topic template?

    #233377
    scottmotion
    Participant

    Is it possible to show the number of topics and replies for each user in the main WP user admin screen? Or is there some other place I can see this? I have Admin Columns Free but no options are available that I can see, nor did I find anything in bbp style pack. Maybe another plugin or some code? Ideally there would be a column between Forum Role and Posts that shows Topics/Replies count. I’m assuming this is a bbp thing, but i’m of course using BuddyPress as well.

    #233371

    In reply to: Repair tool with cron

    dralawady
    Participant

    @liderxlt : have you managed to get it sorted. I’m trying to add a code snipped to BuddyBoss theme to run forum repair on daily basis. Can you share the code snippet with me please?


    @robin-w
    : how can make use of includes/admin/tools.php functions through a theme code snippet?

    #233334
    Robin W
    Moderator

    I suggest this might help

    #buddypress .standard-form #profile-details-section {
    	float: left !important;
    }

    put this in your theme’s custom css, or in the custom css of bbp-style-pack

    #233319
    Asiqur Rahman
    Participant

    Hope this helps. put these codes into your theme functions.php file.

    
    add_filter( 'bbp_get_reply_author_url', 'lp_member_profile_links' );
    add_filter( 'bbp_get_topic_author_url', 'lp_member_profile_links' );
    add_filter( 'bbp_get_author_url', 'lp_member_profile_links' );
    function lp_member_profile_links( $url ) {
    	if ( ! empty( $url ) ) {
    		return $url . 'profile';
    	}
    	
    	return $url;
    }
    
    #233298

    In reply to: Topic Count

    bobjgarrett
    Participant

    After much searching in that file and then further comparisons of the posts (and then the linked postmeta records) created vs those imported I spotted an error in the postmeta records for those imported.
    I had had to write my own code to import a forum from WP Symposium and I had swapped two record numbers between two meta_keys. An update in the database table seems to have fixed this.
    Thanks for your advice while I was finding the problem I had created!

    #233281

    In reply to: Topic Count

    Robin W
    Moderator

    these functions are held in bbpress\includes\forums\template.php and \bbpress\includes\forums\functions.php

    the one changing the count is in functions.php

    bbp_bump_forum_topic_count

    #233279

    In reply to: Topic Count

    bobjgarrett
    Participant

    Strange then that it also changed the total topic count. I will have another look at the code tomorrow.
    Thanks.

    #233277

    In reply to: Topic Count

    Robin W
    Moderator

    I can’t see anything in the code that would do anything other than decrease the count by 1 on trashing a hidden or published topic.

    If it was set to hidden, then it changes the following meta_bbp_total_topic_count_hidden

    #233275
    kstormstudio
    Participant

    I’m the admin and I have FTP access so no problem for this. I just need to call bbpress links from endpoints, nothing more than this.
    Because of course user can only have one profile page instead that 2 so just WooCommerce dashboard as a profile page.

    As you mention there is not parameter in the line code :
    /woo-bbpress/user-subscriptions.php

    I think the page requires some parameters isn’t it?

    #233271

    In reply to: Topic Count

    Robin W
    Moderator

    Interestingly I also tried using the shortcode [bbp-stats] in a test page and that reported the correct number of topics despite the individual forum count being incorrect! How can that be?

    I should start by saying that I am not a bbpress author, just someone trying to help 🙂

    the [bbp-stats] shortcode does the wordpress function
    wp_count_posts( bbp_get_topic_post_type())

    so actually counts the number of topics in the database.

    the forums page calls a function bbp_get_forum_topic_count in \bbpress\includes\forums\template.php

    This looks up the number held in the forum’s post meta under _bbp_topic_count (which you had already worked out)

    so how did you delete the post which caused the numnber to fail back?

    #233269

    In reply to: Topic Count

    bobjgarrett
    Participant

    Thanks for your reply.
    I have looked at this in a bit more detail but not got anywhere!
    As you suggested I compared two topics for a topic imported vs one entered and the differences don’t seem relevant (e.g. no ip address for the imported ones etc.). I also looked at the records from the postmeta table for the two topics and again don’t think there are relevant differences though again no ip address for the imported, 0 for _bbp_reply_count for the imported.
    So no luck there.
    I tried looking at the code of bbpress.php but could not work out how it picked up the count or incremented it.
    Interestingly I also tried using the shortcode [bbp-stats] in a test page and that reported the correct number of topics despite the individual forum count being incorrect! How can that be?

    #233259
    Robin W
    Moderator

    In had a quick look at the code above and the call

    include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );

    is looking for that file in your theme, not the bbpress plugin.

    as a test, create a directory in your child theme called ‘woo-bbpress’ (it can be called anything) and put a copy of the user-subscriptions in there

    then replace then above with

    include get_theme_file_path( '/woo-bbpress/user-subscriptions.php' );

    and see if that improves

    #233250
    kstormstudio
    Participant

    code below of course inserted in functions.php.

    Any help please? Thank you so much

    #233238
    kstormstudio
    Participant

    Im using the last bbPress version, and twenty-twenty theme. All fine!
    But I need to integrate bbpress with woocommerce in a custom woocommerce dashboard we made, so basically I have to link all bbpress profile links (Topic created, Replies, Engagement…) as Woocommerce Endpoints.

    All set up but the problem is the links not showng the correct user information but : “Oh Bother, no topics found here!”. Despite the user has created topics , followed or subscribed.

    This is the code I put for the Subscription Endpoint for instance:

    add_action( 'init', 'wpsh_subscriptions_endpoint' );
    function wpsh_subscriptions_endpoint() {
    	add_rewrite_endpoint( 'subscriptions', EP_ROOT | EP_PAGES );
    }
    add_action( 'woocommerce_account_subscriptions_endpoint', 'subscriptions_endpoint_content' );
    function subscriptions_endpoint_content() {
    	include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );
    }

    so, any suggestions please? 🙂

    #233234

    In reply to: Topic Count

    Robin W
    Moderator

    without getting into looking at the code, you might want to look at the meta for a topic which is imported vs. one that is added. I think there is a ‘parent’ or ‘forum_id’ set in topic meta to say which forum it belongs to, which might need setting for the imported ones to get the repair tools and updates working correctly.

    or even the actual post parent of the imported topic might need setting.

    If it is not that, come back and I’ll do some digging further.

    #233216
    MarkOlbert
    Participant

    Sure, sorry, should’ve done that.

    .bbp_dropdown { 
    	font-size: 12px;
    }
    

    I added this at Appearance -> Customization -> Additional CSS. I’m using Astra Pro, but I think the location is the same for all/most themes.

    #233212
    Robin W
    Moderator
Viewing 25 results - 901 through 925 (of 32,468 total)
Skip to toolbar