The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Php file in vbulletin [help]
Hello. First of all I'm not sure if this is the correct place to post this, but I do it anyways. Sorry if its incorrect, and feel free to move/delete my post.
Anyways, I'd like to refer to these URLS: https://www.vbulletin.com/forum/show...letin-template https://www.vbulletin.com/forum/show...18#post1066718 In the last URL it's pretty much answering all of my isses, but ONE. At the bottom of hes thread he says this: Note: If you wish to include() multiple PHP files, make sure you use ob_clean() before each include() to reset the buffer. Alright. So I DO want to include multiple PHP files, but I want one file on seperate templates. My guess would be to set an value to each of the includes, or rename the second "$includedphp" to "$includedphp1". But I'm very new to coding, and I actually dont dare to mess around with it too much. So, to summary my thread: I want to include 2(multiple) .php files into vbulletin. I've managed to include 1(single) .php file into vbulletin. I've got php file 1 on template 1 I want php file 2 on template 2 What he explains how to do, is to have 2 php files on one template. Now, as said before I'm very new to the php language, and programming generally, so dont shot me if anything I say is incorrect^^ All I want is to understand how to... do what I've asked for Thanks in advice! |
#2
|
|||
|
|||
If you wanted to include multiple files you could do this:
Code:
ob_start(); include('path/to/this/file/myfile.php'); $includedphp = ob_get_contents(); ob_clean(); include('path/to/this/file/myfile1.php'); $includedphp1 = ob_get_contents(); ob_clean(); include('path/to/this/file/myfile2.php'); $includedphp2 = ob_get_contents(); // etc ob_end_clean(); Of course you can name the variables anything you want (they don't have to be $includedphp, they could be $myfile, $myfile1, etc). |
#3
|
|||
|
|||
Thanks, Not yet tested it, but it seem to be exactly what I needed
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|