Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding Skype to your home.tpl file

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-06-2006, 12:19 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default Adding Skype to your home.tpl file

As you may be aware Skype is owned by Ebay now, and of cause has links with PayPal and in my opinion is the best FREE internet comunication system available. If for some unknown reason you do not know anything about Skype then you can find the web page at http://www.skype.com.

Anyway here is a small mod to include this in your shopcart/skin1/customer/home.tpl file.

1st of all right click this image http://www.shisha.co.uk/shopcart/skin1/images/skype.gif and save this in your shopcart/skin1/images/skype.gif

Next save the below Java code in your shopcart/skin1/skypeCheck.js

Code:
var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 )); var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1)); function oopsPopup() { var windowName = "oops"; var URLtoOpen = "http://download.skype.com/share/skypebuttons/oops/oops.html"; var popW = 540, popH = 305; var scrollB = 'no'; w = screen.availWidth; h = screen.availHeight; var leftPos = (w-popW)/2, topPos = (h-popH)/2; oopswindow = window.open(URLtoOpen, windowName,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos); return false; } if(typeof(detected) == "undefined" && activex) { document.write( ['<script language="VBscript">', 'Function isSkypeInstalled()', 'on error resume next', 'Set oSkype = CreateObject("Skype.Detection")', 'isSkypeInstalled = IsObject(oSkype)', 'Set oSkype = nothing', 'End Function', '</script>'].join("\n") ); } function skypeCheck() { if(CantDetect) { return true; } else if(!activex) { var skypeMime = navigator.mimeTypes["application/x-skype"]; detected = true; if(typeof(skypeMime) == "object") { return true; } else { return oopsPopup(); } } else { if(isSkypeInstalled()) { detected = true; return true; } } detected = true; return oopsPopup(); }


Also save this tpl file in shopcart/skin1/skype.tpl - Please make sure you change the "shishapipe" to your Skype name at
Code:
<a href="skype:shishapipe?call">

Code:
{* $Id: skype.tpl,v 0.1 2006/04/06 FS Exp $ *} {capture name=skype} <table width="100%" border="0" cellpadding="0"> <tr> <td><div align="center"> <script type="text/javascript" src="{$SkinDir}/skypeCheck.js"></script> <a href="skype:shishapipe?call"> [img]{$ImagesDir}/skype.gif[/img]</a></div></td> </tr> </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Skype contact us" menu_content=$smarty.capture.skype }

Then in your shopcart/skin1/customer/home.tpl call the file skype.tpl by using this command below.

Code:
{ include file="skype.tpl" }

You can see this at http://www.shisha.co.uk/shopcart/home.php on the left hand side at the bottom
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #2  
Old 04-06-2006, 12:40 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Has anyone got any opinions on the various skype phones?? i was looking at one of the cordless dual phones as we often use skypeout for overseas calls and although i've got my bluetooth headset setup for it i can't help thinking that i look a right div with it in my ear.
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #3  
Old 04-13-2006, 12:54 AM
 
shakes shakes is offline
 

Newbie
  
Join Date: Apr 2006
Location: Canada
Posts: 6
 

Default

delete post.
__________________
XCART Version 4.0.18
Reply With Quote
  #4  
Old 04-13-2006, 01:22 AM
 
shakes shakes is offline
 

Newbie
  
Join Date: Apr 2006
Location: Canada
Posts: 6
 

Default

well, i just figured out another way of doing it using skypes script, which comes with a very cool dropdown button, what do you guys think of it?

Code:
{* $Id: skype.tpl,v 0.1 2006/04/06 FS Exp $ *} {capture name=skype} <table width="100%" border="0" cellpadding="0"> <tr> <td><div align="center"> <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/dropdown.js"></script> <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script> <div id="skypeTransparentDrp"> <div id="skypeDropdown-transparent-head">[img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/call.png[/img][img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/down.png[/img]</div> <div id="skypeDropdown-transparent" style="display: none;"> [img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/2.png[/img] [img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/3.png[/img] [img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/4.png[/img] [img]http://download.skype.com/share/skypebuttons/buttons/transparent_dropdown/5.png[/img] </div> </div> </tr> </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Skype contact us" menu_content=$smarty.capture.skype }

Of course, replace my userid with yours

Code:
<a href="skype:yourskypeuserid?call">

Also, if you want to let customers send you files, you can add this to the bottom of the code for another drop down menu item. I didn't want it so i axed it.


this way you don't need to use the .js file.

sorry, i'm no coding expert so sorry about the mess.

see it in action: http://soloboardshop.com/shop/home.php
__________________
XCART Version 4.0.18
Reply With Quote
  #5  
Old 04-13-2006, 04:09 AM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

coo. works fine. but, if SKYPE not installed, it should't be displayed.
Reply With Quote
  #6  
Old 04-13-2006, 04:11 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

Also does not work on a secure server, skype does not have the buttons or the script in a https (secure server) So if you do not have a secure server then fine, but you will get the message error message if you use https
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #7  
Old 04-13-2006, 09:47 AM
 
shakes shakes is offline
 

Newbie
  
Join Date: Apr 2006
Location: Canada
Posts: 6
 

Default

Quote:
Originally Posted by ShishaPipeUK
Also does not work on a secure server, skype does not have the buttons or the script in a https (secure server) So if you do not have a secure server then fine, but you will get the message error message if you use https

well, i'll be getting https soon, so that's good to know. thanks.
__________________
XCART Version 4.0.18
Reply With Quote
  #8  
Old 11-10-2006, 04:39 PM
 
Audiolines Audiolines is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 102
 

Default Re: Adding Skype to your home.tpl file

anyone know how to not make it pop up if a user does not have skype?
__________________
version 4.0.17
Reply With Quote
  #9  
Old 12-02-2006, 08:42 AM
  ezi designs's Avatar 
ezi designs ezi designs is offline
 

Senior Member
  
Join Date: Sep 2006
Location: United Kingdom
Posts: 118
 

Wink Re: Adding Skype to your home.tpl file

Hi

In answer to your question there is an easy way to add the pop up that you are after. But first go to http://www.skype.com/share/buttons/ to get your code, then depending on you preferred location just copy & paste it in.

Mine goes something like this, in the skin1/customer/home.tpl:

<td class="VertMenuRightColumn">
{if $active_modules.SnS_connector && $config.SnS_connector.sns_display_button eq 'Y' && $sns_collector_path_url ne ''}
{include file="modules/SnS_connector/button.tpl"}
{/if}
<!--
Skype 'My status' button
http://www.skype.com/go/skypebuttons
-->
<script type="text/javascript" src="
>
<a href="skype:what ever your skype name is?call"><img src="
http://mystatus.skype.com/balloon/dlp%2Eskype" style="border: none;" width="150" height="60" alt="My status" /></a>
</p>
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}


Hope this helps and if the user does not have Skype they get a download pop up.


Richard
__________________
x-cart 4.1.6

DSEFU PRO

http.www.demontemplates.com
Reply With Quote
  #10  
Old 01-24-2008, 02:09 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Unhappy Re: Adding Skype to your home.tpl file

Quote:
Originally Posted by ShishaPipeUK
As you may be aware Skype is owned by Ebay now, and of cause has links with PayPal and in my opinion is the best FREE internet comunication system available. If for some unknown reason you do not know anything about Skype then you can find the web page at http://www.skype.com.

Anyway here is a small mod to include this in your shopcart/skin1/customer/home.tpl file.

1st of all right click this image http://www.shisha.co.uk/shopcart/skin1/images/skype.gif and save this in your shopcart/skin1/images/skype.gif

Next save the below Java code in your shopcart/skin1/skypeCheck.js

Code:
var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 )); var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1)); function oopsPopup() { var windowName = "oops"; var URLtoOpen = "http://download.skype.com/share/skypebuttons/oops/oops.html"; var popW = 540, popH = 305; var scrollB = 'no'; w = screen.availWidth; h = screen.availHeight; var leftPos = (w-popW)/2, topPos = (h-popH)/2; oopswindow = window.open(URLtoOpen, windowName,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos); return false; } if(typeof(detected) == "undefined" && activex) { document.write( ['<script language="VBscript">', 'Function isSkypeInstalled()', 'on error resume next', 'Set oSkype = CreateObject("Skype.Detection")', 'isSkypeInstalled = IsObject(oSkype)', 'Set oSkype = nothing', 'End Function', '</script>'].join("\n") ); } function skypeCheck() { if(CantDetect) { return true; } else if(!activex) { var skypeMime = navigator.mimeTypes["application/x-skype"]; detected = true; if(typeof(skypeMime) == "object") { return true; } else { return oopsPopup(); } } else { if(isSkypeInstalled()) { detected = true; return true; } } detected = true; return oopsPopup(); }


Also save this tpl file in shopcart/skin1/skype.tpl - Please make sure you change the "shishapipe" to your Skype name at
Code:
<a href="skype:shishapipe?call">

Code:
{* $Id: skype.tpl,v 0.1 2006/04/06 FS Exp $ *} {capture name=skype} <table width="100%" border="0" cellpadding="0"> <tr> <td><div align="center"> <script type="text/javascript" src="{$SkinDir}/skypeCheck.js"></script> <a href="skype:shishapipe?call"> [img]{$ImagesDir}/skype.gif[/img]</a></div></td> </tr> </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Skype contact us" menu_content=$smarty.capture.skype }

Then in your shopcart/skin1/customer/home.tpl call the file skype.tpl by using this command below.

Code:
{ include file="skype.tpl" }

You can see this at http://www.shisha.co.uk/shopcart/home.php on the left hand side at the bottom

Does who a funy error like if the tamplate do not reconize the image for skype. See below...

http://www.support.webosusa.com/images/mods-problems/skype-problem.jpg

Canything to be change?
__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:12 AM.

   

 
X-Cart forums © 2001-2020