• Koby

    (@blackshie)


    What text is expected from the predefined Discord and Telegram fields?

    With Telegram it doesn’t matter if I just enter my username or @(username), if I enter my t.me\(username) link, with or without leading http, the logo doesn’t appear in the profile.
    It’s the same with Discord, does it still expect the old ID with (username)#(numbers)?
    The sign does not appear there either after entering my username.

    All other social media fields work flawlessly, even just after entering the username it completes it to the correct user profile link and shows it in the profile.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @blackshie

    The Discord field value is the Discord user ID number. See How to find a User ID number

    The Telegram field value is the Telegram profile link – an URL with the t.me/ domain. See Usernames and t.me

    Telegram and Discord social links are not displayed in the profile header by default. Use this code snippet to show the Telegram profile link in the profile header.

    /**
    * Add Telegram social link to the profile header.
    */
    add_filter( 'um_predefined_fields_hook', function( $predefined_fields ) {
    if ( isset( $predefined_fields['telegram'] ) ) {
    $predefined_fields['telegram']['advanced'] = 'social';
    $predefined_fields['telegram']['color'] = '#24A1DE';
    }
    return $predefined_fields;
    } );

    Regards

    Thread Starter Koby

    (@blackshie)

    thanks for your answer

    Your code snippet worked, and with the t.me/username link it is now displayed correctly in the profile.
    Why is the telegram profile and the discord profile hidden by default and why is there no switch for it in the UM settings?

    i find the discord thing pretty silly, the user id is hard to find for many people and you always search for other users and friends by username anyway. why is that? why the id?

    Do you also have the code snippet to display the discord profile?

    Regards

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @blackshie

    I opened a pull request to fix displaying Telegram and Discord social links in profile header.

    Try this code snippet. You’ll see the Discord icon in the profile header, but I’m not sure that a link is correct. Can’t find official documentation about Discord links. Can you direct me to the Discord documentation about using username in links?

    /**
    * Add Telegram and Discord social links to the profile header.
    */
    add_filter( 'um_predefined_fields_hook', function( $predefined_fields ) {
    if ( isset( $predefined_fields['telegram'] ) ) {
    $predefined_fields['telegram']['advanced'] = 'social';
    $predefined_fields['telegram']['color'] = '#24A1DE';
    }
    if ( isset( $predefined_fields['discord'] ) ) {
    $predefined_fields['discord']['advanced'] = 'social';
    $predefined_fields['discord']['match'] = 'https://discord.com/users/';
    }
    return $predefined_fields;
    } );

    Regards

    Thread Starter Koby

    (@blackshie)

    Thank you very much.

    yes i think discord and telegram are one of the most important contact options nowadays and therefore very important to be displayed in the header.

    by the way, the discord field also takes the username and not just the id which i think is very good! it’s the same with the telegram field

    your discord link seems to be correct but, the discord link takes me to my own discord every time no matter what name i enter after the link, and is not a friend add link. but i couldn’t test it with a stranger name i’m not yet friends with. maybe that works. can someone test that?
    i’ve also done some searching but haven’t found anything like this until your link.
    if this really doesn’t exist, the discord symbol should simply not open a link.
    as i already wrote, you add friends via their user name, so just displaying it would be enough.

    but if you could find a way to do this, it would of course be great!

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.