Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: forsakenlad on September 24, 2005, 12:29:59 PM

Title: Making The ICQ, YIM, MSN and AIM Images Static
Post by: forsakenlad on September 24, 2005, 12:29:59 PM
In some themes, the icq and the yim images look really bad, because the images are called from the icq and the yim websites. Here I will explain the way to make them static:

SMF 2.0 Beta3 and Below:

First open up your Display.template.php file and search for this:

', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'], '


And replace it like this:

', $message['member']['msn']['link'], '';
if ($message['member']['icq']['href'])
echo '
<a href="', $message['member']['icq']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/icq.gif" border="0" /></a>';
if ($message['member']['yim']['href'])
echo '
<a href="', $message['member']['yim']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a>';
echo '
', $message['member']['aim']['link'], '


SMF 2.0 Beta4 and Above:

First open up your Display.template.php file and search for this:

<li>
                        <ul class="nolist">
                           ', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
                           ', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
                           ', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
                           ', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
                        </ul>
                     </li>';


And replace it like this:

<li>
                        <ul class="nolist">
                           ', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li><a href="'. $message['member']['icq']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/icq.gif" border="0" /></a></li>' : '', '
                           ', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li><a href="'. $message['member']['msn']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/msn.gif" border="0" /></a></li>' : '', '
                           ', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li><a href="'. $message['member']['aim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/aim.gif" border="0" /></a></li>' : '', '
                           ', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li><a href="'. $message['member']['yim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a></li>' : '', '
                        </ul>
                     </li>';





Now you won't have to deal with those ugly images that are called from the actual websites. Note that after doing this, the online status won't be shown -obviously- ;)
Title: Re: Making The ICQ and the YIM Images Static
Post by: amlucent on November 01, 2008, 01:49:28 AM
Sorry to resurrect a possibly dead thread but how would I go about changing this in SMF 2.0 beta 4?

my Display.template.php looks like this:


<li>
<ul class="nolist">
', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
</ul>
</li>';
Title: Re: Making The ICQ and the YIM Images Static
Post by: forsakenlad on November 01, 2008, 12:03:54 PM
Updated the first post accordingly. Thanks for pointing it out.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: amlucent on November 01, 2008, 09:51:56 PM
That completely borked me


QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected ',' in .../Themes/default/Display.template.php on line 319

310:


if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
311:


echo '
312:
   

<li>', $message['member']['blurb'], '</li>';
313:
314:
   

// This shows the popular messaging icons.
315:

   

   

   

if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
316:

   

   

   

   

echo '
317:

   

   

   

   

   

   

   

<li>
318:                         <ul class="nolist">

319:                            ', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li><a href="', $message['member']['icq']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/icq.gif" border="0" /></a></li>' : '', '

320:                            ', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li><a href="', $message['member']['msn']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/msn.gif" border="0" /></a></li>' : '', '
321:                            ', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li><a href="', $message['member']['aim']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/aim.gif" border="0" /></a></li>' : '', '
322:                            ', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li><a href="', $message['member']['yim']['href'], '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a></li>' : '', '
323:                         </ul>
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: forsakenlad on November 02, 2008, 09:32:00 AM
Could you redo it please? I've updated my first post.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: amlucent on November 02, 2008, 06:30:58 PM
Worked like a charm! thank you much.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: General_Naga on June 23, 2009, 06:31:02 AM
Works like a charm on SMF 2.0 RC1-1

How would I do something similar on the members list?
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: [Core] on July 02, 2009, 09:18:51 PM
Interesting thanks
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: H on July 10, 2009, 03:24:58 PM
QuoteHow would I do something similar on the members list?

Do you still need help with this? :)
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: General_Naga on July 30, 2009, 06:38:07 AM
Quote from: H on July 10, 2009, 03:24:58 PM
QuoteHow would I do something similar on the members list?

Do you still need help with this? :)

Yes please :)
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: nay27uk on August 02, 2009, 02:44:37 PM
Please tell me how I do this for memberlist.template.php see thread here http://www.simplemachines.org/community/index.php?topic=328435.msg2190440#msg2190440 (http://www.simplemachines.org/community/index.php?topic=328435.msg2190440#msg2190440)
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: nay27uk on August 02, 2009, 02:46:17 PM
Quote from: H on July 10, 2009, 03:24:58 PM
QuoteHow would I do something similar on the members list?

Do you still need help with this? :)

Yes please
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: Arantor on August 02, 2009, 03:45:50 PM
I'm just answering this in http://www.simplemachines.org/community/index.php?topic=328435.0
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: nay27uk on August 25, 2009, 07:53:21 PM
please could you update this code for the members online, member list parts of the forum please
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: chrishicks on August 28, 2009, 12:28:24 AM
tagging for future ref.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: nay27uk on August 28, 2009, 09:28:05 AM
Quote from: chrishicks on August 28, 2009, 12:28:24 AM
tagging for future ref.

Thanks I managed to get it in most parts of the forum apart from mebers online or who.php
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: forsakenlad on September 06, 2009, 01:52:30 PM
Quote from: Arantor on August 02, 2009, 03:45:50 PM
I'm just answering this in http://www.simplemachines.org/community/index.php?topic=328435.0

Why not add the solution to the first post?
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: Arantor on September 06, 2009, 01:57:33 PM
Because a month ago I didn't have moderator powers, and it was being done as a support request based off this tip.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: forsakenlad on September 07, 2009, 04:45:39 AM
Hehe I was just requesting it so it be done now.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: Arantor on September 07, 2009, 05:23:48 AM
Also if you read the other thread, the solution by me was in fact incorrect (twice because I was having a bad day) though the user fixed it himself with no final solution posted.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: vvlahek on December 08, 2009, 04:27:27 PM
Can anyone explain how to do this for the memberlist and who templates but for version 1.1.x. I started a topic 2 days ago but seems like no one noticed it yet :D.

I made the display template changes and it works like a charm. But when i try for memberlist and who templates all i get is loads of errors. Maybe it has something to do with the missing ['member'] part of the code in those two.
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: motomaniacs on January 03, 2010, 04:33:53 AM
how can we input for facebook?
Title: Re: Making The ICQ, YIM, MSN and AIM Images Static
Post by: Arantor on January 03, 2010, 05:33:03 AM
Search the mod site, I'm sure there's one there.