source: extensions/PWG_Stuffs/include/stuffs.inc.php @ 7345

Last change on this file since 7345 was 5727, checked in by patdenice, 14 years ago

2.1 ready!

File size: 1.0 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $template;
6
7include_once(STUFFS_PATH . 'include/class.inc.php');
8include(STUFFS_PATH . 'include/functions.inc.php');
9
10$stuffs = new stuffs();
11
12$template->set_template_dir(STUFFS_PATH.'theme/template/');
13$template->set_filename('stuffs', 'stuffs_blocks.tpl');
14
15if (script_basename() == 'index')
16{
17  $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
18  $end = 'PLUGIN_INDEX_CONTENT_AFTER';
19  $template->set_prefilter( 'header', array('stuffs', 'prefilter_index_css') );
20}
21else
22{
23  $begin = 'PLUGIN_PICTURE_BEFORE';
24  $end = 'PLUGIN_PICTURE_AFTER';
25  $template->set_prefilter('header', array('stuffs', 'prefilter_picture_css'));
26  pwgs_picture_special_sections();
27}
28
29if (!empty($stuffs->blocks['begin']))
30{
31  $template->assign('blocks', $stuffs->blocks['begin']);
32  $template->concat($begin,     $template->parse('stuffs', true));
33}
34if (!empty($stuffs->blocks['end']))
35{
36  $template->assign('blocks', $stuffs->blocks['end']);
37  $template->concat($end,       $template->parse('stuffs', true));
38}
39
40?>
Note: See TracBrowser for help on using the repository browser.