Seite 1 von 1

Use Thunderbird's DisplayName as a contact's name?

Verfasst: Mi 28. Mai 2008, 12:48
von teranex
When synching the contacts from Thunderbird with MPE, is it possible to tell MPE to use the DisplayName (or Nickname) as the contact's name in the phone?

This would be useful, by example, because in my phone i'd like to give short names to my relatives, but still being able to use their fullname in my thunderbird addressbook.

Verfasst: Mi 28. Mai 2008, 20:43
von FJ
There are no plans to change it. The phone supports Firstname + Lastname and so its the best to use the right fields.

Verfasst: Di 17. Jun 2008, 12:16
von teranex
After having a look at the code of the thunderbird extension, i commented out some code in components\mpe.js (around line 293) to make it look like:

Code: Alles auswählen

out += 'CARID:' + EncodeQP(Card.phoneticLastName) + ';LEDIT:' + Card.lastModifiedDate + /*AddV('FNAME', Card.firstName)*/
		/*AddV('FNAME', Card.displayName)*/
		/*+ AddV('LNAME', Card.lastName)*/  /*+*/ AddV('DNAME', Card.displayName) + AddV('DMAIL', Card.defaultEmail)
		+ AddV('PMAIL', Card.primaryEmail) + AddV('SMAIL', Card.secondEmail) + AddV('TWORK', Card.workPhone)
		+ AddV('TCELL', Card.cellularNumber) + AddV('THOME', Card.homePhone) + AddV('TEFAX', Card.faxNumber)
		+ AddV('TPAGE', Card.pagerNumber) + AddV('HSTR1', Card.homeAddress) + AddV('HSTR2', Card.homeAddress2)
		+ AddV('HCITY', Card.homeCity) + AddV('HSTAT', Card.homeState) + AddV('HZIPC', Card.homeZipCode)
		+ AddV('HCOUN', Card.homeCountry) + AddV('WSTR1', Card.workAddress) + AddV('WSTR2', Card.workAddress2)
		+ AddV('WCITY', Card.workCity) + AddV('WSTAT', Card.workState) + AddV('WZIPC', Card.workZipCode)
		+ AddV('WCOUN', Card.workCountry) + AddV('DADDR', Card.defaultAddress) + AddV('WURL1', Card.webPage1)
		+ AddV('WURL2', Card.webPage2) + AddV('TITLE', Card.jobTitle) + AddV('COMPA', Card.company)
		+ AddV('BYEAR', Card.birthYear) + AddV('BMONT', Card.birthMonth) + AddV('BIDAY', Card.birthDay)
		+ AddV('NOTES', Card.notes);
	return out;
}

function LineToCard(Card, Line)
{
	var vs = SplitV(Line);

	Card = Card.QueryInterface(Components.interfaces.nsIAbCard);

	Card.phoneticLastName = ValueNN("CARID",vs);
	//Card.firstName        = ValueNN("FNAME",vs);
	//Card.lastName         = ValueNN("LNAME",vs);
	Card.displayName      = ValueNN("DNAME",vs);
	try { Card.defaultEmail = ValueNN("DMAIL",vs); } catch (ex) {}
	Card.primaryEmail     = ValueNN("PMAIL",vs);
	Card.secondEmail      = ValueNN("SMAIL",vs);
	Card.workPhone        = ValueNN("TWORK",vs);
	Card.homePhone        = ValueNN("THOME",vs);
When I sync now it seems to work to use the DisplayName as the contacts name in the phone. When i sync from thunderbird to the phone, the display name is used as the contacts name, and when i sync from the phone to thunderbird, the display name is filled in and the first- and lastname are untouched, which is what i wanted.
However since i don't know the exact details about the synching, i'm wondering if this could cause any negative side effects, possible datacorruptions, or other errors?

If there is no problem with this change, why not make it an option in the thunderbird extension?

Verfasst: Do 19. Jun 2008, 21:10
von FJ
MPE reads only the temporary file and writes it back. So i think you should get no problems with your solution.

Its hard enought to sync 3 storages with each other, there are also some users which use MyphoneExplorer to sync after Thunderbird with google and so on. This is the reason why i don't like flexible field-mappings. If ity a basic part for you there are other softwares which do this (MobileMaster,...) - but they are not free.

Verfasst: Fr 29. Aug 2008, 13:42
von mynab
Too bad... I would really like to have this option too!