Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member Profile URL with User ID instead of Username

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    Check this out, for customizing labels and URLs: http://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/

    You can get the current logged in user id from here: http://codex.buddypress.org/developer-docs/the-bp-global/

    check out the `$bp->loggedin_user object` section

    Avatar of scylderon
    scylderon
    Member

    @scylderon

    I’d be more interested in the displayed_user object, but I’m not sure where to go from there. To globally change the profile slug not just for /members/ but for /members/[username] to /members/[user_id]. Any other suggestions?

    Avatar of scylderon
    scylderon
    Member

    @scylderon

    Anyone?

    Avatar of Di_Skyer
    Di_Skyer
    Member

    @di_skyer

    @scylderon hi, have ??? solved this quest?

    I am looking for a similar solution

    Avatar of Jason Jersey
    Jason Jersey
    Participant

    @phatjay

    Looking for same answer as well

    Avatar of meg@info
    meg@info
    Participant

    @megainfo

    Hi,

    I was made a hack for that and it work partially!!

    The code need more tests, all feeback’s are welcome.

    Add this code to your functions.php

    https://gist.github.com/dzmounir/5503865

    Avatar of meg@info
    meg@info
    Participant

    @megainfo

    The problem is from js code who animate #whats-new-options div, he make a div 40px hight.

    i find fix, i will fix the plugin by ading this code in js file

    
            jQuery('#whats-new').off('focus');
            jQuery('#whats-new').on('focus', function(){
                jQuery("#whats-new-options").css('height','auto');
                jQuery("form#whats-new-form textarea").animate({
                    height:'50px'
                });
                jQuery("#aw-whats-new-submit").prop("disabled", false);
            });
    
    Avatar of Jason Jersey
    Jason Jersey
    Participant

    @phatjay

    Regarding the code on github, yes, that did partially fix it. Now all users can be found via their user id # rather than username.

    /members/id #/

    The only problem I see so far is that the code didnt update the activity feed. If you click a name for a user in the activity feed it is still trying to locate user the old way but the user icons on the newsfeed are correct and try to take you to user profile with their user id #.

    So say for example:

    James Gill wrote a new post, Gluten

    The name James Gill is still trying to render the /members/username/ but not the /members/user id#/

    but the rest of the site except activity feed appears to be working right now. only the icons on the activity feed try to render /members/user id#/

    Avatar of meg@info
    meg@info
    Participant

    @megainfo

    Yes @phatjay,

    I think for the old activities, he dont update because the link of members and all content of activity is storeed in databse,

    you try to post a new activity and see if the link is /members/id #/

    thanks for feedback.

    Avatar of Jason Jersey
    Jason Jersey
    Participant

    @phatjay

    Ah, nice. Yep, the old activities save in the db. Now I am going to go in the db and just drop the old activities

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.