TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 14, 2024, 11:58:32 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 176
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 113
  • Total: 113

Adding YIM icon

Started by alhaudhie, December 16, 2009, 04:36:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Freddy

 ;D  That's a good thing my friend.

Leave it with me and I will set you straight !

Back in a bit....

Freddy

First you need to get the YIM field added so...

In SSI.php, find the ssi_whosOnline function.

Find :


SELECT
        lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
        mg.onlineColor, mg.ID_GROUP

         
Change to :

SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, YIM

         
Find :


$return['users'][$row['logTime'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'hidden' => empty($row['showOnline']),
'is_last' => false,
);

         
Change to :


$return['users'][$row['logTime'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'hidden' => empty($row['showOnline']),
'is_last' => false,
'YIM' => $row['YIM'],
);

         
=============================================


Now going back to your code that you first posted.  It needs to be rearranged something like this :

So change this bit :

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 $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';


To this :
   

if ($user['YIM'])
$user['link'] = '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $user['YIM'] . '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a>' . $user['link'];

echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';

   
That should do it.


alhaudhie

 O0 :2funny:

ehehe

thats veryy cooolll..
tq for helps.

Freddy


ccbtimewizard

QuoteSELECT
   lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
   mg.onlineColor, mg.ID_GROUP, YIM

It should be:

SELECT
   lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
   mg.onlineColor, mg.ID_GROUP, mem.YIM

Freddy

Yeah that is more correct, but it would still work.  Thanks for pointing it out  :)