PDA

View Full Version : Cannot make a php include work in my footer template


Tom McConnell
08-07-2008, 06:56 PM
I have used the following help files:

http://www.vbulletin.com/forum/showt...18#post1066718

http://www.vbulletin.com/docs/html/t..._externalfiles

but cannot make a php include work in my footer.

I enabled in vBulletin Options -> Plugin System

I made myfile.php

ob_start();
include('http://www.3dmypage.com/myincludes/3dmypage_foot_neut.php');
$includedphp = ob_get_contents();
ob_end_clean();

and put it in the http://3dmypage.com/forums/includes/ directory (the help files do not tell you what directory to use).

I put : $includedphp in the footer template at the very bottom.

End result (no footer menu): http://3dmypage.com/forums/

The included footer menu should look like the bottom of this: http://www.3dmypage.com

RLShare
08-07-2008, 07:42 PM
You need to create a plug-in that has this code in it for it to work.


ob_start();
include('http://www.3dmypage.com/myincludes/3dmypage_foot_neut.php');
$includedphp = ob_get_contents();
ob_end_clean();


Try global start for the hook location.

Opserty
08-07-2008, 08:35 PM
You're not following the instructions given in the help files...

It doesn't say anywhere to create a new file (myfile.php) and add that PHP code. Follow the documentation thoroughly and you have more chance of it working.

http://www.vbulletin.com/docs/html/templates_externalfiles

Tom McConnell
08-08-2008, 04:50 AM
For all newbies, to create a plug-in go to;
Control Panel Home -> Plugins & Products (bottom of left panel) -> Add New Plugin

It works now. Help file would be more clear if the line "Create a Plug-in for global_start with these contents:" had some direction for creating a plug-in. If you search the manual for "create plug in", nothing returns for actually creating a plug-in. Remeber, some of us are new to this.

Opserty
08-08-2008, 09:30 AM
There is a whole section on the Plugin System (http://www.vbulletin.com/docs/html/plugin_system) further down the right hand side menu. :)

Tom McConnell
08-08-2008, 12:48 PM
Read all that before post.

But how nice if somewhere near the begining of the plug-in section there was a line "Control Panel Home -> Plugins & Products (bottom of left panel) -> Add New Plugin"

I am done with this. It works.

Thank you, again.

RLShare
08-08-2008, 09:17 PM
It says Plugins & Products right in the menu of that section of the admin panel, its really kind of hard to miss. And if you expand that It says add new plug-in. I do not see how its hard to find for anyone.