diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-17 16:52:43 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-17 16:52:43 +1100 |
| commit | 9c9ead2b082c82a28febfdd409551bc647c50ab3 (patch) | |
| tree | c81fdb217b7a6d8b10756d1aeacfb44c93ce1349 /inc/template.php | |
| parent | 83194c42183cbbcd86c9347cb536148ad09ac966 (diff) | |
Beta PM system
Diffstat (limited to 'inc/template.php')
| -rw-r--r-- | inc/template.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/inc/template.php b/inc/template.php index d8961167..c0c754f1 100644 --- a/inc/template.php +++ b/inc/template.php @@ -5,10 +5,7 @@ // savetheinternet@n0v4.com
// -----------------------------------------------------
- // Standard configuration
- //
- // Folder where the template files are kept
- $templateDir = $config['dir']['template'];
+ // Standard configuration
//
// Enable global things like %gentime, etc.
$templateGlobals = true;
@@ -170,12 +167,18 @@ }
function Element($templateFile, array $options) {
- global $templateDir;
+ global $config;
+
+ // Small little hack to add the PM system
+ if(function_exists('create_pm_header') && @$options['mod']) {
+ $options['pm'] = create_pm_header();
+ }
+
// Read the template file
- if($template = @file_get_contents("${templateDir}/${templateFile}")) {
+ if($template = @file_get_contents("{$config['dir']['template']}/${templateFile}")) {
return templateParse($template, $options, null, $templateFile);
} else {
- throw new Exception("Template file '${templateFile}' does not exist or is empty in '${templateDir}'!");
+ throw new Exception("Template file '${templateFile}' does not exist or is empty in '{$config['dir']['template']}'!");
}
}
|
