Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 876 through 900 (of 32,454 total)
  • Author
    Search Results
  • DeepBlue
    Participant

    Hi

    With the great bbp style pack plugin, with active moderation on moderation tab, we can approve any new topic or reply from a new user

    is it possible to use a shortcode to show all topics / replies “pending” (so the ones that require approval)

    that would be nice for moderator to have all contents to approve at the same place in frontend

    Is it something already doable with an existing shortcode ?

    Thank

    #233473
    Robin W
    Moderator

    just can just add it to the other one

    add_filter( 'gettext', 'rew_change_must_be_text', 30, 3 );
    
    function rew_change_must_be_text( $translated_text, $text, $domain ) {
    	if ( $text == 'You must be logged in to create new topics.' && bbp_get_forum_id() == 2927 ) {
    		$translated_text = 'new text here' ;
    	}
    if ( $text == 'You cannot create new topics' && bbp_get_forum_id() == 2927 ) {
    		$translated_text = 'new text here' ;
    	}
    	return $translated_text ;
    }
    Robin W
    Moderator

    in this part

    bbp_get_forum_id() == 2927

    so for your forum, go to

    dashboard>forums>all forums and select ‘edit’ of the forum you want

    At the top of your browser in the url bat you will see

    http://mysite.com/wp-admin/post.php?post=2927&action=edit

    2927 is the number of that forum, in my case 2927

    enkoes
    Participant

    Hi Robin, where do I specify the FORUM ID in the codes given?

    Robin W
    Moderator

    sorry, late in the day when I looked at this. change the forum id and text you want below to the one you want. if you want it blank, then $translated_text = ''

    add_filter( 'gettext', 'rew_change_must_be_text', 30, 3 );
    
    function rew_change_must_be_text( $translated_text, $text, $domain ) {
    	if ( $text == 'You must be logged in to create new topics.' && bbp_get_forum_id() == 2927 ) {
    		$translated_text = 'new text here' ;
    	}
    	return $translated_text ;
    }

    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

    #233450
    Mauricevdh
    Participant

    Hello,

    I would like to have an area under the topic and above the first reply. This area can be used for html or shortcodes. Best should be able to give the input per topic.

    Is there a plugin available (did extended search without results) or can somebody program this for me?

    http://www.zwembadforum.eu

    #233446
    dasword
    Blocked

    Thanks, how about see only author function (specific user reply filter), my blog subscribers very like to create long story(novel) in the forum under a topic, but they will split those stories into many chapters as update, for example, one of them post one chapter once a week, when he posted a chapter, there are many comments. I would like a function that can filter specific user reply under a topic, so reader can see the full story more clearly. Is there anywhere to add these this function to bbpress forum? Either Plugin or filter hook code or other codes, cherish your replies.

    #233441
    dasword
    Blocked

    I’m here for looking 2 functionalities for bbpress. First of them is quote, it is quite common function I think, if you click the quote function under the reply, it will copy the whole thing of the reply and paste in your textarea, this make people easy to deal with complicated answer sometimes. Second is see only author function, my blog subscribers very like to create long story(novel) in the forum under a topic, but they will split those stories into many chapters as update, for example, one of them post one chapter once a week, when he posted a chapter, there are many comments. I would like a function that can filter specific user reply under a topic, so reader can see the full story more clearly. Is there anywhere to add these 2 functions to bbpress forum? Either Plugin or filter hook code or other codes, thx for helping.

    #233431
    nomanattique
    Participant

    I have added this code in function.php…in child theme..but didn’t work at that time

    #233430
    nomanattique
    Participant

    @robin-w I have added this code in the child theme but it’s not working…
    here is the complete code…kindly check and let me know..it’s correct?

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
    if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
        function chld_thm_cfg_locale_css( $uri ){
            if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
                $uri = get_template_directory_uri() . '/rtl.css';
            return $uri;
        }
    endif;
    add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
    
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bbp-default','fontawesome','slick','disputo-bootstrap' ) );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
    
    // END ENQUEUE PARENT ACTION
    
    add_filter ('bbp_current_user_can_access_create_reply_form' , 'rew_limit_replies') ;
    
    function rew_limit_replies ($retval) {
    	//set limit
    	$limit = 2 ;
    	//get replies for today
    	$user_id = get_current_user_id() ;
    	$reply=bbp_get_reply_post_type() ;
    	$today = getdate();
    	$args = array(
    		'post_type'=> $reply,
    		'order'    => 'ASC',
    		'orderby' => 'ID',
    		'post_status' => 'publish',
    		'posts_per_page' => -1,
    		'post_author' => $user_id,
    		'date_query' => array(
    		array(
    			'year'  => $today['year'],
    			'month' => $today['mon'],
    			'day'   => $today['mday'],
    		),
    		),
    		
    		);              
    
    	$the_query = new WP_Query( $args );
    	$count = $the_query->found_posts;
    	if ($count>=$limit) $retval = 0 ;
    return $retval ;
    }
    #233426
    Eliyahna
    Participant

    Here’s what I tried that didn’t work…

    <a class="bbp-back-to-forum" href="<?php bbp_forum_permalink(); ?>">Back to <?php bbp_forum_title(); ?></a>	<?php 
    	echo '<a href="www.mylink.org/forums/">Back To Forums List</a>'; ?> 
    #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

Viewing 25 results - 876 through 900 (of 32,454 total)
Skip to toolbar