Pass the ID into bp_core_get_username
Seems a bizzarre way around it? if I can use `bp_activity_user_id()` to get the id of the user that posted the item why isn’t there a ‘bp_activity_user_nicename()’ or something similar?
Anyway, I’ll look into your suggestion on both this and the other topic you’ve replied to, thanks.
Yes, it’s missing from the API. If you want it as a single function call, you can always write your own: my_activity_user_nicename() and put it in your bp-custom.php
And, submit it to the trac as an API enhancement!
I was hoping that “ would fix it, apparently not, it just shows the ID number still.
That surprises me… Post your full code sample, to show how you are calling it
Well Its a bit messy, but I’m trying to re-engineer the meta part of the entry, so I’ll be using it in a few places like
`<a class="activity-avatar" title="”
href=”” title=”user name here”>
`
To add the username as a title on the Avatar, so it shows on mouseover. And
`
<a class="author" href="”> said:
`
As a prefix to the post content. Then I’m moving the rest of the meta data to the bottom of the post so I can drop the opacity of it since its less important.
It’s not working because you are not passing an integer parameter for the user_id to bp_core_get_username()
bp_activity_user_id() is a template tag for echoing a value to the screen, not for fetching a value to pass to a function.
Instead use: “
A massive help yet again. Thanks Roger for taking the time to answer these questions.