Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_user_link doesn’t work anymore?


  • cpkid2
    Participant

    @cpkid2

    { open “a” tag } href=”{ php bp_user_link() }activity”>Activity { close “a” tag }

    That line used to direct me to the member’s activity page; however, now it leads me to “sitedomain.com/activity”

    Also, I looked in the source code and the php tag gets stripped completely.

    It was working just fine yesterday and I didn’t touch a thing. Did this tag get deprecated all of a sudden?

    Note: I can’t post the tags so I put in the brackets.

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

  • Jeff Sayre
    Participant

    @jeffsayre

    Which version of BP are you running? Where have you placed your code? I have not checked to see if bp_user_link() has been deprecated, but it is easy enough to do a global search and find out.

    By the way, you use the “code” tag enclosed within angled brackets to display code. Just close the code tag after you’re finshed:

    function example() {

    // do something here

    }


    Paul Gibbs
    Keymaster

    @djpaul

    bp_user_link() is still in BP 1.2.x. You must have changed something, it wouldn’t stop working by itself…


    JJJ
    Keymaster

    @johnjamesjacoby

    bp_user_link hasn’t been deprecated, but it’s on the chopping block.

    I think we’ll need to sweep through the functions for 1.3 and strongly define what the _member_/_loggedin_/_displayed_/_user_ function names are inferring. In the past (and currently) some of these were used rather inconsistently. I cleaned some of this up in the branch last night for 1.2.4, but there’s plenty more to do.


    Wayne Hall
    Participant

    @waynhall

    I noticed the same problem. I don’t know if it had been there all along and I just hadn’t noticed, but I just upgraded to Buddypress 1.2.4. I’m also using the the BuddyPress Template Pack to create a custom theme. To work around the problem, I replaced:
    <?php bp_user_link() ?>
    with:
    <?php bloginfo(‘url’) ?>/members/<?php bp_displayed_user_username() ?>


    Wayne Hall
    Participant

    @waynhall

    By the way, the “code” tag does not work on here, nor does the “pre” tag. Use HTML entities to display angled brackets.


    rich! @ etiviti
    Participant

    @nuprn1

    filed a ticket
    https://trac.buddypress.org/ticket/2409

    fat finger? – returning the logged in user instead of the displayed user

    function bp_displayed_user_link() {
    echo bp_get_loggedin_user_link();
    }
    function bp_user_link() { bp_displayed_user_link(); }

    where both should be point to:

    function bp_get_displayed_user_link() {
    global $bp;

    return apply_filters( ‘bp_get_displayed_user_link’, $bp->displayed_user->domain );
    }


    r-a-y
    Keymaster

    @r-a-y

    Looks like bp_user_link() should be this:
    function bp_user_link() { echo bp_displayed_user_link(); }

    Also bp_displayed_user_link() needs to be changed to:

    function bp_displayed_user_link() {
    echo bp_get_displayed_user_link();
    }


    hotforwords
    Participant

    @hotforwords

    It looks like they fixed it in the ticket! Yeah! Thanks guys! I copied the fix over to my website!

    Marina


    alanchrishughes
    Participant

    @alanchrishughes

    @cpkid2 try this, I’ve been trying to figure out the same thing for a while now.

    http://pastebin.com/7QFJ5fUV

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘bp_user_link doesn’t work anymore?’ is closed to new replies.
Skip to toolbar