The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Building a module that evaluates PHP
Hello,
Extreme newbie question here. I have a php function that I can call thru straight html pages like so: <?php require('BringIt.php'); print(BringIt(input=Database&style=last+user')); ?> How can I get Vbulletin to parse and process BringIt.php ? I've put it in the modules directory but still do not see any output. I first tried making a template that looks like: <tr> <td class="$bgclass"> <?php require('BringIt.php'); print(BringIt(input=Database&style=last+user')); ?> </td> </tr> And adding it to a module to no avail. Idea? Thanks in advance, BarbT |
#2
|
|||
|
|||
You can't put php in the template system. You have to add a new plugin, and put
PHP Code:
|
#3
|
|||
|
|||
Morning,
Thank you for your response! I went to New Plugins and created a new Plugin The new plugin has the code: $bringit = BringIt(input=Database&style=last+user) I saved it successfully. BringIt.php is in the /modules directory. Have I understood your instructions so far? Then I created a template that has: <tr> <td> $bringit </td> </tr> Is this correct, or did I miss a step? To recap, are these the right steps? 1.) put BringIt.php in the modules directory 2.) Create a Php module that calls it, consists of the one line, and associate a template with it 3.) Create a template that displays $bringit Thanks! BarbT |
#4
|
|||
|
|||
|
#5
|
|||
|
|||
Hi everyone,
Thank you all for your super ideas! After lots of playing around and methodical step-by-step attempts, I finally got it to work. This is rather gratifying to me because I'm a ksh master and an idjut in php. Thanks again for your help! Best wishes, Barbt |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|