News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Add & Create Social Media Icons To Profiles

Started by hcfwesker, January 30, 2012, 10:06:52 AM

Previous topic - Next topic

Bob Perry of Web Presence Consulting

Quote from: hcfwesker on December 23, 2012, 09:03:59 PM
Quote from: bperry921 on December 23, 2012, 04:11:48 PMThe custom tweak mentioned allows me to restrict posting a link of any type in the LinkedIn field until the member successfully posts a admin predetermined
number of posts in any board they have access to... works quite well I might add

You lost me.  What kind of edits did you make to negate members from using the LinkedIn profile field until they reach this number of posts?

Quote from: bperry921 on December 23, 2012, 04:11:48 PMfeel free to visit my site and view the member list to see the result

Guests can't view the memberlist or SM fields on profiles.



hmm, let me tweak the guest permissions a bit so you can see it... the tweak/customizing I did is from a module i found that prevents members from posting links in their signature setting, its here on SMF somewhere if i'm not mistaken
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

hcfwesker

The MOD is fixed so guests can't view SM profile options at all.  Just attach both Load.php and Profile-Modify.php, both from Sources folder.

hcfwesker

Just registered my own account, and the problem is not with this MOD, it's the signature link one you added.  It seems to be affecting added profile fields that require a link as well.  When I put any random link in my linkedIn field, I get this

https://rjventure.com/*Link%20Removed*

which comes from the custom code of removing links in signatures.  Something else added somewhere is also causing your url to be added at the front.  Attach those files and I'll try and take a look

Sidenote:   I'm a few miles south of ya in Huntsville, lol

FragaCampos

Hi there.

I would like to know if it's possible to add the active profiles (those we choose in admin panel) to a column in the members list, like the profiles of official SMF do and how to remove the icons from the Who's online list.

Thanks for this wonderful mod, hcfwesker.

hcfwesker

Quote from: FragaCampos on January 29, 2013, 09:40:39 PMI would like to know if it's possible to add the active profiles (those we choose in admin panel) to a column in the members list, like the profiles of official SMF do

You know what, I actually never tested those with fields filled out, when selecting which icons to deactivate in the admin panel.  Just noticed it removes them from the profile modify page for members, but if they filled it out already then it still shows.  I'll have to look into that.  Let me look into that and fix them first.

I never added to the memberlist because it could get cluttered up, but I'll probably just supply you with the custom edit, but make it like the display on Edit Buddies page list where they're all in one box.

Quote from: FragaCampos on January 29, 2013, 09:40:39 PMand how to remove the icons from the Who's online list.

Themes/default/Who.template.php

Find & REMOVE
', $member['facebook']['link'], ' ', $member['myspace']['link'], ' ', $member['twitter']['link'], ' ', $member['googleplus']['link'], ' ', $member['linkedin']['link'], ' ', $member['youtube']['link'], ' ', $member['deviantart']['link'], ' ', $member['pinterest']['link'], '


FragaCampos

I don't believe it will be cluttered if we can select them in the admin panel, and because it's surely rare to have them all activated. I deactivated all that come with SMF and there's lot of space. :)

Many thanks for your help.

hcfwesker

Quote from: FragaCampos on January 30, 2013, 09:58:37 AM
I don't believe it will be cluttered if we can select them in the admin panel, and because it's surely rare to have them all activated. I deactivated all that come with SMF and there's lot of space. :)

But others may want to add this edit as well.  This is what I'm referring to.



Now imagine | FaceBook | MySpace | Twitter | YouTube | LinkedIn | DeviantArt | Pinterest |   all being added as header blocks with a small icon logo under each block.  It just wouldn't look right.  ( i know you can deactivate some but it still looks clunky. )

Which is why i think the following would look much better in the mList.



Just 1 header block with all them in there. 


I don't mind though, I'll supply the edits for the way you prefer, I suppose.


Matthew K.


hcfwesker

v1.0.8 Released! 9563

! Fixed bug where Icons not activated were displaying on Display & Who Online pages.
Added language support for:  turkish

SMF2 users, To upgrade from v1.0.7 simply upload the v1.0.8 Package and install, then delete v1.0.7 after successful upgrade

hcfwesker

Quote from: FragaCampos on January 30, 2013, 09:58:37 AM
I don't believe it will be cluttered if we can select them in the admin panel, and because it's surely rare to have them all activated. I deactivated all that come with SMF and there's lot of space. :)

MemberList edits ( for the way you requested so each icon has it's own header) ...

Sources/Memberlist.php

Code (Find) Select
'msn' => array(
'label' => $txt['msn'],
'width' => '30'
),


Code (Add AFTER) Select
'facebook' => array(
'label' => $txt['smi_facebook_title'],
'width' => '70',
),
'myspace' => array(
'label' => $txt['smi_myspace_title'],
'width' => '70',
),
'twitter' => array(
'label' => $txt['smi_twitter_title'],
'width' => '70',
),
'youtube' => array(
'label' => $txt['smi_youtube_title'],
'width' => '70',
),
'deviantart' => array(
'label' => $txt['smi_deviantart_title'],
'width' => '70',
),
'googleplus' => array(
'label' => $txt['smi_googleplus_title'],
'width' => '70'
),
'linkedin' => array(
'label' => $txt['smi_linkedin_title'],
'width' => '70'
),
'pinterest' => array(
'label' => $txt['smi_pinterest_title'],
'width' => '70'
),


default/Memberlist.template.php

// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2">', $member['msn']['link'], '</td>';


Code (Add After) Select

if (!isset($context['disabled_fields']['facebook']))
echo '
<td class="windowbg2">', $member['facebook']['link'], '</td>';

if (!isset($context['disabled_fields']['myspace']))
echo '
<td class="windowbg2">', $member['myspace']['link'], '</td>';

if (!isset($context['disabled_fields']['twitter']))
echo '
<td class="windowbg2">', $member['twitter']['link'], '</td>';

if (!isset($context['disabled_fields']['youtube']))
echo '
<td class="windowbg2">', $member['youtube']['link'], '</td>';

if (!isset($context['disabled_fields']['deviantart']))
echo '
<td class="windowbg2">', $member['deviantart']['link'], '</td>';

if (!isset($context['disabled_fields']['googleplus']))
echo '
<td class="windowbg2">', $member['googleplus']['link'], '</td>';

if (!isset($context['disabled_fields']['linkedin']))
echo '
<td class="windowbg2">', $member['linkedin']['link'], '</td>';

if (!isset($context['disabled_fields']['pinterest']))
echo '
<td class="windowbg2">', $member['pinterest']['link'], '</td>';

FragaCampos

It worked great.
I believe this is better, because we can order the list in descending or ascending order in those columns.

Thank you once more, hcfwesker. It is always nice to see people like you who keep SMF alive.

vbgamer45

Great modification! hcfwesker has really helped on my sites.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

hcfwesker

Quote from: FragaCampos on January 30, 2013, 11:41:28 PM
It worked great.
I believe this is better, because we can order the list in descending or ascending order in those columns.

Thank you once more, hcfwesker. It is always nice to see people like you who keep SMF alive.

No problem, bud.  Just didn't want to make it a mandatory edit in the MOD until I work on adding options to select where to deactivate them to display for certain pages, I know members have been asking for that so gonna try and get a little more ambitious on the next update.

Quote from: vbgamer45 on January 31, 2013, 10:56:46 PM
Great modification! hcfwesker has really helped on my sites.

I really appreciate that, bro!  :)

Bob Perry of Web Presence Consulting

Quote from: vbgamer45 on January 31, 2013, 10:56:46 PM
Great modification! hcfwesker has really helped on my sites.

Agreed, great mod... I'll be updating versions after I finish this post... I've done my own customizing to the memberlist displaying all icons including SMF's and yall are right, it will get to be a mess if you try to give them column headings, however in my version you won't be able to sort the list Ascending or Descending for the mod icons, but in my case I'm not bothered by that and have just come up a great idea for the Statistics page and will be spending the rest of the night getting that squared away... I'm going to add a table to the other custom hacks I've got in the stats page showing the site's most popular social icons amongst the members, this mod's plus SMF's...

Also, I've got a mod on my site that allows for "validating" links for various Profile fields, I'm going to start testing hacks to include some of or maybe all of the social icons because I notice it will allow bogus links to be inserted in some of them, and I've been experiencing a rash of russian spammer wannabes attempting to post their stupid crap in those fields even though guests on my system can not view links anyway, sigh
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

hcfwesker

Unfortunately the trickiest one is the LinkedIn, because there's no standard URL for all profiles, they have different links depending on what your profile is there.  So just had to make that one with the ability to add an entire length of the URL.  I never use it, keep it deactivated on my site.  Were you able to look into the issue with your signature link issue and LinkedIn?

I'm actually working on a MAJOR update for this mod ( gonna take several days with my limited free time), I don't even want to say what it is just yet cause I just begun and want to make sure it's actually going to work before I get people's hopes up lol :D

Bob Perry of Web Presence Consulting

Quote from: hcfwesker on February 01, 2013, 12:40:06 AM
Unfortunately the trickiest one is the LinkedIn, because there's no standard URL for all profiles, they have different links depending on what your profile is there.  So just had to make that one with the ability to add an entire length of the URL.  I never use it, keep it deactivated on my site.  Were you able to look into the issue with your signature link issue and LinkedIn?

I'm actually working on a MAJOR update for this mod ( gonna take several days with my limited free time), I don't even want to say what it is just yet cause I just begun and want to make sure it's actually going to work before I get people's hopes up lol :D

Your right, LinkedIn is the trickiest one and unfortunately the most popular among the spammer wannabes, I could use some help in debugging the hack I have for "somewhat" validating that puppy, the signature link mod allows me to remove all links posted to it but I have a subtle bug in the logic somewhere that screws up when the field is written back to the database (updated), it tags my own site url onto the begiining of the resulting field, thus if clicked results in a 404 error which is very SEO un-friendly... the validation will end when the member reaches a predetermined number of successful posts giving the admin or staff ample time to stress to successful posters that you will not tolerate bogus links being posted in those fields by ANYONE... and you know what baffles me more than actually having to resort to such stringent security for preventing folks from ruining themselves? It's the logic behind whatever reasoning goes through these characters' minds when they're attempting this stupid act, they obviously do not realize that they will attract a hell of a lot more attention to their website by actually using the social media icons in the manner they were designed to be used, and then use whatever "sharing" functions almost all sites have available these days...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

hcfwesker

Quote from: bperry921 on February 01, 2013, 01:51:29 AMYour right, LinkedIn is the trickiest one and unfortunately the most popular among the spammer wannabes, I could use some help in debugging the hack I have for "somewhat" validating that puppy

Give me a few days, like I said got quiet an addition Im adding along with more options and stuff,  along with one that might resolve the issue you're having. 

Bob Perry of Web Presence Consulting

Quote from: hcfwesker on February 01, 2013, 03:08:14 AM
Quote from: bperry921 on February 01, 2013, 01:51:29 AMYour right, LinkedIn is the trickiest one and unfortunately the most popular among the spammer wannabes, I could use some help in debugging the hack I have for "somewhat" validating that puppy

Give me a few days, like I said got quiet an addition Im adding along with more options and stuff,  along with one that might resolve the issue you're having. 

I'm all for waiting a few days, no big rush by any means, I got a small hack that I'm working for another mod too, I pull all nighters to 48 hr sessions myself at times too, isn't it great ;)

I'd be more than anxious to beta test for you any time you have something new coming out, I have no qualms about installing betas  on a live production system if I trust the author, I like your style...

Which reminds me, would you have time in the near future to co-author a new game module with me?
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Arantor

Yeah, I've had trouble with LinkedIn as well, I don't even have a problem writing a decent regex for validation, but I can't find information on the various kinds of URLs that there can be.

Bob Perry of Web Presence Consulting

Quote from: Arantor on February 01, 2013, 09:25:05 AM
Yeah, I've had trouble with LinkedIn as well, I don't even have a problem writing a decent regex for validation, but I can't find information on the various kinds of URLs that there can be.

Yea this other module for preventing signature links does a fair job of covering the most common methods/types of URLs used on typical SMF sites, but I'm sure there could be others...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Advertisement: