Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | global $template; |
---|
6 | |
---|
7 | include_once(STUFFS_PATH . 'include/class.inc.php'); |
---|
8 | include(STUFFS_PATH . 'include/functions.inc.php'); |
---|
9 | |
---|
10 | $stuffs = new stuffs(); |
---|
11 | |
---|
12 | $template->set_filename('stuffs', realpath($stuffs->get_template('blocks.tpl'))); |
---|
13 | |
---|
14 | if (script_basename() == 'index') |
---|
15 | { |
---|
16 | $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; |
---|
17 | $end = 'PLUGIN_INDEX_CONTENT_AFTER'; |
---|
18 | $css_file = 'index.css'; |
---|
19 | } |
---|
20 | else |
---|
21 | { |
---|
22 | $begin = 'PLUGIN_PICTURE_BEFORE'; |
---|
23 | $end = 'PLUGIN_PICTURE_AFTER'; |
---|
24 | $css_file = 'picture.css'; |
---|
25 | pwgs_picture_special_sections(); |
---|
26 | } |
---|
27 | |
---|
28 | if (!empty($stuffs->blocks['begin'])) |
---|
29 | { |
---|
30 | $template->assign('blocks', $stuffs->blocks['begin']); |
---|
31 | $template->concat($begin, $template->parse('stuffs', true)); |
---|
32 | } |
---|
33 | if (!empty($stuffs->blocks['end'])) |
---|
34 | { |
---|
35 | $template->assign('blocks', $stuffs->blocks['end']); |
---|
36 | $template->concat($end, $template->parse('stuffs', true)); |
---|
37 | } |
---|
38 | |
---|
39 | $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.get_root_url().ltrim($stuffs->get_template($css_file), '/\\.').'">', $smarty, $repeat); |
---|
40 | |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.