![]() |
Using External PHP Pages
Im trying to include an external php file in the VB template. I found this tutorial. I've added the following plugin with Global_Start as the Hook Location.
Plugins are Enabled in VB Options and the plugin itself is activated too. Code:
ob_start(); include('/home/.../bh_includes/head_common.php'); Nothing is showing up in my template though. |
You need to add this:
PHP Code:
|
Thanks
Where would i include that? |
<a href="https://vborg.vbsupport.ru/showthread.php?t=242454" target="_blank">[vBulletin 4] Simple way of including an external PHP file</a>
|
Quote:
|
So this is what i have right now:
Code:
ob_start(); include('/home/XXXX/public_html/bh_includes/head_common.php'); Its still not working |
Sorry, I probably confused you with my error. This should work:
PHP Code:
with this in the header template: {vb:raw includedheader} (the variable names needed to match in the ob_get_contents() and preRegister lines). |
I have a very similar question. My site is www.wavingthewheat.com
I am using a php script to count the number of rows in a table on the database. The script is loaded at www.wavingthewheat.com/chatuser.php I am trying to have the output of that file displayed in my navbar template. I have created a plugin with the following code PHP Code:
The php script works and displays the number of online users, however I can't get anything to display in the template using the plugin. |
Quote:
|
Quote:
That worked. Thanks a bunch. --------------- Added [DATE]1314819916[/DATE] at [TIME]1314819916[/TIME] --------------- I must the most idiot on this forums. I'm trying to include a second php file (for footer this time) and am having problems again. This time this is what im using: Code:
ob_start(); That doesnt work either. I changed the includedphp to includedfphp because using just the includedphp didnt work. I assumed it was because that variable was already being used elsewhere so i changed it (nothing happened though) |
All times are GMT. The time now is 04:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|