1 | <?php |
||
2 | /** |
||
3 | * ExtGallery User area |
||
4 | * |
||
5 | * You may not change or alter any portion of this comment or credits |
||
6 | * of supporting developers from this source code or any supporting source code |
||
7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
11 | * |
||
12 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||
13 | * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
||
14 | * @author Zoullou (http://www.zoullou.net) |
||
15 | * @package ExtGallery |
||
16 | */ |
||
17 | |||
18 | use XoopsModules\Extgallery; |
||
19 | /** @var Extgallery\Helper $helper */ |
||
20 | $helper = Extgallery\Helper::getInstance(); |
||
21 | |||
22 | include __DIR__ . '/header.php'; |
||
23 | //require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php'; |
||
24 | |||
25 | $GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-slideshow.tpl'; |
||
26 | include XOOPS_ROOT_PATH . '/header.php'; |
||
27 | |||
28 | |||
29 | $catId = \Xmf\Request::getInt('id', 0, 'GET'); |
||
0 ignored issues
–
show
|
|||
30 | |||
31 | |||
32 | // Check the access permission |
||
33 | $permHandler = Extgallery\PublicPermHandler::getInstance(); |
||
34 | if (!$permHandler->isAllowed($GLOBALS['xoopsUser'], 'public_access', $catId)) { |
||
35 | redirect_header('index.php', 3, _NOPERM); |
||
36 | } |
||
37 | /** @var Extgallery\CategoryHandler $catHandler */ |
||
38 | $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory'); |
||
39 | /** @var Extgallery\PublicPhotoHandler $photoHandler */ |
||
40 | $photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto'); |
||
41 | |||
42 | $catObj = $catHandler->getCat($catId); |
||
43 | |||
44 | if (null === $catObj) { |
||
45 | include XOOPS_ROOT_PATH . '/footer.php'; |
||
46 | exit; |
||
47 | } |
||
48 | $ajaxeffect = $helper->getConfig('use_slideshow_effects'); |
||
49 | $xoopsTpl->assign('use_slideshow_effects', $ajaxeffect); |
||
50 | |||
51 | $cat = $catHandler->objectToArray($catObj); |
||
52 | $xoopsTpl->assign('cat', $cat); |
||
53 | |||
54 | $catPath = $photoHandler->objectToArray($catHandler->getPath($catId)); |
||
55 | $xoopsTpl->assign('catPath', $catPath); |
||
56 | |||
57 | $photos = $photoHandler->getSlideshowAlbumPhoto($catId); |
||
58 | $xoopsTpl->assign('photos', $photos); |
||
59 | $xoopsTpl->assign('xoops_pagetitle', $catObj->getVar('cat_name')); |
||
60 | $xoTheme->addMeta('meta', 'description', $catObj->getVar('cat_desc')); |
||
61 | |||
62 | $xoopsTpl->assign('extgalleryName', $xoopsModule->getVar('name')); |
||
63 | |||
64 | $rel = 'alternate'; |
||
65 | $attributes['rel'] = $rel; |
||
66 | $attributes['type'] = 'application/rss+xml'; |
||
67 | $attributes['title'] = _MD_EXTGALLERY_RSS; |
||
68 | $attributes['href'] = XOOPS_URL . '/modules/extgallery/public-rss.php'; |
||
69 | $xoTheme->addMeta('link', $rel, $attributes); |
||
70 | $xoTheme->addStylesheet('modules/extgallery/assets/css/style.css'); |
||
71 | |||
72 | $jquery = $helper->getConfig('enable_jquery'); |
||
73 | $xoopsTpl->assign('jquery', $jquery); |
||
74 | if (1 == $jquery) { |
||
75 | $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); |
||
76 | switch ($ajaxeffect) { |
||
77 | case 'galleryview': |
||
78 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleryview/galleryview.js'); |
||
79 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleryview/timers.js'); |
||
80 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleryview/easing.js'); |
||
81 | $xoTheme->addStylesheet('browse.php?modules/extgallery/assets/js/galleryview/galleryview.css'); |
||
82 | break; |
||
83 | |||
84 | case 'galleria': |
||
85 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleria/galleria.js'); |
||
86 | break; |
||
87 | |||
88 | case 'microgallery': |
||
89 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/microgallery/jquery.microgallery.js'); |
||
90 | $xoTheme->addStylesheet('browse.php?modules/extgallery/assets/js/microgallery/style.css'); |
||
91 | break; |
||
92 | |||
93 | case 'galleriffic': |
||
94 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleriffic/jquery.galleriffic.js'); |
||
95 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleriffic/jquery.history.js'); |
||
96 | $xoTheme->addScript('browse.php?modules/extgallery/assets/js/galleriffic/jquery.opacityrollover.js'); |
||
97 | $xoTheme->addStylesheet('browse.php?modules/extgallery/assets/js/galleriffic/galleriffic2.css'); |
||
98 | break; |
||
99 | } |
||
100 | } |
||
101 | |||
102 | $xoopsTpl->assign('show_rss', $helper->getConfig('show_rss')); |
||
103 | |||
104 | //for galleryview |
||
105 | $xoopsTpl->assign('galleryview_panelwidth', $helper->getConfig('galleryview_panelwidth')); |
||
106 | $xoopsTpl->assign('galleryview_panelheight', $helper->getConfig('galleryview_panelheight')); |
||
107 | $xoopsTpl->assign('galleryview_framewidth', $helper->getConfig('galleryview_framewidth')); |
||
108 | $xoopsTpl->assign('galleryview_frameheight', $helper->getConfig('galleryview_frameheight')); |
||
109 | $xoopsTpl->assign('galleryview_backgroundcolor', $helper->getConfig('galleryview_bgcolor')); |
||
110 | $xoopsTpl->assign('galleryview_transitionspeed', $helper->getConfig('galleryview_tspeed')); |
||
111 | $xoopsTpl->assign('galleryview_transitioninterval', $helper->getConfig('galleryview_tterval')); |
||
112 | $xoopsTpl->assign('galleryview_overlayheight', $helper->getConfig('galleryview_overlayheight')); |
||
113 | $xoopsTpl->assign('galleryview_overlaycolor', $helper->getConfig('galleryview_overlaycolor')); |
||
114 | $xoopsTpl->assign('galleryview_overlaytextcolor', $helper->getConfig('galleryview_overlaytc')); |
||
115 | $xoopsTpl->assign('galleryview_captiontextcolor', $helper->getConfig('galleryview_captiontc')); |
||
116 | $xoopsTpl->assign('galleryview_borderwidth', $helper->getConfig('galleryview_borderwidth')); |
||
117 | $xoopsTpl->assign('galleryview_bordercolor', $helper->getConfig('galleryview_bordercolor')); |
||
118 | $xoopsTpl->assign('galleryview_overlayopacity', $helper->getConfig('galleryview_opacity')); |
||
119 | $xoopsTpl->assign('galleryview_overlayfontsize', $helper->getConfig('galleryview_overlayfs')); |
||
120 | $xoopsTpl->assign('galleryview_navtheme', $helper->getConfig('galleryview_navtheme')); |
||
121 | $xoopsTpl->assign('galleryview_position', $helper->getConfig('galleryview_position')); |
||
122 | $xoopsTpl->assign('galleryview_easing', $helper->getConfig('galleryview_easing')); |
||
123 | |||
124 | //for galleria |
||
125 | $xoopsTpl->assign('galleria_height', $helper->getConfig('galleria_height')); |
||
126 | $xoopsTpl->assign('galleria_panelwidth', $helper->getConfig('galleria_panelwidth')); |
||
127 | $xoopsTpl->assign('galleria_bgcolor', $helper->getConfig('galleria_bgcolor')); |
||
128 | $xoopsTpl->assign('galleria_bcolor', $helper->getConfig('galleria_bcolor')); |
||
129 | $xoopsTpl->assign('galleria_bgimg', $helper->getConfig('galleria_bgimg')); |
||
130 | if (1 == $helper->getConfig('galleria_autoplay')) { |
||
131 | $xoopsTpl->assign('galleria_autoplay', 'true'); |
||
132 | } else { |
||
133 | $xoopsTpl->assign('galleria_autoplay', 'false'); |
||
134 | } |
||
135 | $xoopsTpl->assign('galleria_transition', $helper->getConfig('galleria_transition')); |
||
136 | $xoopsTpl->assign('galleria_tspeed', $helper->getConfig('galleria_tspeed')); |
||
137 | |||
138 | //for galleriffic |
||
139 | $xoopsTpl->assign('galleriffic_nb_thumbs', $helper->getConfig('galleriffic_nb_thumbs')); |
||
140 | $xoopsTpl->assign('galleriffic_nb_colthumbs', $helper->getConfig('galleriffic_nb_colthumbs')); |
||
141 | $xoopsTpl->assign('galleriffic_nb_preload', $helper->getConfig('galleriffic_nb_preload')); |
||
142 | if (1 == $helper->getConfig('galleriffic_autoplay')) { |
||
143 | $xoopsTpl->assign('galleriffic_autoplay', 'true'); |
||
144 | } else { |
||
145 | $xoopsTpl->assign('galleriffic_autoplay', 'false'); |
||
146 | } |
||
147 | $xoopsTpl->assign('galleriffic_tdelay', $helper->getConfig('galleriffic_tdelay')); |
||
148 | $xoopsTpl->assign('galleriffic_tspeed', $helper->getConfig('galleriffic_tspeed')); |
||
149 | |||
150 | $var_width = 0; |
||
151 | $var_nav_width = 0; |
||
152 | $var_nav_visible = 'hidden'; |
||
153 | |||
154 | switch ($helper->getConfig('galleriffic_nb_colthumbs')) { |
||
155 | case 1: |
||
156 | $var_nav_width = 130; |
||
157 | $var_nav_visible = 'visible'; |
||
158 | break; |
||
159 | case 2: |
||
160 | $var_nav_width = 200; |
||
161 | $var_nav_visible = 'visible'; |
||
162 | break; |
||
163 | case 3: |
||
164 | $var_nav_width = 280; |
||
165 | $var_nav_visible = 'visible'; |
||
166 | break; |
||
167 | case 'default': |
||
168 | break; |
||
169 | } |
||
170 | $xoopsTpl->assign('nav_width', $var_nav_width); |
||
171 | $xoopsTpl->assign('nav_visibility', $var_nav_visible); |
||
172 | $xoopsTpl->assign('galleriffic_bordercolor', $helper->getConfig('galleriffic_bordercolor')); |
||
173 | $xoopsTpl->assign('galleriffic_bgcolor', $helper->getConfig('galleriffic_bgcolor')); |
||
174 | $xoopsTpl->assign('galleriffic_fontcolor', $helper->getConfig('galleriffic_fontcolor')); |
||
175 | $var_width = $helper->getConfig('galleriffic_width'); |
||
176 | $xoopsTpl->assign('content_width', $var_width + 10); |
||
177 | $var_width = $helper->getConfig('galleriffic_width') + $var_nav_width + 100; |
||
178 | $xoopsTpl->assign('page_width', $var_width); |
||
179 | |||
180 | $xoopsTpl->assign('pic_height', $helper->getConfig('galleriffic_height')); |
||
181 | $xoopsTpl->assign('pic_width', $helper->getConfig('galleriffic_width')); |
||
182 | $xoopsTpl->assign('galleriffic_show_descr', $helper->getConfig('galleriffic_show_descr')); |
||
183 | $xoopsTpl->assign('galleriffic_download', $helper->getConfig('galleriffic_download')); |
||
184 | |||
185 | include XOOPS_ROOT_PATH . '/footer.php'; |
||
186 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths