View Single Post
  #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