[3637] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Plugin Name: CoolIris-Piclens |
---|
[3645] | 4 | * File : piclenswall.php |
---|
| 5 | */ |
---|
[3637] | 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 |
---|
[4127] | 29 | $rssfeed .= 'piclens-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); |
---|
[3637] | 30 | else |
---|
| 31 | { |
---|
| 32 | // categorie pour laquelle le mur est parametre. |
---|
| 33 | if (in_array($page['category']['id'], $this->my_config['piclens_wall_categories'])) |
---|
[4127] | 34 | $rssfeed .= 'piclenswall-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); |
---|
[3637] | 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"), |
---|
[8780] | 50 | 'showitemembed' => ($this->my_config['piclens_wall_showitemembed'] ? "true" : "false"), |
---|
| 51 | 'showlinkout' => ($this->my_config['piclens_wall_showlinkout'] ? "true" : "false"), |
---|
| 52 | 'showclose' => ($this->my_config['piclens_wall_showclose'] ? "true" : "false"), |
---|
[3637] | 53 | 'transparent' => $this->my_config['piclens_wall_transparent'], |
---|
| 54 | 'swf_link' => ($this->my_config['piclens_wall_swflocal'] ? $this->root_site_piclens.PICLENS_PATH.'swf/cooliris.swf' : 'http://apps.cooliris.com/embed/cooliris.swf'), |
---|
| 55 | 'nbligne' => (isset($this->my_config['piclens_wall_nb_ligne']) ? $this->my_config['piclens_wall_nb_ligne'] : "3"), |
---|
| 56 | |
---|
| 57 | 'showChrome' => ($this->my_config['piclens_wall_showChrome'] ? "true" : "false"), |
---|
| 58 | 'showDescription' => ($this->my_config['piclens_wall_showDescription'] ? "true" : "false"), |
---|
| 59 | 'showReflections' => ($this->my_config['piclens_wall_showReflections'] ? "true" : "false"), |
---|
| 60 | 'showTutorial' => ($this->my_config['piclens_wall_showTutorial'] ? "true" : "false"), |
---|
| 61 | 'showNavArrows' => ($this->my_config['piclens_wall_showNavArrows'] ? "true" : "false"), |
---|
| 62 | 'backgroundAlpha' => isset($this->my_config['piclens_wall_backgroundAlpha']) ? $this->my_config['piclens_wall_backgroundAlpha'] : "1.0", |
---|
| 63 | |
---|
| 64 | 'backgroundColor' => str_replace('#', '%23', $this->my_config['piclens_wall_backgroundColor']), |
---|
| 65 | 'glowColor' => str_replace('#', '%23', $this->my_config['piclens_wall_glowColor']), |
---|
| 66 | 'descriptionHeight' => $this->my_config['piclens_wall_descriptionHeight'], |
---|
| 67 | 'tilt' => $this->my_config['piclens_wall_tilt'], |
---|
| 68 | |
---|
| 69 | )); |
---|
| 70 | |
---|
| 71 | if (!empty($this->my_config['piclens_wall_backgroundImage'])) |
---|
| 72 | $template->assign(array( |
---|
| 73 | 'backgroundImage' => $this->my_config['piclens_wall_backgroundImage'])); |
---|
| 74 | if (!empty($this->my_config['piclens_wall_tutorial'])) |
---|
| 75 | $template->assign(array( |
---|
| 76 | 'tutorial' => (empty($this->my_config['piclens_wall_tutorialtime']) ? "4500" : $this->my_config['piclens_wall_tutorialtime']).','.$this->my_config['piclens_wall_tutorial'])); |
---|
| 77 | if (!empty($this->my_config['piclens_wall_customButtonURL'])) |
---|
| 78 | $template->assign(array( |
---|
| 79 | 'customButton' => $this->my_config['piclens_wall_customButtonURL'].(empty($this->my_config['piclens_wall_customButtonTARGET']) ? ','.PICLENS_PATH : ','.$this->my_config['piclens_wall_customButtonTARGET']))); |
---|
| 80 | |
---|
| 81 | if (!empty($this->my_config['piclens_wall_icons'])) |
---|
| 82 | $template->assign(array( |
---|
| 83 | 'icons' => $this->my_config['piclens_wall_icons'])); |
---|
| 84 | if (!empty($this->my_config['piclens_wall_linkCSS'])) |
---|
| 85 | $template->assign(array( |
---|
| 86 | 'linkCSS' => $this->my_config['piclens_wall_linkCSS'])); |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | if (isset($rssfeed)) |
---|
| 91 | $template->concat('PLUGIN_INDEX_CONTENT_AFTER', $template->parse('piclenswall', true)); |
---|
| 92 | } |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | ?> |
---|