View Full Version : Add php script to custom page
renderst
06-21-2004, 12:54 PM
Hi, i need to include a php script (a calculator) into a custom page i just made.
How would i go about doing that?
renderst
06-21-2004, 12:55 PM
it doesnt work for me because vbulletin cannot parse php.
Brian
06-21-2004, 01:56 PM
There are instructions on how to do this in the User's Guide located in the Members Area here. ;)
renderst
06-21-2004, 03:13 PM
theres nothing about it in the users manual. Where can i find the users guide
ixian
06-21-2004, 05:22 PM
By reading this site, of course;)
http://www.vbadvanced.com/membersarea.php?do=usermanuals
renderst
06-21-2004, 08:15 PM
um maybe im blind.. but i cannot find it
DarknessDivine
06-21-2004, 08:23 PM
Adding a Module That Includes a PHP File
Now for our next example, we will add a module that will include a PHP file. The PHP file may be an add-on module which you have downloaded from here, or it could be one that you've created yourself. For more information and tips on creating new modules, please see the Developer Tools section of this guide.
1. Log into your server with an FTP client and upload your PHP file to your /forums/modules/ folder. Please note that all modules must be in this folder.
2. Log into your Admin CP.
3. Click on the 'Add Module' link listed under 'vBa CMPS' in the left frame. You will be given a few options here as shown in this screen shot:
Here is where you will want to set the options for the new module.
Title - Simply enter a title that you would like to be displayed when managing the module through the Admin CP. Please note that this will be the only place that the title is displayed.
Module Identifier - In most cases, this field may be left blank. If you know what you are doing and have a use for this, then enter whatever you would like to use as the module's identifier here.
File to Include - This is where you will choose the file to include for your new module. The select box will list all files that are in your /forums/modules/ folder, so simply select the file that you uploaded in step 1 here.
Template to Include - This option does not need to be changed as we are not including a template with this module
Active - Set this option to 'Yes' as a module will not appear on any of your pages unless it is marked as active here.
Column - Select the column (left, center, or right) that you would like your module to appear in.
Display Order - Enter the order in which you would like this module to appear in the column selected above.
Templates Used - Here is where you may enter a list of templates that your module will use to cache them and help prevent unnecessary queries. Simply enter the list of templates, separating each one with a comma. If you are adding a module which was downloaded from here then there should be a list for the templates to add in the instructions. If you have created your own module, then simply enter a list of all templates you used in the module here.
Update All Pages - If you would like to go ahead and add this module to all of your pages, make sure that 'Yes' is selected for this option. Otherwise you will need to manually add this module to each page.
4. Below the main module options, you will see a list of usergroups. If you wish for a usergroup not to be able to view this module, simply uncheck the box next to the appropriate usergroup name.
5. Save your new module, and you're done!
renderst
06-21-2004, 08:25 PM
thank you darknessdrive!
I could not find that instruction
renderst
06-21-2004, 08:29 PM
hm, all the php code executes on the very top, not in the center where i selected. Any ideas?
DarknessDivine
06-21-2004, 08:33 PM
I have no idea since I've never done this myself..sorry but I'm sure someone else will come along who knows..;) Sorry
Brian
06-22-2004, 01:05 AM
http://www.vbadvanced.com/forum/showthread.php?t=1337
http://www.vbadvanced.com/forum/showthread.php?t=1334
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.