1
smdcom
Add Yahoo! Messenger Status In Site Info Block

hack i made to add ym status in site info block!

1. edit modules/system/blocks/system_blocks.php
2. backup system_blocks.php...
3. search for:
Quote:

function b_system_info_show($options)
{
global $xoopsConfig, $xoopsUser;
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$block = array();
if (!empty($options[3])) {
$block['showgroups'] = true;
$result = $xoopsDB->query("SELECT u.uid, u.uname, u.email, u.user_viewemail, u.user_avatar, g.name AS groupname FROM ".$xoopsDB->prefix("groups_users_link")." l LEFT JOIN ".$xoopsDB->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$xoopsDB->prefix("groups")." g ON l.groupid=g.groupid WHERE g.group_type='Admin' ORDER BY l.groupid, u.uid");
if ($xoopsDB->getRowsNum($result) > 0) {
$prev_caption = "";
$i = 0;
while ($userinfo = $xoopsDB->fetchArray($result)) {
if ($prev_caption != $userinfo['groupname']) {
$prev_caption = $userinfo['groupname'];
$block['groups'][$i]['name'] = $myts->htmlSpecialChars($userinfo['groupname']);
}
if ($xoopsUser != '') {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => "\"\"", 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);

} else {
if ($userinfo['user_viewemail']) {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => '', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
} else {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => ' ', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
}
}


4. add tag in red
Quote:

function b_system_info_show($options)
{
global $xoopsConfig, $xoopsUser;
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$block = array();
if (!empty($options[3])) {
$block['showgroups'] = true;
$result = $xoopsDB->query("SELECT u.uid, u.uname, u.email, u.user_viewemail, u.user_avatar, u.user_yim, g.name AS groupname FROM ".$xoopsDB->prefix("groups_users_link")." l LEFT JOIN ".$xoopsDB->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$xoopsDB->prefix("groups")." g ON l.groupid=g.groupid WHERE g.group_type='Admin' ORDER BY l.groupid, u.uid");
if ($xoopsDB->getRowsNum($result) > 0) {
$prev_caption = "";
$i = 0;
while ($userinfo = $xoopsDB->fetchArray($result)) {
if ($prev_caption != $userinfo['groupname']) {
$prev_caption = $userinfo['groupname'];
$block['groups'][$i]['name'] = $myts->htmlSpecialChars($userinfo['groupname']);
}
if ($xoopsUser != '') {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'yim' => $myts->htmlspecialchars($userinfo['user_yim']), 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => "\"\"", 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);

} else {
if ($userinfo['user_viewemail']) {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'yim' => $myts->htmlspecialchars($userinfo['user_yim']), 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => '', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
} else {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'yim' => $myts->htmlspecialchars($userinfo['user_yim']), 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => ' ', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
}
}


5. go to admin cp | system | block | edit site info

6. change to...
Quote:


<{if $block.showgroups == true}>


<{foreach item=group from=$block.groups}>





<{foreach item=user from=$group.users}>







<{/foreach}>


<{/foreach}>

<{/if}>
3"><{$group.name}>

<{$user.name}>

>&m=g>
even" width="20%" align="right" valign="middle"><{$user.msglink}>







<{$block.recommendlink}>


7. make sure you enter your yim id in profile...

8. example in http://www.xoopsmalaysia.org




2
JasonMR
Re: Add Yahoo! Messenger Status In Site Info Block
  • 2004/9/15 4:46

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Hmmmmm, thanks for this hack smdcom!

I'm gonna test it right away....

3
smdcom
Re: Add Yahoo! Messenger Status In Site Info Block

Quote:

JasonMR wrote:
Hmmmmm, thanks for this hack smdcom!

I'm gonna test it right away....


your welcome...

4
gary711
Re: Add Yahoo! Messenger Status In Site Info Block
  • 2004/9/15 6:20

  • gary711

  • Just popping in

  • Posts: 13

  • Since: 2004/8/3 6


how to add msn status in site info block??

5
irmtfan
Re: Add Yahoo! Messenger Status In Site Info Block
  • 2004/9/15 6:31

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


how to add yahoo status in user profile to all users can use that.?
thanks by the way

6
JasonMR
Re: Add Yahoo! Messenger Status In Site Info Block
  • 2004/9/15 6:52

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Just in case anyone is as colour blind (not really) as I am, there are 4 changes to be made in system_blocks.php, and 3 changes to the template file (one can easily, as I have done, oversee to change the colspan in the th-tag of the table displaying the info).

Also, if you don't see the changes, change your theme, as this will update your actuall DB file, stored under templates_c (which you need to have deleted previously, as it will only update, if a theme file is actually changed).

Thanks again smdcom.

7
smdcom
Re: Add Yahoo! Messenger Status In Site Info Block

Quote:

gary711 wrote:
how to add msn status in site info block??


i think msn doesn't support image status... if it does let me know... and give me the url for the status image..

in yahoo it has this image
http://opi.yahoo.com/online?u=&m=g

msn??

8
JasonMR
Re: Add Yahoo! Messenger Status In Site Info Block
  • 2004/9/15 7:56

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


I may be able to offer a solution. Though, as I don't use IM, nor am interested in using it, I will not implement it.

Check out this web site http://www.onlinestatus.org/. The nice thing about this solution: you can use a set of icons, with a common design, which looks better than using the propriatary icon set.

Here is a link to a site, that the previous one links to: http://onlinestatus.foxinus.cz:8085/.
There you can get the icons and HTML-snippets/code needed.

Hope this helps.

9
smdcom
Re: Add Yahoo! Messenger Status In Site Info Block

Quote:

JasonMR wrote:
I may be able to offer a solution. Though, as I don't use IM, nor am interested in using it, I will not implement it.

Check out this web site http://www.onlinestatus.org/. The nice thing about this solution: you can use a set of icons, with a common design, which looks better than using the propriatary icon set.

Here is a link to a site, that the previous one links to: http://onlinestatus.foxinus.cz:8085/.
There you can get the icons and HTML-snippets/code needed.

Hope this helps.


thanks... i will take a look of it..


10
smdcom
Re: Add Yahoo! Messenger Status In Site Info Block

it seems msn doesn't support Online Status Indicator anymore...

i have test it.. but it display blank image...

http://status.dewaldsr.com:8081/register?type=msn&name=pairacy&onurl=&offurl=&unknownurl=&ircchannel=

u can try it there.. by using your own msn id...

let me know

Login

Who's Online

377 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 377


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits