The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Some basics of vB3(mini howto)
![]() Some basics of vB3(mini howto) also some basic php junk the most important thing if you want to make pages based on templates or anything of the such would be to first know how to " connect" to vbulletin, and then learn how to call and eval templates. so lets take a look at the most BASIC page we can do PHP Code:
somthing abit more advanced. suchas calling more than one template, or doing an action it becomes abit more complicated PHP Code:
PHP Code:
if your going to write a script that is ALL actions you should add somthing like this right after the call to gobal.php PHP Code:
![]() Mini Tut by Faranth (with some help from Brad.loo fixing my silly newbie mistakes ![]() |
#92
|
||||
|
||||
![]() Quote:
![]() |
#93
|
||||
|
||||
![]()
can this be done Zachery?
say I have a var called $a and i want it evald on its own so that I can use it in the templates how do i assign just a value to that and still eval? i.e value 22 |
#94
|
||||
|
||||
![]()
Thankyou very much this is good newbs like me who have come from along time experince with phpBB and IpB :squareeyed:
|
#95
|
|||
|
|||
![]()
Warning: main(): open_basedir restriction in effect. File(./global.php) is not within the allowed path(s): (/home/latch/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/latch/public_html/test.php on line 16
.... my forums are in /home/forums/public_html/ is there anyway to get it to work :S |
#96
|
|||
|
|||
![]()
read the error it tell's you the prob right away.
open_basedir restriction in effect. File(./global.php) is not within the allowed path in other words the server setup does not let you pull files from other site paths this is because there might be other sites on the server you dont own and if there not any open_basedir restriction you could pull files from other peoples sites and this could let people hack people or nick personal information. |
#97
|
|||
|
|||
![]() Quote:
|
#98
|
||||
|
||||
![]() PHP Code:
|
#99
|
|||
|
|||
![]()
OMG Thanks, I feel like a god now !!!
|
#100
|
|||
|
|||
![]()
Hey, i suppose you lot have been asked this loads of times, i am using this code:
Code:
<?php // ## Changes Directory so it can accesss vBulletin IF we are outside the forums folder, if not this is not nessary ## chdir("./forum"); // ## Error Reporting ( we use error reporting in php so we can control the display of error messages // ## we will use this because all vBulletin files follow the same error reporting rules) ## error_reporting(E_ALL & ~E_NOTICE); // ## this action here cache's the templates so that everytime their needed a querry wont be needed to run // ## the names in there are just the template names :), there must be a comma after everyone but the last ## $globaltemplates = array( 'index.php' ); // ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ## require_once("./global.php"); // ## this calls to print out one main template ## eval('print_output("' . fetch_template('index.php') . '");'); ?> Here is the page: http://www.justonxbox.com/test.php Also i know the template is called index.php, this is so that when i make my site from these they are easily edited as that will be the name for this page once done etc... etc... Thanks Paul |
#101
|
|||
|
|||
![]()
yes, thank you!
|
#102
|
||||
|
||||
![]() Quote:
Also, I still don't get actions? Can someone explain the system in more details? |
#103
|
||||
|
||||
![]()
I think I understood actions now. It's no big deal it just pulls outany templates that are defined (somewhere? init.php?) for that action.It's a "shortcut" but it doesn't make any difference as long as youpull out any template you use in globaltemplates you should be ok.Correct me if I'm wrong.
I'd still like to know about the $HTML thing though. |
#104
|
||||
|
||||
![]() Quote:
href=" with href="../forums/ and src=" with src="../forums/, etc. There's got to be an easier way. ![]() The huge problem I am running into now is that by including global.php, and by extension init.php, cookies are being established. That's not what I want. Is there a way to load templates without all that other stuff happening? What I may need to do is create a cron task that dumps the evaluated contents of the templates I need to flat HTML files and then include those. ![]() ![]() |
#105
|
|||
|
|||
![]()
If your using the action templates as shown in the original post:
PHP Code:
PHP Code:
PHP Code:
|
#106
|
||||
|
||||
![]()
Hi
I've got the page to work, but I'd like to use a custom header and footer because the links do not show correctly at present - I've created the new templates for them and called them in my 'test' template instead of the standard ones. But it doesnt work :-( Can someone give me a quick run-down of how it can be achieved? thanks. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|