1 | <?php |
---|
2 | /* |
---|
3 | * Plugin Name: CoolIris-Piclens |
---|
4 | * Version: 0.3.4 |
---|
5 | * Description: Cooliris/Piclens activation |
---|
6 | * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=234 |
---|
7 | * Author: Tiico |
---|
8 | * Author URI: |
---|
9 | * */ |
---|
10 | /********* Fichier piclenswall.php *********/ |
---|
11 | |
---|
12 | |
---|
13 | global $user, $template; |
---|
14 | |
---|
15 | if (!is_a_guest()) |
---|
16 | { |
---|
17 | // Seulement sur une page type 'categorie' |
---|
18 | if ((isset($page['section'])) && (($page['section']) == 'categories')) |
---|
19 | { |
---|
20 | // Page accueil et option mur sur l'accueil activee |
---|
21 | if( (empty($page['category'])) && $this->my_config['piclens_wall_ontop'] ) |
---|
22 | $rssfeed = $this->root_site_piclens.PICLENS_PATH.'piclenswall-rss.php?/categories'; |
---|
23 | |
---|
24 | // categorie et option mur sur categorie activee |
---|
25 | elseif (isset($page['category']) && !empty($page['category']['id']) && $this->my_config['piclens_wall_oncat']) |
---|
26 | { |
---|
27 | // remplacement naviagation ne doit pas etre active et mis en place sur la page... |
---|
28 | if (!($this->my_config['piclens_wall_nav']) or !(in_array($page['category']['id'], $this->my_config['piclens_wall_cat_nav_replace']))) |
---|
29 | |
---|
30 | { |
---|
31 | $rssfeed = $this->root_site_piclens.PICLENS_PATH; |
---|
32 | |
---|
33 | if ($this->my_config['piclens_wall_specif'] == 'common') // pas de specificites 3DWall : utilisation des parametres piclens |
---|
34 | $rssfeed .= 'piclens-rss.php'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); |
---|
35 | else |
---|
36 | { |
---|
37 | // categorie pour laquelle le mur est parametre. |
---|
38 | if (in_array($page['category']['id'], $this->my_config['piclens_wall_categories'])) |
---|
39 | $rssfeed .= 'piclenswall-rss.php'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); |
---|
40 | } |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | $template->set_filenames(array('piclenswall' => PICLENS_ROOT . '/piclenswall.tpl')); |
---|
45 | |
---|
46 | |
---|
47 | $template->assign(array( |
---|
48 | 'piclenswalltitle' => $this->my_config['piclens_wall_title'], |
---|
49 | 'rssfeed' => isset($rssfeed) ? $rssfeed : "", |
---|
50 | 'color' => $this->my_config['piclens_wall_color'], |
---|
51 | 'height' => $this->my_config['piclens_wall_height'], |
---|
52 | 'showfullscreen' => ($this->my_config['piclens_wall_showfullscreen'] ? "true" : "false"), |
---|
53 | 'showembed' => ($this->my_config['piclens_wall_showembed'] ? "true" : "false"), |
---|
54 | 'showsearch' => ($this->my_config['piclens_wall_showsearch'] ? "true" : "false"), |
---|
55 | 'transparent' => $this->my_config['piclens_wall_transparent'], |
---|
56 | 'swf_link' => ($this->my_config['piclens_wall_swflocal'] ? $this->root_site_piclens.PICLENS_PATH.'swf/cooliris.swf' : 'http://apps.cooliris.com/embed/cooliris.swf'), |
---|
57 | 'nbligne' => (isset($this->my_config['piclens_wall_nb_ligne']) ? $this->my_config['piclens_wall_nb_ligne'] : "3"), |
---|
58 | |
---|
59 | 'showChrome' => ($this->my_config['piclens_wall_showChrome'] ? "true" : "false"), |
---|
60 | 'showDescription' => ($this->my_config['piclens_wall_showDescription'] ? "true" : "false"), |
---|
61 | 'showReflections' => ($this->my_config['piclens_wall_showReflections'] ? "true" : "false"), |
---|
62 | 'showTutorial' => ($this->my_config['piclens_wall_showTutorial'] ? "true" : "false"), |
---|
63 | 'showNavArrows' => ($this->my_config['piclens_wall_showNavArrows'] ? "true" : "false"), |
---|
64 | 'backgroundAlpha' => isset($this->my_config['piclens_wall_backgroundAlpha']) ? $this->my_config['piclens_wall_backgroundAlpha'] : "1.0", |
---|
65 | |
---|
66 | 'backgroundColor' => str_replace('#', '%23', $this->my_config['piclens_wall_backgroundColor']), |
---|
67 | 'glowColor' => str_replace('#', '%23', $this->my_config['piclens_wall_glowColor']), |
---|
68 | 'descriptionHeight' => $this->my_config['piclens_wall_descriptionHeight'], |
---|
69 | 'tilt' => $this->my_config['piclens_wall_tilt'], |
---|
70 | |
---|
71 | )); |
---|
72 | |
---|
73 | if (!empty($this->my_config['piclens_wall_backgroundImage'])) |
---|
74 | $template->assign(array( |
---|
75 | 'backgroundImage' => $this->my_config['piclens_wall_backgroundImage'])); |
---|
76 | if (!empty($this->my_config['piclens_wall_tutorial'])) |
---|
77 | $template->assign(array( |
---|
78 | 'tutorial' => (empty($this->my_config['piclens_wall_tutorialtime']) ? "4500" : $this->my_config['piclens_wall_tutorialtime']).','.$this->my_config['piclens_wall_tutorial'])); |
---|
79 | if (!empty($this->my_config['piclens_wall_customButtonURL'])) |
---|
80 | $template->assign(array( |
---|
81 | 'customButton' => $this->my_config['piclens_wall_customButtonURL'].(empty($this->my_config['piclens_wall_customButtonTARGET']) ? ','.PICLENS_PATH : ','.$this->my_config['piclens_wall_customButtonTARGET']))); |
---|
82 | |
---|
83 | if (!empty($this->my_config['piclens_wall_icons'])) |
---|
84 | $template->assign(array( |
---|
85 | 'icons' => $this->my_config['piclens_wall_icons'])); |
---|
86 | if (!empty($this->my_config['piclens_wall_linkCSS'])) |
---|
87 | $template->assign(array( |
---|
88 | 'linkCSS' => $this->my_config['piclens_wall_linkCSS'])); |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | if (isset($rssfeed)) |
---|
93 | $template->concat('PLUGIN_INDEX_CONTENT_AFTER', $template->parse('piclenswall', true)); |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|
97 | ?> |
---|