Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 351 through 375 (of 3,787 total)
  • @danbp

    Participant

    Hi,

    unable to reproduce your issue. Clear all cache you use including browser cache.
    Activate wp_debug in wp-config.php

    Disable all plugins but BP. Remove any custom code in bp-custom or child theme functions.php
    Activate a Twenty theme and give a try.

    Reactivate one by one

    @danbp

    Participant

    The single topic view template (loop-single-reply.php) has 2 actions hooks you can use:

    do_action( 'bbp_theme_before_reply_author_details' );
    do_action( 'bbp_theme_after_reply_author_details' );

    In so far, the above function should work.

    Try this one. Add it into your theme function to test. And if it works from there, remove it and add it to your child-theme functions.php file.

    function country_flag() {
    if( class_exists( 'bbPress' ) ) :
    $user_id = bbp_get_reply_author_id();
    $country = xprofile_get_field_data( 'country', $user_id );
    
    	echo '<div class="country">'. $country .'</div>';
    endif;
    }
    add_filter( 'bbp_theme_after_reply_author_details', 'country_flag' );

    Activate also wp_debug in wp-config.php while testing. It could be possible you have an error somewhere who avoid the function to work properly…

    If it still doesn’t work, ask for help on the bbpress support.

    @danbp

    Participant

    @davehakkens,

    have you uncommented the second filter ? The first one works with groups. Comment it and try the other.

    @danbp

    Participant
    In reply to: Actions not taken

    @danbp

    Participant

    Have you tested with another browser ? Can you provide a site url ?
    Could it be that you used a framework theme or one with plenty custom settings ?

    In reply to: Actions not taken

    @danbp

    Participant

    Do you use a cache plugin ?

    @danbp

    Participant

    If it doesn’t work in your child theme functions.php, use bp-custom.php

    Standalone because bbP is used separetely and not as group forum, which is a popular config when BuddyPress is activated. FYI (in case of):

    Installing Group and Sitewide Forums

    @danbp

    Participant

    Check documentation
    https://codex.wordpress.org/Child_Themes

    Once child is activated, as soon as you click on appearence > editor it is the child style.css file which is showed.

    https://codex.wordpress.org/Appearance_Editor_Screen

    https://codex.wordpress.org/CSS

    Closing this topic as it subject is not related to BuddyPess.

    @danbp

    Participant

    Hi,
    you have to use a child-theme for this or you will loose any custom rule at next theme update.

    You can use something like this, where in your child style.css file has no importance.

    a,
    a:visited,
    a:hover,
    a:focus,
    a:active {	
    	color: #b61a1a; /*red */
    }

    http://www.w3schools.com/css/css_link.asp

    In reply to: [Resolved] Last activy

    @danbp

    Participant

    what exactly (xx posted … 5mn ago ?) and where would you hide this ?

    @danbp

    Participant

    hi @davehakkens,

    You use a standalone bbPress. Normally you have to ask on bbPress forum for such questions.

    Add this to bp-custom.php or child theme functions.php and give a try.

    i tested it with group forums only, so i couldn’t test all the filters.
    You might to find/experiment others.

    It’s a working example who fires the country value. But you’ll certainly have to complete it to get the flag image.

    function country_flag() {
    $user_id = bbp_get_reply_author_id();
    $country = xprofile_get_field_data( 'country', $user_id );
    
    	echo '<div class="country">'. $country .'</div>';
    	
    }
    add_filter( 'bbp_theme_after_reply_author_details', 'country_flag' );
    //add_filter( 'bbp_theme_before_topic_author', 'country_flag' );

    @danbp

    Participant

    hi @masoud1111,

    all i found was how to hide that button, or remove it.
    but not show it only on some profiles

    You just need to add some conditionnals.

    Try this (in bp-custom.php) and give feed back if it works.

    function bpex_private_message_button( $button ) {
    $user = bp_loggedin_user_id();
    
        if ( is_super_admin() ) { 
    		return $button;
    	}
    
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    
    		if ( $role == 'subscriber' || $role == 'contributor' || $role == 'author' || $role == 'editor' )  {
    			// hide button for these roles
    			$button = '';
    		}
    	}
    
    	// allow the button to appear on admin's profile only
    	if ( bp_is_active( 'xprofile' ) && bp_is_user() )  {	
    		$user_id = bp_displayed_user_id();	
    		// assuming admin's ID is 1
    		if ( $user_id == 1 ) {
    			return $button;
    		}
    
    	}
    
    }
    add_filter( 'bp_get_send_message_button', 'bpex_private_message_button', 1 , 1 );

    @danbp

    Participant
    In reply to: menu link member list

    @danbp

    Participant

    – you can add a condition for logged-in user on the directory template.
    – for the menu itself, and specially if it is a wordpress menu like primary, you need to write a function. Here another tutorial for this. It’s similar to the other i’ve mentionned previously, but with more examples (including positionning and conditionnals).

    wp_nav_menu()

    wp_get_nav_menus()

    And you can also open an enhancement ticket if you estimate this should be part of BuddyPress and not only WordPress.

    @danbp

    Participant

    @tranny,

    dealing with spammers is a long run work, to not say a never ending work. There is no miraculous plugin or trick to stop them.
    And even if you would be a genius coder creator of an extra super original spam shield, you could be sure to became target #1 of all spammers, because in this case, you would represent the absolute challenger of all code breakers !

    Back to real life.

    Most of updates spam comes directly into the DB. Bots are clever and don’t need to login to do that.
    Some spammers are real people, and once they are logged, they do their stuff manually. These people can be isolated, but to do this, you have to find them in the user list. Which is absolutely not easy and time comsumting. And of course, this is not prevention but intervention, after you where spammed.

    You could also track IP‘s, but again, this can be helpfull only AFTER you where spammed. But getting ip’s on admin user list is a great way to gain time. Once you have the IP, you can consult many anti spam sites who store any bot and user known to be attackers. And eventually ban them with this plugin.

    For now, first thing to do is to clean your user list. Whatever suspect username, like a589xdf or special to BP, Bill UNERHOOD, can be eliminated. The first example use alpha-numeric digits, the second a very well formed first and last name. It’s extremely rare that normal users enter such credentials. In addition to this, you can check their email. Why would you, for example, have members with a polish email (@blogmedykamenty.pl) if you’re in New Zeeland and your site relates about pets ? In this case, you can raisonably doubt about an interest between medicaments and pets ! You can fire such user.

    All this may be good and well, but you have also to hardening WP. This means using another table prefix as wp_ at very first. And second, to not use “admin” as user name. Never !
    Read also @venutius tutorial

    You have to clean out the existing spammers, unfortunately manually. And to avoid upcoming spam.

    To calm down the bots – in case you receive dozen of spam daily, close all comments and deactivate notices and messages component in bp settings for 2 or 3 weeks.

    Also, in case you’re on a dedicated server, you really need to enforce his security. But this is out of the scope of this forum.

    @danbp

    Participant

    @r-a-y The danish locale for moment.js use “da” extension. As you ask for check, i assume it is confusing when BP translation is using “da_DK” ? ๐Ÿ™‚

    https://github.com/moment/moment/blob/develop/locale/da.js

    @danbp

    Participant

    i use them in bp-custom, but i suppose it will work also in child-thme’s functions.php

    That said i mentionned this in my previous post. ๐Ÿ™‚

    In reply to: how to add new members

    @danbp

    Participant

    How do I add a new member to buddypress from the backend of WP?
    They are the forum moderators and group admins.
    So, how do I โ€œactivateโ€ them?

    What should be understood from your questions ?

    Adding a new user from backend and/or promote it as mod or group admin ?
    Adding a new user is not related to BuddyPress, but to WordPress.

    To promote users as mod or admin or add new user to a group from back-end
    dashboard > groups > select the group > edit > anything to do that is at the bottom of the screen.

    In reply to: menu link member list

    @danbp

    Participant

    Because pages are not user related items ?

    Members Directory page is in the Pages section of the menu customizer. If you want link to it you take it from there.
    The BuddyPress section contains dynamic items for logged-in or logged-out user.

    @danbp

    Participant

    I think it is how it works but i could be wrong.

    Any thoughts @djpaul ?

    @danbp

    Participant

    The complete activity list including bbpress

        $retval['action'] = array(        
            'activity_comment',
    	'activity_update',
    	'created_group',
    	'friendship_created',
    	'joined_group',
    	'last_activity',
    	'new_avatar',
    	'new_blog_comment',
            'new_blog_post',
    	'new_member',
    	'updated_profile',   
    	'bbp_topic_create',
    	'bbp_reply_create'
        );
    In reply to: how to add new members

    @danbp

    Participant

    Hi,

    did you activate the user ?
    or have you omit to uncheck Send User Notification ?

    If you’re doing this just to test BP with some content, use better BP Default Data

    @danbp

    Participant

    You’re mentionning activity types…

    When you go to a group activity screen, you have the group activity filter which give you a list of related group activities you can use: updates, group updates, group membership and if you have a group forum: topics and replies.

    To know how it is spelled internally, the simpliest is to go to DB and _bp_activities table, sort it by component and search groups and you will see the correct type name beside. That’s it for activities.

    If you want list all filters applied to groups, use notepad++ and search for “apply_filters”. This will retrieve over 300 lines of filters related to the group component.

    …but not sure i understand you correctly. ๐Ÿ˜‰

    In reply to: menu link member list

    @danbp

    Participant

    See this tutorial if it helps.

    @danbp

    Participant

    No idea if the order or the names have an influence on your issue, but i don’t think that you need 2 locahost in the file.
    You use

    127.0.0.1 localhost
    127.0.0.1 localhost
    ::1 localhost
    ::1 mysite
    127.0.0.1 mysite

    Make it looking exactly like in my previous example.

    What is the URL of your local site ?
    What do you have in site’s htaccess ?

    BP pages have no model, just a page attribute, which should be ( no parent ).

    What you could do:
    Try to install another site with simply WP and BP (download a new copy for each) and see if the issue is still in.
    If it does, you have to review your server settings or at least, to read some advice and docs

Viewing 25 replies - 351 through 375 (of 3,787 total)
Skip to toolbar