') ') Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $10.00
Net Balance: $9.41
Left to go: $90.59

Donations
Dante7237  ($10)Dec-3

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Bootstrap By Captcha cell cent chronolabs Clicks content CĂN demo docek download Dresses evden eve facebook Fat Food for free Gateway giải Google Guide herre Home Honeypot Human HỘ IP iPhone jQuery Law Legal List Loss mobile module modules Monster new newbb news nhiệt NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon security Sentry Signatures Signed site Smartphone Smoking Solution Spam Studio tags tdmcreate The Theme themes tháp web weight Wishcraft xoops Xortify XPayment

New Users

Registering user

# 137911

mydarkglobe

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

(1) 2 »


#1 Posted on: 2004/9/14 22:05 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' => "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$userinfo['uid']."','pmlite',450,370);\"><img src=\"".XOOPS_URL."/images/icons/pm_small.gif\" border=\"0\" width=\"27\" height=\"17\" alt=\"\" /></a>", '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' => '<a href="mailto:'.$userinfo['email'].'"><img src="'.XOOPS_URL.'/images/icons/em_small.gif" border="0" width="16" height="14" alt="" /></a>', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
} else {
$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => '&nbsp;', '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' => "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$userinfo['uid']."','pmlite',450,370);\"><img src=\"".XOOPS_URL."/images/icons/pm_small.gif\" border=\"0\" width=\"27\" height=\"17\" alt=\"\" /></a>", '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' => '<a href="mailto:'.$userinfo['email'].'"><img src="'.XOOPS_URL.'/images/icons/em_small.gif" border="0" width="16" height="14" alt="" /></a>', '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' => '&nbsp;', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
}
}


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

6. change to...
Quote:
<table class="outer" cellspacing="0">

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

<!-- start group loop -->
<{foreach item=group from=$block.groups}>
<tr>
<th colspan="3"><{$group.name}></th>
</tr>

<!-- start group member loop -->
<{foreach item=user from=$group.users}>
<tr>
<td class="even" valign="middle" align="center"><img src="<{$user.avatar}>" alt="" width="32" /><br /><a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>"><{$user.name}></a></td>

<td class="odd" width="20%" align="center" valign="middle">
<a href=http://messenger.yahoo.com/edit/send/?.target=<{$user.yim}>><img src=http://opi.yahoo.com/online?u=<{$user.yim}>&m=g></a>
</td>


<td class="even" width="20%" align="right" valign="middle"><{$user.msglink}></td>
</tr>
<{/foreach}>
<!-- end group member loop -->

<{/foreach}>
<!-- end group loop -->
<{/if}>
</table>

<br />

<div style="margin: 3px; text-align:center;">
<img src="<{$block.logourl}>" alt="" border="0" /><br /><{$block.recommendlink}>
</div>


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

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





Top

smdcom
Joined:
2004/4/26 22:46
From Malaysia
Group:
Registered Users
Posts: 882
(Show More) (Show Less)


#2 Posted on: 2004/9/14 23:46 Re: Add Yahoo! Messenger Status In Site Info Block
Hmmmmm, thanks for this hack smdcom!

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

Top

JasonMR
Joined:
2004/6/21 5:38
Group:
Registered Users
Posts: 655
(Show More) (Show Less)


#3 Posted on: 2004/9/15 1:00 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...

Top

smdcom
Joined:
2004/4/26 22:46
From Malaysia
Group:
Registered Users
Posts: 882
(Show More) (Show Less)


#4 Posted on: 2004/9/15 1:20 Re: Add Yahoo! Messenger Status In Site Info Block
how to add msn status in site info block??

Top

gary711
Joined:
2004/8/3 1:10
Group:
Registered Users
Posts: 13
(Show More) (Show Less)


#5 Posted on: 2004/9/15 1:31 Re: Add Yahoo! Messenger Status In Site Info Block
how to add yahoo status in user profile to all users can use that.?
thanks by the way

Top

irmtfan
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3371
(Show More) (Show Less)


#6 Posted on: 2004/9/15 1:52 Re: Add Yahoo! Messenger Status In Site Info Block
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.

Top

JasonMR
Joined:
2004/6/21 5:38
Group:
Registered Users
Posts: 655
(Show More) (Show Less)


#7 Posted on: 2004/9/15 2:37 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=<your yahoo id!>&m=g

msn??

Top

smdcom
Joined:
2004/4/26 22:46
From Malaysia
Group:
Registered Users
Posts: 882
(Show More) (Show Less)


#8 Posted on: 2004/9/15 2:56 Re: Add Yahoo! Messenger Status In Site Info Block
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.

Top

JasonMR
Joined:
2004/6/21 5:38
Group:
Registered Users
Posts: 655
(Show More) (Show Less)


#9 Posted on: 2004/9/15 3:13 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..



Top

smdcom
Joined:
2004/4/26 22:46
From Malaysia
Group:
Registered Users
Posts: 882
(Show More) (Show Less)


#10 Posted on: 2004/9/15 3:20 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/regis ... =&unknownurl=&ircchannel=

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

let me know

Top

smdcom
Joined:
2004/4/26 22:46
From Malaysia
Group:
Registered Users
Posts: 882
(Show More) (Show Less)




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]