source: extensions/PWG_Stuffs/modules/piclenswall/main.inc.php @ 3613

Revision 3613, 4.9 KB checked in by tiico, 11 years ago (diff)

Modify piclenwall module for compatibility with piclens plugin up to 0.3.5 (extended configuration)

Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $page;
6
7// RSS Feed only available in category or index gallery
8if (get_db_plugins('active','piclens') and isset($page['section']) and $page['section'] == 'categories')
9{
10  include_once PHPWG_ROOT_PATH.'plugins/piclens/include/Piclens.class.php';
11
12  $obj = new Piclens();
13  $obj->load_config();
14
15  $rssfeed = '';
16
17  if( empty($page['category']))
18  {
19    $rssfeed = get_root_url().PICLENS_PATH.'piclenswall-rss.php?/categories';
20  }
21  else
22  {
23        // remplacement naviagation ne doit pas etre active et mis en place sur la page...
24                if (!@$obj->my_config['piclens_wall_nav'] or !@in_array($page['category']['id'], $obj->my_config['piclens_wall_cat_nav_replace']))
25                {                               
26                        if (@$obj->my_config['piclens_wall_specif'] == 'common') // pas de specificites 3DWall : utilisation des parametres piclens
27      {
28                                $rssfeed = get_root_url().PICLENS_PATH.'piclens-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']);
29      }
30                        elseif (@in_array($page['category']['id'], $obj->my_config['piclens_wall_categories']))
31                        {
32                                //  categorie pour laquelle le mur est parametre.
33                                $rssfeed = get_root_url().PICLENS_PATH.'piclenswall-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']);
34                        }
35                }
36  }
37  $block['RSSFEED'] = $rssfeed;
38  $block['PIC_HEIGHT']  = @$obj->my_config['piclens_wall_height']; //$datas[0];
39  $block['COLOR']  = @$obj->my_config['piclens_wall_color']; //$datas[1];
40  $block['SHOWFULLSCREEN'] = (@$obj->my_config['piclens_wall_showfullscreen'] ? "true" : "false");
41  $block['SHOWEMBED'] = (@$obj->my_config['piclens_wall_showembed'] ? "true" : "false");
42  $block['SHOWSEARCH'] = (@$obj->my_config['piclens_wall_showsearch'] ? "true" : "false");
43  $block['TRANSPARENT'] = @$obj->my_config['piclens_wall_transparent'];
44  $block['SWF_LINK'] = (@$obj->my_config['piclens_wall_swflocal'] ? @$obj->root_site_piclens.PICLENS_PATH.'swf/cooliris.swf' : 'http://apps.cooliris.com/embed/cooliris.swf');
45  $block['NBLIGNE'] = (isset($obj->my_config['piclens_wall_nb_ligne']) ? @$obj->my_config['piclens_wall_nb_ligne'] : "3");
46
47  if (isset($obj->my_config['piclens_wall_showChrome']))
48    $block['showChrome'] = (@$obj->my_config['piclens_wall_showChrome'] ? "true" : "false");
49  if (isset($obj->my_config['piclens_wall_showDescription']))
50    $block['showDescription'] = (@$obj->my_config['piclens_wall_showDescription'] ? "true" : "false");
51  if (isset($obj->my_config['piclens_wall_showReflections']))
52    $block['showReflections'] = (@$obj->my_config['piclens_wall_showReflections'] ? "true" : "false");
53  if (isset($obj->my_config['piclens_wall_showTutorial']))
54    $block['showTutorial'] = (@$obj->my_config['piclens_wall_showTutorial'] ? "true" : "false");
55  if (isset($obj->my_config['piclens_wall_showNavArrows']))
56    $block['showNavArrows'] = (@$obj->my_config['piclens_wall_showNavArrows'] ? "true" : "false");
57 
58  $block['backgroundAlpha'] = isset($obj->my_config['piclens_wall_backgroundAlpha']) ? $obj->my_config['piclens_wall_backgroundAlpha'] : "1.0";
59  if (isset($obj->my_config['piclens_wall_backgroundColor']))
60    $block['backgroundColor'] = str_replace('#', '%23', @$obj->my_config['piclens_wall_backgroundColor']) ;
61  if (isset($obj->my_config['piclens_wall_glowColor']))
62    $block['glowColor'] = str_replace('#', '%23', @$obj->my_config['piclens_wall_glowColor']);
63  if (isset($obj->my_config['piclens_wall_descriptionHeight']))
64    $block['descriptionHeight'] = @$obj->my_config['piclens_wall_descriptionHeight'];
65  if (isset($obj->my_config['piclens_wall_tilt']))
66    $block['tilt'] = $obj->my_config['piclens_wall_tilt'];
67
68    if (isset($obj->my_config['piclens_wall_backgroundImage']) and !empty($obj->my_config['piclens_wall_backgroundImage']))
69        $block['backgroundImage'] = @$obj->my_config['piclens_wall_backgroundImage'];
70
71    if (isset($obj->my_config['piclens_wall_tutorial']) and !empty($obj->my_config['piclens_wall_tutorial']))
72        $block['tutorial'] = (empty($obj->my_config['piclens_wall_tutorialtime']) ? "4500" : @$obj->my_config['piclens_wall_tutorialtime']).','.@$obj->my_config['piclens_wall_tutorial'];             
73
74
75        if (isset($obj->my_config['piclens_wall_customButtonURL']) and !empty($obj->my_config['piclens_wall_customButtonURL']))
76        $block['customButton'] = @$obj->my_config['piclens_wall_customButtonURL'].(empty($obj->my_config['piclens_wall_customButtonTARGET']) ? ','.PICLENS_PATH : ','.@$obj->my_config['piclens_wall_customButtonTARGET']); 
77
78    if (isset($obj->my_config['piclens_wall_icons']) and !empty($obj->my_config['piclens_wall_icons']))
79        $block['icons'] = @$obj->my_config['piclens_wall_icons']; 
80    if (isset($obj->my_config['piclens_wall_linkCSS']) and !empty($obj->my_config['piclens_wall_linkCSS']))
81        $block['icons'] = @$obj->my_config['piclens_wall_linkCSS']; 
82
83 
84}
85else
86{
87  return false;
88}
89       
90?>
Note: See TracBrowser for help on using the repository browser.