User avatar
Jared
Forum Admin
Posts: 3584
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

How to add Google +1 Button in phpBB 3.1.2

Fri Feb 06, 2015 3:55 pm

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: Select all

<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: Select all

<!-- 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: Select all

<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.

User avatar
Jared
Forum Admin
Posts: 3584
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to add Google +1 Button in phpBB 3.1.2

Fri Feb 06, 2015 3:58 pm

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

Return to “SEO, Marketing, & Web Design”

Who is online

Users browsing this forum: No registered users and 1 guest