Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,951 through 4,975 (of 32,577 total)
  • Author
    Search Results
  • #186752
    Divvy
    Participant

    Hey,

    Sorry, I know that this topic have almost 3 years old, but I have a solution.
    I’m going to add here in case there is more people looking for the same.

    I have found this code to place badges (achievements) under user avatar in bbpress:

    add_filter( 'bbp_get_reply_author_link', 'my_append_badges_via_filter', 10, 2 );
    
    function my_append_badges_via_filter($author_link = '', $args) {
    
    	# Needed to get the user ID of the person intended to be displayed.
    	$user_id = bbp_get_reply_author_id( $args['post_id'] );
    	#Construct your output here.
    	$badge_output = '';
    
    	$achievements = badgeos_get_user_achievements( array( 'user_id' => $user_id ) );
    	if ( !empty( $achievements ) ) {
    			$badge_output .= '<div class="achievements">';
            foreach ( $achievements as $achievement ) {
    						if($achievement->post_type != 'badges')
    							continue;
                $badge_output .= '<div class="achievement achievement-' . $achievement->post_type . '">';
                //echo '<h2>' . get_the_title( $achievement->ID ) . '</h2>';
                $badge_output .= get_the_post_thumbnail( $achievement->ID, 'thumbnail', array('title'=>get_the_title( $achievement->ID ) ) );
                //echo __( 'Earned on: ', 'text-domain' ) . date( get_option( 'date_format' ), $achievement->date_earned ) ;
                $badge_output .= '</div>';
            }
    			$badge_output .= '</div>';
      } 
    		
    	return  $author_link . $badge_output;
    }

    To make badge smaller I added this CSS code:

    .achievement.achievement-badges{width:50px;}

    But the code is not perfect. Because is not showing badges only under avatar, is also showing at:
    – forums main page
    – forum page
    – above topic (information bar)

    Would be great too if have:
    – link in badges to archivements tab page

    Can someone help me with this? 🙂

    Thanks!!

    #186735
    u_Oi
    Participant

    Hi,

    @philipjohn

    Try this code in your function file, it shows only the titles (of topics) but no the content.

    //Restrict Topic and Replies Content For No-Registered Users
    function pj_hla_logged_in_topics($have_posts){
    if (!is_user_logged_in()){
    $have_posts = null;
    }
    return $have_posts;
    }
    add_filter('bbp_has_replies', 'pj_hla_logged_in_topics');

    Regards,

    #186715
    sovvyg
    Participant

    fdarn, i am using shortcodes to embed the forums but it doesn’t show on the core pages either. I have tried removing all of the forum shortcodes from the site and this doesn’t seem to make any difference.

    #186709
    Vinod Dalvi
    Participant

    @fdarn Are you using this [bbp-forum-index] shortcode?

    I have tested it on my test site using bbPress version 2.6-rc-3 and it is working fine for me.

    #186707
    Vinod Dalvi
    Participant

    Are you using the shortcode provided by following plugin?

    bbp style pack

    If yes then Could you please contact the plugin author here https://wordpress.org/support/plugin/bbp-style-pack

    #186703
    Vinod Dalvi
    Participant

    It seems to achieve this you have to use plugin like this https://wordpress.org/plugins/cbxuseronline/ and develop some custom code.

    #186698
    Robin W
    Moderator

    probably start here

    Custom Import

    I started with bbpress and a snitz database – here is what I wrote as I went along which whilst you can skip the access database stuff might help you

    Documented import from snitz access database

    #186697
    aleksandar100
    Participant

    Hello,

    Sorry if this question has already been asked.

    I have a WordPress website that has been custom developed on top of the Twenty Twelve WordPress theme. I want to migrate it to a new theme (on the same installation) and have been working out how to transfer the custom features to plugins.

    The final step is the forum and I want to give bbPress a try but have no clue where to begin with. The forum posts are using a custom post type and are stored in the wp_posts table in the database.

    I read about the custom importer, but I am not a developer and kind of got overwhelmed. Is there anyone who has done this before and can perhaps share their process step by step. I should be able to work it out from there.

    Thank you in advance.

    #186686
    Peter Raschendorfer
    Participant

    After further digging into the code I’ve found the principal reason. It makes no difference if a member has created topics or not. The problem is the main query which always queries for posts. The 404 error appears if the user has not created any posts.

    I’ve created a ticket: https://bbpress.trac.wordpress.org/ticket/3161

    #186684
    fdarn
    Participant

    Sovvyg, Are you maybe using a short code to embed the forum on a different page? I am having the same issue when I use shortcodes.

    #186680
    sovvyg
    Participant

    I can’t see any issue in the template file, both breadcrumbs and subscription is on there as it should be. I have made a child file and removed and readded the breadcrumbs which reflects fine but the subscribe button just isn’t showing

    In template file:

    <?php bbp_breadcrumb(); ?>
    
    <?php bbp_forum_subscription_link(); ?>

    If anyone could help id be so grateful, im probably missing something minor!

    #186679
    cyklokopce
    Participant

    And similar one, is there any CSS code to hide that line about the number of displayed topics/posts as well? Thanks!

    #186678
    cyklokopce
    Participant

    Hi, could you please help me, is there any CSS code to hide that line on the top of every forum page? It looks like this: Home > Forum > Topic…

    I use bbPress 2.5.13 and wordpress 4.8.1

    My forum is here: http://www.cyklokopce.sk/forums/forum/info-o-trasach-lokalitach/

    And the line is Domov › Diskusné Fóra › Info o trasách, lokalitách…

    Thank you!

    Daniel

    #186670
    fdarn
    Participant

    Hello,
    I am using bbPress 2.5.13
    I need to use a shortcode to put my forum on a page in wordpress. The shortcode options in bbp style pack will display the topic index but they will not display the Create a New Topic form or Link, like the regular Forum page does. See screenshots for examples.

    Regular

    shortcode

    #186667
    clearscope
    Participant

    We have encountered an issue whereby when multiple forums are placed on a page, using the [bbp-single-forum id=##] shortcode, the HTML buttons do not appear for all but the 1st forum. The class=”quicktags-toolbar” div still appears, but it is empty (the HTML input buttons do not appear within the source HTML).

    This issue has been confirmed on multiple installs, with all plugins disabled and using the default WP theme.

    Here is a screenshot example: https://imgur.com/rqPiXa6

    #186660
    bulld_digital
    Participant

    Hi, I have a multisite setup with a main site and 1 sub-site.

    I played around with settings and network activate bbpress before choosing to go with this option: “Sub-Sites of the Network Only” https://codex.bbpress.org/getting-started/installing-bbpress/multisite/

    So i want the forums only to be available on the sub-site, so i deactivated the plugin from the network so i could activate it on a sub-site level. But then I got this error message when trying to reach the admin of that sub-site: https://www.dropbox.com/s/j4q73lc5attt23t/activate.jpg?dl=0

    Now what should i do to proceed? Are there database tables that should be removed first?

    #186652
    Vinod Dalvi
    Participant

    Is there such plugin as you mentioned?

    Please ignore it. It is my copy paste mistake.

    BathindaHelper.com

    I could confirm the issue on your site so please troubleshoot it as described above.

    And last, could you pls suggest me some paid developer in/around New Delhi in India, which could help me develop some code for MLM (Multi Level Marketing) for my WP website?

    You can contact http://freewptp.com/contact/

    Vinod Dalvi
    Participant

    You can remove ip address from bbPress posts by using the below custom code in the functions.php file of your child theme or in another custom plugin.

    function vvd_no_view_ip( $author_ip, $r, $args ){
    	return __return_empty_string();	
    }
    add_filter('bbp_get_author_ip','vvd_no_view_ip', 10, 3 );
    #186650
    Vinod Dalvi
    Participant

    You can remove ip address by using the below custom code in the functions.php file of your child theme or in another custom plugin.

    function vvd_no_view_ip( $author_ip, $r, $args ){
    	return __return_empty_string();	
    }
    add_filter('bbp_get_author_ip','vvd_no_view_ip', 10, 3 );
    #186649
    Vinod Dalvi
    Participant

    You can remove ip address by using the below custom code in the functions.php file of your child theme or in another custom plugin.

    function vvd_no_view_ip( $author_ip, $r, $args ){
    	return __return_empty_string();	
    }
    add_filter('bbp_get_author_ip','vvd_no_view_ip', 10, 3 );
    #186648

    In reply to: hide ip address

    Vinod Dalvi
    Participant

    You can remove ip address by using the below custom code in the functions.php file of your child theme or in another custom plugin.

    function vvd_no_view_ip( $author_ip, $r, $args ){
    	return false;	
    }
    add_filter('bbp_get_author_ip','vvd_no_view_ip', 10, 3 );
    #186647

    In reply to: Hide IP

    Vinod Dalvi
    Participant

    Instead of editing plugin code you can remove it by using below custom code in the functions.php file of your child theme or in another custom plugin.

    function vvd_no_view_ip( $author_ip, $r, $args ){
    	return false;	
    }
    add_filter('bbp_get_author_ip','vvd_no_view_ip', 10, 3 );
    #186624
    sovvyg
    Participant

    never mind ive done it, thanks to you i merged your solution with mine and hey presto!

    function vvd_add_notice_before_topic_form() {
        
            echo '<div class="bbp-forum-content">';
    		echo bbp_forum_content();
    		echo '</div>';
        
     }
     add_action( 'bbp_theme_before_topic_form_notices', 'vvd_add_notice_before_topic_form' );

    Thanks again for your help 🙂

    #186623
    sovvyg
    Participant

    Hi Vinood, thanks for the code, it works perfectly.

    The only issue is that the text will need to be different for each forum which is why i was wondering if there was a way to pull the text from the forum description rather than add the custom text in the php file if that makes sense.

    If there is not a way then i will make the descriptions more global but ideally i’d be able to make each unique or have none at all.

    Thanks, Lauren

    #186619
    zopfan
    Participant

    You’re right, it was perhaps the theme issue only. Now I’m on my way to pin-point the issue further. But you seem to be right. I’ll let you know.

    deactivating all plugins except Unyson plugin

    Is there such plugin as you mentioned?

    Could you please share me your site URL

    BathindaHelper.com

    And last, could you pls suggest me some paid developer in/around New Delhi in India, which could help me develop some code for MLM (Multi Level Marketing) for my WP website?

Viewing 25 results - 4,951 through 4,975 (of 32,577 total)
Skip to toolbar