Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
v3 Arcade Share Tools - Facebook, Google+, Twitter and More Details »»
v3 Arcade Share Tools - Facebook, Google+, Twitter and More
Version: 1.0.4, by Gemma Gemma is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 06-19-2011 Last Update: Never Installs: 26
Template Edits
Re-useable Code  
No support by the author.

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 (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

File Type: jpg arcade1.jpg (80.1 KB, 0 views)
File Type: jpg arcade2.jpg (34.4 KB, 0 views)
File Type: jpg arcade3.jpg (79.3 KB, 0 views)
File Type: jpg pinterest.jpg (77.1 KB, 0 views)
File Type: jpg pinterest_arcade.jpg (86.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
CK, KW802

Comments
  #22  
Old 05-10-2012, 07:13 AM
tidus78's Avatar
tidus78 tidus78 is offline
 
Join Date: Sep 2009
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
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
No,it links to front page of the forum
Reply With Quote
  #23  
Old 05-10-2012, 07:51 AM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are some other posts earlier in this thread about opengraph meta tags - https://vborg.vbsupport.ru/showpost....3&postcount=14 which may need to be implemented.

Quote:
Originally Posted by tidus78 View Post
No,it links to front page of the forum
That is probably happening if your arcade isn't set to allow guests to play games.

In your usergroup settings for Unregistered/Not Logged In you would need to set Can View Arcade and Can Play Arcade to YES. Then in your v3ARCADE_PLAY template find:

Code:
<!-- main -->
            <div class="blockrow">{vb:raw flashcode}</div>
Replace that with:
Code:
<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>
Changing the error message to suit your own needs.
Reply With Quote
  #24  
Old 05-10-2012, 04:51 PM
tidus78's Avatar
tidus78 tidus78 is offline
 
Join Date: Sep 2009
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried but no results...

Reply With Quote
  #25  
Old 05-11-2012, 02:52 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated: Revised code and some additional Facebook integration code.

Quote:
Tried but no results...
Not sure

Did you try the additional steps in previous posts - adding the OG meta tags and making your arcade available to guests?

Do you have any other Facebook integration mods installed (other than the standard Facebook Connect that comes with the vbulletin software) that could be conflicting?
Reply With Quote
  #26  
Old 05-12-2012, 11:13 PM
tidus78's Avatar
tidus78 tidus78 is offline
 
Join Date: Sep 2009
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look at the URL,is it a SEO problem?

http://www.console-planet.it/arcade....lay&gameid=128
Reply With Quote
  #27  
Old 05-13-2012, 12:19 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tidus78 View Post
Look at the URL,is it a SEO problem?

http://www.console-planet.it/arcade....lay&gameid=128
Looking at your source code you have two sets of OG meta tags. One for your site information and this one. The one for your site information is conflicting with this one. Even if you try displaying an arcade url from your site directly onto your Facebook page you will get the same results.

Do you have any other Facebook modifications installed?
Reply With Quote
  #28  
Old 05-15-2012, 06:16 PM
tidus78's Avatar
tidus78 tidus78 is offline
 
Join Date: Sep 2009
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes,this one : https://vborg.vbsupport.ru/showthread.php?t=266159

I tried to disable it but no results...
Reply With Quote
  #29  
Old 06-23-2012, 08:13 AM
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Location: Vienna
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Gemma, for my site, facebook etc still picks up the site information instead of the game info
Any solution for that? Did it like mentioned in the install in the first post and post 14
Reply With Quote
  #30  
Old 06-23-2012, 10:36 AM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Datenpapst View Post
Hey Gemma, for my site, facebook etc still picks up the site information instead of the game info
Any solution for that? Did it like mentioned in the install in the first post and post 14
I've updated the opening post, to get Facebook to work you need to include step 2 and also set the usergroup permissions mentioned in step 5

5. Goto Usergroups > Usergroup Manager > Unregistered / Not Logged In and change the Can View Arcade and Can Play Arcade to YES

Then, hopefully, it should work as intended
Reply With Quote
  #31  
Old 06-23-2012, 02:39 PM
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Location: Vienna
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



Did as you said.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06494 seconds
  • Memory Usage 2,356KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete