Skip to content

Instantly share code, notes, and snippets.

@ErikAbele
Created June 22, 2011 17:17
Show Gist options
  • Save ErikAbele/1040587 to your computer and use it in GitHub Desktop.
Save ErikAbele/1040587 to your computer and use it in GitHub Desktop.
Google +1 Button Gadget (e.g. for use in Google Sites)
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
title="Google +1 Button"
title_url="http://www.google.com/webmasters/+1/button/"
description="Google +1 buttons let people who love your content recommend it on Google Search"
thumbnail="http://www.google.com/+1/button/images/icon.png"
author="Erik Abele" author_email="erikabele (at) gmail (dot) com"
width="106" height="60" scrolling="false">
</ModulePrefs>
<UserPref name="size" display_name="Size" default_value="standard" datatype="enum">
<EnumValue value="small" display_value="Small (15px)" />
<EnumValue value="medium" display_value="Medium (20px)" />
<EnumValue value="standard" display_value="Standard (24px)" />
<EnumValue value="tall" display_value="Tall (60px)" />
</UserPref>
<UserPref name="count" display_name="Include Count" datatype="bool" default_value="true"/>
<UserPref name="href" display_name="URL to +1" datatype="string" default_value="http://www.example.com/" required="true" />
<UserPref name="lang" display_name="Language" datatype="string" default_value="en" required="true" />
<Content type="html"><![CDATA[
<html>
<head>
<style type="text/css">body{background-color: transparent;}</style>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: '__UP_lang__'}
</script>
</head>
<body>
<g:plusone size="__UP_size__" count="__UP_count__" href="__UP_href__"></g:plusone>
</body>
</html>
]]></Content>
</Module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment