$lang['select'] = 'Select';
$lang['orgs'] = 'Companies';
$lang['upload'] = 'Upload';
+$lang['qrcode'] = 'QR Code';
$lang['publicbook'] = 'Public Addressbook';
$lang['privatebook'] = 'Private Addressbook';
// join marker field to markers
if(is_array($out['marker'])) $out['markers'] = join(', ',$out['marker']);
+ $out['qrcode'] = tpl_qrcode($out);
+
/*
print '<pre>';
print_r($out);
$smarty->assign('entry',$out);
}
+function tpl_qrcode($in){
+ $data = "BEGIN:VCARD\n";
+ $data .= "N:{$in['name']};{$in['givenname']}\n";
+ if($in['mobile']) $data .= "TEL;CELL:{$in['mobile']}\n";
+ if($in['phone']) $data .= "TEL;WORK:{$in['phone']}\n";
+ if($in['homephone']) $data .= "TEL;HOME:{$in['homephone']}\n";
+ if($in['mail'][0]) $data .= "EMAIL:{$in['mail'][0]}\n";
+ $data .= "END:VCARD";
+ $data = rawurlencode($data);
+
+ return 'http://chart.apis.google.com/chart?cht=qr&chld=L|5&chs=500x500&chl='.$data.'&.png';
+}
+
+
/**
* assigns the last LDAP error to the template
*/
padding: 1px 0px 1px 16px;
}
+a.ed_qrcode {
+ background: transparent url(../pix/qrcode.png) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
a.ed_csvexport {
background: transparent url(../pix/page_white_excel.png) 0px 1px no-repeat;
padding: 1px 0px 1px 16px;
<a href="entry.php?dn={$dn|escape:url}&mode=vcf" class="ed_vcfexport">{$lang.vcfexport}</a>
</li>
+ <!-- qr code -->
+ <li>
+ <a href="{$entry.qrcode}" rel="imagebox" class="ed_qrcode" title="{$lang.qrcode}">{$lang.qrcode}</a>
+ </li>
+
<!-- show on map -->
{if $smarty.request.mode == 'map' && $conf.gmapkey}
<li>