By 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!
Wikidot supports now new google+ code (it's displayed without iframe).
google+ generator:
https://developers.google.com/+/web/+1button/
Example:
Could this snippet be upgrade to new google+ version ?
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
This is currently not available in chrome.
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
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 | NEW: Wikiroo, backup tool (in development)
Right you are. According to Google, you cannot hide the count when using size=tall. I'll add a note to the page.
BMC Creative | RoaringApps | @brycecammo
Ahh, so I'm not crazy :)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
like it :D
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
I believe that should be: '+1 it' :)
BMC Creative | RoaringApps | @brycecammo