News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Add & Create Social Media Icons To Profiles

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

Previous topic - Next topic

estes

Quote from: hcfwesker on September 10, 2013, 01:07:14 AM
Quote from: estes on September 09, 2013, 10:17:02 PM
i just installed this mod on SMF 2.0.5.  when i navigate to the Admin > Configuration page i dont see any links for Profile Fields.

the install said it installed correctly.  did i skip something?

Admin > Configuration > Core Features > "Click on Custom Profile Fields to Activate"

Goto the Core Features link in the admin panel and you must first enable the default "Custom Profile Fields" setting for this MOD to work.

yes that's correct. i do have that feature enabled.  the mod settings link should then appear on the configuration page correct?

i should add that i see the fields in the profiles settings, however, i don't see a link to the settings for the mod.  right now the links are displayed in text instead of icons.

hcfwesker

read the Mod page description. It tells you where the features are.  theres no new menu page, there's a link to a post on the MOD page to explain how custom social profiles are created.

estes

i read the mod page and i was under the impression there was a config under the admin > configuration > profiles page

the mod seems to be working somewhat...i see the social media profiles but they are displayed as links (not the icons).

doing a search on the directory it shows the icons exist in: /Themes/default/images/

there's no settings to display these as icons instead of links?

hcfwesker

Quote from: estes on September 10, 2013, 12:58:33 PM
i read the mod page and i was under the impression there was a config under the admin > configuration > profiles page

the mod seems to be working somewhat...i see the social media profiles but they are displayed as links (not the icons).

doing a search on the directory it shows the icons exist in: /Themes/default/images/

there's no settings to display these as icons instead of links?

My bad, figured it wouldn't be too tough to find them from the way i worded it.  Admin > Configuration > Features & Options > Profile Fields

They are displayed as icons on post pages, personal messaging pages, and member (ultimate profile) pages.  On member (default) profiles they're displayed as links.  A screenshot would help on where you're getting the icon issue.

Quote from: estes on September 10, 2013, 12:58:33 PMdoing a search on the directory it shows the icons exist in: /Themes/default/images/

If you have a custom theme with it's own 'images' folder than the images need to added there as well.



estes

uploading the images to that folder worked..thanks for all the help and cool mod!

Hildegarde

What do i have to do if i get this error?

I've been trying to install from Packages and when i want to install it, 2 errors in these lines:

mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,

mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,

I'm using a custom theme and my language is Spanish_es-utf8

Kindred

http://wiki.simplemachines.org/smf/Error_in_mod_installation

the error has to do with other mods that you have not your theme and not your language.

in other words - use your human intuition and add the variable definitions on to the end of those lines
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Hildegarde

Done.

Is this correct?



But every time i write in the fields, it doesn't let me save changes, i mean, what i wrote disappear.

I don't know where is the admin section for the mod.

hcfwesker

#428
The Gamers MOD makes installs to the same line, which is what is throwing the errors, along with other MODs im not sure of.  And, yes, what you have is correct, just make sure to make the same changes to the other line that is throwing the error too in Load.php

Then, after you manually add those changes, install the package and just ignore the error message, AS LONG as there are no other errors.

For admin stuff ...
Custom Profile Fields must be activated under 'Core Features' for this Mod to work.

Admin > Configuration > Features & Options > Profile Fields
Admin settings to Activate/Deactivate which to allow members to modify ( All on by default)
Admin settings to select which to show on new member Registration (All off by default)

It's all on the Mod page description

Quote from: estes on September 12, 2013, 12:47:17 PM
uploading the images to that folder worked..thanks for all the help and cool mod!

Good deal, glad it's working.  During the install it should have asked you if you wanted to install on other themes, you must have missed that part at the bottom, which would have added the images for you in your other themes.


estes


Hildegarde

When you say i have to make the same changes to the other line, what line do you mean? The mod says me i have to change 2 lines, but i'm confusing, because is exactly the same lane so that's why i've added all the info on the end.

mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,

mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,


The difference between each other is mem.member_ip and mem.member_ip2. Ok, as you can see in my last pic, i though that was the good way to add the info.

I've uninstalled the mod and reinstall it again, upload the "new" Load.php and what i get is the same problem. Everything is ok, but when i write and i click on Save Changes, it disappear.

hcfwesker

In your original post, you said you were getting 2 errors in 2 lines.  So you have to manually make the edits to both those lines.  you only showed in your pic one manual edit you made.  So thats why I was asking if you made the changes to the other line.

Line 1 ( which you posted and did correctly)
mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,

Line 2  ( which is a few lines down in the file, and ALSO needs the manual edits made)
mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,

You have to do it for both of those.  Yes they do look the same which may be confusing; but both have to be done.


Quote from: Hildegarde on September 12, 2013, 08:10:06 PMI've uninstalled the mod and reinstall it again, upload the "new" Load.php and what i get is the same problem. Everything is ok, but when i write and i click on Save Changes, it disappear.

No, upload the edited Load.php FIRST  .... then install the package through package manager.  Uploading Load.php after installing the package will overwrite the successful edits in Load.php the package manager makes for you.

Simply put ... Do the changes to Load.php and upload the file FIRST, then install the package SECOND

Hildegarde

OMG YES.  ;D

I didn't realize the few lines down in the file.

Thank you dude, really thank you for all. =)

hcfwesker

Quote from: Hildegarde on September 12, 2013, 09:16:52 PMThank you dude, really thank you for all. =)

You're welcome.  Glad you caught on quickly and got it solved :)

Starz0r


impreza

Portal ToTemat.pl - treści w postaci artykułów i filmów tematycznych.

hcfwesker

Quote from: Starz0r on September 19, 2013, 09:12:25 PM
The only errors I get trying to install this mod.



SMF 1? SMF 2?  And, does your forum actually use the 'core' them?  If not then simply delete the 'core' theme or just ignore the errors.  The only thing that will happen if you proceed "as is"; is these icons won't show in member's miniprofiles next to their private messages on the 'core' theme.

Arantor

Well, it's SMF 2. Forum is using the Core theme as per screenshot.

(It's SMF 2 because SMF 1 didn't offer to show the different edits with the little notepad icon)

hcfwesker

Ah, I gotcha.  Because it looked like an SMF 1 theme, but as you said, it must be on the 'core' theme from which the screenshot was took.  In that case, Starz0r, try the following ....

Themes/core/PersonalMessage.template.php

find
// Show the profile, website, email address, and personal message buttons.

Add BEFORE
// This shows the social media icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="reset nolist">
<ul>
', !isset($context['disabled_fields']['facebook']) && !empty($message['member']['facebook']['link']) ? '<li>' . $message['member']['facebook']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['myspace']) && !empty($message['member']['myspace']['link']) ? '<li>' . $message['member']['myspace']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['twitter']) && !empty($message['member']['twitter']['link']) ? '<li>' . $message['member']['twitter']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['googleplus']) && !empty($message['member']['googleplus']['link']) ? '<li>' . $message['member']['googleplus']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['linkedin']) && !empty($message['member']['linkedin']['link']) ? '<li>' . $message['member']['linkedin']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['youtube']) && !empty($message['member']['youtube']['link']) ? '<li>' . $message['member']['youtube']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['deviantart']) && !empty($message['member']['deviantart']['link']) ? '<li>' . $message['member']['deviantart']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['pinterest']) && !empty($message['member']['pinterest']['link']) ? '<li>' . $message['member']['pinterest']['link'] . '</li>' : '', '';


// Any custom fields with Social Media?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 3 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
}
echo '
<li><a href="', $custom['value'], '" title="', $custom['title'], ' - ', $custom['value'], '" /><img src="', $settings['images_url'], '/', $custom['customsmiicon'], '" /></a></li>';
}
if ($shown)
echo '
</ul>
</li>';
}



AFTER you make that manual change in the file, then go Install the MOD, and just ignore the error on that file as long as that's the only one.


Starz0r

Quote from: hcfwesker on September 20, 2013, 04:06:28 PM
Ah, I gotcha.  Because it looked like an SMF 1 theme, but as you said, it must be on the 'core' theme from which the screenshot was took.  In that case, Starz0r, try the following ....

Themes/core/PersonalMessage.template.php

find
// Show the profile, website, email address, and personal message buttons.

Add BEFORE
// This shows the social media icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="reset nolist">
<ul>
', !isset($context['disabled_fields']['facebook']) && !empty($message['member']['facebook']['link']) ? '<li>' . $message['member']['facebook']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['myspace']) && !empty($message['member']['myspace']['link']) ? '<li>' . $message['member']['myspace']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['twitter']) && !empty($message['member']['twitter']['link']) ? '<li>' . $message['member']['twitter']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['googleplus']) && !empty($message['member']['googleplus']['link']) ? '<li>' . $message['member']['googleplus']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['linkedin']) && !empty($message['member']['linkedin']['link']) ? '<li>' . $message['member']['linkedin']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['youtube']) && !empty($message['member']['youtube']['link']) ? '<li>' . $message['member']['youtube']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['deviantart']) && !empty($message['member']['deviantart']['link']) ? '<li>' . $message['member']['deviantart']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['pinterest']) && !empty($message['member']['pinterest']['link']) ? '<li>' . $message['member']['pinterest']['link'] . '</li>' : '', '';


// Any custom fields with Social Media?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 3 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
}
echo '
<li><a href="', $custom['value'], '" title="', $custom['title'], ' - ', $custom['value'], '" /><img src="', $settings['images_url'], '/', $custom['customsmiicon'], '" /></a></li>';
}
if ($shown)
echo '
</ul>
</li>';
}



AFTER you make that manual change in the file, then go Install the MOD, and just ignore the error on that file as long as that's the only one.
Thank you, hopefully this works.

Advertisement: