PDA

View Full Version : Quick Question About Subpages In Custom Pages


The-Ensemble
Tue 26th Sep '06, 3:09pm
I can't seem to get a answer for this on VB.org, No one seems to take a few minutes to confirm yes or no, I hope someone here might be able to.

What needs to be put in where it says

// Block of code #1 & 2

Is there something specific or do I leave those there?

I'm new to php and the subpages Is something I REALLY want to use.


Creating "Subpages"

If you want to create "subpages" within your custom page, simply wrap blocks of code with the following structure:

if ($_REQUEST['do'] == 'test')
{
// Block of code #1
}

if ($_REQUEST['do'] == 'test2')
{
// Block of code #2
}



Is the code I need something like this?
if ($_REQUEST['do'] == 'xxx')
{
eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');
}

Colin F
Tue 26th Sep '06, 4:06pm
Yes, that looks fine.

The-Ensemble
Tue 26th Sep '06, 4:22pm
Thank you!

nico_swd
Tue 26th Sep '06, 4:36pm
Just a question, but if you were that desperate for an answer, why didn't you just go and try it out? You would have get the same result in a couple of seconds. :)

The-Ensemble
Tue 26th Sep '06, 5:05pm
Because if you do one thing wrong in php you can screw your ENTIRE board up, and I do not want to risk that.

nico_swd
Tue 26th Sep '06, 6:58pm
If you know which part of the code is yours, and which belongs to the boards, then can't you screw up that much. You would just have to take your code out and reupload the file to your host. The only thing I'd be careful with, is when you play with the database. But printing out different templates under different conditions is pretty harmless. :)

The-Ensemble
Tue 26th Sep '06, 7:56pm
Again, with me if it can go wrong, it normally will :D
So I want to play it safe, I've worked damn hard on my board, recoding it all etc.
I dont want to risk losing any of it.