How to add Google +1 Button in phpBB 3.1.2

Jared

Administrator
Staff member
I know this has nothing to do with data recovery, but since I seem to be the first person to have figured this out I though I'd share. Might be good to generate some traffic to the forum. :D

So as you see all the posts now have a Google +1 button. Here's how I did it:

1. In the folder /styles/prosilver/template locate the following two files: overall_header.html and viewtopic_body.html
2. After the <head> tag in overall_header.html insert the following code:
Code:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
//<![CDATA[
   {lang: 'en-US'}
//]]>
</script>

3. In the viewtopic_body.html file find the line:
Code:
<!-- IF postrow.U_QUOTE -->
<li>
	<a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="button icon-button quote-icon"><span>{L_QUOTE}</span></a>
</li>

Then immediately following it, add this code:
Code:
<li>
<g:plusone href="{postrow.U_GOOGLE_PLUS}" size="medium" annotation="bubble"></g:plusone>
</li>

You can adjust the size attribute to be "small" "tall" "medium"etc. and the annotation to "none" as well.

Hopefully this helps someone to not spend 3 hours figuring it out like I did.
 

Jared

Administrator
Staff member
Oh yeah, and don't forget to purge the cache in the admin panel after you upload the files back to your site.
 
Top