Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: DobbysGamertag - elokuu 12, 2014, 01:17:08 AP

Otsikko: Social icons in forum posts.
Kirjoitti: DobbysGamertag - elokuu 12, 2014, 01:17:08 AP
Hi,

I apologize if this is the incorrect place.

I was wondering if its possible to remove the "social icons". Such as 'view profile' 'email' and 'personal message'

See:



For what i mean. If it's possible to remove them, i could do with instructions on how to do this :)

Thanks!
Otsikko: Re: Social icons in forum posts.
Kirjoitti: kat - elokuu 12, 2014, 07:11:40 AP


Admin>Features and options>Profile Fields.

Just uncheck those that you don't want people to use.

:)
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Illori - elokuu 12, 2014, 07:14:23 AP
Lainaus käyttäjältä: K@ - elokuu 12, 2014, 07:11:40 AP


Admin>Features and options>Profile Fields.

Just uncheck those that you don't want people to use.

:)

that would remove them everywhere, and those are not the ones the op is talking about and also requires that the advanced profile fields be enabled.
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Kindred - elokuu 12, 2014, 07:41:12 AP
Just out of curiosity...   Why would you want to do that?

The code would have to be removed in display.template.php
Otsikko: Re: Social icons in forum posts.
Kirjoitti: DobbysGamertag - elokuu 12, 2014, 07:52:57 AP
Lainaus käyttäjältä: Kindred - elokuu 12, 2014, 07:41:12 AP
Just out of curiosity...   Why would you want to do that?

I dislike them.

Lainaus käyttäjältä: Kindred - elokuu 12, 2014, 07:41:12 AP
The code would have to be removed in display.template.php

Thanks :) i'll take a look later. Any ideas where i'm supposed to be looking?
Otsikko: Re: Social icons in forum posts.
Kirjoitti: kat - elokuu 12, 2014, 08:01:40 AP
// This shows the popular messaging icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="im_icons">
<ul>
', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
</ul>
</li>';


???
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Kindred - elokuu 12, 2014, 10:44:49 AP
Just be aware... You are going to have your users asking where those links are....
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Arantor - elokuu 12, 2014, 10:48:24 AP
It's not the MSN/YIM/AIM/ICQ icons, it's the code above that.

And actually, no, I don't think they are. Judging by the suddenness and level of drop I got in PMs after changing my name, most people apparently didn't realise they could click on one of those icons to PM me...
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Chalky - elokuu 12, 2014, 01:38:02 IP
I removed those icons from my forum in the early days and I've never regretted it.  I don't like them either  ;)   I think the topic display looks much cleaner and more modern without them.

What K@ said looks a lot like the code I removed too  :)
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Arantor - elokuu 12, 2014, 01:39:57 IP
Except what K@ demonstrated is not the code for the icons the OP talked about, which is managed by:

// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
echo '
<li class="profile">
<ul>';
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'])
echo '
<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

echo '
</ul>
</li>';
}
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Chalky - elokuu 12, 2014, 01:59:09 IP
Aha!  That'll teach me to be lazy and not look it up  :P  Since I removed the code on my forum I knew I wouldn't find it by looking there....
Otsikko: Re: Social icons in forum posts.
Kirjoitti: kat - elokuu 12, 2014, 03:03:30 IP
I think we both got PWNT, there, Chalky... ;)
Otsikko: Re: Social icons in forum posts.
Kirjoitti: Chalky - elokuu 12, 2014, 04:48:28 IP
Lol  :P