Hello,
I'm trying to integrate vBulletin 5.0.x with Wordpress. Specifically, I'm trying to add the WordPress header and footer to show in vBulletin using Wordpress's functions get_header() and get_footer() that come from the file wp-blog-header.php in the WordPress installation folder. So I'm trying to figure out the following:
1) require the wp-blog-header.php file somewhere for vbulletin to use using require()
2) to figure out where to insert the php functions get_header() and get_footer()
I looked at this post:
https://vborg.vbsupport.ru/showthread.php?t=298770 and it gave some information on making an extension by adding a folder to the /core/packages folder and putting a class file there with a custom function that I could use in a template, but I couldn't find much information on how to create a product xml file. It seems important to do this because I can't register my extension in the Admin CP -> Products & Hooks -> Manage Products -> Add/Import Product without it.
I'm don't need to create hooks or templates, and this product I'm creating doesn't need any custom html. Here's the code I wrote so far:
PHP Code:
<?php
class wp_integrate extends vB_Api_Extensions
{
public $product = 'wp_integrate';
public $version = '1.0.0';
public $developer = 'me';
public $title = 'WordPress Integration Extension';
public $minver = '5.0.4';
public $maxver = '5.0.4';
public $infourl = '';
public $checkurl = '';
public $AutoInstall = 0;
public $extensionOrder = 9;
public function wpHeader(){
get_header();
}
public function wpFooter(){
get_footer();
}
}
I added these lines to the /core/global.php file because I couldn't figure out where to put a php require statement:
PHP Code:
define('ROOT_DIR',str_replace('\\\\', '/', realpath(dirname(__FILE__))).'/'); #Get real path for root dir ---linux and windows
require(ROOT_DIR.'../beta/wp-blog-header.php'); // get WordPress
So any help would be greatly appreciated - I couldn't find any docs on doing this after 6+ hours of searching.