source: extensions/Flash_Gallery/include/flashgal.inc.php @ 14809

Last change on this file since 14809 was 3531, checked in by tiico, 15 years ago

First revision (for testing)
Only in French (translation to be done)

File size: 1.7 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $template, $page;
6
7include_once(FLASHGAL_PATH . 'include/class.inc.php');
8include(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";
16if ($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
25if (script_basename() == 'index')
26{
27  $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
28  $end = 'PLUGIN_INDEX_CONTENT_AFTER';
29  $css_file = 'index.css';
30}
31else
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
44if (!empty($flashgal->blocks['begin']))
45{
46  $template->assign('blocks', $flashgal->blocks['begin']);
47  $template->concat($begin,     $template->parse('flashgal', true));
48}
49if (!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?>
Note: See TracBrowser for help on using the repository browser.