Jeremy D commited on 2012-01-23 19:41:59
Showing 3 changed files, with 48 additions and 0 deletions.
... | ... |
@@ -60,6 +61,7 @@ class pB |
60 | 61 |
private $geshi_languages = array(); |
61 | 62 |
private $db = null; |
62 | 63 |
private $usr = null; |
64 |
+ private $tpl = null; |
|
63 | 65 |
|
64 | 66 |
/* |
65 | 67 |
* Setup the settings when creating the object. |
... | ... |
@@ -95,6 +97,17 @@ class pB |
95 | 97 |
$this->usr = new $class; |
96 | 98 |
} |
97 | 99 |
|
100 |
+ // Start up our User handler. |
|
101 |
+ require_once(pBS::get('sources') . '/tpl.php'); |
|
102 |
+ if (file_exists(pBS::get('sources') . '/tpl-' . pBS::get('tpl') . '.php')) |
|
103 |
+ { |
|
104 |
+ require_once(pBS::get('sources') . '/tpl-' . pBS::get('tpl') . '.php'); |
|
105 |
+ |
|
106 |
+ $class = 'pTPL_' . pBS::get('user'); |
|
107 |
+ if (class_exists($class)) |
|
108 |
+ $this->tpl = new $class; |
|
109 |
+ } |
|
110 |
+ |
|
98 | 111 |
// Start getting things going. |
99 | 112 |
$this->loadLanguage(); |
100 | 113 |
$this->loadGeshi(); |
... | ... |
@@ -17,6 +17,9 @@ class pBS |
17 | 17 |
// User Handler. |
18 | 18 |
private static $user = 'smf'; |
19 | 19 |
|
20 |
+ // Template Handler. |
|
21 |
+ private static $tpl = 'smf'; |
|
22 |
+ |
|
20 | 23 |
// Language files location and default. |
21 | 24 |
private static $languages = './languages'; |
22 | 25 |
private static $default_language = 'english'; |
... | ... |
@@ -0,0 +1,33 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+* Sets up the basic Theme handler for Pastebin |
|
5 |
+*/ |
|
6 |
+class pTPL_smf extends pTPL |
|
7 |
+{ |
|
8 |
+ /* |
|
9 |
+ * We simply just create the object to the user_info handler. |
|
10 |
+ */ |
|
11 |
+ public function __construct() |
|
12 |
+ { |
|
13 |
+ } |
|
14 |
+ |
|
15 |
+ /* |
|
16 |
+ * Do the header |
|
17 |
+ * @Note: Because we used ssi earlier to star the SMF theme, we have nothing to do here |
|
18 |
+ */ |
|
19 |
+ public function html_head($title) |
|
20 |
+ { |
|
21 |
+ global $context; |
|
22 |
+ |
|
23 |
+ $context['page_title'] = $title; |
|
24 |
+ } |
|
25 |
+ |
|
26 |
+ /* |
|
27 |
+ * The very last thing before we close up shop. |
|
28 |
+ */ |
|
29 |
+ public function html_footer() |
|
30 |
+ { |
|
31 |
+ ssi_shutdown(); |
|
32 |
+ } |
|
33 |
+} |
|
0 | 34 |
\ No newline at end of file |
1 | 35 |