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

Last change on this file since 4538 was 3609, checked in by patdenice, 15 years ago

Convert all php and tpl files in Unix format for my plugins.

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_filename('stuffs', realpath($stuffs->get_template('blocks.tpl')));
13
14if (script_basename() == 'index')
15{
16  $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
17  $end = 'PLUGIN_INDEX_CONTENT_AFTER';
18  $css_file = 'index.css';
19}
20else
21{
22  $begin = 'PLUGIN_PICTURE_BEFORE';
23  $end = 'PLUGIN_PICTURE_AFTER';
24  $css_file = 'picture.css';
25  pwgs_picture_special_sections();
26}
27
28if (!empty($stuffs->blocks['begin']))
29{
30  $template->assign('blocks', $stuffs->blocks['begin']);
31  $template->concat($begin,     $template->parse('stuffs', true));
32}
33if (!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="'.$stuffs->get_template($css_file).'">', $smarty, $repeat);
40
41?>
Note: See TracBrowser for help on using the repository browser.