source: extensions/Fotorama/admin.php @ 30278

Last change on this file since 30278 was 30052, checked in by rvelices, 10 years ago

Fotorama use segmented views for large number of items
do not load plugin language and register event if not required
add event to allow video plugins to fill thumbnail.video and thumbnail.video_id (Fotorama can show youtube/vimeo videos during slideshow)

File size: 1.9 KB
Line 
1<?php
2
3defined('FOTORAMA_PATH') or die('Hacking attempt!');
4
5global $conf, $template, $page;
6load_language('plugin.lang', FOTORAMA_PATH);
7
8if (isset($_POST['submit']))
9{
10  $conf['Fotorama'] = array(
11    'shadows' => isset($_POST['shadows']),
12    'only_fullscreen' => isset($_POST['only_fullscreen']),
13    'autoplay' => isset($_POST['autoplay']),
14    'stopautoplayontouch' => isset($_POST['stopautoplayontouch']),
15    'loop' => isset($_POST['loop']),
16    'enable_caption' => isset($_POST['enable_caption']),
17    'replace_picture' => isset($_POST['replace_picture']),
18    'replace_picture_only_users' => isset($_POST['replace_picture_only_users']),
19    'clicktransition_crossfade' => isset($_POST['clicktransition_crossfade']),
20    'close_button' => isset($_POST['close_button']),
21    'resize' => isset($_POST['resize']),
22    'info_button' => isset($_POST['info_button']),
23    'square_thumb' => isset($_POST['square_thumb']),
24    );
25  if (isset($_POST['allowfullscreen']))
26    $conf['Fotorama']['allowfullscreen'] = $_POST['allowfullscreen'];
27  if (isset($_POST['fit']))
28    $conf['Fotorama']['fit'] = $_POST['fit'];
29  if (isset($_POST['transition']))
30    $conf['Fotorama']['transition'] = $_POST['transition'];
31  if (isset($_POST['nav']))
32    $conf['Fotorama']['nav'] = $_POST['nav'];
33  if (isset($_POST['fullscreen_nav']))
34    $conf['Fotorama']['fullscreen_nav'] = $_POST['fullscreen_nav'];
35  if (isset($_POST['thumbheight']))
36    $conf['Fotorama']['thumbheight'] = $_POST['thumbheight'];
37  if (isset($_POST['period']))
38    $conf['Fotorama']['period'] = $_POST['period'];
39
40  conf_update_param('Fotorama', serialize($conf['Fotorama']));
41  $page['infos'][] = l10n('Information data registered in database');
42}
43
44$template->assign(array(
45  'Fotorama' => $conf['Fotorama'],
46  ));
47
48$template->set_filename('plugin_admin_content', realpath(FOTORAMA_PATH . 'template/admin.tpl'));
49$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
50
51?>
Note: See TracBrowser for help on using the repository browser.