Page 1 of 3
Is there a Google +1 Button Plugin?
Posted: Fri Jun 10, 2011 12:45 pm
by Isotopp
Has anyone written a plugin for S9Y that adds a +1 button somewhere? Maybe as part of a generall Button-Pest plugin (serendipity_event_findmore)?
Re: Is there a Google +1 Button Plugin?
Posted: Fri Jun 10, 2011 1:23 pm
by Timbalu
Hi
I dont think so ... but maybe its easy to include it into the serendipity_event_findmore plugin
Re: Is there a Google +1 Button Plugin?
Posted: Fri Jun 10, 2011 2:23 pm
by garvinhicking
Hi!
I just added spread.ly to findmore, and I'm quite sure that google +1 is as easy, if it follows similar embedding stile like facebook and spread.ly.
HOWEVER I'm too stupid to find the documentation on googles pages for how to embed the +1 thing. I only find information about how to use it with the google toolbar.
Any pointers?
Regards,
Garvin
Re: Is there a Google +1 Button Plugin?
Posted: Fri Jun 10, 2011 2:45 pm
by onli
It's not nice because of the additional script-tags, but adding
Code: Select all
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone href="{$entrydata.url|escape:url}"></g:plusone>
to the plugin-findmore.tpl could work. It should be easy enough to add the sript-tag via the plugin to the head and adding a google+1-option.
garvin:
http://code.google.com/apis/+1button/
Re: Is there a Google +1 Button Plugin?
Posted: Fri Jun 10, 2011 10:42 pm
by rocksteady72
Hi all,
I just add following lines at the end to serendipity_event_findmore/plugin_findmore.tpl
Code: Select all
<iframe src="http://www.facebook.com/plugins/like.php?href={$entrydata.url|@escape:url}&layout=standard&show-faces=true&width=300&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100%; height:60px"></iframe>
{/if}
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript"
src="https://apis.google.com/js/plusone.js"></script>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone></g:plusone>
</div>
{/if}
Works well for me.
Benjamin
Re: Is there a Google +1 Button Plugin?
Posted: Tue Jun 14, 2011 10:44 am
by seraphyn
Okay,
today I would like to go to make the same thing.
Less work for me *g*
But there should a "no follow-me-option" like facebook-like.
This would be better for the german laws...
chris
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jun 15, 2011 10:12 am
by seraphyn
Ich denke da wäre der kleine Plusone-Button eher angebracht.
http://www.google.com/webmasters/+1/button/
Jener würde sich besser in das findmore_plugin einpassen...
Ist denn im Moment Jemand daran, oder kann man sich darauf stürzen?
Chris
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jun 15, 2011 10:39 am
by Timbalu
Hi
Look into berlios SVN and see what Garvin added for spread.ly to findmore just by diff. This should be very easy to adapt to 1+. Make your private changes - see if it works a while, then return back and send a diff to Garvin to update findmore.
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jun 15, 2011 10:44 am
by seraphyn
Sorry for the last posting.
Sometimes...
Tested it, but I got one thing to stop, how could I tell the findmore_plugin to put the script in the head-section of the theme?
Chris
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jun 15, 2011 11:16 am
by Timbalu
You can't!
As far as I see this is impossible, since some of these "like scripts" generate images/iframes/trackbacks, which can't be used in the html head section.
In case of just generating a button image, you can use the plugins image folder to store a previously generated one and just do some normal <a href=""><img src="" /></a> in the findmore.tpl, right?!
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jun 15, 2011 11:41 am
by seraphyn
I've look at serendipity_event_head_nugget this should normally work too.
So I try to understand the code there and use it in the findmore_plugin.
Chris
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jul 06, 2011 9:56 am
by seraphyn
Have had a look, but do not find really the Code for the nugget, does someone?
Chris
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jul 06, 2011 10:45 am
by garvinhicking
seraphyn wrote:Have had a look, but do not find really the Code for the nugget, does someone?
Chris
For that to work, the plugin would need to listen to one more event hook (frontend_header) to output things there...
Re: Is there a Google +1 Button Plugin?
Posted: Wed Jul 06, 2011 11:19 am
by seraphyn
Narf,
seems I'm too lame for this
Or today is not really my day, choose the right one
Tried to hack something, withtou having the script inside the module, means put it by myself in the header.
Of course, it won't use the URL of the entry, but I used the right variables for that.
Could it be, that google+ only use the FQDN of the blog instead of the entry URL?
Chris
Re: Is there a Google +1 Button Plugin?
Posted: Thu Jul 14, 2011 3:52 pm
by seraphyn
onli wrote:<g:plusone href="{$entrydata.url|escape:url}"></g:plusone>[/code]
This seems only to work in extended entries not in small entries.
Looks like the whole Domain is just taken.
Is there a way to have it for not extended enrtries too?
Chris