Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: HappyToBeHere on September 18, 2007, 01:13:57 PM

Title: How to remove ICQ/AIM/MSN/YIM/Website
Post by: HappyToBeHere on September 18, 2007, 01:13:57 PM
We need to remove the display of ICQ/AIM/MSN/YIM/Website values from our new SMF installation. The columns may remain in the database, but it is important for us that they should never be used, and that the empty fields should never be seen by users in their profiles. New users should not know that the columns even exist.

I can't find a mod todo this -- but maybe somebody here knows how to do it properly.

Would be most grateful for any help, suggestions or pointers.


Title: Re: How to remove ICQ/AIM/MSN/YIM/Website
Post by: Dragooon on September 18, 2007, 01:25:46 PM
THIS IS NOT TESTED! PLEASE TAKE A BACKUP OF PROFILE.TEMPLATE.PHP

In Profile.template.php
Find
// All the messenger type contact info.
echo '
<tr>
<td width="40%"><b>', $txt[513], ': </b><div class="smalltext">', $txt[600], '</div></td>
<td><input type="text" name="ICQ" size="24" value="', $context['member']['icq']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[603], ': </b><div class="smalltext">', $txt[601], '</div></td>
<td><input type="text" name="AIM" maxlength="16" size="24" value="', $context['member']['aim']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['MSN'], ': </b><div class="smalltext">', $txt['smf237'], '.</div></td>
<td><input type="text" name="MSN" size="24" value="', $context['member']['msn']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[604], ': </b><div class="smalltext">', $txt[602], '</div></td>
<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';

Remove it

Find
// Messenger type information.
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>', $txt[513], ':</b></td>
<td>', $context['member']['icq']['link_text'], '</td>
</tr><tr>
<td><b>', $txt[603], ': </b></td>
<td>', $context['member']['aim']['link_text'], '</td>
</tr><tr>
<td><b>', $txt['MSN'], ': </b></td>
<td>', $context['member']['msn']['link_text'], '</td>
</tr><tr>
<td><b>', $txt[604], ': </b></td>
<td>', $context['member']['yim']['link_text'], '</td>
</tr><tr>
<td><b>', $txt[69], ': </b></td>

Remove it

Find
<tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr>

Remove it

Find // All the messenger type contact info.
echo '
<tr>
<td width="40%"><b>', $txt[513], ': </b><div class="smalltext">', $txt[600], '</div></td>
<td><input type="text" name="ICQ" size="24" value="', $context['member']['icq']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[603], ': </b><div class="smalltext">', $txt[601], '</div></td>
<td><input type="text" name="AIM" maxlength="16" size="24" value="', $context['member']['aim']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['MSN'], ': </b><div class="smalltext">', $txt['smf237'], '.</div></td>
<td><input type="text" name="MSN" size="24" value="', $context['member']['msn']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[604], ': </b><div class="smalltext">', $txt[602], '</div></td>
<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';

Remove it

Find
// Website details.
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>
<tr>
<td width="40%"><b>', $txt[83], ': </b><div class="smalltext">', $txt[598], '</div></td>
<td><input type="text" name="websiteTitle" size="50" value="', $context['member']['website']['title'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[84], ': </b><div class="smalltext">', $txt[599], '</div></td>
<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>
</tr>';

Remove it
Title: Re: How to remove ICQ/AIM/MSN/YIM/Website
Post by: metallica48423 on September 18, 2007, 02:46:59 PM
don't forget the messenger icons residing in Display.template.php ;)


// This shows the popular messaging icons.
echo '
', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'], '<br />';

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

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

// Don't show the email address if they want it hidden.
if (empty($message['member']['hide_email']))
echo '
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';

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

Remove it.
Title: Re: How to remove ICQ/AIM/MSN/YIM/Website
Post by: HappyToBeHere on September 18, 2007, 10:08:17 PM
Thanks for your help!