Advertisement:

Author Topic: Making The ICQ, YIM, MSN and AIM Images Static  (Read 40556 times)

Offline Eren Yaşarkurt

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,134
  • Gender: Male
  • aka forsakenlad
    • erenyasarkurt on Facebook
    • erenyasarkurt on LinkedIn
    • @erenyasarkurt on Twitter
    • yekolay
Making The ICQ, YIM, MSN and AIM Images Static
« 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:

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

And replace it like this:

Code: [Select]
', $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:

Code: [Select]
<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:

Code: [Select]
<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- ;)
« Last Edit: November 02, 2008, 09:31:21 AM by forsakenlad »
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

yemek siparişi - order your food quick and easy

Offline amlucent

  • Jr. Member
  • **
  • Posts: 147
  • Gender: Male
    • The Good Old Days Guild
Re: Making The ICQ and the YIM Images Static
« Reply #1 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:

Code: [Select]
<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>';

Offline Eren Yaşarkurt

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,134
  • Gender: Male
  • aka forsakenlad
    • erenyasarkurt on Facebook
    • erenyasarkurt on LinkedIn
    • @erenyasarkurt on Twitter
    • yekolay
Re: Making The ICQ and the YIM Images Static
« Reply #2 on: November 01, 2008, 12:03:54 PM »
Updated the first post accordingly. Thanks for pointing it out.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

yemek siparişi - order your food quick and easy

Offline amlucent

  • Jr. Member
  • **
  • Posts: 147
  • Gender: Male
    • The Good Old Days Guild
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #3 on: November 01, 2008, 09:51:56 PM »
That completely borked me


Quote
Template 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>
« Last Edit: November 01, 2008, 09:54:49 PM by amlucent »

Offline Eren Yaşarkurt

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,134
  • Gender: Male
  • aka forsakenlad
    • erenyasarkurt on Facebook
    • erenyasarkurt on LinkedIn
    • @erenyasarkurt on Twitter
    • yekolay
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #4 on: November 02, 2008, 09:32:00 AM »
Could you redo it please? I've updated my first post.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

yemek siparişi - order your food quick and easy

Offline amlucent

  • Jr. Member
  • **
  • Posts: 147
  • Gender: Male
    • The Good Old Days Guild
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #5 on: November 02, 2008, 06:30:58 PM »
Worked like a charm! thank you much.

Offline General_Naga

  • Jr. Member
  • **
  • Posts: 162
  • Gender: Male
    • Traction Wars Hompage
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #6 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?

Offline [Core]

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
  • The Fresh Prince.
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #7 on: July 02, 2009, 09:18:51 PM »
Interesting thanks

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,660
  • Gender: Male
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #8 on: July 10, 2009, 03:24:58 PM »
Quote
How would I do something similar on the members list?

Do you still need help with this? :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Offline General_Naga

  • Jr. Member
  • **
  • Posts: 162
  • Gender: Male
    • Traction Wars Hompage
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #9 on: July 30, 2009, 06:38:07 AM »
Quote
How would I do something similar on the members list?

Do you still need help with this? :)

Yes please :)

Offline nay27uk

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • Lister Hosting
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #10 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

Offline nay27uk

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • Lister Hosting
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #11 on: August 02, 2009, 02:46:17 PM »
Quote
How would I do something similar on the members list?

Do you still need help with this? :)

Yes please

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor on GitHub
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #12 on: August 02, 2009, 03:45:50 PM »
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline nay27uk

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • Lister Hosting
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #13 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

Offline chrishicks

  • Full Member
  • ***
  • Posts: 508
  • Gender: Male
    • RejectsRestStop
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #14 on: August 28, 2009, 12:28:24 AM »
tagging for future ref.

Offline nay27uk

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • Lister Hosting
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #15 on: August 28, 2009, 09:28:05 AM »
tagging for future ref.

Thanks I managed to get it in most parts of the forum apart from mebers online or who.php

Offline Eren Yaşarkurt

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,134
  • Gender: Male
  • aka forsakenlad
    • erenyasarkurt on Facebook
    • erenyasarkurt on LinkedIn
    • @erenyasarkurt on Twitter
    • yekolay
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #16 on: September 06, 2009, 01:52:30 PM »
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

yemek siparişi - order your food quick and easy

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor on GitHub
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #17 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Eren Yaşarkurt

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,134
  • Gender: Male
  • aka forsakenlad
    • erenyasarkurt on Facebook
    • erenyasarkurt on LinkedIn
    • @erenyasarkurt on Twitter
    • yekolay
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #18 on: September 07, 2009, 04:45:39 AM »
Hehe I was just requesting it so it be done now.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

yemek siparişi - order your food quick and easy

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor on GitHub
Re: Making The ICQ, YIM, MSN and AIM Images Static
« Reply #19 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.