jdaw
04-01-2010, 07:48 PM
This issue had me running in circles. I am not a coder, so everything was a pain in the wazoo. I thought to lay out the various methods you can use to integrate vBulletin into your website so that it has the same header and/or body. Hopefully this will save someone a little trouble.
If you have Wordpress as your website (CMS), you can call the header and footer with a simple plugin in vBulletin. This isn't as complicated as it sounds.
First you will need to create your plugins. To start, log in to your vBulletin admin and navigate to “Plugins and Products” toward the bottom of the main list. Next, click on “Add New Plugin”.
Now you need to fill in the various fields.
For Product, select “vBulletin”.
For the Hook Location select “global_start”.
For Title simply type something that describes you plugin like Header, or Footer, etc.
Leave the “Execution Order” at 5 or whatever the default value is.
The “Plugin PHP Code” is a little more complicated.
These are two separate plugins.
// Header
ob_start();
include '../blog/wp-conent/themes/your-theme/includes/header.php';
$wp_header = ob_get_clean();
// Footer
ob_start();
include '../blog/wp-content/themes/your-theme/includes/footer.php';
$wp_footer = ob_get_clean();
The $wp_header and $wp_footer are the commands you will enter in the vBulletin header and footer templates to call the plugin. On the main menu navigate to “Styles and Templates” and click on “Style Manager”. Next, select “Edit Templates” from the drop down menu. Enter $wp_header at the beginning of the header template and $wp_footer at the beginning of the footer template.
You can also try an iframe, however the url in the address bar won't update and probably wouldn't word for bookmarking.
<iframe src ="path to forum" width="your width" height="your height">
<p>Your browser does not support iframes.</p>
</iframe>
Things can get pretty complicated. If the iframe isn't sizing properly there are various scripts you can try.
http://www.kaali.co.uk/index.pl?art=94
http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx
There is more to come.
If you have Wordpress as your website (CMS), you can call the header and footer with a simple plugin in vBulletin. This isn't as complicated as it sounds.
First you will need to create your plugins. To start, log in to your vBulletin admin and navigate to “Plugins and Products” toward the bottom of the main list. Next, click on “Add New Plugin”.
Now you need to fill in the various fields.
For Product, select “vBulletin”.
For the Hook Location select “global_start”.
For Title simply type something that describes you plugin like Header, or Footer, etc.
Leave the “Execution Order” at 5 or whatever the default value is.
The “Plugin PHP Code” is a little more complicated.
These are two separate plugins.
// Header
ob_start();
include '../blog/wp-conent/themes/your-theme/includes/header.php';
$wp_header = ob_get_clean();
// Footer
ob_start();
include '../blog/wp-content/themes/your-theme/includes/footer.php';
$wp_footer = ob_get_clean();
The $wp_header and $wp_footer are the commands you will enter in the vBulletin header and footer templates to call the plugin. On the main menu navigate to “Styles and Templates” and click on “Style Manager”. Next, select “Edit Templates” from the drop down menu. Enter $wp_header at the beginning of the header template and $wp_footer at the beginning of the footer template.
You can also try an iframe, however the url in the address bar won't update and probably wouldn't word for bookmarking.
<iframe src ="path to forum" width="your width" height="your height">
<p>Your browser does not support iframes.</p>
</iframe>
Things can get pretty complicated. If the iframe isn't sizing properly there are various scripts you can try.
http://www.kaali.co.uk/index.pl?art=94
http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx
There is more to come.