Topic: Show punbb user in joomla module.
PunBB version 1.2.17
I would like to create a Joomla 1.5 module which shows the punBB username. I have been looking at:
http://dev.joomla.org/component/option, … llo_world/
I have then tried to put the following code in the module file, helper file and default.php (/tmpl/), but I get the error below.
-Fatal error: Call to a member function query() on a non-object in /var/www/...site.../forum/include/functions.php on line 125
If I put the code in another file, and just use a wrapper it works.
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
define('PUN_QUIET_VISIT', 1);
echo 'Logged in as: <b>'.pun_htmlspecialchars($pun_user['username']).'</b>';