The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
include php file
is there an easy way to do this? been trying to include a php on vbulletin 3.6.4 on a custom page but it doesn't work. Howto?
|
#2
|
|||
|
|||
Hmmz... people should explain themselfs better then this.
If Im not misunderstanding you, then what you are trying to do, is adding new costum php file, which will be integreted with the forum itself. Its easy, include, Global.php (so you'll have vB Functions - DB, etc') and just link it from the board, that way you can use, templates, pharses etc'.. (Not Hooks tho - as far as i know) Greets, |
#3
|
|||
|
|||
To include something in a template file (custom page), follow these steps:
Step 1, create a variable for the include file: Open global.php Find: PHP Code:
PHP Code:
Step 2, add $yourvariable to your template file (custom page) through Styles Manager: Code:
Content Here $yourvariable Content Here |
#4
|
|||
|
|||
thank you, i fixed the problem another way, i went the plugin way, i create a plugin with global start the following inside:
PHP Code:
|
#5
|
|||
|
|||
when you use this just in the custom page, you could built the code into your php file
so it must not be on every page includet like you do it now(overload) |
#6
|
|||
|
|||
by this do you mean the code i posted? what code and which php file?
custom page mypage.php -> plugin -> index.php |
#7
|
|||
|
|||
something like
https://vborg.vbsupport.ru/showthrea...79#post1153579 |
#8
|
|||
|
|||
thanks for that link, here's what i have so far.
custom_page.php looks like this: PHP Code:
custom_template looks like this: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">$vbphrase[custom_header]</td> </tr> <tr> <td class="alt1">$my_included_php_file</td> </tr> </table> $footer </body> </html> PHP Code:
PHP Code:
do you mean i should put custom_page.php code inside custom\index.php then i should delete the plugin instead? then just to create a navbar link to custom\index.php? thank you |
#9
|
|||
|
|||
Do the work of the include file in the custom page file before the template eval.
PHP Code:
|
#10
|
|||
|
|||
thank you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|