Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Integrating Skype on PME (2)

phpMyEdit Configuration     Integrating Skype on PME (2)
Odoslať novú tému   Odpovedať na tému    
 
franciscohm     Založený: 08.05.2008   Príspevky: 33  
Príspevok Zaslal: 2008-12-07 04:03
Návrat hore  Odpovedať s citátom     

If you have a field which contains a phone number, you may want to personalize it with the following code:

Kód:
$opts['fdd']['wmp_e'] = array(
  'default'    => '',
  'input'      => '',
  'maxlen'     => 75,
  'name'       => 'Teléfono móvil',
  'options'    => 'ACPVDX',
  'select'     => 'T',
  'size|ACP'   => 20,
  'escape'     => false, 
  'sql|V'      => 'IF(wmp_e="","",CONCAT(wmp_e , " &nbsp;&nbsp;<a href=\"callto:",IF((left(wmp_e,3)="+34") or (left(wmp_e,5)="(+34)") or (left(wmp_e,4)="0034") or (left(wmp_e,6)="(0034)"),REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(wmp_e,"(0)",""),"(",""),")",""),"-","")," ",""),CONCAT("+34",REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(wmp_e,"(0)",""),"(",""),")",""),"-","")," ",""))),"\"><img src=\"images/call_pc.png\" style=\"border: none;\" title=\"Llamar (con el programa por defecto designado en su ordenador)\" /></a> <a href=\"skype:",IF((left(wmp_e,3)="+34") or (left(wmp_e,5)="(+34)") or (left(wmp_e,4)="0034") or (left(wmp_e,6)="(0034)"),REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(wmp_e,"(0)",""),"(",""),")",""),"-","")," ",""),CONCAT("+34",REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(wmp_e,"(0)",""),"(",""),")",""),"-","")," ",""))),"?sms\"><img src=\"images/sms_skype.png\" style=\"border: none;\" title=\"Enviar SMS (Skype)\" /></a>"))',
  'sqlw'       => 'TRIM("$val_as")',
  'sort'       => true
);



It creates a button for calling and another one for sendind an SMS.

Comments:

There is a query that try to interpret "(0)", "-", "(", ")" and other signs.

It also adds a country prefix if needed. In the script it is "+34" for Spain. You may chainge it to suit your needs.

Screenshot:

Image

Note: Contact details are mine. :-)

Icons:

Image Image

Hope it is useful for somebody! :-)

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov