• Resolved psmorrow

    (@psmorrow)


    Hi, I’m using EM with buddypress. is it possible to set the value for an EM attribute to the value of an xprofile field? The goal being to display it on an event page using the #_ATT syntax.

    Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter psmorrow

    (@psmorrow)

    Actually, I’ll share more details about what I’m trying to do…in case there’s a kind soul out there that can help me figure this out.

    The end goal is to add a hpyerlink to contact a person on skype. This works only partially:

    function my_em_custom_content($content){
    
    	$data = xprofile_get_field_data( 'Skype ID', bp_loggedin_user_id());
    	$content .= '<a href="skype:'.$data.'?call">Call Me on Skype<br />';	
    	return $content;
    }
    add_filter('em_content','my_em_custom_content');

    It only works partially because the “Call me on Skype” hyperlink, is only displayed when the event owner and the user are the same person….when a user tries to view the details of another member’s event, no skype hyperlink ?? Can anyone share why this is happening???

    Also, I am envisioning my next issue being that I don’t want to display the skype id of the logged in user….perhaps I’ll cross that bridge after I figure this first issue out ??

    Any help anyone can provide would be awesome!

    • This reply was modified 8 years, 1 month ago by psmorrow.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    Thread Starter psmorrow

    (@psmorrow)

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘attribute value’ is closed to new replies.