Previous Thread
Next Thread
Print Thread
Hop To
#243732 06/08/2011 9:53 PM
Joined: Jun 2004
Posts: 207
C
enthusiast
OP Offline
enthusiast
C
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
Offline
Carpal Tunnel
I
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 10:03 AM
Joined: Jun 2011
Posts: 112
Sysop
Offline
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 10:07 AM.
cascadeclimbers #243755 06/09/2011 11:56 AM
Joined: Jun 2006
Posts: 1,344
G
veteran
Offline
veteran
G
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: 739
Likes: 1
Old Hand
Offline
Old Hand
Joined: May 2008
Posts: 739
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: 739
Likes: 1
Old Hand
Offline
Old Hand
Joined: May 2008
Posts: 739
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
Offline
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
v7.7.5 Active Topics Display Name Incorrect
by Jake - 11/17/2020 4:46 PM
custom islands in forums tool
by Ruben - 11/17/2020 3:21 PM
Captcha bug maybe?
by Morgan - 11/16/2020 8:34 AM
Facebook thumbnail issue
by DBryce - 11/08/2020 7:43 PM
No hop to menu in the category pages
by Morgan - 11/05/2020 4:19 PM
Who's Online Now
1 members (JAISP), 67 guests, and 56 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5