For those who want to run external PHP applications within vb style, I created a php test webtemplate which you can use. Here is instructions to use it:
1- First import this attached XML file for sample webtemplate in your admin cp/Logician's Webtemplates/export-import/
Import Webtemplates section.
2- Then go to your webtemplate list find the new webtemplate named "phptest2" and click edit.
3- Find section that says
PHP Code:
// ============================
// Put Your PHP CODE right after this line
// ============================
4- Put your external PHP application's code AFTER the line like this
PHP Code:
// ============================
// Put Your PHP CODE right after this line
YOUR CODE GOES HERE WITHOUT // AT THE BEGINING
// ============================
Here is a sample:
PHP Code:
// ============================
// Put Your PHP CODE right after this line
echo "Time now is $today<br><br>";
echo "You registered this board at ".date('M-d-Y h:i:s',$vbulletin->userinfo[joindate]);
// ============================
Important Note:
Webtemplates main goal is NOT running PHP code or integrating PHP code with vbulletin, this is just an additional bonus which can sometimes work for certain applications. Integrating any PHP application with vbulletin is usually is not as easy as that. When you have 2 PHP applications (vbulletin and your other application) running at the same time, you are likely to have unexpected problems. For instance they can have same function names and they can clash, have same variable names and overwrite eachother's variables etc. Trying to integrate 2 PHP applications usually requires a lot of work on code level of both applications. So this method is likely to NOT work for many applications. However if your application is not very advanced and you are lucky that it does not have any clashing issues with vbulletin, you might run it like this. If you are able to run it with this method, you should be very happy but if you can't please don't blame the hack which as nothing to do with this, nor intended to do handle such a project. So I'm sharing this tip "as is" basis, hoping it can help "some" people around but stressing again that Webtemplate Hacks intention is not provide PHP integration with external scripts.