Adding users social media account in profile

Started by iqbalresources, September 14, 2022, 06:07:13 AM

Previous topic - Next topic

iqbalresources

I've been looking a way to let user put their social media account in profile. There's a few mods available, but unfortunately outdated. so i'm looking again, to see if there any simple code that i can use, and the closest one as per below

https://www.simplemachines.org/community/index.php?topic=499592.0

so i make a tiny adjustment on the code as shared in above thread, and luckily, able to do that. so here i share the code that i put in 'Show Enclosed Within Text (Optional)' box, in Features and Option>Profile Fields.


Facebook
<a class="facebook" href="http://facebook.com/{INPUT}" target="_blank" title="Facebook - {INPUT}"><img src="{IMAGES_URL}/facebook.png" alt="Facebook - {INPUT}"></a>
Instagram
<a class="instagram" href="http://instagram.com/{INPUT}" target="_blank" title="Instagram - {INPUT}"><img src="{IMAGES_URL}/instagram.png" alt="Instagram - {INPUT}"></a>
Twitter
<a class="twitter" href="http://twitter.com/{INPUT}" target="_blank" title="Twitter - {INPUT}"><img src="{IMAGES_URL}/twitter.png" alt="Twitter - {INPUT}"></a>

and for the image, im put it in theme/images folder (same directory with skype.png)

thank you  :)



Speed King

I think social profile links should be https, not http

iqbalresources


Steve

Shall I edit your first post to indicate that?
DO NOT pm me for support!

Edwar Colt

Hello

Which file to edit to add this icon tip in version 2.1.3? And how to show these icons in the mobile version..

Sesquipedalian

You don't need to edit any files. Just create custom profile fields in Administration Center ► Features and Options ► Profile Fields, and configure them as described above.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Edwar Colt

Very cool, now it's easy to set up a verified account system. Thanks @Sesquipedalian

AlanDewey

Causing lots of electrons to push each other around since 1985.

Edwar Colt

I did it this way:


Display Settings

Name: {Verified Account}

Profile Section: > Forum Profile <

Show on Registration: No

Show on Topic View: Yes

Show on memberlist: Yes

Choose Placement: After Username

Show Enclosed Within Text:

<a class="checkacoount" href="https://yourdomain.com/VerifiedAccount/{INPUT}" target="_blank" title="Verified Account - {INPUT}"><img src="{IMAGES_URL}/space.png" alt="Verified Account - {INPUT}"><i class="fa-solid fa-circle-check" style="color: #70a5ff;"></i></a>
Field Type: Text

Input Mask: For text fields an input mask can be selected to validate the data.

Regex (Advanced)
~[a-z0-9_]{1,16}~i

Privacy: > Who can see and edit this field.
Users can see this field; only admins can edit it <

Active: Yes

I created a folder on the server with the name of Verified Account and inside that folder, at each profile verification, I open a folder with the name of the account to be verified. inside that folder a standard or personal index.html page for each profile. formatted according to the verified account proposal.

I put a 16x1 png image as space in the theme images folder and a fonts icon > https://fontawesome.com/

And end..

jovanddd

dezinsekcija [nofollow]
deratizacija [nofollow]

Advertisement: