UserPro Forums
  • Create new topic
  • Forums
    • No replies topics
    • Newest topics
    • Forum statistics
  • Account
    • Lost password
    • Register
    • Login
  • Documentation
  • Back to main site

Community Forums

User To User Support Forum/Forums/Support Questions (UserPro)/Custom Social Profiles

Custom Social Profiles

basecustomproflesocialurl
  • 8 years, 11 months ago AvatarRichard Kelsey
    Participant

    Added a whole bunch of custom social profiles for users (artists) to add…

    Text input type.

    For some reason when you click on the icons of the user (next to the default facebook, twitter, etc. ones), the base url precedes it…mywebsite.com/www.socialprofile.com/my_social_profile_name…

    Any ideas?

    Thanks!

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    Should I use the user_url meta key?

    8 years, 11 months ago Avataradmin
    Keymaster

    Hi Richard, do you mind to put the purchase code in your profile 🙂

    8 years, 11 months ago AvatarRichard Kelsey
    Participant
    This reply has been marked as private.
    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    I wonder if the problem lies with Path Compatibility?

    8 years, 11 months ago Avataradmin
    Keymaster

    The social profile value should have http:// to make the link correct. This is not required for facebook / twitter fields tho, as I made some filters to automatically convert it to correct link.

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    Where do I add this value?

    8 years, 11 months ago Avataradmin
    Keymaster

    Sorry? 🙂 If I understand correctly, isn’t the problem with social field (custom social fields) value/url?

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    I added custom fields with text value.

    User enters his URL as http://mixcloud.com/myprofile as always.

    Link in button next to FB/Twitter by profile pic returns this link:

    http://blankbookingagency.com/profile/maximus.petrus/www.mixcloud.com/maximus-petrus

    8 years, 11 months ago Avataradmin
    Keymaster

    Can you try to replicate it here in your profile, e.g. edit your facebook/twitter link so I can understand the problem?

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    It has nothing to do with facebook/twitter links. I setup new custom fields for user to add other social profile links.

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    Ok, I added the http://…works fine….now how to tell each user to not to forget? 🙂 Is there some kind of hook that can be added? 🙂

    8 years, 11 months ago Avataradmin
    Keymaster

    I did that for facebook/twitter.

    See common-functions.php this function userpro_link_filter() for idea about doing the same thing for other social profiles. You can also use this in a custom hook that you do not need to update plugin files directly.

    That hook allow you to change value BEFORE IT IS PRINTED TO FORM VIEW. e.g. if I want to change Male to “I am a Man”.. so the ide ais: just example, lets say we want to validate twitter field and pre-append the value with http, we can do this inside the function

    // auto twitter
    if ($key == ‘twitter’ && !strstr($value, ‘http’) ) {
    $v = ‘http://’;
    if (!strstr($value, ‘twitter’)){
    $v .= ‘twitter.com/’;
    }
    $v .= $value;
    return $v;
    }

    If key is twitter, and does not have http, we add it.. that’s all

    add_filter(‘userpro_before_value_is_displayed’, ‘userpro_custom_hook’, 9999, 4);
    function userpro_custom_hook($value, $key, $array, $user_id){

    }

    8 years, 11 months ago AvatarRichard Kelsey
    Participant

    Okay, that’s a cool solution. In the meantime I have added placeholder http:// and help text “Must begin with http://”
    which I guess does it too for now. 🙂

    8 years, 11 months ago Avataradmin
    Keymaster

    Great 🙂

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.

Disclaimer

This forum is 100% free and USER to USER support only. Technical support staff doesn’t monitor this forum actively.

If you are a customer and want to get technical support from our staff please submit a technical support ticket here: UserPRO Technical Support

Recent Topics

  • Custom Badges AddOn Plugin here
  • Green Trust Cash APplication
  • How to use cash app without a bank account
  • Install Cash App on your Device [100%] by yourself | Step-by-Step Guide
  • Green Trust Cash Application

About forum

Here you can find help from UserPro plugin developers and other UserPro fellow users. Please be polite and ask your questions. NO SPAM!

Search Forums

Follow us

  • facebook
  • twitter
  • youtube
© Copyright UserPro