Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3 Arcade Integrate Facebook and Twitter Details »»
v3 Arcade Integrate Facebook and Twitter
Version: 1.01, 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: 04-28-2011 Last Update: Never Installs: 16
Template Edits
Re-useable Code  
No support by the author.

What does this do?

This will add a Twitter button to your arcade playing area (v3ARCADE_PLAY template), allowing the user to update their Twitter status about your arcade/game they are playing. It will also add a Facebook button to allow publishing to Facebook and a Facebook comments box (optional) to the same area.

And it will add a Facebook comments box to your highscore table where users can publish scores/comments to their Facebook wall.

(see attached images).

Open your v3ARCADE_PLAY template

Find:

Code:
</div>
            </div>
            <!-- /right area-->
        </td>
    </tr>
</table>
Add above:

Code:
<div class="collapse"><h3 class="blockhead">Share A Link On Twitter</h3>
<div class="blockrow" align="center">
Share a link to {vb:raw game.title} on Twitter<br/><br/>
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div></div>
<div class="collapse"><h3 class="blockhead">Share This Game Link on Facebook</h3>
<div class="blockrow" align="center">
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank"><img src="{vb:raw vboptions.arcadeimages}/Facebook-Social-Bar-128.png"></a><br>If you like {vb:raw game.title} you can share our game link with your Facebook friends.</div></div>
<div class="collapse"><h3 class="blockhead">Leave A Comment</h3>
<div class="blockrow" align="center">
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script><fb:comments expr:xid="APP_ID" simple="1" css="{vb:raw vboptions.bburl}/fb_comments.css" numposts="0" width="300" publish_feed="true"></fb:comments>
</div>
You will need to replace APP_ID with your Facebook Application ID (both instances). If you use a different image you will also need to alter this line <img src="{vb:raw vboptions.arcadeimages}/Facebook-Social-Bar-128.png">

Save the template.

Open v3ARCADE_SCORES

Find:

Code:
        </td>
    </tr>
</table>
{vb:raw footer}
Add above:

Code:
<div class="threadlisthead table">
                    <span class="threadinfo">
                        <span class="threadtitle">
                            Enjoyed a game? Got a good score? Tell your Facebook Friends about it!
                        </span>
                    </span>
                                    </div>
<center><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script><fb:comments expr:xid="APP_ID" simple="1" css="{vb:raw vboptions.bburl}/fb_comments.css" numposts="0" width="425" publish_feed="true"></fb:comments><br/><br/>
<div>Please finalise your comments in the game highscore table to ensure the correct url is sent (click the Add Comment button)<br/>before posting any comments to Facebook. Thanks
</center></div>
You will need to replace APP_ID with your Facebook Application ID (both instances)

Save the template.

Extract the contents of the facebook.zip archive. Upload fb_comment.css to your forum root and Facebook-Social-Bar-128.png to your images/arcade folder (or if you are using your own image upload it to images/arcade)

Change log version 1.0 to 1.01
Update code to fix 'The comments plugin requires an href parameter' error in Facebook Comments plugin.

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

Download Now

File Type: zip facebook.zip (6.9 KB, 52 views)

Screenshots

File Type: jpg tweet.jpg (39.8 KB, 0 views)
File Type: jpg fb1.jpg (50.0 KB, 0 views)
File Type: jpg fb3.jpg (100.9 KB, 0 views)
File Type: jpg fb4.jpg (45.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
nacaruncr

Comments
  #12  
Old 06-19-2011, 06:39 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated 19.06.2011

Change log version 1.0 to 1.01
Update code to fix 'The comments plugin requires an href parameter' error in Facebook Comments plugin.

To apply the fix simply re-apply the code changes.
Reply With Quote
  #13  
Old 06-20-2011, 04:52 PM
dmm2020 dmm2020 is offline
 
Join Date: Apr 2010
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a note to those not aware with this mod. If you get an error related to "database down" when trying to post a comment, that means either the connection to facebook can not be made or database is down AT facebook. It is not an error in the mod. This one is a great one.
Reply With Quote
  #14  
Old 06-20-2011, 05:19 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Newer version - https://vborg.vbsupport.ru/showthread.php?t=265545
Reply With Quote
  #15  
Old 05-09-2012, 02:13 PM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome Gemma!!!!!!!!!!!!!
Reply With Quote
Reply


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 09:00 AM.


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.04021 seconds
  • Memory Usage 2,280KB
  • Queries Executed 20 (?)
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
  • (4)bbcode_code
  • (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
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)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