Add first and last name to profile.

Just some stuff about Joomla CMS
Post Reply
thockman
Site Admin
Posts: 104
Joined: Thu Dec 15, 2005 5:51 pm
Location: Kansas City
Contact:

Add first and last name to profile.

Post by thockman » Sun Mar 09, 2008 7:15 pm

Code: Select all

//This sections adds the Show or Hide option in the User Status Tab manager
//Changes to cb.menu.xml
//In the <tab name="_UE_USER_STATUS" section add the below

<param name="firstname" type="radio" default="1" label="_UE_YOUR_FNAME" description="">
	<option value="0">Hide</option>
	<option value="1">Show</option>
</param>
<param name="lastname" type="radio" default="1" label="_UE_YOUR_LNAME" description="">
	<option value="0">Hide</option>
	<option value="1">Show</option>
</param>


//This sections shows the F and L names in the profile page if the show option is selected
//Changes to cb.menu.php
//Add the below lines below //------------------- User Status items for User Status Window:

if ($params->get('firstname', '1')==1) {
	$mi = array(); $mi["_UE_MENU_STATUS"]["_UE_YOUR_FNAME"]["_UE_YOUR_FNAME"]=null;
	$this->_addMenuItem( $mi, $user->firstname,"", "",
	"","", _UE_YOUR_FNAME_DESC,"" );
}
if ($params->get('lastname', '1')==1) {
	$mi = array(); $mi["_UE_MENU_STATUS"]["_UE_YOUR_LNAME"]["_UE_YOUR_LNAME"]=null;
	$this->_addMenuItem( $mi, $user->lastname,"", "",
	"","", _UE_YOUR_LNAME_DESC,"" );
}


//This sections changes the is not displayed icon to displayed.
//Changes to cb.core.php
//Find SWITCH($ueConfig['name_style'])
//For each _UE_YOUR_*NAME change the getFieldIcons*=1 instead of 3

echo getFieldIcons(1,true,($ueConfig['name_format']!=1));

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest