Google +1 Button

By bcammo bcammo

Description

This snippet will add the official Google +1 button to your Wikidot page. This allows visitors to +1 a page you specify.

Attributes

The snippet uses the following attributes; only the URL attribute is required (all others are optional).

Attribute Required Allowed values Default value Description
url yes any valid URL, including %%link%% The URL of the page you want to plus one.
size no small, medium, standard, tall standard The size of the +1 button.
count no true, false true Controls whether or not to display the count of plus ones. The count will always be shown when using size=tall.

Code

You can add the +1 button to your page with the following code:

[[include :snippets:plusone-button
|url=http://example.com
|size=medium
|count=true
]]

You can also use the button in a live template. Such a use might use the code below.
[[include :snippets:plusone-button
|url=%%link%%
|size=tall
|count=false
]]

In action

[フレーム]


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by bcammo

Chatbox - 26 Mar 2012 11:07
Tweet Button - 16 Feb 2012 01:49


Rate this solution

If you think this solution is useful — rate it up!

rating: +10
TeRq TeRq 02 Jan 2014 11:40

Wikidot supports now new google+ code (it's displayed without iframe).

google+ generator:
https://developers.google.com/+/web/+1button/

Example:

<script type="text/javascript" src="https://apis.google.com/js/platform.js"></script>
<div class="g-plusone" data-size="medium"></div>

Could this snippet be upgrade to new google+ version ?


Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)

by TeRq TeRq , 02 Jan 2014 11:40
Matt Gentile Matt Gentile 15 Sep 2011 15:33

This is currently not available in chrome.


CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +

Last edited on 15 Sep 2011 15:33 by Matt Gentile
by Matt Gentile Matt Gentile , 15 Sep 2011 15:33
leiger leiger 14 Jul 2011 01:54

If I use size=tall, then count=false stops working for me (but count=false does work when using the standard size). Are you able to reproduce this?

Had a look at the code of your snippet and can't find the problem there, so I'm not sure if the problem is caused by something else… or perhaps I'm imagining it ;-)


~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

by leiger leiger , 14 Jul 2011 01:54
bcammo bcammo 14 Jul 2011 02:06

Right you are. According to Google, you cannot hide the count when using size=tall. I'll add a note to the page.

by bcammo bcammo , 14 Jul 2011 02:06
leiger leiger 14 Jul 2011 02:15

Ahh, so I'm not crazy :)


~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

by leiger leiger , 14 Jul 2011 02:15
Matt Gentile Matt Gentile 13 Jul 2011 12:35

like it :D


CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +

by Matt Gentile Matt Gentile , 13 Jul 2011 12:35
bcammo bcammo 13 Jul 2011 12:39

I believe that should be: '+1 it' :)

by bcammo bcammo , 13 Jul 2011 12:39
page revision: 4, last edited: 19 Mar 2012 19:40
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /