########################################################
## Mod Title: Php in templates
## Mod Version: 3.0
## Author: Ryan McLaughlin <
ryanmc2@hotmail.com >
## Description: This mod allows simple php to be inserted
## into the .tpl files.
##
## Installation Level: (easy)
## Installation Time: 1 Minute
## Files To Edit: template.php
## Included Files: template.php
##
##############################################################
## For Security Purposes, This MOD Cannot Be Posted Or Added
## At Any Non-Official phpBB Site
##############################################################
##
## Author Note:
##
## I have included the template.php (v 1.10) file with the
## mod already in place. just copy my file over the origianl file.
## Or follow the instructions below to install it into your own file.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up
## All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
/phpBB2/includes/template.php
#
#-----[ FIND ]------------------------------------------
#
$code_lines[$i] = chop($code_lines[$i]);
#
#-----[ AFTER, ADD ]------------------------------------------
#
if (preg_match('/<\?php/', $code_lines[$i]))
{
$code_lines[$i] = str_replace('<?php', '', $code_lines[$i]);
while (!preg_match('/\?>/', $code_lines[$i])) {
$i++;
}
if (preg_match('/\?>/', $code_lines[$i])){
$code_lines[$i] = str_replace('?>', '', $code_lines[$i]);
}
}
else {
#
#-----[ FIND ]------------------------------------------
#
// Bring it back into a single string of lines of code.
#
#-----[ BEFORE, ADD ]------------------------------------------
#
} -- this ends the else from above
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM