Showing posts with label facebook. Show all posts
Showing posts with label facebook. Show all posts

Jun 3, 2010

Add Facebook Like button to any page in Umbraco

I’ve been using Umbraco for quite a while now and recently got a request to add the Facebook like buttons to several sections on our sites. News, Home searches, Blogs, ect… We host like 20+ websites on one Umbraco install. So coming up with an XSLT macro that could be used across domains was not as easy as I had expected. Main problem being is that I quickly found out that the umbraco.library:NiceURL() doesn’t add the hostname of the site it’s being used. Then trying to google things like ‘umbraco xslt get hostname’ or ‘how to get hostname in umbraco’ and ‘get full url in umbraco xslt’ didn’t actually turn up anything. So after some other odd researching I found that I can simply request server variables in umbraco XSLT. In that I found umbraco.library:RequestServerVariables('HTTP_HOST'). Now I finally had everything I needed to get underway with the simple little macro to add the Facebook Like button on any page simply by a Macro in Umbraco. This can be added in the Content section to give access to your designers to add it to individual pages and also to the Templates to add it to sections of your site.

 

XSLT Snippet:

   1: <xsl:variable name="niceHost">



   2: http://<xsl:value-of select="umbraco.library:RequestServerVariables('HTTP_HOST')" />



   3: </xsl:variable> 



   4:  



   5: <xsl:variable name="niceURL">



   6: <xsl:value-of select="umbraco.library:NiceUrl($currentPage/@id)" />



   7: </xsl:variable>



   8: <iframe src="http://www.facebook.com/plugins/like.php?href={$niceHost}{$niceURL}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">NoIframe</iframe> 


Jan 13, 2009

Digsby - My New Favorite IM/Social Network Client

Today I logged into my work computer like I normally do. I have my IM client set to automatically sign me in, so i never think about it. This morning that client was Pidgin.

After 30 minutes or so of being at my desk, one of my other colleagues yelled over the cubicles telling me to sign in to IM. I use MSN, and for some reason Pidgin wouldn't let me sign in anymore. Another colleague told me that MSN just made an update to their network and until Pidgin could release an update it wouldn't work.

That is when I decided that maybe it was time to try out some other products. I remembered an article my buddy Karl over at AskTheAdmin wrote about an all-in-one client called Digsby.

Digsby is a little more robust than Pidgin as it not only handles all of the different IM networks out there like AIM, MSN, Google Talk, ICQ, IRC etc. It also handles emails, and social networks like Twitter, Facebook and Myspace!

From The Digsby Site:

  • Instant Messaging: digsby is a multiprotocol IM client that lets you chat with all your friends on AIM, MSN, Yahoo, ICQ, Google Talk, and Jabber with one simple to manage buddy list.
  • Email Notifications: digsby is an email notification tool that alerts you of new email and lets you perform actions such as 'Delete' or 'Report Spam' with just one click.
  • Social Networks: digsby is a social networking tool that alerts you of events like new messages and gives you a live Newsfeed of what your friends are up to.


You may also notice that I have put up a Digsby widget on the right side of the blog. Now you guys can shoot me an IM directly if you have any questions, or comments right from the page!

Digsby isn't all roses and sunshine though. I have noticed a couple of drawbacks. For one, the installer comes with a bunch of adware. You can cancel through all of that though to keep your system free of junk. The other thing is that it is only available for Windows right now. They do say that they will have a Mac and Linux release eventually, so keep an eye out for it.

So what IM/Social networking clients do you use? I want to know! Post links to them in the comments... Or shoot me an IM via Digsby!



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam