Skip to content

Commit

Permalink
Finish work on better integration of skype
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Nov 28, 2015
1 parent 9817ce8 commit d12e3ca
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 191 deletions.
162 changes: 0 additions & 162 deletions htdocs/admin/skype.php

This file was deleted.

8 changes: 1 addition & 7 deletions htdocs/contact/card.php
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
Expand Down Expand Up @@ -1156,12 +1156,6 @@
print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
}

// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td>'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
}

print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td>';
print $object->LibPubPriv($object->priv);
print '</td></tr>';
Expand Down
4 changes: 3 additions & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -530,7 +530,9 @@ function getBannerAddress($htmlkey, $object)
}
if (! empty($conf->skype->enabled))
{
if ($this->skype) $out.=($outdone?'<br>':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
$out.='<div style="clear: both;"></div>';
if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
$outdone++;
}

$out.='<!-- END Part to show address block -->';
Expand Down
12 changes: 8 additions & 4 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -1520,14 +1520,18 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)

if (! empty($addlink))
{
$newskype='<a href="skype:';
$newskype =img_picto($langs->trans("Skype"), 'object_skype.png');
$newskype.= '&nbsp;';
$newskype.=dol_trunc($skype,$max);
$newskype.= '&nbsp;';
$newskype.='<a href="skype:';
$newskype.=dol_trunc($skype,$max);
$newskype.='?call" alt="'.$langs->trans("Call").'&nbsp;'.$skype.'" title="'.$langs->trans("Call").'&nbsp;'.$skype.'">';
$newskype.='<img src="../theme/common/skype_callbutton.png" border="0">';
$newskype.='</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="skype:';
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_callbutton.png" border="0">';
$newskype.='</a>&nbsp;&nbsp;&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">';
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
$newskype.='</a>';

if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/modSkype.class.php
Expand Up @@ -61,7 +61,7 @@ function __construct($db)

// Config pages
//-------------
$this->config_page_url = array("skype.php");
$this->config_page_url = array();

// Dependancies
//-------------
Expand Down
7 changes: 1 addition & 6 deletions htdocs/langs/en_US/admin.lang
Expand Up @@ -540,7 +540,7 @@ Module2800Desc=FTP Client
Module2900Name=GeoIPMaxmind
Module2900Desc=GeoIP Maxmind conversions capabilities
Module3100Name=Skype
Module3100Desc=Add a Skype button into card of adherents / third parties / contacts
Module3100Desc=Add a Skype button into card of users / third parties / contacts / members
Module4000Name=HRM
Module4000Desc=Human resources management
Module5000Name=Multi-company
Expand Down Expand Up @@ -1249,11 +1249,6 @@ AddSubscriptionIntoAccount=Suggest by default to create a bank transaction, in b
AdherentLoginRequired= Manage a Login for each member
AdherentMailRequired=EMail required to create a new member
MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default
##### Skype setup #####
SkypeSetup=Skype module setup
SkypeDeactivateInUser=Deactivate Skype in user card
SkypeDeactivateInContact=Deactivate Skype in contact card
SkypeDeactivateInMember=Deactivate Skype in member card
##### LDAP setup #####
LDAPSetup=LDAP Setup
LDAPGlobalParameters=Global parameters
Expand Down
Binary file modified htdocs/theme/common/skype_callbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified htdocs/theme/common/skype_chatbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 2 additions & 10 deletions htdocs/user/card.php
Expand Up @@ -193,7 +193,7 @@
$object->office_phone = GETPOST("office_phone", 'alpha');
$object->office_fax = GETPOST("office_fax", 'alpha');
$object->user_mobile = GETPOST("user_mobile");
$object->skype = GETPOST("skype");
$object->skype = GETPOST("skype", 'alpha');
$object->email = GETPOST("email", 'alpha');
$object->job = GETPOST("job", 'alpha');
$object->signature = GETPOST("signature");
Expand Down Expand Up @@ -330,7 +330,7 @@
$object->office_phone = GETPOST("office_phone", 'alpha');
$object->office_fax = GETPOST("office_fax", 'alpha');
$object->user_mobile = GETPOST("user_mobile");
$object->skype = GETPOST("skype");
$object->skype = GETPOST("skype", 'alpha');
$object->email = GETPOST("email", 'alpha');
$object->job = GETPOST("job", 'alpha');
$object->signature = GETPOST("signature");
Expand Down Expand Up @@ -1325,14 +1325,6 @@
print '</td></tr>'."\n";
}

// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td>';
print '<td>'.dol_print_skype($object->skype,0,0,1).'</td>';
print "</tr>\n";
}

// Signature
print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td>';
print dol_htmlentitiesbr($object->signature);
Expand Down

0 comments on commit d12e3ca

Please sign in to comment.