Skip to:
Content
Pages
Categories
Search
Top
Bottom

Extending Featured Member Widget

  • Hi Everybody (@Jeff Sayre!!!)

    I’m using WPMU 2.8.4 BP 1.1

    I’ve installed Jeff Sayre’s Featured Members Widget and have been attempting to customise the output by editing the plugin file itself. So far I’ve had no luck. I’ve scoured the forums and found some relevant information, but unfortunately it was not specific enough, and the function that Andy wrote in this thread appears to be deprecated

    i.e.

    (bp_get_field_data( 'Website', $user->user_id )

    So I found the following:

    <?php echo xprofile_get_field_data('Website', $user->user_id ) ?>

    Where ‘Website’ is the name of the custom profile field I want to display. But this still doesn’t seem to work. Essentially I’m asking what code needs to go into line 53 of the plugin to display custom profile data.

    I’m relatively new at coding PHP myself (I know enough to read it and hack it – I’ve got a ‘Teach Yourself PHP6 and MySQ’L book arriving from Amazon tomorrow!). So help would be appreciated.

    It’s a great plugin (cheers Jeff!) but I think if we could get it to display custom data it would be AWESOME!!

    Thanks all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • OK Andy solved this one for me in this thread. The answer is this: xprofile_get_field_data( $field_name_or_id, $user_id );

    Where $user_id is (in this case) $member and $field_name_or_id is (in my case) 61. I got the number by looking at the Profile Field I was after in Firefox with the Web Developer toolbar and it showed me the number in the class. I can’t work out another way of seeing a custom profile field’s id.. Off we go!!!

    @jeffsayre

    Participant

    Thanks for your comments and compliment.

    I have not yet updated this plugin for the WPMU 2.8 series. There is a completely-overhauled widget API in 2.8. After I get the Privacy Component out the door, I will update this plugin. In the meantime, please describe in more detail the additional features you would like to see.

    Hi Jeff,

    My only suggestion for improving the plugin would be to be able to automatically link in custom profile data from the widget itself. So you’d have an option to enter the name of a field and this would then display. Then you could display the user’s ‘about me’ section, their ‘website’ and, for example, a link to their Twitter feed, and it would automatically display all this info for whichever user you specify.

    Using the code above it’s not difficult at all to manually alter the plugin to display the desired data, but obviously this isn’t future-proof.

    I’m very happy with the plugin as it is at the moment, but then that’s because I’ve altered it myself. I’m sure others would like to see this functionality included.

    What do you think? Would this be relatively simple to incorporate?

    Maybe one more thing: if you want to link to the user’s Twitter Feed from the widget, it would be nice to be able to specify a thumbnail image to be the clickable link. So if you could have a box where you could input html around the inserted custom profile data, you could style it, make them into links, and add images and whatever else you want to. This one is probably much more complicated, but it would certainly be a cool feature!

    Many thanks,

    Ali

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extending Featured Member Widget’ is closed to new replies.
Skip to toolbar