Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: JayBachatero on June 01, 2005, 09:25:51 PM

Title: AIM online/offline status
Post by: JayBachatero on June 01, 2005, 09:25:51 PM
im not sure if this it the right place to put this but i was thinking why not change the AIM maged based on the user status.  that way it shows online of offline.  this code does the trick (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fbig.oscar.aol.com%2Flilj625%3Fon_url%3Dhttp%3A%2F%2Fkevmundial.com%2Fimages%2Fonline.bmp%26amp%3Boff_url%3Dhttp%3A%2F%2Fkevmundial.com%2Fimages%2Foffline.bmp&hash=b399446759935d3bc1c6b5520ea2e2061b8dfb5a)

http://big.oscar.aol.com/lilj625?on_url=http://kevmundial.com/images/online.bmp&off_url=http://kevmundial.com/images/offline.bmp


[EDIT]
since this was moved to tips n tricks ima put the code here

i changed the img src on Load.php and Memberlist.php
on Memberlist.php i put this

search for 'aim' => array( and replace with this w/o the php tags

<?php
'aim' => array(
'name' => $row['AIM'],
'href' => !empty($row['AIM']) ? 'aim:goim?screenname=' $row['AIM'] . '&message=' $txt['aim_default_message'] : '',
'link' => !empty($row['AIM']) ? '<a href="aim:goim?screenname=' $row['AIM'] . '&message=' $txt['aim_default_message'] . '" target="_blank"><img src="http://big.oscar.aol.com/' $row['AIM'] . '?on_url=' $settings['images_url'] . '/aim_on.gif&off_url=' $settings['images_url'] . '/aim_off.gif" alt="' $row['AIM'] . '" border="0" /></a>' ''
),
?>



example here
http://www.kevmundial.com/board/index.php?board=39;topic=343.1#msg1386

memberlist example
http://www.kevmundial.com/board/index.php?action=mlist;sort=AIM;start=0
Title: Re: AIM online/offline status
Post by: mager on June 01, 2005, 10:03:07 PM
Thats cool, now, if there was a way to add it to my forum.. =P
Title: Re: AIM online/offline status
Post by: [Unknown] on June 01, 2005, 10:04:15 PM
That must be so inefficient.

-[Unknown]
Title: Re: AIM online/offline status
Post by: JayBachatero on June 01, 2005, 10:30:18 PM
Quote from: [Unknown] on June 01, 2005, 10:04:15 PM
That must be so inefficient.

-[Unknown]

so how do you guys do it for yahoo?
Title: Re: AIM online/offline status
Post by: [Unknown] on June 01, 2005, 10:37:39 PM
We don't, I'm afraid.  Just the one icon.

-[Unknown]
Title: Re: AIM online/offline status
Post by: JayBachatero on June 02, 2005, 12:44:30 AM
oh ok if i would like to do this modifications myself what files should i look at to seup the link?
Title: Re: AIM online/offline status
Post by: [Unknown] on June 02, 2005, 12:49:28 AM
Load.php, mainly.  Mamberlist.php... or maybe the template.

-[Unknown]
Title: Re: AIM online/offline status
Post by: JayBachatero on June 02, 2005, 07:03:00 AM
something like this w/o the <?php ?> tags i just put the for the colors 2 show

<?php
'aim' => $profile['AIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['AIM'],
'href' => 'aim:goim?screenname=' urlencode($profile['AIM']) . '&amp;message=' $txt['aim_default_message'],
'link' => '<a href="aim:goim?screenname=' urlencode($profile['AIM']) . '&amp;message=' $txt['aim_default_message'] . '"><img src="http://big.oscar.aol.com/' urlencode($profile['AIM']) . '?on_url=http://kevmundial.com/images/online.bmp&off_url=http://kevmundial.com/images/offline.bmp" alt="' $profile['AIM'] . '" border="0" /></a>',
'link_text' => '<a href="aim:goim?screenname=' urlencode($profile['AIM']) . '&amp;message=' $txt['aim_default_message'] . '">' $profile['AIM'] . '</a>'
) : array('name' => '''href' => '''link' => '''link_text' => ''),
?>



i changed the img src on Load.php and Memberlist.php
on Memberlist.php i put this

<?php
'aim' => array(
'name' => $row['AIM'],
'href' => !empty($row['AIM']) ? 'aim:goim?screenname=' $row['AIM'] . '&message=' $txt['aim_default_message'] : '',
'link' => !empty($row['AIM']) ? '<a href="aim:goim?screenname=' $row['AIM'] . '&message=' $txt['aim_default_message'] . '" target="_blank"><img src="http://big.oscar.aol.com/' $row['AIM'] . '?on_url=' $settings['images_url'] . '/aim_on.gif&off_url=' $settings['images_url'] . '/aim_off.gif" alt="' $row['AIM'] . '" border="0" /></a>' ''
),
?>



example here
http://www.kevmundial.com/board/index.php?board=39;topic=343.1#msg1386

memberlist example
http://www.kevmundial.com/board/index.php?action=mlist;sort=AIM;start=0
Title: Re: AIM online/offline status
Post by: Dem0n on June 07, 2005, 06:17:03 PM
good job.
Title: Re: AIM online/offline status
Post by: JayBachatero on June 07, 2005, 09:14:09 PM
 thanks.  maybe [Unknown] makes it a default or move it to the tips n tricks side of the forum.
Title: Re: AIM online/offline status
Post by: deathwantsme on October 29, 2005, 05:17:23 AM
Does this mod actualy show if a user is online or offline of aim? If so, how does it do that?
Title: Re: AIM online/offline status
Post by: JayBachatero on October 29, 2005, 10:43:03 PM
Quote from: deathwantsme on October 29, 2005, 05:17:23 AM
Does this mod actualy show if a user is online or offline of aim? If so, how does it do that?

Yea it does.  i need to update it for 1.1.  the way it does it is with this link http://big.oscar.aol.com/lilj625?on_url=http://kevmundial.com/images/online.bmp&off_url=http://kevmundial.com/images/offline.bmp its from aim.
Title: Re: AIM online/offline status
Post by: MF30 on July 26, 2009, 08:36:16 PM
Thanks JayBachatero. :P