1
dadoprom
New messages in theme as smarty; how to?
  • 2005/10/31 13:01

  • dadoprom

  • Not too shy to talk

  • Posts: 143

  • Since: 2004/3/2 1


Hi,
I would like to know if it is possible to show number of new messages directly in a theme trought smarty or just a flashing image which claims you have a new message?

Thanx for your help
Everything is possible......
-------------------------------------------------
http://www.mla.sk

2
dadoprom
Re: New messages in theme as smarty; how to?
  • 2005/10/31 13:14

  • dadoprom

  • Not too shy to talk

  • Posts: 143

  • Since: 2004/3/2 1


help........
Everything is possible......
-------------------------------------------------
http://www.mla.sk

3
christian
Re: New messages in theme as smarty; how to?
  • 2005/10/31 13:30

  • christian

  • Just can't stay away

  • Posts: 401

  • Since: 2002/2/24


waouw, you are impatient

Here is a answer but it is in french.

Cheers

4
dadoprom
Re: New messages in theme as smarty; how to?
  • 2005/10/31 13:30

  • dadoprom

  • Not too shy to talk

  • Posts: 143

  • Since: 2004/3/2 1


nevermind
Everything is possible......
-------------------------------------------------
http://www.mla.sk

5
dadoprom
Re: New messages in theme as smarty; how to?
  • 2005/10/31 14:14

  • dadoprom

  • Not too shy to talk

  • Posts: 143

  • Since: 2004/3/2 1


sorry to bather u, but could u pls. explain it to me a bit, because I don't understand french... and I think it is exactly what I need...

I am using XOOPS 2.0.13.1

thanx
Everything is possible......
-------------------------------------------------
http://www.mla.sk

6
talunceford
Re: New messages in theme as smarty; how to?

You might try translating it using google languages.....

7
shank
Re: New messages in theme as smarty; how to?
  • 2005/12/1 2:55

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Save this code as insert.pms.php in the class/smarty/plugins/ folder

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);
}
?>


and in your theme place this code wherever you want thealert to show
<{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>
s l s h a n k l e @ b e l l s o u t h . n e t

8
NeoFenix
Re: New messages in theme as smarty; how to?
  • 2005/12/9 14:55

  • NeoFenix

  • Just popping in

  • Posts: 31

  • Since: 2005/7/8 3


this is working with 2.2.3?

9
blueteen
Re: New messages in theme as smarty; how to?
  • 2005/12/9 15:48

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


yes it works.
i'm using this script on a XOOPS 2.2.3a with success :o)

10
tjnemez
Re: New messages in theme as smarty; how to?
  • 2005/12/11 12:08

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


the above does not work for me, using 2.2.3 final. any ideas?
Not right now; I am busy screwing up my site!


Dream Catcher Dezines
Mind Health ...

Login

Who's Online

300 user(s) are online (231 user(s) are browsing Support Forums)


Members: 0


Guests: 300


more...

Donat-O-Meter

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

Latest GitHub Commits