source: extensions/piclens/piclenswall.php @ 3598

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

Correct FR langage
Add a new config tab for news parameters for embeded wall (such as numRows, Transparency...) [to be completed]

File size: 3.5 KB
Line 
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'                               => $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'] : "0.0",
65               
66               
67                        ));
68                       
69                        if (isset($rssfeed))
70                                $template->concat('PLUGIN_INDEX_CONTENT_AFTER', $template->parse('piclenswall', true));
71                }
72        }
73
74?>
Note: See TracBrowser for help on using the repository browser.