Previous Thread
Next Thread
Print Thread
Hop To
#243732 06/08/2011 10:53 PM
Joined: Jun 2004
Posts: 207
C
enthusiast
enthusiast
C Offline
Joined: Jun 2004
Posts: 207
Info for this can be found here http://www.google.com/+1/button/

However it's pretty simple. Any page you want it you can add the following code. In showflat.tpl with the FB and Twitter icons is an obvious start.

In your header file add the following before the </head> tag...

{literal}
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<script type="text/javascript">
function plusone_vote( obj ) {
_gaq.push(['_trackEvent','plusone',obj.state]);
}
</script>
{/literal}

The function plusone_vote is a callback if you use Google Analytics, allows you to track events.

Add the following in your showflat.tpl...
<g:plusone callback="plusone_vote"></g:plusone>



Won't you take me to Funkytown?
Joined: Jun 2006
Posts: 3,837
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,837
Just wondering how popular this might be? with facebook & twitter, do we need a third option?

cascadeclimbers #243751 06/09/2011 11:03 AM
Joined: Jun 2011
Posts: 112
Sysop
Sysop
Joined: Jun 2011
Posts: 112
I would say it's going to much more valuable than Facebook and Twitter.... although the take rate will be slower, most people browsing the web probably don't have google accounts..... google should just buy facebook.... smile

Last edited by UBBSystems; 06/09/2011 11:07 AM.
cascadeclimbers #243755 06/09/2011 12:56 PM
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
I do too, but I hope they get their crap together and get it working for google apps people. They always leave them out and the tools become useless to those using google apps email.

Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
where exactly on showflat do you put <g:plusone callback="plusone_vote"></g:plusone>?


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
nevermind. best place is right above the twitter/facebook block


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Joined: Jul 2007
Posts: 103
member
member
Joined: Jul 2007
Posts: 103
I changed my board easily with all the +1 icons you would possible need. There is actually a great service out there called AddThis. http://www.addthis.com

It is capable of wrapping all the add/+1/like/etc service into one block of code.

It is easy to implement. Just open showflat.tpl and look for the face book part.

After this to the following:


Code
{if $facebook}
<td>
<iframe src="http://www.facebook.com/plugins/like.php?href={$facebookURL}&amp;layout=standard&amp;show_faces=false&amp;width=350&amp;action=like&amp;colorscheme=light&amp;height=24" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:24px;" allowTransparency="true"></iframe>
</td>
{/if}
</div>

<!-- Add this -->
<!-- AddThis Button BEGIN -->
{literal}
<td valign="top">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_google_plusone"></a>
<a class="addthis_button_live"></a>
<a class="addthis_button_hotmail"></a>
<a class="addthis_button_gmail"></a>
<a class="addthis_button_nujij"></a>
<a class="addthis_button_google"></a>
<a class="addthis_button_googlereader"></a>
<a class="addthis_button_blogger"></a>
<a class="addthis_button_myspace"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4de3b33e712ccfab"></script>
<!-- AddThis Button END -->
</td>
{/literal}

And presto. See it in action here:
http://nlforum.merudi.net/ubbthreads.php/topics/119466/1.html

All the icons that you need wink.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 744 guests, and 147 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)