xoops forums

goffy

Quite a regular
Posted on: 7/26 7:47
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#1

Warning with xoInboxCount

hi

I am currently redesigning myxoops.org and I have a problem with "xoInboxCount" where I need support
Quote:
Warning: Use of undefined constant xoInboxCount - assumed 'xoInboxCount' (this will throw an Error in a future version of PHP) in Datei /.../myxoops.org/myxoops/secure/xoops_data/caches/smarty_compile/e7ff34f6-system-myxoops2019-default^%%C2^C23^C2339D63%%nav-menu.tpl.php

how can I solve this?

iHackCode

Module Developer
Posted on: 7/26 22:19
iHackCode
iHackCode (Show more)
Module Developer
Posts: 1036
Since: 2004/6/29
#2

Re: Warning with xoInboxCount

Do you have a function.xoInboxCount.php file in htdocs/class/smarty/xoops_plugins ?

goffy

Quite a regular
Posted on: 7/28 12:38
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#3

Re: Warning with xoInboxCount

hi

yes, and it provides the number of unread messages in a proper way

geekwright

Quite a regular
Posted on: 7/28 17:11
geekwright
geekwright (Show more)
Quite a regular
Posts: 270
Since: 2010/10/15
#4

Re: Warning with xoInboxCount

I've not seen this. Can you email me the nav-menu.tpl template file and the nav-menu.tpl.php compiled version so I can look at what it is doing?

goffy

Quite a regular
Posted on: 7/29 5:46
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#5

Re: Warning with xoInboxCount

sent

geekwright

Quite a regular
Posted on: 7/29 23:30
geekwright
geekwright (Show more)
Quite a regular
Posts: 270
Since: 2010/10/15
#6

Re: Warning with xoInboxCount

Here is a quick review of the problem Goffy experienced for anyone following along.

This will NOT work and triggers the warning:
<{if xoInboxCount}> ... <{/if}>


This will work:
<{xoInboxCount assign="unreadCount"}> <{if $unreadCount}> ... <{/if}>


The output of xoInboxCount goes straight to the page output. Using the assign parameter assigns the count to variable that can be used with the "if" function.

goffy

Quite a regular
Posted on: 7/30 5:11
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#7

Re: Warning with xoInboxCount

hi geekwright

many thanks for help and explanation