621
smdcom
Re: IStat not updating!

make sure u add this to ur theme.html

Quote:

<table width="100%" cellspacing="0">
<tr id="footerbar">
<td><a href="https://xoops.org/" target="_blank"><img src="<{$xoops_imageurl}>poweredby.gif" alt="" /></a>
<script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src = "http://YOUR_URL_XOOPS_SITE_/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&refer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>
</td>
</tr>
</table>
</body>
</html>


it's work in my site... take a look...



622
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=<your yahoo id!>&m=g

msn??



623
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...



624
smdcom
Re: Who's Online block disappeared....

try go to admin cp | groups | edit registered user

make sure you tick/enable Who's Online block there...

then, go back to block admin...



625
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' => "<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 inhttp://www.xoopsmalaysia.org






626
smdcom
Re: session_start(): error

Quote:

Herko Coomans wrote:
It's probably a return or space after a closing ?> in a language file. Make sure all files end with ?>, o empty lines after that.

Herko


thanks herko...

it's work now after i overwrite the common.php and global.php back..



627
smdcom
Re: session_start(): error

i change my language to default language = english...

then, it's ok... but if i change back to my language = malay... it's show blank page.. and with that errors..

how to solve this? anyone? pls help...

i can't find the solution here..



628
smdcom
session_start(): error

Quote:
Notice [PHP]: Constant ˆÙ“p2B already defined in file /home/xoops/public_html/language/malay/global.php line 229
Notice [PHP]: Constant ¬‘p2B already defined in file /home/xoops/public_html/language/malay/global.php line 290
Notice [PHP]: Constant ø ?p2B already defined in file /home/xoops/public_html/language/malay/global.php line 291
Notice [PHP]: Constant -?p2B already defined in file /home/xoops/public_html/language/malay/global.php line 292
Warning [PHP]: session_start(): Cannot send session cookie - headers already sent by (output started at /home/xoops/public_html/language/malay/global.php:538) in file /home/xoops/public_html/include/common.php line 186
Warning [PHP]: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/xoops/public_html/language/malay/global.php:538) in file /home/xoops/public_html/include/common.php line 186
Warning [PHP]: Cannot modify header information - headers already sent by (output started at /home/xoops/public_html/language/malay/global.php:538) in file /home/xoops/public_html/index.php line 39


i change my timestamps.. then, i got this error.. any idea to reset the session? or to solve this?



629
smdcom
Re: Show Total Members In Who is Online Block

ok...

i on PHP Debug.. i got this

Quote:
Notice [PHP]: Undefined variable: numbers in file C:\Program Files\Apache Group\Apache2\htdocs\tetikus\modules\system\blocks\system_blocks.php line 90


which means..

Quote:
$block['total_members'] = $numbers; <<-- this line 90


the code i put is like thisQuote:

if (is_object($xoopsModule)) {
$result = $xoopsDB->query("SELECT count(uid) FROM ".$xoopsDB->prefix("users")." WHERE level='1'");
$xoopsDB->errno() == 0 or trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
$numbers = $xoopsDB->fetchRow($result);
}

$block['total_members'] = $numbers;


i test in XOOPS 2.0.6.. it's works.. but it doestn't works with XOOPS 2.0.7.3



630
smdcom
Re: Show Total Members In Who is Online Block

still the same...

actually, it just typing error when i type it here... in real coding i use $block['total_members'] = $numbers;

still doesn't working...

anyone has other method to do this?




TopTop
« 1 ... 60 61 62 (63) 64 65 66 »



Login

Who's Online

219 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 219


more...

Donat-O-Meter

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

Latest GitHub Commits