Bug/Wish :
+ * Bestalias:
+ - #207 : enable for the user the choice of his prefered alias. -MC
+ - #207 : use only the bestalias and the forlife in vcard and fiche. -MC
+
Fixes (from 0.9.2 branch) :
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: vcard.php,v 1.14 2004-10-21 13:12:06 x2000habouzit Exp $
+ $Id: vcard.php,v 1.15 2004-11-17 11:11:59 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$page->assign_by_ref('vcard', $vcard);
mysql_free_result($result);
-$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND type!='a_vie' AND type!='homonyme'",'aliases');
+$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND FIND_IN_SET('bestalias',flags)",'best');
$adr = $globals->db->query(
"SELECT statut,adr1,adr2,adr3,cp,ville,gp.pays,gr.name,tel,fax,
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: fiche.tpl,v 1.25 2004-11-13 15:56:35 x2000habouzit Exp $
+ $Id: fiche.tpl,v 1.26 2004-11-17 11:12:00 x2000habouzit Exp $
***************************************************************************}
{literal}
</div>
<div class='right' style="font-size: smaller; width:100%">(Fiche mise à jour le {$date|date_format:"%d %B %Y"})</div>
<div>
- <a href="mailto:{$bestalias}@polytechnique.org">{$bestalias}@polytechnique.org</a><br />
+ <a href="mailto:{$bestalias}@polytechnique.org">{$bestalias}@polytechnique.org</a>
+ {if $bestalias neq $forlife}
+ <br />
<a href="mailto:{$forlife}@polytechnique.org">{$forlife}@polytechnique.org</a>
+ {/if}
</div>
<div>{if $nationalite}<em>{$nationalite}</em> - {/if}X {$promo} - Formation : {$applis|smarty:nodefaults}</div>
{if $mobile}<div><em class="intitule">Mobile : </em>{$mobile}</div>{/if}
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: vcard.tpl,v 1.5 2004-10-29 15:46:57 x2000habouzit Exp $
+ $Id: vcard.tpl,v 1.6 2004-11-17 11:12:00 x2000habouzit Exp $
***************************************************************************}
BEGIN:VCARD
VERSION:3.0
FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom`"|qp_enc}
{/if}
N;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc};{$vcard.prenom|qp_enc};{$vcard.epouse|qp_enc};;
+EMAIL;TYPE=internet:{$best[0].alias}@polytechnique.org
EMAIL;TYPE=internet:{$vcard.forlife}@polytechnique.org
-{foreach from=$aliases item=a}
-EMAIL;TYPE=internet:{$a.alias}@polytechnique.org
-{/foreach}
{if $vcard.mobile}
TEL;TYPE=cell;ENCODING=QUOTED-PRINTABLE:{$vcard.mobile|qp_enc}
{/if}