Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: forsakenlad in September 24, 2005, 12:29:59 NACHMITTAGS

Titel: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: forsakenlad in September 24, 2005, 12:29:59 NACHMITTAGS
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- ;)
Titel: Re: Making The ICQ and the YIM Images Static
Beitrag von: amlucent in November 01, 2008, 01:49:28 VORMITTAG
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>';
Titel: Re: Making The ICQ and the YIM Images Static
Beitrag von: forsakenlad in November 01, 2008, 12:03:54 NACHMITTAGS
Updated the first post accordingly. Thanks for pointing it out.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: amlucent in November 01, 2008, 09:51:56 NACHMITTAGS
That completely borked me


ZitatTemplate 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>
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: forsakenlad in November 02, 2008, 09:32:00 VORMITTAG
Could you redo it please? I've updated my first post.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: amlucent in November 02, 2008, 06:30:58 NACHMITTAGS
Worked like a charm! thank you much.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: General_Naga in Juni 23, 2009, 06:31:02 VORMITTAG
Works like a charm on SMF 2.0 RC1-1

How would I do something similar on the members list?
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: [Core] in Juli 02, 2009, 09:18:51 NACHMITTAGS
Interesting thanks
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: H in Juli 10, 2009, 03:24:58 NACHMITTAGS
ZitatHow would I do something similar on the members list?

Do you still need help with this? :)
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: General_Naga in Juli 30, 2009, 06:38:07 VORMITTAG
Zitat von: H in Juli 10, 2009, 03:24:58 NACHMITTAGS
ZitatHow would I do something similar on the members list?

Do you still need help with this? :)

Yes please :)
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: nay27uk in August 02, 2009, 02:44:37 NACHMITTAGS
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)
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: nay27uk in August 02, 2009, 02:46:17 NACHMITTAGS
Zitat von: H in Juli 10, 2009, 03:24:58 NACHMITTAGS
ZitatHow would I do something similar on the members list?

Do you still need help with this? :)

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

Thanks I managed to get it in most parts of the forum apart from mebers online or who.php
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: forsakenlad in September 06, 2009, 01:52:30 NACHMITTAGS
Zitat von: Arantor in August 02, 2009, 03:45:50 NACHMITTAGS
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?
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: Arantor in September 06, 2009, 01:57:33 NACHMITTAGS
Because a month ago I didn't have moderator powers, and it was being done as a support request based off this tip.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: forsakenlad in September 07, 2009, 04:45:39 VORMITTAG
Hehe I was just requesting it so it be done now.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: Arantor in September 07, 2009, 05:23:48 VORMITTAG
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.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: vvlahek in Dezember 08, 2009, 04:27:27 NACHMITTAGS
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.
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: motomaniacs in Januar 03, 2010, 04:33:53 VORMITTAG
how can we input for facebook?
Titel: Re: Making The ICQ, YIM, MSN and AIM Images Static
Beitrag von: Arantor in Januar 03, 2010, 05:33:03 VORMITTAG
Search the mod site, I'm sure there's one there.