Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display something if xprofile_get_field_data( ’xxx’ ) == ’yyy’


  • guigoz
    Member

    @guigoz

    Hi,

    I want to let my professionnal users import RSS feed with external member blog plugin. To do that, I’m using the code below to check their xprofile field, and then display the plugin link.

    But it works only when I am on the Member component… How can I do that everywhere on my site ?

    Thanks for help.
    Guillaume.

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

  • guigoz
    Member

    @guigoz

    Bump ?


    Virtuali
    Participant

    @gunju2221

    @guigoz, there is a plugin that allows you to put RSS Feeds into your groups. So every time a member inserts a RSS, the posts will show up on the activity stream.

    Is that what you are looking for?


    guigoz
    Member

    @guigoz

    @gunju2221

    I know this plugin, but I’m using External Member Blog Plugin : http://bp-tricks.com/featured/allow-users-to-add-their-rss-feed-to-their-profile-with-the-external-blogs-plugin/

    The thing is not about choosing a plugin, but I need display a link only to members which have xprofile named X equal to Y.

    I’ve tested with : “
    But it works only if I am on member page. And I want it everywhere.


    guigoz
    Member

    @guigoz

    Anyone ?


    guigoz
    Member

    @guigoz

    If anyone is concerned…

    1) In bp-custom.php

    `function My_Function ($user_id) {
    global $bp;
    $type_member = xprofile_get_field_data( ‘FIELD NAME’, $user_id );
    if($type_member == ‘FIELD VALUE’) {
    return true;
    } else {
    return false;
    }
    }`

    2) Somewhere in your theme to display something to this type of member :

    `
    loggedin_user->id)) : ?>
    HTML TO DISPLAY
    `

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display something if xprofile_get_field_data( ’xxx’ ) == ’yyy’’ is closed to new replies.
Skip to toolbar