Making template with PHP ...



Hello all

I was wondering if anybody can help me (or give me some tutorial) about MAKING A TEMPLATE using PHP like the ones PHPBB done!

I mean its so strange when they have like:

<input type="submit" name="delete" class="liteoption" value="{L_DELETE}" />
<input type="submit" name="move" class="liteoption" value="{L_MOVE}" />
<input type="submit" name="lock" class="liteoption" value="{L_LOCK}" />
<input type="submit" name="unlock" class="liteoption" value="{L_UNLOCK}" />

How does {L_DELETE} work? I mean how simply can we make a template? Any good tutorial for that?
  <title>Page Title</title>
<h1>Header that goes on all pages</h1>
  <li>Menu Item 1</li>
  <li>Menu Item 2</li>
$Mode = $_GET['mode'];

    case 1:
        $File = "HomepageBodyText.html";
    case 2:
        $File = "AnotherPageBodyText.html";
    case 1:
        $File = "ADifferentPageBodyText.html";

$FID = fopen($File, 'r');

    echo fgets($FID);

<h2>Generic Footer on all pages</h2>

Now, for the above example, lets say it was stored in a file called "index.php" . If you went to the url "" then the contents of "HomepageBodyText.html" would be pasted into the document.

Are you following?
Thank you, Yes I got it
but isnt that slow when you are using fgets while we have like hundred lines of code?

Is that the way professionals make template ?
cause I like to make my own but dont know how to start.

Most of the sites I've done recently pull the page data out of SQL, not other files.

If the files you are including are also php files and not html, you can use the include("filename") function to very quickly read them in. There's a bit of a slowdown since the target files will be parsed by PHP, but it may be faster for larger instances.
Thank you again for your answer
I think that is a very good way to do it.

Just one more question...
Do (TPL) files act like the one you told me as they seem to use some special variable like {L_MOVE} ?
Those parameters are telling a script how to act on a database to make changes to forum posts. That's all much beyond just conventional templating.