1
Hi everyone,
I'm trying to modify some code, and am stuck on the following issue...
My template code is listed below in the "full description of the issue." It uses
echo "
" . "{$xoops_uname}";
in php code. For some reason, that's not being translated.
Isn't that one of the Smarty Variables that are supposed to be available in all modules?
I tried including header.php, but that broke the code altogether, giving an error about a call to a nonmember function. I also tried using $xoopsUser->getVar('uid'), but that gave the same error.
Here's the info:
XOOPS Version: 2.0.13.2
Module Name/Version: Tiny D0 2.22
PHP Version: 4.4.2
MySQL Version: 4.1.14
Web Server Software (Apache/IIS/Other): Apache
Operating System: XOOPS on Windows, MySQL on Debian
Theme you are using: filthy_blue
Custom template: (Yes/No) Yes
PHP Debug Messages:
Here's the offending line in the php debugger:
Notice [PHP]: Only variable references should be returned by reference in file kernel/object.php line 289
=> Notice [PHP]: Undefined variable: xoops_uname in file class/xoopsblock.php(146) : eval()'d code line 2
Notice [PHP]: Only variable references should be returned by reference in file class/xoopsblock.php line 149
MySQL Debug Messages:
Not relevant
Smarty Debug Messages: (Relevant ones)
{$xoops_uname} Group1
{$xoops_userid} 4
A full description of the issue:
Here's my template code:
echo "hello";
echo "
" . "{$xoops_uname}";
echo "
" . "{X_SITEURL}";
echo "
goodbye";
The SITEURL shows up on the page, the xoops_userid does not.
The PHP debug specifically says xoops_uname is not defined. However, the Smarty debug window shows the variables and their values just fine!
Isn't the xoops_uname defined in all modules/templates?
Any help will be most appreciated!
Thanks,
Jeff