Can manage non registered users
[platal.git] / templates / vcard.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
50a40a33 3{* Copyright (C) 2003-2006 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
c9d11694 22{foreach from="$users" item=vcard}
0337d704 23BEGIN:VCARD
24VERSION:3.0
25{if $vcard.nom_usage}
c9d11694 26FN:{$vcard.prenom|vcard_enc} {$vcard.nom_usage|vcard_enc} ({$vcard.nom|vcard_enc})
0337d704 27{else}
c9d11694 28FN:{$vcard.prenom|vcard_enc} {$vcard.nom|vcard_enc}
0337d704 29{/if}
c9d11694 30N:{$vcard.nom|vcard_enc};{$vcard.prenom|vcard_enc};{$vcard.nom_usage|vcard_enc};;
d865c4a0 31{if $vcard.nickname}
c9d11694 32NICKNAME:{$vcard.nickname|vcard_enc}
d865c4a0 33{/if}
c9d11694 34EMAIL;TYPE=internet,pref:{$vcard.bestalias}@{#globals.mail.domain#}
0337d704 35{if $vcard.bestalias neq $vcard.forlife}
7d73bb7b 36EMAIL;TYPE=internet:{$vcard.forlife}@{#globals.mail.domain#}
0337d704 37{/if}
38{if $vcard.virtualalias}
39EMAIL;TYPE=internet:{$vcard.virtualalias}
40{/if}
41{if $vcard.mobile}
c9d11694 42TEL;TYPE=cell:{$vcard.mobile|vcard_enc}
0337d704 43{/if}
44{if $vcard.adr_pro}
45{if $vcard.adr_pro[0].entreprise}
c9d11694 46ORG:{$vcard.adr_pro[0].entreprise|vcard_enc}
0337d704 47{/if}
48{if $vcard.adr_pro[0].poste}
c9d11694 49TITLE:{$vcard.adr_pro[0].poste|vcard_enc}
0337d704 50{/if}
51{if $vcard.adr_pro[0].fonction}
c9d11694 52ROLE:{$vcard.adr_pro[0].fonction|vcard_enc}
0337d704 53{/if}
54{if $vcard.adr_pro[0].tel}
c9d11694 55TEL;TYPE=work:{$vcard.adr_pro[0].tel|vcard_enc}
0337d704 56{/if}
57{if $vcard.adr_pro[0].fax}
c9d11694 58FAX;TYPE=work:{$vcard.adr_pro[0].fax|vcard_enc}
0337d704 59{/if}
c9d11694 60ADR;TYPE=work:{format_adr adr=$vcard.adr_pro[0]}
0337d704 61{/if}
62{foreach item=adr from=$vcard.adr}
c9d11694 63ADR;TYPE=home{if $adr.courier},postal{/if}:{format_adr adr=$adr}
79a5acea 64{foreach item=tel from=$adr.tels}
65{if $tel.tel}
c9d11694 66{if $tel.tel_type neq 'Fax'}TEL{else}FAX{/if};TYPE=home:{$tel.tel}
0337d704 67{/if}
68{/foreach}
79a5acea 69{/foreach}
0337d704 70{if $vcard.web}
c9d11694 71URL:{$vcard.web}
0337d704 72{/if}
d865c4a0 73{if strlen(trim($vcard.freetext)) == 0}
c9d11694 74NOTE:(X{$vcard.promo})
a77a3269 75{else}
c9d11694 76NOTE:(X{$vcard.promo})\n{$vcard.freetext|vcard_enc}
a77a3269 77{/if}
937e3c82 78{if $vcard.photo}
c9d11694 79PHOTO;ENCODING=b;TYPE={$vcard.photo.attachmime}:{$vcard.photo.attach|base64_encode}
937e3c82 80{/if}
c9d11694 81SORT-STRING:{$vcard.nom|vcard_enc}
0337d704 82REV:{$vcard.date|date_format:"%Y%m%dT000000Z"}
5e193297 83END:VCARD{"\n"}
c9d11694 84{/foreach}
0337d704 85{* vim:set et sw=2 sts=2 sws=2: *}