Google + 1 and PhpBB3

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

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.
Board rules! No PM support
User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 04:52

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 ?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Google + 1 and PhpBB3

Post by Stoker »

Its based on the code used here: http://www.google.com/webmasters/+1/button/
Board rules! No PM support
User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 04:52

Google + 1 and PhpBB3

Post by kevinviet »

So they're the same :D thanks
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Google + 1 and PhpBB3

Post by Stoker »

Codechange moved from overall_header.html to overall_footer.html
Seems to load better.
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

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
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Google + 1 and PhpBB3

Post by Stoker »

If you know why, then why are you asking??
Board rules! No PM support
User avatar
Vox Populi
BBCoder III
BBCoder III
Posts: 135
Joined: 27 Jul 2011, 15:44
BBCodes: 51
Favourite BBCode: YouTube
Favourite MOD: mChat, Welcome on Index
Location: Index,WA
Contact:

Google + 1 and PhpBB3

Post by Vox Populi »

[offtopic]:lol:[/offtopic] Too funny. You're catching on Stoker.
Be who you are and say what you feel.
Those who mind don't matter.
Those who matter don't mind.
- Dr. Seuss
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

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
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

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.
Board rules! No PM support
Post Reply