ive been looking through all the php files for PHPBB forums. and i want to learn how to use php like it does.

Atm i use print to show any html. But i want to use .tpl files, and use $blah to show all the variables etc.

Could some1 point me in the right direction pleez?

    Tpl files I believe are just a fancy name... you can create your templates like the following:

    Template.php

    <html>
    <head><title>Hey!</title></head>
    <body>

    <h1>Hi!</h1>

    <?php
    #

    Code goes here

    #
    ?>

    </body>
    </html>

    Well that's how I've done mine anyway... I've got dynamic navigation and many scripts inside each template... works for me.

    As for variables, I'm just starting to learn about them... I've got another post somewhere... something like, Links titles and more... I've asked about variables in there!

    Thanks,

    Chris

      tpl files are for the layout of the forum. If a skinner want to skin (duh...), he opens a .tpl file and can easily change the whole layout of the forum without destroying any php-code.

      If you want the 'online-users-list' displayed at the top of the page, you only have to move a {variable} to the top of the page and it's done.

      How phpBB does that?? PhpBB assigns all the vars it wants to display to a variable and parses the page at the end.
      Look at the template.php file (located in the includes-map) for more information 🙂

        oh! I see... I misunderstood what he was asking... I thought he was creating a site and wanted to use templates for his site like phpbb does not edit them... sorry.

          Write a Reply...