Back to vBulletin 4.x Template Modifications

v3 Arcade Share Tools - Facebook, Google+, Twitter and More
Mod Version: 1.0.4, by Gemma

vB Version: 4.x.x Rating: (4 votes - 5.00 average) Installs: 26
Released: 20 Jun 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code External Content  

This is loosely based on my v3 Arcade Integrate Facebook and Twitter Add-on.

This template modification will add submit buttons to Facebook, Twitter, Google +1, StumbleUpon and Pinterest.

1. Open v3ARCADE_PLAY template

Find:
Code:
{vb:raw headinclude_bottom}
Below that add:
Code:
<meta property="fb:app_id" content="xxxxxxxxxxxxxxx" />
<meta property="og:title" content="{vb:raw game.title}" />
<meta property="og:type" content="website" />
<meta property="og:description" content="{vb:raw game.description}" />
<meta property="og:url" content="{vb:raw vboptions.bburl}/arcade/game-{vb:raw game.gameid}/" />
<meta property="og:image" content="{vb:raw vboptions.bburl}/images/arcade/{vb:raw game.stdimage}" />
Replacing xxxxxxxxxxxxxxx with your Facebook APP ID

Find:
Code:
<div class="blockrow" align="center">
                        <vb:if condition="!$show['challenge'] AND !$show['tournament']">
                            <img src="{vb:raw vboptions.arcadeimages}/backtip.gif" border="0" alt="" />
                        <vb:else />
                            {vb:rawphrase challenge_warning}
                        </vb:if>
                    </div>
Add below

Code:
<div class="collapse"><h3 class="blockhead">Share and Bookmark</h3>
<div class="blockrow" align="center">
<div> 
<table width="300" height="75" border="0" align="right">
<tr bgcolor="#d2e7fd">
<td width="60" align="center">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall" count="true"></g:plusone>
</td>
<td width="60" align="center">
<script src="http://widgets.fbshare.me/files/fbshare.js" type="text/javascript">
</script>
</td>
<td width="60" align="center">
<script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script>
</td>
<td width="60" align="center">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5" type="text/javascript">
</script>
</td>
<td width="60" align="center">
<a href="http://pinterest.com/pin/create/button/?url={vb:raw  vboptions.bburl}/arcade/game-{vb:raw game.gameid}&media={vb:raw  vboptions.bburl}/images/arcade/{vb:raw  game.stdimage}&description={vb:raw game.title} -- {vb:raw  game.description}" class="pin-it-button" count-layout="vertical"  target="_blank"><img border="0"  src="//assets.pinterest.com/images/PinExt.png" title="Pin It"  /></a>
</td>
</table>
</div>

2. Still in v3ARCADE_PLAY


Find:
Code:
<!-- main -->
            <div class="blockrow">{vb:raw flashcode}</div>
Replace with:
Code:
<!-- main -->
<vb:if condition="$show['guest']">
<div class="standard_error">
    <h2 class="blockhead">Arcade Error Message</h2>
    <div class="blockbody formcontrols">
                <p class="blockrow">Sorry, guests cannot play games in the arcade, you must be a registered member of {vb:raw vboptions.bbtitle} to play games and submit scores.<br/><br/> This will also allow you to compete on our arcade leaderboards, play tournaments or challenge other players to a 1v1 match.<br/><br/> Registration is quick, free and simple. Click <a href="register.php">HERE</a> to join our site.</p>
    </div>
</div></vb:if>
<vb:if condition="$show['member']"><div class="blockrow">{vb:raw flashcode}</div></vb:if>
Save template

3. Open your footer template and add this to the bottom

Code:
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
Save template.

4. Open your v3arcade_headinclude template and at the bottom add this:
Code:
<script>var fbShare = {url: '{vb:raw href}',size: 'large',badge_text: 'fff',badge_color: '6666CC',google_analytics: 'true'}</script>
5. Goto Usergroups > Usergroup Manager > Unregistered / Not Logged In and change the Can View Arcade and Can Play Arcade to YES

History
11.05.12 - v1.04 - Revised code and some additional Facebook integration code
13.04.12 - v1.03 - Added Pinterest Integration. Removed support for Facebook Comments
19.12.11 - v1.02 - Fixed Facebook Comments
05.07.11 - v1.01 - Fixed problem with Twitter counter not updating
20.06.11 - v1.00 - Initial release

How To Add 'Pin It' button if upgrading (https://www.pinterest.com) -

Spoiler (click to open)


Here is how to add a Pin It (https://www.pinterest.com) button to your arcade.

Open your footer template and add this to the bottom and save.

Code:
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
This is the code you want to use in your arcade

Code:
<a href="http://pinterest.com/pin/create/button/?url=http://www.forumbanter.com/arcade/game-{vb:raw game.gameid}&media={vb:raw vboptions.bburl}/images/arcade/{vb:raw game.stdimage}&description={vb:raw game.title} -- {vb:raw game.description}" class="pin-it-button" count-layout="vertical" target="_blank"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
So if you want to add it to the rest of your bookmarks open the v3ARCADE_PLAY template and find your existing code (I'm using the default OP code as example)

Code:
<div class="collapse"><h3 class="blockhead">Share and Bookmark</h3>
<div class="blockrow" align="center">
<div> 
<table width="250" height="75" border="0" align="right">
<tr bgcolor="#d2e7fd"><td width="60" align="center">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall" count="true"></g:plusone>
</td>
<td width="60" align="center">
<script src="http://widgets.fbshare.me/files/fbshare.js" type="text/javascript">
</script>
</td>
<td width="60" align="center">
<script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script>
</td>
<td width="60" align="center">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5" type="text/javascript">
</script>
</td>
</table>
</div>
Replace it with

Code:
<div class="collapse"><h3 class="blockhead">Share and Bookmark</h3>
<div class="blockrow" align="center">
<div> 
<table width="300" height="75" border="0" align="right">
<tr bgcolor="#d2e7fd">
<td width="60" align="center">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall" count="true"></g:plusone>
</td>
<td width="60" align="center">
<script src="http://widgets.fbshare.me/files/fbshare.js" type="text/javascript">
</script>
</td>
<td width="60" align="center">
<script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script>
</td>
<td width="60" align="center">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5" type="text/javascript">
</script>
</td>
<td width="60" align="center">
<a href="http://pinterest.com/pin/create/button/?url={vb:raw vboptions.bburl}/arcade/game-{vb:raw game.gameid}&media={vb:raw vboptions.bburl}/images/arcade/{vb:raw game.stdimage}&description={vb:raw game.title} -- {vb:raw game.description}" class="pin-it-button" count-layout="vertical" target="_blank"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
</td>
</table>
</div>
Save the template.
Attached Thumbnails
Click image for larger version
Name:	pinterest_arcade.jpg
Views:	21
Size:	86.4 KB
ID:	137735   Click image for larger version
Name:	pinterest.jpg
Views:	21
Size:	77.1 KB
ID:	137736  

Close


If anyone wants to further develop any of my addons, you are free to do so.

Download

No files for download.

Screenshots

Click image for larger version
Name:	arcade1.jpg
Views:	469
Size:	80.1 KB
ID:	130237   Click image for larger version
Name:	arcade2.jpg
Views:	435
Size:	34.4 KB
ID:	130238   Click image for larger version
Name:	arcade3.jpg
Views:	307
Size:	79.3 KB
ID:	130240   Click image for larger version
Name:	pinterest.jpg
Views:	178
Size:	77.1 KB
ID:	137737  

Click image for larger version
Name:	pinterest_arcade.jpg
Views:	144
Size:	86.4 KB
ID:	137738  

Similar Mods

Show Thread Enhancements Google+1 / Facebook / Linkedin / Twitter Share Buttons vBulletin 4.x Template Modifications
Show Thread Enhancements Google Buzz, Facebook Share, Twitter On Thread vBulletin 4.x Template Modifications

vblts.ru supports vBulletin®, 2022-2024