1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | global $template, $page; |
---|
6 | |
---|
7 | include_once(FLASHGAL_PATH . 'include/class.inc.php'); |
---|
8 | include(FLASHGAL_PATH . 'include/functions.inc.php'); |
---|
9 | |
---|
10 | $home = (($page['section'] == 'categories') and empty($page['category'])) ? true : null ; |
---|
11 | $catid = ($page['section'] == 'categories' and |
---|
12 | isset($page['category'])) ? $page['category']['id'] : null ; |
---|
13 | $permalinkcat = empty($page['category']['permalink']) ? null : $page['category']['permalink']; |
---|
14 | /*if ($home) |
---|
15 | echo "HOMEOK"; |
---|
16 | if ($catid) |
---|
17 | echo "CATOK"; |
---|
18 | */ |
---|
19 | $flashgal = new flashgal($catid, $home, $permalinkcat); |
---|
20 | |
---|
21 | //$flashgal = new flashgal($page['category']['id']); |
---|
22 | |
---|
23 | $template->set_filename('flashgal', realpath($flashgal->get_template('blocks.tpl'))); |
---|
24 | |
---|
25 | if (script_basename() == 'index') |
---|
26 | { |
---|
27 | $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; |
---|
28 | $end = 'PLUGIN_INDEX_CONTENT_AFTER'; |
---|
29 | $css_file = 'index.css'; |
---|
30 | } |
---|
31 | else |
---|
32 | { |
---|
33 | $begin = 'PLUGIN_PICTURE_BEFORE'; |
---|
34 | $end = 'PLUGIN_PICTURE_AFTER'; |
---|
35 | $css_file = 'picture.css'; |
---|
36 | // pwgs_picture_special_sections(); |
---|
37 | } |
---|
38 | |
---|
39 | //echo "flashgal->module['replace_thumb']".$flashgal->module['replace_thumb']; |
---|
40 | //echo "flashgal->module['replace_cats']".$flashgal->module['replace_cats']; |
---|
41 | // Suppression de la barre de navigation miniature |
---|
42 | |
---|
43 | |
---|
44 | if (!empty($flashgal->blocks['begin'])) |
---|
45 | { |
---|
46 | $template->assign('blocks', $flashgal->blocks['begin']); |
---|
47 | $template->concat($begin, $template->parse('flashgal', true)); |
---|
48 | } |
---|
49 | if (!empty($flashgal->blocks['end'])) |
---|
50 | { |
---|
51 | $template->assign('blocks', $flashgal->blocks['end']); |
---|
52 | $template->concat($end, $template->parse('flashgal', true)); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.$flashgal->get_template($css_file).'">', $smarty, $repeat); |
---|
58 | |
---|
59 | ?> |
---|