
I wil install 2.2.2on my local tomorrow and see if I can figure it out.
Stay tuned.
coops wrote:
It's in the FAQ
xgarb wrote:
<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>
<{if $msgcount > 0}>
<{else}>
<{/if}>
LazyBadger wrote:
No problem with embedding any block, main problem is transparent I18n'ion of included parts
function smarty_insert_pms()
{
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
}
?>
<td width="200" align="center">........Along With Everthing between these tags.........td>
<td width="200" align="center"><{if $xoops_isuser}>
<{if $xoops_isadmin}>
<a href="<{$xoops_url}>/user.php">View/Edit Your Profilea><br />
<a href="<{$xoops_url}>/user.php?op=logout">Log Outa><br />
<a href="<{$xoops_url}>/admin.php">Administration Menua><br />
<{else}>
<a href="<{$xoops_url}>/user.php">View/Edit Your Profilea><br />
<a href="<{$xoops_url}>/user.php?op=logout">Log Outa><br />
<{/if}>
<{else}>
<form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post">
Username:<input type="text" name="uname" size="12" value="" maxlength="25" /><br />
Password:<input type="password" name="pass" size="12" maxlength="32" /><br />
<input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" />
<input type="hidden" name="PHPSESSID" value="" /><input type="hidden" name="op" value="login" />
<input type="submit" value="Login" />form>
<a href="<{$xoops_url}>/user.php#lost">Lost Password?a>
<a href="<{$xoops_url}>/register.php">Register Now!a>
<{/if}>td>
<td width="200" align="center"><form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><input type="hidden" name="PHPSESSID" value="6494a0b00b340ce50b50fbd541ccd1dc" />Username : <input type="text" name="uname" size="12" value="" maxlength="25" /><br />Password : <input type="password" name="pass" size="12" maxlength="32" /><br />
<input type="hidden" name="xoops_redirect" value="/" />
<input type="hidden" name="op" value="login" />
<input type="submit" value="User Login" /><br />
form><a href="<{$xoops_url}>/user.php#lost">Lost Password?a>br>
<a href="<{$xoops_url}>/register.php">Register now!a>
td>