I need to know how to include and pull info from vB (like member name, categories, etc) into my Wordpress. I'm assuming I need to require_once global.php, but I don't seem to be doing something correctly. This is what I'm using now: PHP: <?php chdir("/home/USER/public_html/forum"); require('/home/USER/public_html/forum/global.php');chdir("./");?>
Re: Info In Wordpress? (Do Not Move) What was your expect result and what is your actual result? The code above doesn't really have any output. That is, global.php doesn't create any output for the screen.
Re: Info In Wordpress? (Do Not Move) Without a bit more information, it's not possible to help much. Here's a couple things that could be going wrong though. Firstly, make sure you initialize variables, which could be why you're not seeing the expected output. Secondly, make sure the file is correct. You shouldn't have to use chdir or anything else, but using require , include (or require_once, include_once) should be enough to at least get you started.
Re: Info In Wordpress? (Do Not Move) One easy way to pull the "Latest Threads" list into your WordPress Sidebar, is to use the RSS Feed option in WordPress and import them from your forum.
Re: Info In Wordpress? (Do Not Move) Sorry for the vagueness, I was ready to hit the sack when I wrote that. When I tried to include the global.php, it spits out the following error on any WP page: I'm not a coder, so this "initialize variables" is greek to me. But one of the things I'm looking to do is display the username (if logged in) and to output a list of the main-level forum categories.
Re: Info In Wordpress? (Do Not Move) Not sure about the first error, but the second one speaks for itself. You're trying to use $db->query_first_slave without actually initializing $db first My guess is that the first error is trying to pull a fetch_array statement and it's complaining because it's not an array. Make sure that whatever instructions you have followed are followed perfectly, and that any includes come before anything
Re: Info In Wordpress? (Do Not Move) There are no instructions, per se. I'm trying to piece together some code I'm finding on Google to do this. And please explain "initializing" for me. I'm not really a PHP coder. Or much of a coder at all.
Re: Info In Wordpress? (Do Not Move) Ok, so I removed the "require" code from the WP template's header.php file and added it to wp-config.php, which I read about on another forum. I also changed the code I inserted to this: PHP: define('CWD', '/home/{USER}/public_html/forum'); define('VB_AREA', 'Forum');require_once('./forum/includes/init.php');require_once('./forum/global.php'); And now I get the following error(s) when I visit the site:
Re: Info In Wordpress? (Do Not Move) I've never been able to get past the header already sent error on wordpress so I can't help you much.
Re: Info In Wordpress? (Do Not Move) I just did, now I need to know how to show a variable output (like the "$bbuserinfo[username]"). If it's successful, I'll share my findings here.
Re: Info In Wordpress? (Do Not Move) I'm not pulling the latest threads, though. I'm trying to display the username/login box, and show a list of the forum categories in a sub-menu. Now if there's a plugin for that, lead me to it, because this is giving me headaches.
There are actually some plugins where you can sync users or use vB as a comment system, but none of them are the type that I need. I agree with you, though. With both being very popular scripts, that would be a killer bridge.