Log in

View Full Version : Insert external PHP file into template


PET
09-15-2008, 11:56 PM
Hello,

I want to insert a header.php and a footer.php in the template. How can I do that? Basicly I want the forum to have the header & footer of the website.

Thanks

Lynne
09-16-2008, 01:01 AM
From the manual - Including External Files (http://www.vbulletin.com/docs/html/templates_externalfiles)

PET
09-18-2008, 07:54 AM
http://www.nightclubwiz.com/bottom_forum.php

This is the page I want to add. It has some divs, some php code, some querys.

This is the plugin I created:

ob_start();
include('mypath.../bottom_forum.php');
$footer_external = ob_get_contents();
ob_end_clean();

and this is the error I get on the forum index:

Fatal error: Call to a member function query_read() on a non-object in forumpath...\index.php on line 318

Any sugestions please? Could there be a problem because the connection is made to another database to get the info?

Lynne
09-18-2008, 02:38 PM
It looks to me like you have not given it the proper parameters to connect to the database. Tons of these errors:
Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in D:\hosting\member\nightclubwiz\bottom_forum.php on line 84