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}>
<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>/email.gif" title="You have <{$msgcount}> new PMs" width="22" height="22" /></a>
<{else}>
<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>/noemail.gif" title="You have no new PMs" width="22" height="22" /></a>
<{/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);
}
?>
<a href="<{$xoops_url}>/viewpmsg.php">
<{if $msgcount > 0}>
<img src="<{$xoops_imageurl}>images/prvmsg_on.jpg" alt=You have <{$msgcount}>
new message border="0" />
<{else}>
<img src="<{$xoops_imageurl}>images/prvmsg_off.jpg"
alt="You have no new messages" border="0" />
<{/if}></a>
<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 Profile</a><br />
<a href="<{$xoops_url}>/user.php?op=logout">Log Out</a><br />
<a href="<{$xoops_url}>/admin.php">Administration Menu</a><br />
<{else}>
<a href="<{$xoops_url}>/user.php">View/Edit Your Profile</a><br />
<a href="<{$xoops_url}>/user.php?op=logout">Log Out</a><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>