Using php in phpBB3 Templates

I needed to add some actual php to the footer of the new phpBB3 site I created…

There are two steps required.

  1. Enable php in your templates
  2. To enable php go to the General tab in the Admin Control Panel
  3. Click Security Settings
  4. Set Allow php in templates: to yes
    1. Wrap your php in comment tags <!– PHP –> <!– ENDPHP –> and not <?php ?> tags.
    2. Go to the Styles tab
    3. Choose Templates from the left menu
    4. Edit the desired template
      1. i.    Choose the file you want to edit.
      2. ii.    Add your php like so:
  • Copyright &copy; <!-- PHP -->echo date("Y")." ";<!-- ENDPHP -->University of Oregon. All rights reserved.
Leave a Comment