PDA

View Full Version : WordPress and vBulletin integration


bronco92
03-16-2017, 09:59 PM
Hi all,

I followed this thread https://vborg.vbsupport.ru/showthread.php?t=302307 and I'v managed to import wordpress header and footer to vbulletin 5.2.5 but there is a problem that I can't solve as my PHP knowledge is not on high level.

I created two products (for header and footer) and two hooks (one for each product). Than I created two folders inside core/packages (for header and footer) and inside that folders I created /api folders and php files.

This is what I added in php file:


<?php
class wpFooter_Api_WordFooter extends vB_Api_Extensions
{
public $product = 'wpfooter';
public $version = '1.0.0';
public $developer = 'me';
public $title = 'WP Footer Extension';
public $minver = '5.2.5';
public $maxver = '5.9.99';
public $infourl = '';
public $checkurl = '';
public $AutoInstall = 1;
public $extensionOrder = 10;

public function wpFooter(){
require_once('../wp-blog-header.php');
return get_footer();
}
}


I also created custom template for footer with this content:


{vb:data wpfoot, wordfooter, wpFooter}
{vb:raw wpfoot}


For footer I used footer_before_body_end hook location.

As I said, header and footer are imported but the problem is that they are shown on top of the page, before any content.

How can I solve this? What I'm doing wrong?