Feed on
Posts
Comments

Skype Me, Dr. Memory!

A few days ago, a reader of this humble blog asked if I knew a way to embed “Skype Presence” in a SharePoint Web Part.

I didn’t. But, I was intrigued. (That’s a bad sign… as it usually means I’m going to stay up until the wee hours.)

It turns out to be pretty easy-breezy, with a few caveats. I’ll explain those below. It’s easy because lots of stuff today is “widgetized.” A few minutes on the Skype site turned up some Skype web-widgets—– basically HTML code one can embed on a blog or web page — that gave me what I needed: HTML that would display Skype “presence” by Skype name (what I call a SkypeID).

Realize, I’m no code slinger, but it looked to me that one could simply modify the HTML, adding in different Skype names, and then stack it up in a CEWP. So that’s what I did.

That’s it. Once again, the Content Editor Web Part (AKA: CEWP) is a wily rascal. It can do the most amazing things. The HTML itself is pretty simple. It consists of a small scriptlet, and some basic HTML. Here it is in a screen shot:

I’ve highlighted the areas you need to change – basically substituting the appropriate SKYPEID in the yellow areas, and/or the appropriate “friendly name” at the bottom. That’s the basics.

My first attempted yielded the result above — a webpart with my Skype status and name. If you click on the “I’m Online” graphic, it launches Skype and tries to make the call (via Skype, of course).

Silly Rabbit, Trix is for Kids

I tried it, but some wiseass at Skype designed it so you can’t call yourself. (Grumble – what fun is that!). Anyway, this all once again shows how truly neat the CEWP is.

Now I decided to get fancy — after all it was still early. I decided to set up a nice format, a table, light border, etc. Just because, I also decided to see how it handled multiple Skype accounts in the same part.

Not a problem, it turns out. I just had to cut-and-paste the code, changing the embedded SkypeID in two places, and inserting a “Friendly Name” so that it looked nice on the screen. It’s all pretty straight HTML. No muss, no fuss, and — no kitchen drudgery.

Here’s the final screen shot:

Schizophrenic Skype Status

The caveats and other bits:

  1. You’ve gotta have a Skype account to use this. And, you have to have Skype loaded to use the button to call someone. If you don’t have Skype, you’ve wasted your time reading this anyway.
  2. This is just stacking up the standard Skype “Skype Me” widgets. You can find other ones here: http://www.skype.com/intl/en/share/buttons/
  3. I’ve not a clue what kind of demand this puts on SharePoint — but since this is all “client-side” code, it shouldn’t be a problem.
  4. The trick here is the Content Editor Web Part. Make it your friend.
  5. I did this originally in MOSS, and then duplicated it in WSS, just to make sure that it worked in both environments. It does.
  6. This Skype status does NOT refresh unless you reload the page. Hence just leaving the page loaded might result in inaccurate “presence” information. [I looked at a few methods to automatically refresh, but nothing seemed elegant, and the easy answer would refresh the entire page.]
  7. Use at your own risk.

I’ve appended the final code below, and I put an exported copy of the webpart up here. Feel free to download and abuse. You’ll need to edit the code and insert the desired SkypeIDs and dup the sections for additional IDs.

Finally — and I say this seriously — Caveat Emptor and all that jazz. I offer no guarantees. I distribute this free of all responsibility and liability, use and/or abuse at your own risk. It should give you no problems, but if it does, well… I’ve left town, and I’m living with the dogs on the Dalmatian coast.

Content Editor Web Part – Code for Skype Presence embedded on WSS site.

Note the areas you’ll need to edit and change. You must replace the text “SKYPE_IDn” and “Friendly_Name” with a real Skype IDs and really friendly name.

Content Editor Web Part – Skype Presence

<!– Caveat Emptor! I make no warranties that this will work –>

<!– In fact, I make no warranties at all. You use this at your own risk –>

<!—I mean that. I’m not responsible if your naughty bits fall off –>

<style type=”text/css”>

.style1

{

    font-family: Tahoma;

}

.style2 {

    border-style: solid;

    border-width: 1px;

    font-family: Tahoma;

    font-size: medium;

}

.style3 {

    border-style: solid;

    border-width: 1px;

</style>

<Center>

Skype Status — Click to Call

</Center>

<script type=”text/javascript” src=”http://download.skype.com/share/skypebuttons/js/skypeCheck.js” mce_src=”http://download.skype.com/share/skypebuttons/js/skypeCheck.js”></script>

<table style=”width: 100%”>

<!– BEGIN ReUsable SECTION - duplicate the section below once for each SkypeID

<!– Change SKYPE_ID and Friendly Name –>

<!– BEGIN –>

<tr>

<td style=”width: 200px; height: 44px” class=”style3″>

<span class=”style1″>

<a href=”skype:SKYPE_ID1?call”>

<img src=”http://mystatus.skype.com/bigclassic/SKYPE_ID1” style=”border: none;” alt=”Click to Skype” />

</a>

</span>

</td>

<td class=”style2″>

<strong>  

FRIENDLY_NAME1

</strong>

</td>

</tr>

<!– END –>

<!– BEGIN –>

<tr>

<td style=”width: 200px; height: 44px” class=”style3″>

<span class=”style1″>

<a href=”skype:SKYPE_ID2?call”>

<img src=”http://mystatus.skype.com/bigclassic/SKYPE_ID2” style=”border: none;” alt=”Click to Skype” />

</a>

</span>

</td>

<td class=”style2″>

<strong>  

FRIENDLY_NAME2

</strong>

</td>

</tr>

<!– END –>

<!– END DUPLICATE SECTION –>

</table>

Trackback URI | Comments RSS

Leave a Reply