The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
A simple question: is there any way to include PHP scripts using the standard method of code inside <?php ?> tags inside a notice? I tried it ( <?php phpinfo(); ?>), but it doesn't seem to work. Javascript appears to work, though.
|
|
#2
|
||||
|
||||
|
You could use the php script in a plugin assign it a variable and use that variable in the notice.
|
|
#3
|
||||
|
||||
|
Sorry to be a pest, but how would I assign the script in a plugin a variable? THanks!
|
|
#4
|
|||
|
|||
|
You could create a plugin using hook parse_templates, and code like this:
Code:
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('template_name', array('phpinfo' => $phpinfo));
Of course you want to change 'template_name' to the name of the template you want to insert the code in. Then in that template you can use Code:
{vb:raw phpinfo}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|