New module to call username when in session
Posted: Sat Mar 01, 2008 12:17 pm
Hey all,
I am trying to write a module that call/displays the username when in session (after login). The xml file is correct, I am able to install it successfully; but it will not display the username when in session. Please note, I am learning; so my apologies for the question:
mod_yourname.php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once (dirname(__FILE__).DS.'helper.php');
$yourname = hola::nombre();
require( JModuleHelper::getLayoutPath( 'mod_yourname' ) );
helper.php
class hola {
function nombre() {
$clientInfo =& JApplicationHelper::getClientInfo();
}
}
tmpl/default.php
echo $yourname
Also, both index.html have the basic HTML suggested in the tutorials.
In advanced, thank you for all your help
Regards,
I am trying to write a module that call/displays the username when in session (after login). The xml file is correct, I am able to install it successfully; but it will not display the username when in session. Please note, I am learning; so my apologies for the question:
mod_yourname.php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once (dirname(__FILE__).DS.'helper.php');
$yourname = hola::nombre();
require( JModuleHelper::getLayoutPath( 'mod_yourname' ) );
helper.php
class hola {
function nombre() {
$clientInfo =& JApplicationHelper::getClientInfo();
}
}
tmpl/default.php
echo $yourname
Also, both index.html have the basic HTML suggested in the tutorials.
In advanced, thank you for all your help
Regards,