vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Add-On Releases - v3 Arcade Integrate Facebook and Twitter (https://vborg.vbsupport.ru/showthread.php?t=262859)

Gemma 04-28-2011 10:00 PM

v3 Arcade Integrate Facebook and Twitter
 
1 Attachment(s)
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.

Jimandbob 04-29-2011 07:53 PM

Great Thanks :)

KW802 04-29-2011 08:05 PM

Nice! :cool:

MortysTW 05-03-2011 06:53 PM

Thank you

Alecsmith 05-06-2011 02:59 PM

Installed working perfectly :)

CK 05-30-2011 04:01 PM

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

How do you use the default facebook bar in vBulletin rather than they one included in this?

Great addon :)

dmm2020 06-19-2011 03:43 PM

Getting error:
The comments plugin requires an href parameter. - what I do?

Gemma 06-19-2011 03:48 PM

Did you add your Facebook Application ID where required?

dmm2020 06-19-2011 04:23 PM

Quote:

Originally Posted by Gemma (Post 2209943)
Did you add your Facebook Application ID where required?

Yes I did in both places.

What I am reading, is facebook changed the parameters and there should be a href paramter right after fb:comments, just can't figure out how it can be fixed.

Edit: Ahem...no I did not. I edit the scores one but in v3ARCADE_PLAY there are two places there. Problem resolved

dmm2020 06-19-2011 05:46 PM

Once I realized I hadn't edited the app id in the play template, I did that and problem fixed.

Anyway, code changes applied and still works. Thanks.


All times are GMT. The time now is 02:54 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.01091 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete