1
I need to make a smarty insert that assigns the value of a cookie to a varible. What I am doing is working on a popup window for new private messages. This is what I did so far:
When a user logs in and has new messages they get a popup that tells them how many. this popup also sets a cookie named 'pms' with a value of $msgcount.
I have made a smarty insert that checks if they have unread messages and assigns the number of unread messages to $msgcount. and I was thinking I could make another one that would check for the cookie and assign the value to $cookie then in my theme I could do this:
<{if $xoops_isuser}><{insert name="pms"}><{insert name="cookie"}><{/if}>
<{if $msgcount > $cookie}>
<body onLoad="javascript: poponload()"><{else}><body><{/if}>
What I need help with apparently is the insert.cookie.php file for the plugins folder.
I tried this:
function smarty_insert_cookie()
{
$cookie=$_COOKIE['pms'];
}
?>
and it didn't work.
Help me out here. I know this is simple.
Thanks,
Steve
s l s h a n k l e @ b e l l s o u t h . n e t