BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #39071

    Hi Brajesh,

    I tried to make my own shortcode with this but I must have done something wrong. When I run the following code it simply returns the word… Aray … on the page and nothing else.

    I added this code to my functions file…

    /**
     * returns n number of top followed users.
     *
     * @param int $count number of entries requested.
     *
     * @return array
     **/
    
    function buddydev_get_top_followed_users( $count = 100 ) {
        
    	global $wpdb;
    
    	$bp = buddypress();
    
    	return $wpdb->get_col( $wpdb->prepare( "SELECT leader_id, COUNT( leader_id ) as follow_count FROM {$bp->follow->table_name} WHERE follow_type = %s GROUP BY leader_id ORDER BY follow_count DESC LIMIT 0, %d", '', $count ) );
    }
    
    add_shortcode('top_followers', 'buddydev_get_top_followed_users');

    I used this shortcode..

    [top_followers]

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #39067

    Wow thank you very much Brajesh you are awesome.

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #758

    Sorry just one more thing I would like to see added is some kind of progress indicator like a spinning ball or something. Creating a sub domain site takes a little bit longer and I can see cases where users push the “Register” button a few times because they think nothing is happening.

    Thanks

    • This reply was modified 5 years, 11 months ago by Milo.
  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #755

    not your fault I should know better than that.

    WORKS PERFECT! Redirects as expected on both Registration and Site Creation

    Thanks

    • This reply was modified 5 years, 11 months ago by Milo.
  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #753

    Yikes does something other than that code go in this file. ERRORS…….

    add_filter( ‘bpajaxr_redirect_url’, ‘buddydev_redirect_to_profile_on_ajax_registration’, 10, 2 ); function buddydev_redirect_to_profile_on_ajax_registration( $url = ”, $user_id = 0 ) { if( ! $user_id ) { return $url ; } $url = bp_core_get_user_domain( $user_id ); return $url; }
    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-content/plugins/wordpress-social-login/wp-social-login.php on line 64

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 60

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-login.php on line 431

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-login.php on line 444

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 957

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 958

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 959

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 960

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 961

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 962

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 965

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 966

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 967

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 968

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 971

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 972

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 973

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 974

    Warning: Cannot modify header information – headers already sent by (output started at /home/relativeu/public_html/wp-content/plugins/bp-custom.php:15) in /home/relativeu/public_html/wp-includes/pluggable.php on line 1207

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #751

    ok but I dont seem to have this file

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #749

    yeah I was just reading that (you read my mind 😉 where is that file I am having trouble locating it.

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #747

    I have confirmed that I am using 1.1.9. I have cleared the cache (a few times) but this is still not working for me. Would you like to try again yourself? http://relativeu.com/

    I have tried making both… just a user…. also a multisite. Each time I am just directed back to the main page after registration

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #740

    Excellent Brajesh thanks. I am going to try it out in a few minutes here. I will report back. 🙂

  • Participant
    Level: Enlightened
    Posts: 51
    Milo on #702

    Hi Brajesh,
    I used your “BP Redirect To Profile” with this configuration and everything is working fine. I would just like it if they could go to their profile page after sign up as well. That is the only thing missing for me now. I really like this layout everything looks really cool on the sign up with this Ajax plugin… nice work.