5,693,062 members and growing! (15,867 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General     Beginner

Create your own simple button for Google Toolbar

By Brent Lamborn

A short tutorial explaining how to create a custom button for Google Toolbar.
Windows, .NET, ASP.NET, Dev

Posted: 6 Oct 2006
Updated: 6 Oct 2006
Views: 13,106
Bookmarked: 14 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
7 votes for this Article.
Popularity: 2.93 Rating: 3.47 out of 5
0 votes, 0.0%
1
1 vote, 14.3%
2
3 votes, 42.9%
3
1 vote, 14.3%
4
2 votes, 28.6%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Here is a quick tutorial on how to add your own custom button to Google Toolbar. I decided to pick something extremely simple for my first article. There's not really even any coding involved, just a simple XML file and a link!

You will need to compose an XML document. Google will use this to create the button. It's nothing fancy - really! If you don't know what XML is - don't worry about! To start take a look at the contents of Green Marines XML file:

<?xml version="1.0" ?>
- <custombuttons xmlns="http://toolbar.google.com/custombuttons/">
- <button>
<site>http://www.greenmarines.com</site>
<title>Green Marines</title>
<description>A free community for US Marines.</description>
<update>http://www.greenmarines.com/updated_button.xml</update>
<icon mode="base64" type="image/x-icon">
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAA
AAAAAAAAAAAAAAA AAAAAAAAAAAA////AH97gAC/vr8AQT4+AN/d4ABgXGAAo
J+gACEbIACPjJAA7+7vAFFLUQAwKzAA 0M3QAHBtbQCwrq4AmJWYAElESACIg
4gA9/f3ALe2twBYVFgAKSMoAOfl5wDHxccA2NfXADgzNgB5 dXcAqKepAGlla
gAcFhsAPDg8AGViYgCEgYEAXFZeAJOTkwB9e3gAJCAkAIyKigBFQEQATUhMAP
Ty 9AB0cnQA6+vrACwnLAA0LjQAy8jLAMPBwwC7ubsA29ncAJ2angB0cm4AVU
9YAFpZVwDV1NQAIB4c AFhVUwCclpsAUU9OAKakpgDS0dEAY15jAHt2ewAjHx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UXL7B/AQEBAQEBAQFhnE1Jr1d5cWwBAaOiogGLIVAgnRiWQAafeA
EBoqIBPA86OJsq kR4sj21cpImiAW5UMyRjfSVvZKmODHABAQFMHa18dBaUTo
eaJ2IQAaUBXjlyCTt+dj2IngaSHDJz XQE2QjdYq6iGEj4VknooSwGgAXcOJi
N9Rlo0agaZC66ViQEBAXUBmEctaRSANVgEe4kBAQEBAQEb g1sBExkBBwOJE0
9Ta0VlaBoiMJOQWaxWAYxSH0RBlz9mCKoRhEhRCokBASsCYKdVgUqCfmdDAQG
h AQEBAV9TLoWmZzEBAQEBAaGhoaGhoYqNoaGhoaGhoQAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA=</icon>
<feed refresh-interval="1800">http://www.greenmarines.com/MemberBlogs/tabid/67/rssid/0/Default.aspx</feed>
</button>
</custombuttons>

Most of this is the base64 encoded icon - we'll get to that in a minute. What you need to do is copy the above XML then begin replacing the values inside the elements. The elements are:

  • site - The location the browser will be directed to if someone clicks your button
  • title - The name of your button
  • description - Keep it short, this will appear when your mouse hovers over the button on the toolbar
  • update - the location of the XML file
  • icon - base64 encoded representation of your button's icon
  • feed - an RSS or Atom feed added to your button (required if you want to submit your button to the Google Button Gallery) You can add more than one too!

You don't need all of them. The main ones are in red above. Just replace the values between these tags in the XML with your own. To base64 encode an image for your button, determine or create your image. (I used Green Marines favicon.ico since it will be made 16 x 16 pixels anyway). Then use this page to encode your image. Copy the result into the image element of your XML document.

If you have an RSS or Atom feed, insert the URL of your feed into the feed element. Save your document with an .xml extension (we used updated_button.xml). Copy the XML file to the root of your website directory. It's ready to go!

Now, just add the below link to your site, where ever you choose and when people click it, they will get your button added onto their Google toolbar:

http://toolbar.google.com/buttons/add?url=http://www.yourwebsite.com/yourbuttonxmlfile.xml 

Replace the url= with the fully qualified public url to your xml file. If someone clicks the link and doesn't already have the correct version of Google Toolbar installed, they will be prompted to install the correct toolbar.

That's it! For more detailed instructions go here: http://www.google.com/tools/toolbar/buttons/apis/howto_guide.html

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Brent Lamborn


Wishes all apps could be browser based.

ASP.NET freak. Flex 3 is the shizzz. Oh, eureka! God, that's nice. It's like a little bowl of oatmeal with a hole in it.
Occupation: Web Developer
Location: United States United States

Other popular ASP.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 4 of 4 (Total in Forum: 4) (Refresh)FirstPrevNext
QuestionGoogle Base?memberOskar Austegard12:27 9 Oct '06  
AnswerRe: Google Base?memberBrent Lamborn6:09 10 Oct '06  
GeneralRe: Google Base?memberOskar Austegard11:39 10 Oct '06  
GeneralGood workmembervik2019:55 6 Oct '06  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 6 Oct 2006
Editor:
Copyright 2006 by Brent Lamborn
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project