Results 1 to 6 of 6

Thread: Displaying name

  1. #1
    yeksoon is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Displaying name

    Currently, the default is to display in 'Firstname Lastname' format.

    Is there a way to configure it to display 'Lastname Firstname' or 'Surname Firstname' format'?

  2. #2
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Displaying name

    Where.....?
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  3. #3
    yeksoon is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Re: Displaying name

    Contact List

  4. #4
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Displaying name

    Open modules/Contacts/Contact.php, find function called _create_proper_name_field() and replace it with the following:
    PHP Code:
    function _create_proper_name_field()
        {
            
    $full_name '';
            
            if(!empty(
    $this->last_name))
            {
                
    $full_name $this->last_name;
            }
            if(!empty(
    $full_name) && !empty($this->first_name))
            {
                
    $full_name .= ' ' $this->first_name;
            }
            elseif(empty(
    $full_name) && !empty($this->last_name))
            {
                
    $full_name $this->last_name;
            }

            
    $this->name $full_name;
            
    $this->full_name $full_name//used by campaigns
        

    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  5. #5
    yeksoon is offline Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Re: Displaying name

    thanks for the suggestion.

    But, the fix is still one-sided.

    Now, it allows displaying names in "lastname firstname" format but not the other way round.

    I think the correct way is to allow display in both ways "lastname firstname" and "firstname lastname"

    Just out of curiousity, am I the only one asking for this display method?

    The reason I ask for 2 ways to display the names, is because I work with people from around the world.

    Eg. It looks fine if you are displaying it "Michael Jordan".. and "Yao Ming" with "Yao" being the surname

  6. #6
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Displaying name

    Create knowledge base and correct _create_proper_name_field()
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •