Thread: Integration with vBulletin - YAFB - Yay! Another Facebook Bridge
View Single Post
  #254  
Old 10-14-2009, 12:59 PM
Calash's Avatar
Calash Calash is offline
 
Join Date: Jun 2006
Location: East Coast, USA
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Hmm, look like I should start building migration tool to help people using this product. Hehe
I know going from Facebook Connect to vBnexus was fairly easy. It just requires a query to migrate the Fbid -> vbid table, then a second to create the settings.

Going from vBnexus to here should not be that difficult. The key will be to filter out the Google Connect information.

Ill take a look at it on my test site and see what would need to be done.


Edit:

This query gets the info from vBnexus to your fields in the user table. Facebook users still have to reconnect so the default settings on Facebook side work but it is pretty painless. Still testing, but feel free to use the code if it will help.

Code:
UPDATE vb_users as a, vb_vbnexus_nonvbuser as b
SET a.fbuid = b.nonvbid
WHERE b.type=1 AND a.userid = b.userid
vb_ should be replaced with your table prefix. I tested this on my test site, linking to a new FB application and it worked.

A similar query should work for migrating from Facebook Connect

Code:
UPDATE vb_users as a, vb_fbuser as b
SET a.fbuid = b.fbuid
WHERE b.type=1 AND a.userid = b.userid
This block is untested but should work.



On a side note, this seems to have some issues with scripts outside of the vb forum path. The Navbar link should probably have the bburl variable in it to correct the problem.


Double Edit:


The fbb_navbar_button template is to blame for this. By adding the bburl variable to the facebook.php path it now works outside of the vBulletin directory.


Code:
            <td id="navbar_fbb" class="vbmenu_control">
                <a id="navbar_fbb_link" href="$vboptions[bburl]/facebook.php" rel="nofollow">
                    <img src="$vboptions[bburl]/fbb/facebook_logo_16x16.gif" width="16" height="16" border="0"/>
                    $vbphrase[fbb_navbar_button_text]
                </a>
            </td>


Sorry if I went overboard there. When I get on a roll it is hard to stop me sometimes
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete