Page 1 of 3

Google + 1 and PhpBB3

Posted: 07 Aug 2011, 20:07
by Stoker
Google + 1 and PhpBB3
Written by Stoker

The +1 button is shorthand for "this is pretty cool" or "you should check this out."

Click +1 to publicly give something your stamp of approval. Your +1's can help friends, contacts, and others on the web find the best stuff when they search.


Open styles/prosilver/template/overall_footer.html
Find:

Code: Select all

</body>
Add before:

Code: Select all

<!-- IF SCRIPT_NAME == "viewtopic" or SCRIPT_NAME == "viewforum" -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<!-- ENDIF -->
Open styles/prosilver/template/viewtopic_body.html
Find:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
Add before:

Code: Select all

<!-- IF not S_IS_BOT -->
<div style="float:right;"><div class="g-plusone"></div></div>
<!-- ENDIF -->
Open styles/prosilver/template/viewforum_body.html
Find:

Code: Select all

<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
Add before:

Code: Select all

<!-- IF not S_IS_BOT -->
<div style="float:right;"><div class="g-plusone"></div></div>
<!-- ENDIF -->
Save, upload changed files and refresh the template.

Google + 1 and PhpBB3

Posted: 07 Aug 2011, 22:12
by kevinviet
Thank you Stoker :thumb: Your way look more simple (less code) than the instruction on Google site. Are they both the same or any thing differrent ? do you know ?

Google + 1 and PhpBB3

Posted: 07 Aug 2011, 22:30
by Stoker
Its based on the code used here: http://www.google.com/webmasters/+1/button/

Google + 1 and PhpBB3

Posted: 07 Aug 2011, 22:44
by kevinviet
So they're the same :D thanks

Google + 1 and PhpBB3

Posted: 10 Aug 2011, 20:21
by Stoker
Codechange moved from overall_header.html to overall_footer.html
Seems to load better.

Google + 1 and PhpBB3

Posted: 11 Aug 2011, 14:19
by Terr0r
and why is it loading better stoker ?

I know why it is loading better in the overall_footer.html then in the overall_header.html

Google + 1 and PhpBB3

Posted: 11 Aug 2011, 14:28
by Stoker
If you know why, then why are you asking??

Google + 1 and PhpBB3

Posted: 11 Aug 2011, 14:37
by Vox Populi
[offtopic]:lol:[/offtopic] Too funny. You're catching on Stoker.

Google + 1 and PhpBB3

Posted: 11 Aug 2011, 14:52
by Terr0r
Stoker wrote:If you know why, then why are you asking??
I asking it not for my self but I asking at you stoker why it is loading better in the overall_footer.html then in the overall_header.html :P :D

Google + 1 and PhpBB3

Posted: 11 Aug 2011, 15:07
by Stoker
Well, it has something to do with the script.
You can try google it.

You can also experiment with the code and see what you think is best.