Getting +1 button to show up

34 views
Skip to first unread message

bgbopper

unread,
Sep 24, 2011, 10:57:09 AM9/24/11
to TiddlyWiki
Hello,

I am trying to get Google Plus's +1 button to show up on the front of
my tiddlywiki. I've tried entering the code with <html></html> around
it and adding systemConfig to the tag, but that gives me a syntax
error ("missing ; before statement"). I can't get it to show up with
or without that systemConfig tag, and forcing the code doesn't seem to
work.

Any tips or suggestions?

Thanks in advance.

Måns

unread,
Sep 24, 2011, 2:08:37 PM9/24/11
to TiddlyWiki
Hi bghopper

I found this: http://www.elevatelocal.co.uk/blog/how-to-add-google-1-button-plus-one-html5-02063128

The six different buttons seem to work allright in Chrome and FF.

I wonder if we could dream up a g+ plugin with help from some of the
great programmers in our community?!

Maybe we could write the script links in the MarkupPreHead or
MarkupPostHead

<!--{{{-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/
jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://apis.google.com/js/
plusone.js"></script>
<script type="text/javascript">
$(document).ready(function(){
gapi.plusone.render("standard", {"size": "standard", "count":
"true"}); });
</script>
<!--}}}-->


and do sth like:

[[G+Plugin]]
//{{{
config.macros.plusone = {
handler: function (place, macroName, params, wikifier, paramString,
tiddler)
{
var tokens = params[0];
var el = createTiddlyElement( place, 'div', '', 'plusone',
tokens );
plusone.render(el, tokens );
}
};
//}}}

And then write sth like: <<plusone standard>> to get a nice g+ button
with count???

That would be AWESOME :-)

I'm not a programmer and I DON'T know how to read/understand the
google api's JS-files...
However I'm sure that pMario, Tobias, Jon or Eric could come up with a
g+ plugin from these few ressources...

So please - step in and do some JS-Magic with a G+ button :-)

Cheers Måns Mårtensson

Måns

unread,
Sep 24, 2011, 3:55:24 PM9/24/11
to TiddlyWiki
Hi bghopper

Here's a versatile G+ bookmarklet
Drag this link: <html><a title="Click and drag to bookmark bar"
href="javascript:var
d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?
e():(k)?k():(x?x.createRange().text:0)),f='https://m.google.com/app/
plus/x/',l=d.location,e=encodeURIComponent,u=f+'?content='+e(d.title)
+e(' - ')+e(l.href)+'&amp;v=compose&amp;hideloc=1';a=function(){if(!
w.open(u,'gplusshare','toolbar=0,resizable=1,scrollbars=1,status=1,width=450,height=295'))l.href=u;};if
(/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else
a();void(0)">Share to G+</a></html> up to your Bookmarks Toolbar.

It works directly as is - and from the browser's toolbar if you drag
it to the bookmarks toolbar...

Cheers Måns Mårtensson

On 24 Sep., 20:08, Måns <humam...@gmail.com> wrote:
> Hi bghopper
>
> I found this:http://www.elevatelocal.co.uk/blog/how-to-add-google-1-button-plus-on...

Måns

unread,
Sep 24, 2011, 4:33:28 PM9/24/11
to TiddlyWiki
Here's a +1 bookmarklet:

http://tinyurl.com/3ke74zp

Enjoy
Måns Mårtensson

On 24 Sep., 21:55, Måns <humam...@gmail.com> wrote:
> Hi bghopper
>
> Here's a versatile G+ bookmarklet
> Drag this link: <html><a title="Click and drag to bookmark bar"
> href="javascript:var
> d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?
> e():(k)?k():(x?x.createRange().text:0)),f='https://m.google.com/app/
> plus/x/',l=d.location,e=encodeURIComponent,u=f+'?content='+e(d.title)
> +e(' - ')+e(l.href)+'&amp;v=compose&amp;hideloc=1';a=function(){if(!
> w.open(u,'gplusshare','toolbar=0,resizable=1,scrollbars=1,status=1,width=45 0,height=295'))l.href=u;};if

bgbopper

unread,
Sep 24, 2011, 5:25:50 PM9/24/11
to TiddlyWiki
The bookmarklet below is a bit of a complicated run-around for what
I'd like to do. Ideally, I'd like to put a +1 button right next to
"Welcome to Comicspedia!" here: www.comicspedia.net

G.J.Robert

unread,
Nov 15, 2011, 1:08:24 AM11/15/11
to tiddl...@googlegroups.com
Hopefully even that every tiddler can get it's own +1 button!

I know that Google may not recognize the multiple +1 buttons to correspond to different tiddlers on the same page, though...

G.J.Robert

unread,
Nov 15, 2011, 1:10:01 AM11/15/11
to tiddl...@googlegroups.com
Or how about adding a +1 button for every HTML static page of TiddlySpace tiddlers?
Reply all
Reply to author
Forward
0 new messages