The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Complete Wordpress/Vbulletin Bridge - Share Users And Postings Details »» | |||||||||||||||||||||||||||
Complete Wordpress/Vbulletin Bridge - Share Users And Postings
Developer Last Online: Oct 2022
DOES NOT WORK FOR Vbulletin 4.x This version probably no longer works for Wordpress 3.x. I have started developing this product over and have released the NEW version here: http://www.lampwrights.com/showthread.php?t=41 This mod bridges your Vbulletin users over to Wordpress. You can also use Vbulletin as your comment engine instead of the spammy one built into Wordpress. You can display the comments inline in your post. You need not use the comment feature, if your only interested in sharing users. You can map your Vbulletin Usergroups to Wordpress Usergroups and those users will then be recognized as registered Wordpress users. For example, user "Joe" registers at your forum and logs in. Joe then clicks on your Wordpress page. Joe is instantly added to the Wordpress user base with the permissions you set for his usergroup. In otherwords, if a user comes over belonging to the "Registered User" group, you can select that he is placed in the Wordpress "Subscriber" usergroup. If you change a users group from vbulletin, it will automatically change in Wordpress. Requirements:
01/03/2007 - Fixed the unlock_tables() issue on some setups. 01/03/2007 - Fixed a bug in the script that if you used a MySQL database prefix, integration would not work. Please see this post for more information! Special thanks to axisoverdrive for giving me access to his server and letting me troubleshoot the issue! 01/05/2007 - Fixed issue where if a user saved (not published) and published later, the post would not be added to the forum. 01/05/2007 - When a post is edited, it will also be edited in the forum. 01/08/2007 - Modified slightly so when posts are edited, so are the titles (if edited). 02/07/2007 - Major modifications to new version (now 2.05). The list follows:
Special Thanks: axisoverdrive - Debugging Help, Kyraal - Paypal Donation, Kalina - Paypal Donation, Wildcard27 - Paypal Donation, Shri - Paypal Donation, pspcrazy - Paypal Donation, Tomahoochi - Paypal Donation. If you use this plug-in, and find it useful, please support us by nominating us for Mod Of The Month (MOTM) in the top right corner of this thread, or feel free to donate. Show Your Support
|
Comments |
#102
|
|||
|
|||
Quote:
What is the technical reason for Wordpress and vBulletin needing to share the same [MySQL] database, and is there any possibility of separating the two to use separate databases? |
#103
|
|||
|
|||
Quote:
If you open the plugins.php file you will note: Code:
wp_redirect('plugins.php?activate=true'); } else if ('deactivate' == $_GET['action']) { check_admin_referer('deactivate-plugin_' . $_GET['plugin']); $current = get_settings('active_plugins'); array_splice($current, array_search( $_GET['plugin'], $current), 1 ); // Array-fu! update_option('active_plugins', $current); do_action('deactivate_' . trim( $_GET['plugin'] )); wp_redirect('plugins.php?deactivate=true'); Nobody has reported any problems activating the plug-in. You should note however, that there are issues with the plugin page in wordpress because it uses AJAX and the developers did not take into account all the possible cache settings browsers/ISP's may be using. You can google: wordpress plugin page AJAX, to see more about this. |
#104
|
|||
|
|||
Quote:
http://www.google.com/search?hl=en&l...22&btnG=Search However, from what I understand, PHP 5.x has addressed this issue. I may be able to rewrite the code to take that into consideration, but honestly, it is so easy for them to share the same database, that using two connections would just be a waste of resources. If you are vaguely familiar with phpMyAdmin or other such MySQL applications (navicat, etc) you can easily merge databases. There are many pages on the net that show how to merge databases, and here is one: http://www.everymanhosting.com/forum...d122ddc0190861 |
#105
|
|||
|
|||
I just finished testing this on a 2.1 platform. Appears to be running smoothly. You should be fine, but as always, backup all your mysql data and files before you upgrade just in case there is something I didn't catch.
|
#106
|
|||
|
|||
Yep, I also got it to work on Wordpress 2.1 earlier this afternoon.
Thanks! (BTW, hate to be a pain, but i was never able to get the disable "post to a forum" option to work. Any ideas?) |
#107
|
|||
|
|||
Quote:
I was also having session issues because we have a login box in the upper corner on our theme. This submits to the vB login.php file so it can set up the appropriate session cookies there before shooting back to WP. I created a small vB plugin to redirect back to the WP install if that's where you were logging in from. So, there were some cookie domain and path issues because we have the scripts in /board/ and /WP/. The cookies are *supposed* to be setting with .domain.com and / for the domain and path respectively. But they weren't due to the $vbulletin global not being available inside of the vbsetcookie() function. This is because you were calling require_once('./includes/init.php'); inside of vb_Init(). Since it's inside of that function, things get messed up further down the call stack. I commented that out (along with the CWD stuff) and just put a require_once('./global.php'); to be done with it. Nothing vB does interferes with WP, so it's safe to do so. That fixed it getting the correct domain settings and such. However, I noticed you weren't using the built-in vB session handler. I'm not sure why you'd want to do this, since the code is much more robust and production-tested. So, I took out the define at the top, and converted all the $vbuser stuff to $vbulletin->userinfo, and it runs perfectly now. The last issue was also with the login box. When you're logged in, it says your name and shows a log out button. However, you had to refresh the page at least once for this to show up, as the bridge code is setting a cookie, but not setting the current user for the current execution of the script. So, I just added a set_current_user($results->ID,$vbulletin->userinfo['username']); to vb_Init() after the setup_userdata() calls, and that fixed everything. I'd also recommend you do some proper formatting on this code. It's a harder to work with when there isn't standard formatting throughout. The tab key is your friend :up: |
#108
|
|||
|
|||
Quote:
I need to clarify my reasons for wanting|needing a separation of d/bs between WP & vB: it basically boils down to 2 factors - security & server load balancing. The hosting company we're using for our vB 3.6.4 forum is quite restrictive and a recent request to upgrade from PHP4 to PHP5.2.0 resulted in PHP 5.0.4 being installed & running under CGI in Apache [was not CGI under PHP4], also register_globals is enabled under PHP 5.0.4 [CGI], I have a feeling things are going to go pear-shaped very soon . From a security POV I would prefer to have 2 separate MySQL d/bs for WP & vB respectively, although it probably won't make a huge difference, it might limit some damage. ITO load-balancing, the option of being able to run a separate MySQL server [b] for WP and other stuff, and keep the PHP for WP & vB running on the same server [a] that vB has its d/b on. |
#109
|
|||
|
|||
Quote:
I've got a question on this, I'm thinking of using Wordpress as my CMS for the site, as I'm fed up of my site looking like every other forum based site. So does this preclude me from using wordpress as the front end as users will have to have logged into VBulletin firstly ? |
#110
|
|||
|
|||
Quote:
Quote:
Also, if you require ./globals from inside a function, you are going to get init errors from VB under certain circumstances. This is why init was called instead inside the vb_Init function. I am assuming that since you have clicked uninstall on the plugin, you may have figured this out already. Quote:
I never agreed with what some call "proper formatting". I have been coding in this style since I started scripting. Spacing everything out with tabs has only confused me when writing/reading code. There are some times when I might use it when I want a particular block to stand out while I scan over code. This is just a personal preference of my own, like reading from left to right. |
#111
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|