2
0
forked from Wavyzz/dolibarr

Improvement of the Skype button

Perm & add a button"Chat"
This commit is contained in:
aspangaro
2013-11-24 21:28:15 +01:00
parent f98ec89dec
commit e1b4d01235
10 changed files with 44 additions and 35 deletions

View File

@@ -1190,11 +1190,11 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
* Show Skype link
*
* @param string $skype Skype to show (only skype, without 'Name of recipient' before)
* @param int $cid Id of contact if known
* @param int $cid Id of contact if known
* @param int $socid Id of third party if known
* @param int $addlink 0=no link to create action
* @param int $max Max number of characters to show
* @return string HTML Link
* @param int $max Max number of characters to show
* @return string HTML Link
*/
function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
@@ -1208,9 +1208,12 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
$newskype='<a href="skype:';
$newskype.=dol_trunc($skype,$max);
$newskype.='" alt="'.$langs->trans("Call").'&nbsp;'.$skype.'" title="'.$langs->trans("Call").'&nbsp;'.$skype.'">';
$newskype.='<img src="../theme/'.$conf->theme.'/img/object_skype.png" border="0">&nbsp;';
$newskype.='?call" alt="'.$langs->trans("Call").'&nbsp;'.$skype.'" title="'.$langs->trans("Call").'&nbsp;'.$skype.'">';
$newskype.='<img src="../theme/common/skype_callbutton.png" border="0">&nbsp;';
$newskype.='</a>&nbsp;<a href="skype:';
$newskype.=dol_trunc($skype,$max);
$newskype.='?chat" alt="'.$langs->trans("Chat").'&nbsp;'.$skype.'" title="'.$langs->trans("Chat").'&nbsp;'.$skype.'">';
$newskype.='<img src="../theme/common/skype_chatbutton.png" border="0">&nbsp;';
$newskype.='</a>';
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)