Here are the some codes to help the joomla developer..
$user =& JFactory::getUser();
echo $user->id;
echo $user->username;
echo $user->name;
echo $user->email;
echo $user->usertype;
echo $user->guest;
echo $user->get('aid'); // access Guest 0, register 1
$user = & JFactory::getUser();
if($user->get('guest'))
echo"login";
else
echo"logout";
if ($menu->getActive() == $menu->getDefault()) {
login user details
$user =& JFactory::getUser();
echo $user->id;
echo $user->username;
echo $user->name;
echo $user->email;
echo $user->usertype;
echo $user->guest;
echo $user->get('aid'); // access Guest 0, register 1
Check the user is guest or registered
$user = & JFactory::getUser();
if($user->get('guest'))
echo"login";
else
echo"logout";
Check page status is home page or not..
echo "Default page";
} else
echo "Inner page";
}
Setup page title suffix or prefix in pages.
$this->setTitle('Prefix - ' . $this->getTitle().'- suffix ');
Cheers....
nice work...
ReplyDeletegr8 work agin..
ReplyDeletehelpful to me...
thax..