New Custom Pages with Php the Correct Way

Temporary forum to obtain support while phpBB.com is offline.
Please use the support forum on phpBB.com
Forum rules
Temporary forum to obtain support while phpBB.com is offline.
Please use the support forum on phpBB.com
Locked
WinterWulf
Registered User
Posts: 14
Joined: Wed Feb 04, 2009 6:35 pm
Location: North Pole

New Custom Pages with Php the Correct Way

Post by WinterWulf » Wed Feb 04, 2009 8:17 pm

Hello everyone, this is my first post here so I hope I am doing this correctly;

I want to make 20-50+ new custom pages for my phpbb3 set up. I have been using the http://www.phpbb.com tutorial catched at

http://74.125.47.132/search?q=cache:Or- ... cd=1&gl=us

also visable at

http://www.ktuk.net/phpBB3/viewtopic.php?f=32&t=2854

( and anywhere else with a tutorial for this sort of thing - they are all the same! ).

On these custom pages I would like to run database searchs and post the info found. For instance, one page might look like:

Code: Select all

Welcom $username!
We are very $emotion to see you! We hope you will come by again when you have more $money#. At the moment you only have $money#. Sorry. But here: take this tasty $snack.
Placeing the php in the actual .php file that the URL refers to causes the page to load strangely (you see all the text unformated, without color or images and then it *pops* back to normal) and any information you tell it to print gets posted at the very top of the page, regardless of where you place the text. After a good bit of trial, error and searching I have found

viewtopic.php?f=26&t=12672

which possibly solves the problem. But now that I know how to make php calls whial in the _body document, should I realy? It isn't recomended and I have the sneaky suspicion that all of the wierd interconnected files I have been playing with and trying to figure out have a purpose; one goal of which is to speed up loading times. Which brings me to the real question and perhapse the questions that tag along with it:

What is the proper way to create a new custom page like this? Why is PhpBB set up like this ( for speed )? After making a call to a database, do we need to

Code: Select all

// free result set memory 
mysql_free_result($result); 
or

Code: Select all

// close connection 
mysql_close($connection); 
?

And, if anyone has the time and inclination: What would a flow chart of the way PhpBB handles these files/processes look like?

Locked