1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | define('GDTHEME_VERSION', '1.3.6'); |
---|
6 | |
---|
7 | define("QUOTES_NONE", FALSE); |
---|
8 | define("QUOTES_LAZY", 1); |
---|
9 | define("QUOTES_SINGLE", 2); |
---|
10 | define("QUOTES_SAFE", 4); |
---|
11 | |
---|
12 | final class greyDragonCore { |
---|
13 | |
---|
14 | // singleton instance |
---|
15 | private static $instance; |
---|
16 | private static $version; |
---|
17 | private $themeConfig; |
---|
18 | private $themeConfigMin; |
---|
19 | private $dir; |
---|
20 | private $cssfile; |
---|
21 | |
---|
22 | public static function Instance($ver = '') { |
---|
23 | if (!self::$instance): |
---|
24 | self::$instance = new self($ver); |
---|
25 | endif; |
---|
26 | return self::$instance; |
---|
27 | } |
---|
28 | |
---|
29 | private function __construct($ver = ''){ |
---|
30 | $this->dir = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'greydragon/'; |
---|
31 | |
---|
32 | self::loadConfig($ver); |
---|
33 | } |
---|
34 | |
---|
35 | private function getDefaults() { |
---|
36 | |
---|
37 | return array( |
---|
38 | "p_version" => array("value" => "", "quotes" => QUOTES_NONE), |
---|
39 | |
---|
40 | // General Settings |
---|
41 | "p_logo_path" => array("value" => null, "quotes" => QUOTES_NONE), |
---|
42 | "p_header" => array("value" => null, "quotes" => QUOTES_LAZY), |
---|
43 | "p_footer" => array("value" => null, "quotes" => QUOTES_LAZY), |
---|
44 | "p_colorpack" => array("value" => "greydragon", "quotes" => QUOTES_NONE), |
---|
45 | |
---|
46 | "p_favicon_ico" => array("value" => null, "quotes" => QUOTES_NONE), |
---|
47 | "p_favicon_png" => array("value" => "", "quotes" => QUOTES_NONE), |
---|
48 | "p_favicon_gif" => array("value" => "", "quotes" => QUOTES_NONE), |
---|
49 | "p_favicon_apple" => array("value" => "", "quotes" => QUOTES_NONE), |
---|
50 | "p_favicon_noshine" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
51 | |
---|
52 | // Advanced Options - General |
---|
53 | "p_fullscreen" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
54 | "p_main_menu" => array("value" => "closed", "quotes" => QUOTES_NONE), // static, closed, opened, top, header-bottom, header-top, disabled |
---|
55 | "p_animated_menu" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
56 | "p_main_menu_close" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
57 | |
---|
58 | "p_lowertext" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
59 | "p_credits" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
60 | "p_nogenerator" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
61 | "p_hideabout" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
62 | "p_adminemail" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
63 | "p_nocounter" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
64 | |
---|
65 | // Advanced Options - Photo Page |
---|
66 | "p_pict_tab_mode" => array("value" => "txt-tab-open", "quotes" => QUOTES_NONE), |
---|
67 | "p_pict_tab_default" => array("value" => "desc", "quotes" => QUOTES_NONE), |
---|
68 | "p_pict_tab_anim" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
69 | "p_pict_tab_exif" => array("value" => "on", "quotes" => QUOTES_NONE), |
---|
70 | |
---|
71 | // Advanced Options - Root Page |
---|
72 | "p_rootpage" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
73 | "p_rootpage_desc" => array("value" => null, "quotes" => QUOTES_SAFE | QUOTES_LAZY), |
---|
74 | "p_rootpage_link" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
75 | "p_rootpage_src" => array("value" => "slider", "quotes" => QUOTES_NONE), |
---|
76 | "p_rootpage_size" => array("value" => "M", "quotes" => QUOTES_NONE), |
---|
77 | "p_rootpage_id" => array("value" => 1, "quotes" => QUOTES_NONE), |
---|
78 | "p_rootpage_mode" => array("value" => "fade", "quotes" => QUOTES_NONE), |
---|
79 | "p_rootpage_delay" => array("value" => 10, "quotes" => QUOTES_NONE), |
---|
80 | "p_rootpage_elastic" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
81 | "p_rootpage_navarr" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
82 | "p_rootpage_navctr" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
83 | "p_rootpage_noclick" => array("value" => "off", "quotes" => QUOTES_NONE), |
---|
84 | |
---|
85 | 'p_customcss' => array("value" => null, "quotes" => (QUOTES_LAZY | QUOTES_SINGLE)), |
---|
86 | 'p_debug' => array("value" => "off", "quotes" => FALSE) |
---|
87 | ); |
---|
88 | } |
---|
89 | |
---|
90 | private function loadConfig($ver = '') { |
---|
91 | global $conf, $pwg_loaded_plugins; |
---|
92 | |
---|
93 | $this->themeConfigMin = unserialize($conf['greydragon']); |
---|
94 | $this->themeConfigMin["version"] = $ver; |
---|
95 | $this->themeConfigMin["hasUserTags"] = isset($pwg_loaded_plugins['user_tags']); |
---|
96 | |
---|
97 | $this->themeConfig = $this->validateDefault($this->themeConfigMin); |
---|
98 | } |
---|
99 | |
---|
100 | private function validateDefault($config) { |
---|
101 | |
---|
102 | // Check version, perform update if necessary |
---|
103 | if (!isset($config["p_version"]) || ($this->themeConfigMin["version"] !== $config["p_version"])): |
---|
104 | |
---|
105 | if (isset($config["p_favicon_path"])): |
---|
106 | $config["p_favicon_ico"] = $config["p_favicon_path"]; |
---|
107 | unset($config["p_favicon_path"]); |
---|
108 | endif; |
---|
109 | endif; |
---|
110 | |
---|
111 | $theme_default_settings = $this->getDefaults(); |
---|
112 | |
---|
113 | foreach ($theme_default_settings as $key => $value): |
---|
114 | if (isset($value["value"])): |
---|
115 | if (array_key_exists($key, $config)): |
---|
116 | else: |
---|
117 | $config[$key] = $value["value"]; |
---|
118 | endif; |
---|
119 | endif; |
---|
120 | endforeach; |
---|
121 | |
---|
122 | // Populate some system settings |
---|
123 | $url_root = get_root_url(); |
---|
124 | $config['U_SITE_ADMIN'] = $url_root . 'admin.php?page='; |
---|
125 | |
---|
126 | return $config; |
---|
127 | } |
---|
128 | |
---|
129 | public function initEvents() { |
---|
130 | } |
---|
131 | |
---|
132 | public function loadCSS() { |
---|
133 | } |
---|
134 | |
---|
135 | public function getConfig($isFull = TRUE) { |
---|
136 | if ($isFull): |
---|
137 | return $this->themeConfig; |
---|
138 | else: |
---|
139 | $config = $this->themeConfigMin; |
---|
140 | $config['p_version'] = GDTHEME_VERSION; |
---|
141 | return $config; |
---|
142 | endif; |
---|
143 | } |
---|
144 | |
---|
145 | public function setSetting($name, $value) { |
---|
146 | $this->themeConfig[$name] = $value; |
---|
147 | } |
---|
148 | |
---|
149 | public function saveSettingFromPOST($name) { |
---|
150 | $theme_default_settings = $this->getDefaults(); |
---|
151 | |
---|
152 | $isFound = FALSE; |
---|
153 | $isStored = FALSE; |
---|
154 | |
---|
155 | if (array_key_exists($name, $theme_default_settings)): |
---|
156 | $setting = $theme_default_settings[$name]; |
---|
157 | $default = $setting["value"]; |
---|
158 | $quotes = $setting["quotes"]; |
---|
159 | |
---|
160 | if (isset($_POST[$name]) and !empty($_POST[$name])): |
---|
161 | $isFound = TRUE; |
---|
162 | $value = $_POST[$name]; |
---|
163 | |
---|
164 | if ($value != $default): |
---|
165 | $isStored = TRUE; |
---|
166 | |
---|
167 | if ($quotes): |
---|
168 | if (($quotes & QUOTES_LAZY) == QUOTES_LAZY): |
---|
169 | $value = str_replace('\"', '"', $value); |
---|
170 | $value = str_replace("\'", "'", $value); |
---|
171 | endif; |
---|
172 | if (($quotes & QUOTES_SINGLE) == QUOTES_SINGLE): |
---|
173 | $value = str_replace("'", '"', $value); |
---|
174 | endif; |
---|
175 | if (($quotes & QUOTES_SAFE) == QUOTES_SAFE): |
---|
176 | $value = str_replace("'", ''', $value); |
---|
177 | $value = str_replace('"', '"', $value); |
---|
178 | endif; |
---|
179 | |
---|
180 | $value = str_replace("\'", "';", $value); |
---|
181 | endif; |
---|
182 | endif; |
---|
183 | endif; |
---|
184 | |
---|
185 | if ($isFound): |
---|
186 | $this->themeConfig[$name] = $value; |
---|
187 | if ($isStored): |
---|
188 | $this->themeConfigMin[$name] = $value; |
---|
189 | endif; |
---|
190 | endif; |
---|
191 | endif; |
---|
192 | |
---|
193 | // Config cleanup |
---|
194 | if ((!$isStored) && (array_key_exists($name, $this->themeConfigMin))): |
---|
195 | unset($this->themeConfigMin[$name]); |
---|
196 | endif; |
---|
197 | if ((!$isFound) && (array_key_exists($name, $this->themeConfig))): |
---|
198 | unset($this->themeConfig[$name]); |
---|
199 | endif; |
---|
200 | |
---|
201 | } |
---|
202 | |
---|
203 | public function saveSettingsFromPost(){ |
---|
204 | $theme_default_settings = $this->getDefaults(); |
---|
205 | |
---|
206 | if ((isset($_POST["p_reset"])) && ($_POST["p_reset"] == "on")): |
---|
207 | // Reset theme settings |
---|
208 | $config = array(); |
---|
209 | conf_update_param('greydragon', pwg_db_real_escape_string(serialize($config))); |
---|
210 | load_conf_from_db(); |
---|
211 | $this->loadConfig(); |
---|
212 | else: |
---|
213 | foreach ($theme_default_settings as $key => $value): |
---|
214 | $this->saveSettingFromPOST($key); |
---|
215 | endforeach; |
---|
216 | endif; |
---|
217 | } |
---|
218 | |
---|
219 | public function hasSettingFromPost($name) { |
---|
220 | return (isset($_POST[$name])); |
---|
221 | } |
---|
222 | |
---|
223 | public function getSettingFromPost($name) { |
---|
224 | if (isset($_POST[$name])): |
---|
225 | return $_POST[$name]; |
---|
226 | else: |
---|
227 | return FALSE; |
---|
228 | endif; |
---|
229 | } |
---|
230 | |
---|
231 | public function hasOption($name, $isGlobal = FALSE) { |
---|
232 | global $conf; |
---|
233 | |
---|
234 | if ($isGlobal): |
---|
235 | return (array_key_exists($name, $conf) && isset($conf[$name]) && ($conf[$name])); |
---|
236 | else: |
---|
237 | return (array_key_exists($name, $this->themeConfig)); |
---|
238 | endif; |
---|
239 | } |
---|
240 | |
---|
241 | public function deleteOption($name, $isGlobal = FALSE) { |
---|
242 | global $conf; |
---|
243 | |
---|
244 | if ($isGlobal): |
---|
245 | if (array_key_exists($name, $conf) && isset($conf[$name])): |
---|
246 | unset($conf[$name]); |
---|
247 | endif; |
---|
248 | else: |
---|
249 | if (array_key_exists($name, $this->themeConfig)): |
---|
250 | unset($this->themeConfig[$name]); |
---|
251 | endif; |
---|
252 | endif; |
---|
253 | } |
---|
254 | |
---|
255 | public function getOption($name, $isGlobal = FALSE) { |
---|
256 | global $conf; |
---|
257 | |
---|
258 | if ($isGlobal): |
---|
259 | if (array_key_exists($name, $conf)): |
---|
260 | return $conf[$name]; |
---|
261 | else: |
---|
262 | return FALSE; |
---|
263 | endif; |
---|
264 | else: |
---|
265 | if (array_key_exists($name, $this->themeConfig)): |
---|
266 | return $this->themeConfig[$name]; |
---|
267 | else: |
---|
268 | return FALSE; |
---|
269 | endif; |
---|
270 | endif; |
---|
271 | } |
---|
272 | |
---|
273 | public function hasCustomFavicon() { |
---|
274 | return ($this->hasOption("p_logo_path")); |
---|
275 | } |
---|
276 | |
---|
277 | public function update($old_version, $new_version) { |
---|
278 | $this->prepareCustomCSS(); |
---|
279 | } |
---|
280 | |
---|
281 | public function uninstall() { |
---|
282 | // delete configuration |
---|
283 | $this->deleteCustomCSS(); |
---|
284 | |
---|
285 | conf_delete_param('greydragon'); |
---|
286 | } |
---|
287 | |
---|
288 | public function prepareHomePage($prefix, $pageId) { |
---|
289 | |
---|
290 | $r_desc = $this->getOption('p_rootpage_desc'); |
---|
291 | $r_link = $this->getOption('p_rootpage_link'); |
---|
292 | $r_noclick = $this->getOption('p_rootpage_noclick'); |
---|
293 | $r_scr = $this->getOption('p_rootpage_src'); |
---|
294 | $r_size = $this->getOption('p_rootpage_size'); |
---|
295 | $r_mode = $this->getOption('p_rootpage_mode'); |
---|
296 | $r_id = $this->getOption('p_rootpage_id'); |
---|
297 | $r_delay = $this->getOption('p_rootpage_delay'); |
---|
298 | $r_elastic = ($this->getOption('p_rootpage_elastic') == "on")? 'true' : 'false'; |
---|
299 | $r_navarr = ($this->getOption('p_rootpage_navarr') == "on")? 'true' : 'false'; |
---|
300 | $r_navctr = ($this->getOption('p_rootpage_navctr') == "on")? 'true' : 'false'; |
---|
301 | |
---|
302 | $content = '<!-- GD Auto generated. Do not modify --> |
---|
303 | <style type="text/css"> |
---|
304 | .titrePage { display: none; } |
---|
305 | .content { max-width: 100%; margin: 0 !important; } |
---|
306 | </style> |
---|
307 | <div id="gdHomeContent">'; |
---|
308 | if ($r_desc): |
---|
309 | $content .= ' |
---|
310 | <div class="gdHomeQuote">' . l10n($r_desc) . '</div>'; |
---|
311 | endif; |
---|
312 | if ($r_link): |
---|
313 | $content .= ' |
---|
314 | <div class="gdHomeEnter"><a href="index.php?/categories">' . l10n('Click to Enter') . '</a></div>'; |
---|
315 | endif; |
---|
316 | $content .= ' |
---|
317 | <div class="gdHomePagePhoto">'; |
---|
318 | if ($r_noclick != "on"): |
---|
319 | $content .= ' |
---|
320 | <a href="index.php?/categories">'; |
---|
321 | endif; |
---|
322 | $content .= ' |
---|
323 | <!-- |
---|
324 | <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> |
---|
325 | <ol class="carousel-indicators"> |
---|
326 | <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> |
---|
327 | <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> |
---|
328 | <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> |
---|
329 | </ol> |
---|
330 | <div class="carousel-inner"> |
---|
331 | <div class="carousel-item active"> |
---|
332 | <img class="d-block w-100" src="..." alt="First slide"> |
---|
333 | </div> |
---|
334 | <div class="carousel-item"> |
---|
335 | <img class="d-block w-100" src="..." alt="Second slide"> |
---|
336 | </div> |
---|
337 | <div class="carousel-item"> |
---|
338 | <img class="d-block w-100" src="..." alt="Third slide"> |
---|
339 | </div> |
---|
340 | </div> |
---|
341 | <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> |
---|
342 | <span class="carousel-control-prev-icon" aria-hidden="true"></span> |
---|
343 | <span class="sr-only">Previous</span> |
---|
344 | </a> |
---|
345 | <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> |
---|
346 | <span class="carousel-control-next-icon" aria-hidden="true"></span> |
---|
347 | <span class="sr-only">Next</span> |
---|
348 | </a> |
---|
349 | </div> |
---|
350 | --> |
---|
351 | |
---|
352 | <div style="width: 800px; min-height: 500px; display: inline-block; overflow: hidden;"> |
---|
353 | '; |
---|
354 | |
---|
355 | if ($r_scr == "photo"): |
---|
356 | $content .= '[photo id=' . $r_id . ' size=' . $r_size . ' html=yes link=no]'; |
---|
357 | elseif ($r_scr == "random"): |
---|
358 | $content .= '[random album=' . $r_id . ' size=' . $r_size . ' html=yes link=no]'; |
---|
359 | else: |
---|
360 | $content .= '[slider album=' . $r_id . ' nb_images=10 random=yes size=' . $r_size . ' speed=' . $r_delay . ' title=no effect=' . $r_mode . ' arrows=' . $r_navarr . ' control=' . $r_navctr . ' elastic=' . $r_elastic . ']'; |
---|
361 | endif; |
---|
362 | $content .= ' |
---|
363 | </div>'; |
---|
364 | if ($r_noclick != "on"): |
---|
365 | $content .= ' |
---|
366 | </a>'; |
---|
367 | endif; |
---|
368 | $content .= ' |
---|
369 | </div> |
---|
370 | </div>'; |
---|
371 | |
---|
372 | $query = 'UPDATE ' . $prefix . 'additionalpages ' |
---|
373 | . 'SET content = "' . pwg_db_real_escape_string($content) . '" ' |
---|
374 | . ' , standalone = FALSE ' |
---|
375 | . 'WHERE (id = ' . $pageId . ') AND (content <> "' . pwg_db_real_escape_string($content) . '");'; |
---|
376 | pwg_query($query); |
---|
377 | return (pwg_db_changes() > 0); |
---|
378 | } |
---|
379 | |
---|
380 | public function getURLRoot() { |
---|
381 | $root_base = get_root_url(); |
---|
382 | if ($root_base): |
---|
383 | else: |
---|
384 | $root_base = '/'; |
---|
385 | endif; |
---|
386 | return $root_base; |
---|
387 | } |
---|
388 | |
---|
389 | public function getHeader() { |
---|
390 | global $conf; |
---|
391 | |
---|
392 | $content = ""; |
---|
393 | $root_base = $this->getURLRoot(); |
---|
394 | |
---|
395 | if ($this->hasOption('p_logo_path')): |
---|
396 | $content .= '<a title="Home" id="g-logo" href="' . get_gallery_home_url() . '"><img alt="Home" src="' . $root_base . $this->getOption('p_logo_path') . '"></a>'; |
---|
397 | endif; |
---|
398 | if ($this->hasOption('p_header')): |
---|
399 | $p_header = $this->getOption('p_header'); |
---|
400 | elseif ($this->hasOption('page_banner', TRUE)): |
---|
401 | $p_header = $this->getOption('page_banner', TRUE); |
---|
402 | else: |
---|
403 | $p_header = ""; |
---|
404 | endif; |
---|
405 | $p_header = trim(str_replace('%gallery_title%', $conf['gallery_title'], $p_header)); |
---|
406 | if (strlen($p_header) > 0): |
---|
407 | $content .= '<a title="Home" id="g-header-text" href="' . get_gallery_home_url() . '">' . $p_header . '</a>'; |
---|
408 | endif; |
---|
409 | |
---|
410 | return $content; |
---|
411 | } |
---|
412 | |
---|
413 | public function prepareCustomCSS() { |
---|
414 | |
---|
415 | $this->cssfile = dirname(dirname(dirname(dirname(__FILE__)))) . '/' . PWG_LOCAL_DIR . 'greydragon/custom.css'; |
---|
416 | |
---|
417 | if ($this->getOption('p_lowertext') == "on"): |
---|
418 | $css = "/* Theme dynamic settings. Do not modify */\n" |
---|
419 | . "html, body, input, select, textarea, file { text-transform: lowercase; }\n\n"; |
---|
420 | else: |
---|
421 | $css = ""; |
---|
422 | endif; |
---|
423 | $temp = $this->getOption('p_customcss'); |
---|
424 | if ($temp): |
---|
425 | $css .= "/* Custom CSS. Do not modify */\n" . $temp; |
---|
426 | endif; |
---|
427 | |
---|
428 | // create a local directory |
---|
429 | if (!file_exists($this->dir)): |
---|
430 | mkdir($this->dir, 0755); |
---|
431 | endif; |
---|
432 | |
---|
433 | if ($css): |
---|
434 | $handle = fopen($this->cssfile, "w"); |
---|
435 | if ($handle): |
---|
436 | fwrite($handle, $css); |
---|
437 | fclose($handle); |
---|
438 | endif; |
---|
439 | else: |
---|
440 | @unlink($this->cssfile); |
---|
441 | endif; |
---|
442 | } |
---|
443 | |
---|
444 | public function deleteCustomCSS() { |
---|
445 | |
---|
446 | // delete local folder |
---|
447 | foreach (scandir($this->dir) as $file): |
---|
448 | if ($file == '.' or $file == '..') continue; |
---|
449 | unlink($this->dir . $file); |
---|
450 | endforeach; |
---|
451 | rmdir($this->dir); |
---|
452 | } |
---|
453 | |
---|
454 | public function getColorPackList() { |
---|
455 | $themeroot = './themes/' . basename(dirname(dirname(__FILE__))) . '/'; |
---|
456 | |
---|
457 | $packlist = array(); |
---|
458 | $packroot = $themeroot . 'css/colorpack/'; |
---|
459 | foreach (scandir($packroot) as $pack_name): |
---|
460 | if (file_exists($packroot . "$pack_name/styles.css")): |
---|
461 | if ($pack_name[0] == "."): |
---|
462 | continue; |
---|
463 | endif; |
---|
464 | $packlist[] = $pack_name; |
---|
465 | endif; |
---|
466 | endforeach; |
---|
467 | return $packlist; |
---|
468 | } |
---|
469 | |
---|
470 | public function getPageTabs() { |
---|
471 | // metadata array |
---|
472 | // each tab represented by respected sub array |
---|
473 | // sub array need to include |
---|
474 | // "id" = unique id of the tab |
---|
475 | // "icon_class" = class to be used to render icon tabs |
---|
476 | // "title" = tab or menu block title |
---|
477 | // "content" = block content |
---|
478 | // "target" = optional, rendering target - "left", "top", "right", "bottom", not supported, reserved for future use |
---|
479 | // "combine" = combine_css or combine_js reference block |
---|
480 | // |
---|
481 | // prior to rendering, each element would be processed and converted into tab content in picture.tpl |
---|
482 | |
---|
483 | $metadata = array(); |
---|
484 | $metadata = trigger_change('gd_get_metadata', $metadata); |
---|
485 | |
---|
486 | $meta_icon = ""; |
---|
487 | $meta_text = ""; |
---|
488 | $meta_content = ""; |
---|
489 | |
---|
490 | foreach ($metadata as $item): |
---|
491 | |
---|
492 | $id = $item["id"]; |
---|
493 | $icon_class = $item["icon_class"]; |
---|
494 | $title = $item["title"]; |
---|
495 | $block_content = $item["content"]; |
---|
496 | $combine = $item["combine"]; |
---|
497 | $no_overlay = $item["no_overlay"]; |
---|
498 | |
---|
499 | if ($no_overlay): |
---|
500 | $meta_icon .= '<li class="ico-btn btn-' . $id . '">' . $block_content . '</li>'; |
---|
501 | else: |
---|
502 | $meta_icon .= '<li class="meta-' . $id . '{if $ico_mode=="on"} ' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}"{if $ico_mode=="on"} title="{"' . $title . '"|@translate}"{/if}>{if $ico_mode=="off"}' . $title . '{/if}</li>'; |
---|
503 | endif; |
---|
504 | |
---|
505 | $meta_text .= '<li class="{if $ico_mode=="on"}' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}" rel="tab-' . $id . '"{if $ico_mode=="on"} title="{"' . $title . '"|@translate}"{/if}>{if $ico_mode=="off"}' . $title . '{/if}</li>'; |
---|
506 | if (isset($combine)): |
---|
507 | $meta_content .= '{strip}' . $combine . '{strip}'; |
---|
508 | else: |
---|
509 | $meta_content .= '<div id="tab-' . $id . '" class="image-metadata-tab">' . $block_content . '</div>'; |
---|
510 | endif; |
---|
511 | endforeach; |
---|
512 | |
---|
513 | return array("icon" => $meta_icon, "text" => $meta_text, "content" => $meta_content); |
---|
514 | } |
---|
515 | } |
---|
516 | |
---|
517 | ?> |
---|