<{if $xoops_isuser}>....code goes here....<{/if}>
edited to fix space in code.
s l s h a n k l e @ b e l l s o u t h . n e t
| |
|
| Stats | |
| Goal: | $100.00 |
| Due Date: | Jun 30 |
| Gross Amount: | $25.00 |
| Net Balance: | $23.57 |
| Left to go: | $76.43 |
|
|
|
| Donations | |
| Anonymous ($15)Jun-14 | |
| Anonymous ($10)Jun-10 | |

<{if $xoops_isuser}>....code goes here....<{/if}>
blueteen wrote:
can you activate 'debug php mode'
tjnemez wrote:
thanks for your help. i tried this but it does not work for me.
<{if$xoops_isuser}><{insert name="pms"}>
<a href="<{$xoops_url}>/viewpmsg.php">
<{if $msgcount > 0}>
<{if $msgcount > 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private Messages
<{/if}></a><{/if}>
supermario wrote:
Quote:blueteen wrote:
can you activate 'debug php mode'
I'm having the same problem... it won't appear. I turned on PHP Debug and there were no errors that seemed to refer to this.
<?php
// $Id$
// FILE :: ex_assign.php
// AUTHOR :: Ryuji AMANO <info@joetsu.info>
// WEB :: Ryu's Planning <http://ryus.joetsu.info/>
//
global $xoopsUser, $xoopsModule;
if (is_object($xoopsUser)) {
$pm_handler =& xoops_gethandler('privmessage');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$this->assign("ex_new_messages", $pm_handler->getCount($criteria));
}
if ( is_object($xoopsModule) ) {
$this->assign('ex_moduledir', $xoopsModule->getVar('dirname'));
}
?>
<{include_php file="$xoops_rootpath/themes/YOUR_THEME_NAME_HERE/ex_assign.php"}>
<{if $ex_new_messages < 1}>
<a href="<{$xoops_url}>/viewpmsg.php">Private Messages</a>
<{/if}>
<{if $ex_new_messages > 0}>
<{if $smarty.server.SCRIPT_NAME == "/index.php"}>
<script language="javascript" type="text/javascript">
<!--
msg="<b>Hello! <{$xoops_uname}></b><br />You have <span style='color:#ff0000; font-weight: bold;'><{$ex_new_messages}></span> new Message(s)";
openwin (msg)
function openwin(message) {
w = open("", "message", "width=250,height=150,toolbar=no,scrollbars=yes,resizable=yes");
w.focus();
w.document.open();
w.document.write("<html><head></head><meta http-equiv='content-type' content='text/html; charset=<{$xoops_charset}>' /><title>You've Got Messages</title><body><br><br><center>");
w.document.write(message);
w.document.write("<br /><br /><a href="javascript:window.opener.location='<{$xoops_url}>/viewpmsg.php';window.close();">");
w.document.write("View</a>");
w.document.write("</center></body></html>");
w.document.close();
}
// -->
</script>
<{/if}>
<a href="<{$xoops_url}>/viewpmsg.php">
<span style="color:#ff6600;"><{$ex_new_messages}>-Message(s)
</span></a>
<{/if}>