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: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google + 1 and PhpBB3

Post by Stoker » 07 Aug 2011, 18:07

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
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 02:52

Google + 1 and PhpBB3

Post by kevinviet » 07 Aug 2011, 20:12

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: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google + 1 and PhpBB3

Post by Stoker » 07 Aug 2011, 20:30

Its based on the code used here: http://www.google.com/webmasters/+1/button/
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear

User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 02:52

Google + 1 and PhpBB3

Post by kevinviet » 07 Aug 2011, 20:44

So they're the same :D thanks

User avatar
Stoker
Site Admin
Site Admin
Posts: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google + 1 and PhpBB3

Post by Stoker » 10 Aug 2011, 18:21

Codechange moved from overall_header.html to overall_footer.html
Seems to load better.
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 03 May 2011, 22:47
BBCodes: 100
Location: The Netherlands

Google + 1 and PhpBB3

Post by Terr0r » 11 Aug 2011, 12:19

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: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google + 1 and PhpBB3

Post by Stoker » 11 Aug 2011, 12:28

If you know why, then why are you asking??
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear

User avatar
Vox Populi
BBCoder III
BBCoder III
Posts: 135
Joined: 27 Jul 2011, 13:44
BBCodes: 51
Favourite BBCode: YouTube
Favourite MOD: mChat, Welcome on Index
Location: Index,WA

Google + 1 and PhpBB3

Post by Vox Populi » 11 Aug 2011, 12:37

[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: 03 May 2011, 22:47
BBCodes: 100
Location: The Netherlands

Google + 1 and PhpBB3

Post by Terr0r » 11 Aug 2011, 12:52

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: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google + 1 and PhpBB3

Post by Stoker » 11 Aug 2011, 13:07

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
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear