The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
v3 Arcade Share Tools - Facebook, Google+, Twitter and More Details »» | |||||||||||||||||||||||||||||||||||||
v3 Arcade Share Tools - Facebook, Google+, Twitter and More
Developer Last Online: Nov 2023
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} 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}" /> 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> 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> 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> 3. Open your footer template and add this to the bottom Code:
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script> 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> 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 (www.pinterest.com) - https://vborg.vbsupport.ru/showpost....8&postcount=12 If anyone wants to further develop any of my addons, you are free to do so. Screenshots
Show Your Support
|
Comments |
#12
|
||||
|
||||
I can't reproduce any error. If you go to the facebook link below and enter the url of one of your games does it give any errors and does it pull the game information for that url? (ie - http://www.yoursite.com/arcade.php?do=play&gameid=789)
http://developers.facebook.com/tools/debug |
#13
|
||||
|
||||
Here is how to add a Pin It (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> 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> 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> 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> |
#14
|
|||
|
|||
Quote:
I know the cause but I cannot solve it. Facebook is not picking up any Opengraph meta tags, hence it doesn't know any of the parameters (this can be seen in the debugger tool. On your site, og: tags are visible in the source code, like this: Code:
<meta property="fb:app_id" content="snipped" /> <meta property="og:title" content="TOTWO" /> <meta property="og:type" content="website" /> <meta property="og:description" content="TOTWO is a pairs game. Click on the cards to see what is behind them, and try to match all the pairs before the time runs out! Have fun!" /> <meta property="og:url" content="http://www.forumbanter.com/arcade/game-873/" /> <meta property="og:image" content="http://www.forumbanter.com/images/arcade/totwo.jpg" /> Now, beyond that, I have tried adding suitable tags into the v3ARCADE_PLAY template, but Facebook still doesn't pick them up! Although they are visible in the source, Facebook's debugger doesn't "see" them. Oddly if, as a test, I put some manual tags in the v3ARCADE_MAIN template, Facebook DOES see them (though of course that's no use for this mod!) Bit weird and I've spent hours trying to figure it out to no avail. It's possible others haven't reported this, since unless you try clicking your own Facebook links (which most people probably won't do), they may not be aware it might not be working. |
#15
|
||||
|
||||
Quote:
Could you try this for me please. Open your v3ARCADE_PLAY template and search for: Code:
{vb:raw headinclude_bottom} 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}" /> Code:
<script>var fbShare = {url: '{vb:raw href}',size: 'large',badge_text: 'fff',badge_color: '6666CC',google_analytics: 'true'}</script> |
#16
|
|||
|
|||
Thanks Gemma, still doesn't seem to pick up the tags which is bizarre since they are visible in the source.
Debugger with a sample game URL: http://developers.facebook.com/tools...26gameid%3D162 |
#17
|
|||
|
|||
Wait...I've got it!
The debugger is seeing the standard no permissions error (as my site doesn't allow guests to play) and of course the og:tags are not sent on error pages! Your site has guest playing enabled hence the debugger works. Anyone without guest playing enabled cannot use the debugger. So now I need to run some tests, I will do that later. I have temporarily enabled guest playing. |
#18
|
||||
|
||||
Are you running any other Facebook plugins on your site? For example does this work if you disable Facebook Connect?
|
#19
|
|||
|
|||
Quote:
I have gone down the road of a workaround, such as seen here: http://www.bowlandcentral.com/forum/...lay&gameid=831 Basically it's a fiddle...guest view in the arcade is actually enabled, but a standard vBulletin conditional around the embed allows me to NOT display the game but instead display a message. This seems to allow the Facebook stuff to work correctly. I hate Facebook...trying to get Like buttons to post correctly to walls is sooooo awkward... |
Благодарность от: | ||
Gemma |
#20
|
|||
|
|||
Quote:
|
#21
|
||||
|
||||
In the template called footer. In the templates section of your admincp, select edit templates and scroll down to the one called footer. There is only one template called footer per style
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|