mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/mod_vcard.erl: Ensure mod_vcard to respect FORM_TYPE registry (EJAB-328).
* src/mod_vcard_ldap.erl: Likewise. * src/mod_vcard_odbc.erl: Likewise. * doc/guide.tex: Updated documentation. SVN Revision: 990
This commit is contained in:
parent
e7136065fc
commit
b4997bc20c
@ -1,5 +1,10 @@
|
||||
2007-11-27 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/mod_vcard.erl: Ensure mod_vcard to respect FORM_TYPE registry (EJAB-328).
|
||||
* src/mod_vcard_ldap.erl: Likewise.
|
||||
* src/mod_vcard_odbc.erl: Likewise.
|
||||
* doc/guide.tex: Updated documentation.
|
||||
|
||||
* src/mod_muc/mod_muc_room.erl: Don't show the room name as the room description (EJAB-382).
|
||||
|
||||
2007-11-26 Badlop <badlop@process-one.net>
|
||||
|
@ -2998,10 +2998,10 @@ consists of the following \modvcardldap{}-specific options:
|
||||
\term{"\%u"} will be replaced with the user part of a JID, and \term{"\%d"}
|
||||
will be replaced with the domain part of a JID. The default is:
|
||||
\begin{verbatim}
|
||||
[{"NICKNAME", "%u", []},
|
||||
[{"NICK", "%u", []},
|
||||
{"FN", "%s", ["displayName"]},
|
||||
{"FAMILY", "%s", ["sn"]},
|
||||
{"GIVEN", "%s", ["givenName"]},
|
||||
{"LAST", "%s", ["sn"]},
|
||||
{"FIRST", "%s", ["givenName"]},
|
||||
{"MIDDLE", "%s", ["initials"]},
|
||||
{"ORGNAME", "%s", ["o"]},
|
||||
{"ORGUNIT", "%s", ["ou"]},
|
||||
@ -3048,10 +3048,10 @@ consists of the following \modvcardldap{}-specific options:
|
||||
is:
|
||||
\begin{verbatim}
|
||||
[{"Full Name", "FN"},
|
||||
{"Given Name", "GIVEN"},
|
||||
{"Given Name", "FIRST"},
|
||||
{"Middle Name", "MIDDLE"},
|
||||
{"Family Name", "FAMILY"},
|
||||
{"Nickname", "NICKNAME"},
|
||||
{"Family Name", "LAST"},
|
||||
{"Nickname", "NICK"},
|
||||
{"Birthday", "BDAY"},
|
||||
{"Country", "CTRY"},
|
||||
{"City", "LOCALITY"},
|
||||
@ -3106,9 +3106,9 @@ Also we want users to search each other. Let's see how we can set it up:
|
||||
{ldap_filter, ""},
|
||||
%% Now we want to define vCard pattern
|
||||
{ldap_vcard_map,
|
||||
[{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
|
||||
{"GIVEN", "%s", ["givenName"]},
|
||||
{"FAMILY", "%s", ["sn"]},
|
||||
[{"NICK", "%u", []}, % just use user's part of JID as his nickname
|
||||
{"FIRST", "%s", ["givenName"]},
|
||||
{"LAST", "%s", ["sn"]},
|
||||
{"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
|
||||
{"EMAIL", "%s", ["mail"]},
|
||||
{"BDAY", "%s", ["birthDay"]}]},
|
||||
@ -3123,7 +3123,7 @@ Also we want users to search each other. Let's see how we can set it up:
|
||||
%% Note that JID is always returned with search results
|
||||
{ldap_search_reported,
|
||||
[{"Full Name", "FN"},
|
||||
{"Nickname", "NICKNAME"},
|
||||
{"Nickname", "NICK"},
|
||||
{"Birthday", "BDAY"}]}
|
||||
]}
|
||||
...
|
||||
@ -3136,7 +3136,7 @@ searching his info in LDAP.
|
||||
\item \term{ldap\_vcard\_map} example:
|
||||
\begin{verbatim}
|
||||
{ldap_vcard_map,
|
||||
[{"NICKNAME", "%u", []},
|
||||
[{"NICK", "%u", []},
|
||||
{"FN", "%s", ["displayName"]},
|
||||
{"CTRY", "Russia", []},
|
||||
{"EMAIL", "%u@%d", []},
|
||||
@ -3157,7 +3157,7 @@ searching his info in LDAP.
|
||||
[{"Full Name", "FN"},
|
||||
{"Email", "EMAIL"},
|
||||
{"Birthday", "BDAY"},
|
||||
{"Nickname", "NICKNAME"}
|
||||
{"Nickname", "NICK"}
|
||||
]},
|
||||
\end{verbatim}
|
||||
\end{itemize}
|
||||
|
@ -272,10 +272,10 @@ set_vcard(User, LServer, VCARD) ->
|
||||
"match substring)")}]},
|
||||
?TLFIELD("text-single", "User", "user"),
|
||||
?TLFIELD("text-single", "Full Name", "fn"),
|
||||
?TLFIELD("text-single", "Name", "given"),
|
||||
?TLFIELD("text-single", "Name", "first"),
|
||||
?TLFIELD("text-single", "Middle Name", "middle"),
|
||||
?TLFIELD("text-single", "Family Name", "family"),
|
||||
?TLFIELD("text-single", "Nickname", "nickname"),
|
||||
?TLFIELD("text-single", "Family Name", "last"),
|
||||
?TLFIELD("text-single", "Nickname", "nick"),
|
||||
?TLFIELD("text-single", "Birthday", "bday"),
|
||||
?TLFIELD("text-single", "Country", "ctry"),
|
||||
?TLFIELD("text-single", "City", "locality"),
|
||||
@ -442,10 +442,10 @@ search_result(Lang, JID, ServerHost, Data) ->
|
||||
{xmlelement, "reported", [],
|
||||
[?LFIELD("Jabber ID", "jid"),
|
||||
?LFIELD("Full Name", "fn"),
|
||||
?LFIELD("Name", "given"),
|
||||
?LFIELD("Name", "first"),
|
||||
?LFIELD("Middle Name", "middle"),
|
||||
?LFIELD("Family Name", "family"),
|
||||
?LFIELD("Nickname", "nickname"),
|
||||
?LFIELD("Family Name", "last"),
|
||||
?LFIELD("Nickname", "nick"),
|
||||
?LFIELD("Birthday", "bday"),
|
||||
?LFIELD("Country", "ctry"),
|
||||
?LFIELD("City", "locality"),
|
||||
@ -465,10 +465,10 @@ record_to_item(R) ->
|
||||
[
|
||||
?FIELD("jid", User ++ "@" ++ Server),
|
||||
?FIELD("fn", R#vcard_search.fn),
|
||||
?FIELD("family", R#vcard_search.family),
|
||||
?FIELD("given", R#vcard_search.given),
|
||||
?FIELD("last", R#vcard_search.family),
|
||||
?FIELD("first", R#vcard_search.given),
|
||||
?FIELD("middle", R#vcard_search.middle),
|
||||
?FIELD("nickname", R#vcard_search.nickname),
|
||||
?FIELD("nick", R#vcard_search.nickname),
|
||||
?FIELD("bday", R#vcard_search.bday),
|
||||
?FIELD("ctry", R#vcard_search.ctry),
|
||||
?FIELD("locality", R#vcard_search.locality),
|
||||
@ -530,10 +530,10 @@ filter_fields([{SVar, [Val]} | Ds], Match, LServer)
|
||||
Match#vcard_search{us = {make_val(LVal), Host}}
|
||||
end;
|
||||
"fn" -> Match#vcard_search{lfn = make_val(LVal)};
|
||||
"family" -> Match#vcard_search{lfamily = make_val(LVal)};
|
||||
"given" -> Match#vcard_search{lgiven = make_val(LVal)};
|
||||
"last" -> Match#vcard_search{lfamily = make_val(LVal)};
|
||||
"first" -> Match#vcard_search{lgiven = make_val(LVal)};
|
||||
"middle" -> Match#vcard_search{lmiddle = make_val(LVal)};
|
||||
"nickname" -> Match#vcard_search{lnickname = make_val(LVal)};
|
||||
"nick" -> Match#vcard_search{lnickname = make_val(LVal)};
|
||||
"bday" -> Match#vcard_search{lbday = make_val(LVal)};
|
||||
"ctry" -> Match#vcard_search{lctry = make_val(LVal)};
|
||||
"locality" -> Match#vcard_search{llocality = make_val(LVal)};
|
||||
|
@ -61,7 +61,7 @@
|
||||
[{"NICKNAME", "%u", []},
|
||||
{"FN", "%s", ["displayName"]},
|
||||
{"FAMILY", "%s", ["sn"]},
|
||||
{"GIVEN", "%s", ["givenName"]},
|
||||
{"FIRST", "%s", ["givenName"]},
|
||||
{"MIDDLE", "%s", ["initials"]},
|
||||
{"ORGNAME", "%s", ["o"]},
|
||||
{"ORGUNIT", "%s", ["ou"]},
|
||||
@ -97,10 +97,10 @@
|
||||
|
||||
-define(SEARCH_REPORTED,
|
||||
[{"Full Name", "FN"},
|
||||
{"Given Name", "GIVEN"},
|
||||
{"Given Name", "FIRST"},
|
||||
{"Middle Name", "MIDDLE"},
|
||||
{"Family Name", "FAMILY"},
|
||||
{"Nickname", "NICKNAME"},
|
||||
{"Family Name", "LAST"},
|
||||
{"Nickname", "NICK"},
|
||||
{"Birthday", "BDAY"},
|
||||
{"Country", "CTRY"},
|
||||
{"City", "LOCALITY"},
|
||||
@ -300,7 +300,7 @@ ldap_attribute_to_vcard(vCard, {"fn", Value}) ->
|
||||
{xmlelement,"FN",[],[{xmlcdata,Value}]};
|
||||
|
||||
ldap_attribute_to_vcard(vCard, {"nickname", Value}) ->
|
||||
{xmlelement,"NICKNAME",[],[{xmlcdata,Value}]};
|
||||
{xmlelement,"NICK",[],[{xmlcdata,Value}]};
|
||||
|
||||
ldap_attribute_to_vcard(vCard, {"title", Value}) ->
|
||||
{xmlelement,"TITLE",[],[{xmlcdata,Value}]};
|
||||
@ -332,10 +332,10 @@ ldap_attribute_to_vcard(vCard, {"photo", Value}) ->
|
||||
{xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]};
|
||||
|
||||
ldap_attribute_to_vcard(vCardN, {"family", Value}) ->
|
||||
{xmlelement,"FAMILY",[],[{xmlcdata,Value}]};
|
||||
{xmlelement,"LAST",[],[{xmlcdata,Value}]};
|
||||
|
||||
ldap_attribute_to_vcard(vCardN, {"given", Value}) ->
|
||||
{xmlelement,"GIVEN",[],[{xmlcdata,Value}]};
|
||||
{xmlelement,"FIRST",[],[{xmlcdata,Value}]};
|
||||
|
||||
ldap_attribute_to_vcard(vCardN, {"middle", Value}) ->
|
||||
{xmlelement,"MIDDLE",[],[{xmlcdata,Value}]};
|
||||
|
@ -272,10 +272,10 @@ set_vcard(User, LServer, VCARD) ->
|
||||
"match substring)")}]},
|
||||
?TLFIELD("text-single", "User", "user"),
|
||||
?TLFIELD("text-single", "Full Name", "fn"),
|
||||
?TLFIELD("text-single", "Name", "given"),
|
||||
?TLFIELD("text-single", "Name", "first"),
|
||||
?TLFIELD("text-single", "Middle Name", "middle"),
|
||||
?TLFIELD("text-single", "Family Name", "family"),
|
||||
?TLFIELD("text-single", "Nickname", "nickname"),
|
||||
?TLFIELD("text-single", "Family Name", "last"),
|
||||
?TLFIELD("text-single", "Nickname", "nick"),
|
||||
?TLFIELD("text-single", "Birthday", "bday"),
|
||||
?TLFIELD("text-single", "Country", "ctry"),
|
||||
?TLFIELD("text-single", "City", "locality"),
|
||||
@ -439,10 +439,10 @@ search_result(Lang, JID, ServerHost, Data) ->
|
||||
{xmlelement, "reported", [],
|
||||
[?LFIELD("Jabber ID", "jid"),
|
||||
?LFIELD("Full Name", "fn"),
|
||||
?LFIELD("Name", "given"),
|
||||
?LFIELD("Name", "first"),
|
||||
?LFIELD("Middle Name", "middle"),
|
||||
?LFIELD("Family Name", "family"),
|
||||
?LFIELD("Nickname", "nickname"),
|
||||
?LFIELD("Family Name", "last"),
|
||||
?LFIELD("Nickname", "nick"),
|
||||
?LFIELD("Birthday", "bday"),
|
||||
?LFIELD("Country", "ctry"),
|
||||
?LFIELD("City", "locality"),
|
||||
@ -465,10 +465,10 @@ record_to_item(LServer, {Username, FN, Family, Given, Middle,
|
||||
[
|
||||
?FIELD("jid", Username ++ "@" ++ LServer),
|
||||
?FIELD("fn", FN),
|
||||
?FIELD("family", Family),
|
||||
?FIELD("given", Given),
|
||||
?FIELD("last", Family),
|
||||
?FIELD("first", Given),
|
||||
?FIELD("middle", Middle),
|
||||
?FIELD("nickname", Nickname),
|
||||
?FIELD("nick", Nickname),
|
||||
?FIELD("bday", BDay),
|
||||
?FIELD("ctry", CTRY),
|
||||
?FIELD("locality", Locality),
|
||||
@ -533,10 +533,10 @@ filter_fields([{SVar, [Val]} | Ds], Match, LServer)
|
||||
NewMatch = case SVar of
|
||||
"user" -> make_val(Match, "lusername", LVal);
|
||||
"fn" -> make_val(Match, "lfn", LVal);
|
||||
"family" -> make_val(Match, "lfamily", LVal);
|
||||
"given" -> make_val(Match, "lgiven", LVal);
|
||||
"last" -> make_val(Match, "lfamily", LVal);
|
||||
"first" -> make_val(Match, "lgiven", LVal);
|
||||
"middle" -> make_val(Match, "lmiddle", LVal);
|
||||
"nickname" -> make_val(Match, "lnickname", LVal);
|
||||
"nick" -> make_val(Match, "lnickname", LVal);
|
||||
"bday" -> make_val(Match, "lbday", LVal);
|
||||
"ctry" -> make_val(Match, "lctry", LVal);
|
||||
"locality" -> make_val(Match, "llocality", LVal);
|
||||
|
Loading…
Reference in New Issue
Block a user