Google + 1 and PhpBB3

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Google + 1 and PhpBB3

Post 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

Post 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

Post by Stoker »

Its based on the code used here: http://www.google.com/webmasters/+1/button/

Google + 1 and PhpBB3

Post by kevinviet »

So they're the same :D thanks

Google + 1 and PhpBB3

Post by Stoker »

Codechange moved from overall_header.html to overall_footer.html
Seems to load better.

Google + 1 and PhpBB3

Post 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

Post by Stoker »

If you know why, then why are you asking??

Google + 1 and PhpBB3

Post by Vox Populi »

[offtopic]:lol:[/offtopic] Too funny. You're catching on Stoker.

Google + 1 and PhpBB3

Post 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

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