The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to include code in misc.php
I have a chunk of code in a plugin In which I include in misc.php in vbulletin to display.
The problem is it always shows at the top. I want to make this its own page in misc.php with its own block instead of at the top of the page above the header. Any help would be great. Here is an example code. Code:
if (isset($_GET['test'])) if ($_GET['test] == 'true') { if (!$vbulletin->userinfo['userid'] OR !($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])) { print_no_permission(); } require_once('page.php'); } |
#2
|
||||
|
||||
You have to kill the script (with exit()), otherwise, the rest of misc.php will still run.
|
#3
|
||||
|
||||
Quote:
I want to have a box on misc.php Right now the include is at the very top above the header and all. I am trying to have its own space there on the page. |
#4
|
||||
|
||||
You don't say what is in your php script, but perhaps you shouldn't echo (I'm guessing that is what you are doing) and instead set a variable with the results which you can put wherever you want on the page.
|
#5
|
||||
|
||||
I am including a php file with a form and a bunch of if statements.
it all runs just fine only problem is it stays at the very top. |
#6
|
||||
|
||||
Ok, but what method are you using to output the results from your php file? If you are using echo, then it will go into the page wherever the code gets called which is not necessarily where you want it.
|
#7
|
||||
|
||||
ok I got it I had to make a plugin for just the ob code stuff.
Ok all done here is what I came up with. https://vborg.vbsupport.ru/showthread.php?t=211677 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|