Search

Friday, July 29, 2011

Add Google +1 button to PhpBB

The Google +1 button is analogous to the Facebook Like.  With a few steps, we could add this feature to our PhpBB-based forum.
 
In the first place, edit two files : overall_header.html and viewtopic_body.html in the template folder as below.
 
overall_header.html
 
1.    find </head>
2.    in front of it, insert <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
 
 
viewtopic_body.html
 
1.    find <div class="postbody">
2.    inline add to the appropriate position to show the +1 button
<div>
<g:plusone size="medium"></g:plusone>
</div>
 
 
It is advisable to refresh to template if the +1 button does not appear.
 
1.    Open PhpBB Administration Control Panel
2.    Click the 'STYLES' tab
3.    Click 'Templates' and 'Refresh'
 
 
 

1 comment: