Facebook and Windows Live Toolbar Buttons: Creating your own

I got bored yesterday, so to satisfy an hours’ boredom, I took a look at the buttons on the Windows Live Toolbar as you can easily create your own. There are two ways of doing it, the easy way, or the more advanced way, which I will now go into:

The Easy Way

The easy way is basically going to the button creation page on Windows Live Gallery and just fill in all the relevant details:

You can even have the button act as a search. An example of this would be for doing a Live Search, you would use this link http://search.live.com/results.aspx?q={query}&mkt=en-gb&FORM=LVCP which we just put in the Add Search section:

Then we just agree to the terms and create our button, which you can then put on Live Gallery straight away, or download if you want to host it elsewhere.

The Advanced Way

The advanced way requires us to head to the MSDN pages for the Toolbar section so we can see what can go into the button. This shows us the structure of the XML file needed for the button. If we took the above example of doing a Live Search button, then in the <shortcuts> section we would have the following:

<shortcuts> <buttonWindow href="http://search.live.com/results.aspx?q={query}&mkt=en-gb&FORM=LVCP" width="350" height="100" /> </shortcuts>

So to try all this out, I used the Share with Facebook shortcut that Facebook provides for sharing webpages with your friends. The shortcut itself is just a bit of javascript, but I had to modify it slightly to work with the button. In the javascript, I changed l=d.location to l={url) which uses the {url} variable to get the current page address from the browser.

So my finished XML looked like this:

<?xml version="1.0" encoding="utf-8"?>
<button>
  <buttonNamespace>ScottIsAFool</buttonNamespace>
  <buttonUpgrade />
  <locale language="*">
    <buttonText>Share With Facebook</buttonText>
    <tooltip>Share this page on Facebook</tooltip>
    <icon src="facebook.bmp" />
    <shortcuts>
      <url href="javascript:var%20d=document,f='http://www.facebook.com/share',l={url},e=encodeURIComponent,p='.php?src=bm&v=4&i=1176212157&u='+e(l.href)+'&t='+e(d.title);try{if(!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z){a=function(){if(!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=0,width=626,height=436'))l.href=f+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0)" />
    </shortcuts>
  </locale>
</button>

Which uses this bitmap file . Save this XML file as button.xml, and along with your image (if you used one), put them into a cab file (not zip or rar) and rename it from .cab to .btn. You can then submit this to Windows Live Gallery, or if you want to host it yourself, you would use the following link: http://toolbar.live.com/addbutton/?btnurl= and put the direct URL to the btn file after the =.

My Facebook example can be downloaded from http://gallery.live.com/liveItemDetail.aspx?li=8e97a24a-4794-45ca-86aa-4b0ef603344f

SL

Advertisements
  1. #1 by Magnus on September 15, 2007 - 8:49 pm

     Do you have any recommendations where I can host the customized Toolbar buttons. The http://toolbar.live.com/addbutton/?btnurl= link doesn\’t seem to work for me when I am hosting it on Skydrive. Any hints or step-by-step instructions how to do this would be much appreciated. Also, do you know how to automatically add Toolbar buttons by placing them in a special folder and changing the registry. The information about this on MSDN doesn\’t seem to work anymore. Thanks

  2. #2 by Scott on September 15, 2007 - 9:24 pm

     For hosting them on skydrive, as long as they are public it should work, but what you have to do, is go to the file\’s page, then right click on the image and copy shortcut, then put that at the end of the btnurl. As for dumping the files in a particular folder, not sure, I\’ll have a dig around though.
     
    SL

  3. #3 by Unknown on January 21, 2008 - 3:39 pm

    wow gold wow gold wow power leveling wow power leveling wow powerleveling wow powerleveling wow power leveling wow gold wow gold World of Warcraft Gold rolex replica wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling power leveling power leveling power leveling rolex rolex power leveling power leveling power leveling wow powerleveling wow powerleveling wow powerleveling wow powerleveling wow powerleveling wow powerleveling powerleveling powerleveling powerleveling wow gold powerleveling powerleveling powerleveling World of Warcraft Gold World of Warcraft Gold World of Warcraft Gold World of Warcraft Gold World of Warcraft Gold rolex replica Warcraft Gold Warcraft Gold Gold wow Gold wow Gold wow Gold wow Warcraft Gold Warcraft Gold 货架 机票 灭蟑螂 租房 租房 北京租房 北京租房 搬家公司 北京搬家 北京搬家公司 上海机票 上海机票 上海打折机票 上海打折机票 上海特价机票 上海特价机票 搬家公司 搬家公司 北京搬家公司 北京搬家公司 中高年 転職 アルバイト 求人情報 ブライダル 転職 競馬 FX ダイエット お見合い 競馬 予想 新築マンション 新築マンション コンタクトレンズ 婚約指輪 合宿免許 人材派遣 東京都 墓地 派遣会社 人材派遣 パチンコ 攻略 おなら xczfshdgfgjf

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: