| Previous topic :: Next topic |
| Author |
Message |
opto
Joined: 21 Jul 2007
Posts: 118
|
| Posted: Wed Aug 08, 2007 7:28 am Post subject: firstname lastname display of names |
|
|
Currently, vtiger 503 displays names as: lastname firstname.
A better option might be:
lastname, firstname
(for double names or foreign names, it is clearer where the firstname begins).
We preferred the order
firstname lastname.
If anybody is interested, to get this, change: \vtigercrm (root)\include\utils\Commanutil.php
The comment (//) is the vtiger setting, the following line the replacement
/**
* Function to get the Contact Name when a contact id is given
* Takes the input as $contact_id - contact id
* returns the Contact Name in string format.
*/
function getContactName($contact_id)
{
global $log;
$log->debug("Entering getContactName(".$contact_id.") method ...");
$log->info("in getContactName ".$contact_id);
global $adb;
$contact_name = '';
if($contact_id != '')
{
$sql = "select * from vtiger_contactdetails where contactid=".$contact_id;
$result = $adb->query($sql);
$firstname = $adb->query_result($result,0,"firstname");
$lastname = $adb->query_result($result,0,"lastname");
// $contact_name = $lastname.' '.$firstname;
$contact_name = $firstname.' '.$lastname;
}
$log->debug("Exiting getContactName method ...");
return $contact_name;
}
maybe this helps someone,
Klaus |
|
| Back to top |
|
fixedamage
Joined: 13 Oct 2007
Posts: 1
|
| Posted: Sat Oct 13, 2007 7:12 pm Post subject: firstname lastname display of names |
|
|
| I was not able to get this to work. I have replaced my text just as you have it and nothing has changed. What I really want is "Lastname, Firstname" but I can't get that to work either. Any suggestions? |
|
| Back to top |
|
billdeng
Joined: 17 Sep 2007
Posts: 5
Location: China
|
| Posted: Thu Nov 08, 2007 7:58 am Post subject: firstname lastname display of names |
|
|
Thank you very much. I have changed my system as your direction.
I have tried to fix it by my self but I couldn't find out where the function getContactName is.
Thank you. |
|
| Back to top |
|
razter
Joined: 06 Feb 2006
Posts: 124
|
| Posted: Tue Dec 18, 2007 5:19 am Post subject: firstname lastname display of names |
|
|
I would like to keep it Lastname Firstname, but I would like Firstname to also go in alphabetical order.
For example,
Smith, Joe
Smith, Sally
Smith, Zoe
Right now it only puts Lastname in alphabetical order.
Lastname should be ascending (and it is) and then Firstname should be ascending.
Do you know how to make this change? |
|
| Back to top |
|
pratim
Joined: 11 Apr 2008
Posts: 68
|
| Posted: Wed Aug 06, 2008 10:48 am Post subject: Re: firstname lastname display of names |
|
|
The following link will help you
http://forums.vtiger.com/viewtopic.php?t=20664 |
|
| Back to top |
|
| |