Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 470 total)
  • Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Christian,
    no problem. If you decide to not use it again, you can use my plugin BuddyPress notification widget in that case.

    About the notice plugin,
    I will write the code tonight and put on github and link here.
    Thanks
    Brajesh

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Christian,
    in case of limited no. of trusted users, we can add the capability ‘bp_moderate’. Still, I will say it is a flawed approach and insecure. Please do not try that.

    Can you please let me the answers of the following questions and may be I can put some code:-

    1. By notice, do you want to show the users who created this notice?
    2. I assume there can be more than one notice at a time?
    3. Should all users be mailed on notice(also a local notification be generated for each user)
    4. Is there anything else you want to be part of this notice feature?

    Thanks

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Christian,
    If you want to allow it for all users using the inbuilt notice my not be the best option as it needs bp_moderate capability and I will strongly recommend against giving everyone the ‘bp_moderate’ capability.

    If you are comfortable with the code, I will suggest look at the bp-messages component and check now the notices are handled. With some slight modification, you can achieve the same.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    You are right about creating a home.php or front-page file and putting the content from activity/index.php

    Here are a couple of things that I may suggest to improve it.
    Since you are using the code (which is part of bp-legacy template and most theme include that), you activity/index.php does not have header/footer.
    The easy way is.
    1. copy the page.php from your theme and rename it to home.php
    2. Now look for the section where you see the loop code( something like while(have_posts()) ..etc, replace only that section of code with the the content of actvity/index.php or you can put this line

    
    <?php bp_get_template_part( 'activity/index' ); ?>
    

    It will include the activity loop inside your home page.

    You may want to look for the div/classes that is generated for your post. If you can inject that, it should look fine(as your theme supports bp and they should have the css.

    If it does not work, please post the content of your homepage on pastebin and I will modify it for you :)

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Christian,
    There is one functionality in BuddyPress that allows it. You can see the feature as site wide notice(Mark a message as notice).

    The problem is currently, only a user with the capability ‘bp_moderate’ can send the notice. Do you want to allow this notification feature for all users or just selected few?

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Thank you for the ticket @mercime :)

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    the problem is that currently the pagination links are broken.
    for example if you put the page number manually like this

    https://buddypress.org/extend/plugins/?ppage=5

    It will work. After the second page, the pagination is broken .

    I am not sure if the moderators, developers are aware.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi @number_6,
    Just wanted to post that it is easily doable with a small snippet of js.

    Please put this code in your js file.

    
    jQuery('#whats-new').off('focus');
    jQuery('#whats-new').off('blur');
    

    Please put this inside the document ready section for your theme’s js file( or please do let me know if you want me to provide the complete code).

    By putting the above code, we have turned off the focus/blur events bound with the activity post box. So, There won’t be any fluctuation.

    Now, we will need some css to make the activity box and the post button visible properly.

    Here is the css code.

    
    #whats-new-options{
    height: 40px !important; /** I have used important to make sure that it will always be effective*/
    }
    
    form#whats-new-form textarea{
    height: 50px !important;
    }
    
    

    hoping that the above code works for you. Please do post back it it works for you or not?

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    It is easy to do that.
    Here is a function, you can put it in your bp-custom.php or your theme’s functions.php

    
    function devb_show_displayed_user_email() {
    	
    	if( ! bp_is_user() )
    		return ;
    	
    	$user_email = bp_get_displayed_user_email();
    	
    	echo "<a href='mailto:{$user_email}'>{$user_email}</a>";
    }

    And you can call it on the user profile like this

    
    <?php devb_show_displayed_user_email();?>
    
    

    and It will show the email as links.

    Hope that helps.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    It is a bug with BuddyPress and there is still an open ticket for the purpose.
    You can see the details here

    https://buddypress.trac.wordpress.org/ticket/5087

    and here

    https://buddypress.trac.wordpress.org/ticket/5643

    At the moment, there does not seem to be a solution. The problem is that query variable ‘s’ is used for Normal WordPress search as well as BuddyPress activity search too. So, When BuddyPress activity is set as home page, the wordpress search query( which is like sitename/?s=someterm) is mistaken for BuddyPress activity search and gets handled by BuddyPress causing the trouble.

    It will need some work on the way BuddyPress catches url(I am hoping that). let us hope that it makes to the core soon.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    hi @mcpeanut,
    Thank you.
    I actually made a mistake by including the lighbox hurriedly. I am updating to have an option to disable it.

    I have tested it on a few themes and it seems to have conflicts on couple of themes bacuse of my use of theme specific activity instead of supplying with the plugin.

    I am looking on to improve it and I saw your suggestions yesterday there.

    Please help me to improve it by providing your future suggestions here.

    https://github.com/buddydev/mediapress

    Let us improve it together :)
    Thank you
    Brajesh

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi @dio1987,
    Can you please provide a screenshot of what exactly you are looking for?
    MediaPress does provides the uploading/album(or gallery) etc.
    If you can explain, I can put the code for you :)

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    You are most welcome :)
    Have a great day!

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Fan,
    Do you mean removing the tabs in user profile ?
    If yes, Please visit Dashboard->Settings->BuddyPress then click on the components tab.
    there you can disable the Notifications and settings component.

    If you are using WordPress multisite, you can find the BuddyPress settings under NetworkAdmin->Settings->BuddyPress

    Hope that helps.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Chaitanya,
    Try this code.

    
    
    function bpfr_add_notification_to_page_title( $title, $original_title, $sep  ) {
    	
    	//do not change if the user is not logged in
    	if( ! is_user_logged_in() )
    		return $title;
    	
    	$user_id = get_current_user_id();//logged in user's id
    	
    	$count = bp_notifications_get_unread_notification_count( $user_id );
    	
    	if( $count > 0 )
    		$title = sprintf( "You Have %d New Notification(s) - ", $count );
    	
    	return $title;
    	
    	
    }
    add_filter( 'wp_title', 'bpfr_add_notification_to_page_title', 100, 3 );
    

    I have modified the code from your last post. The difference is, It only does it for logged in users. Also, I have decreased the priority to make it work on BuddyPress pages( otherwide bp_modify_title would have overwritten it).

    Hope that helps.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Do you want the join and leave button depending on the currently logged in user ina single shortcode or 2 different shortcode. I am not sure, so here is the code that will give you join button for any group

    
    add_shortcode( 'group-join', 'devb_group_join_btn' );
    function devb_group_join_btn( $atts = '', $content = null ){
        if( !is_user_logged_in() || !bp_is_active( 'groups' ) )
            return '';
        $atts = shortcode_atts( array(
                'group_id'=> false,
                'name'    => ''  
        ), $atts );
        
        extract( $atts );
    
        if( !$group_id && !$name )
          return '';
    
        if( $name ){
            
            $group_id = groups_get_id( $name );
        }
    
        if( groups_is_user_member(get_current_user_id(), $group_id ) )
                return '';
        
        //now let us put the button
        $btn = bp_get_group_join_button( groups_get_group(array('group_id'=> $group_id ) ) );
        
        return $btn;
    }
    
    

    please make sure to pass the slug of group as name. If you want it to be extendede and leave button added, please do reply.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Peter,
    The user does not need to login. You just need to add a user meta ‘last_activity’ for each user and they will appear on your member directory.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Ben,
    What I am doing with the Limit Members Per group plugin is as follows:-

    1. Give Site Admins options to set a limit and then allow him to give the Group admins flexibility to choose the number.
    2. If the option to allow groups admins select their own limit is enabled, It will use specific settings per group otherwise the global configuration will be used.

    Do you think merging this with Limit groups per user plugin will be a good Idea? I believe they serve different purpose but I am open to merge if you all think so :)

    PS: And just to clarify, the upcoming plugin is Free not premium.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Henry,
    As Hugo linked, the function does not uses exit. You might use ‘bp_core_redirect’ though, which does not require you to put exit after it.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    If you guys mean the the sites from the navigation, then you can use the following code in either your theme’s functions.php or bp-custom.php

    
    function bpdev_remove_blogs_nav(){
        global $bp;
    
        bp_core_remove_nav_item($bp->blogs->id);//
    
    }
    add_action('wp_loaded','bpdev_remove_blogs_nav');
    

    Hope that helps.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Hi Henry,
    That code works. All you are missing is an exit statement.
    here is the code I modified for you

    
    //redirect logged-in users away from activate page
    function bp_redirect_activate_to_profile() {
    	global $bp;
    	
    	if ( is_user_logged_in() && bp_is_activation_page() ) {
    		wp_redirect( $bp->loggedin_user->domain );
            exit(0);
    	}
    }
    add_action('wp','bp_redirect_activate_to_profile');
    

    That will work. Please do let me know if it works for you or not ?

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    If you are checking for BuddyPress activation page, you can use any of the following

    
    if( bp_is_activation_page() ) {
    //do something
    } 
    

    or

    
    if ( bp_is_current_component( 'activate' ) ){
    
    //do something
    }
    

    hope that helps.

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    Awesome work guys! Loved the new enhancements in Group/Activity fetching. Opens a lot of possibilities.

    Thank you dev team for all the hard work :)

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    @bphelp thanks Ben for the heads up.
    @sooskriszta
    You are right about the use case. It is not suitable for spammers protection and neither suitable for normal sites.

    I built it specifically for membership based sites where they wanted to limit the no. of friends and charge for increasing the limit(I had got that specific requirement from a client and they implemented it with s2 members plugin in their case).

    As far as Friendship request throttling is concerned, I am about to release a plugin today which does allows site admins to limit the no. of requests sent per minute(or you can set say 30 requests per 60 mins, that flexibility lies with the site admins).

    Profile photo of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    @webwarriorwng
    I am the author of that plugin. Can you please tell me the problem you are faccing.

    I will appreciate a little detail about your BuddyPress/WordPress version and theme you are using?

Viewing 25 replies - 1 through 25 (of 470 total)