From myroundcube@mail4us.net Fri Dec 13 08:19:02 2013 From: Rosali To: dev@lists.roundcube.net Subject: Re: [RCD] append tel url in addressbook Date: Fri, 13 Dec 2013 08:18:46 +0100 Message-ID: <606585dbbee82b86704765e468c4dc8c@roland-liebl.de> In-Reply-To: <2622cb459bbeadd161244775435dcb29@nyx.cx> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5792473178287721083==" --===============5792473178287721083== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit +1 Please add it to Roundcube 1.0-RC/stable. It is really useful for mobile devices or VOIP calls on desktop computers. IMO all non-numeric characters except the leading + should be stripped off to receive urls like ... [Unformatted as it is in the addressbook] Also leading '00' should be replaced by '+' in the formatting function. > Hello, i have modified the show.inc file for append the support for > tel://url in addressbook. > If you want add the modification to your code, it's ok for me. > > Cheers, > > --- old/program/steps/addressbook/show.inc > +++ new/program/steps/addressbook/show.inc > > @@ -137,7 +137,7 @@ > 'name' => rcube_label('properties'), > 'content' => array( > 'email' => array('size' => $i_size, 'render_func' => > 'rcmail_render_email_value'), > - 'phone' => array('size' => $i_size), > + 'phone' => array('size' => $i_size, 'render_func' => > 'rcmail_render_tel_value'), > 'address' => array(), > 'website' => array('size' => $i_size, 'render_func' => > 'rcmail_render_url_value'), > 'im' => array('size' => $i_size), > @@ -187,6 +187,14 @@ > ), Q($email)); > } > > +function rcmail_render_tel_value($tel, $col) > +{ > + return html::a(array( > + 'href' => 'tel:' . $tel, > + 'class' => 'tel', > + ), Q($tel)); > +} > + > > function rcmail_render_url_value($url, $col) > { --===============5792473178287721083==--