source: extensions/piclens/piclenswall.php @ 3645

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

Add index.php file into directory
Add CHANGELOG and clean header files
Add 'last comments' option for name and descriptions (%ID option)
Add maintain.inc.php for migration to 0.4.x (name and description translation)
Complete Chinese translation (thanks winson)

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