source: extensions/piclens/admin/piclenswallconfig2.php @ 3637

Last change on this file since 3637 was 3637, checked in by tiico, 15 years ago

Pb with last commit (3636)
Convert all file into UTF8 and Unix format
Add TODO in chinese language file

File size: 8.8 KB
Line 
1<?php
2/*
3 * Plugin Name: CoolIris-Piclens
4 * Version: 0.3.4
5 * Description: Cooliris/Piclens activation
6 * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=234
7 * Author: Tiico
8 * Author URI:
9 * */
10/********* Fichier piclenswallconfig2.php  *********/
11/* Advanced configuration for embeded wall
12
13backgroundAlpha — 0.0 to 1.0      Changes background transparency (Not Well Supported on IE).     To change the backgroundAlpha, you must set the FlashVar "wmode" to "transparent". You can change the alpha and color together.
14backgroundColor — Hexadecimal Color String     Sets a color for the background.     This can be specified in either of the usual HTML color formats (#FFFFFF or #FFF), or as a hexidecimal number (0xFFFFFF). Note that if you are setting the FlashVars in the SWF's url, you must escape the # character as %23.
15backgroundImage — URL     Specifies a background image for the wall.     The background image can be a PNG, GIF, or JPG. The background image covers the background color.
16customButton — imageURL,targetURL     Adds a custom button in the lower right corner of the toolbar.
17descriptionHeight — 0 to 100     Sets the percentage height of the name and description overlay when items are selected.
18feed — URL     Specifies the feed (MediaRSS or API) that the wall should display.
19glowColor — Hexadecimal Color String     Changes the color of the glow around the selected cell (Default is white).     The color string can be specified as it is for backgroundColor.
20icons — baseURL     Points to a directory of PNG images for custom toolbar icons.
21    The following filenames in the directory will be used:
22        * embed.png - Embed Code button
23        * fullscreen.png - Fullscreen/Launch Client button
24        * next.png - Next Item button
25        * pause.png - Pause Slideshow button
26        * play.png - Start Slideshow button.
27        * prev.png - Previous Item button
28        * search.png - Search button
29
30itemGUID — string     Sets the initially-selected item when the wall loads.     The wall will automatically select the item in a MediaRSS feed with the <guid> </guid> that matches the provided identifier. This enables you to provide "permalinks" to a particular item in the wall. Note that the desired item must be present in the initial feed loaded by the wall (it can't be in a next/previous feed).
31linkCSS — string     A CSS string to be applied to any HTML links in item descriptions.
32numRows — 1 to 7     Sets how many rows of images to show in the UI.     Note that as you show more rows, the wall is more CPU intensive and may run slower for older computers.
33showChrome — true | false     Shows or hides the bottom toolbar background.
34showDescription — true | false     Shows or hides the item description overlay.
35showReflections — true | false     Shows or hides the reflections under the images.     Hiding the reflections will improve performance.
36showEmbed — true | false     Shows or hides the Embed Code button.
37showSearch — true | false     Shows or hides the Search button.
38showTutorial — true | false     If set to true, show a tutorial message if the user does not click on the wall.     By default, the tutorial message says "Click and Drag to Begin", and will display after a few seconds of no interaction. This can be customized with the tutorial FlashVar.
39showNavArrows — true | false     Shows or hides the left/right navigation arrows.
40style — black | dark | light | white     Sets the theme to use for the wall.     This sets up different default background colors and button appearances.
41tilt — 0 to 5     Sets the amount of wall tilt (or disables it by setting it to 0).
42
43tutorial — delayInMillis,imageURL     Customizes the tutoril message and delay.     Instead of the simple Click & Drag to Begin, you can use your own tutorial message (as an image file). To customize the delay and tutorial, pass in a time value (in milliseconds) and a URL to your tutorial image. For example, tutorial=4500,images/tutorial.png will show the designed PNG in 4.5 seonds, unless the user starts interacting with the wall.
44*/
45
46if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
47
48global $template, $page;
49 
50$pwgstuff_ok = get_db_plugins('active','PWG_Stuffs');
51$me = get_plugin_data($plugin_id);
52
53 $template->set_filenames( 
54                array('plugin_admin_content' => PICLENS_ROOT.'/admin/piclenswallconfig2.tpl'             
55                        ) );
56
57                       
58
59if (isset($_POST['submit'])) { 
60        $me->my_config['piclens_wall_color'] =   $_POST['background_color'];
61        $me->my_config['piclens_wall_showembed'] = isset($_POST['piclens_wall_embed']);
62        $me->my_config['piclens_wall_showfullscreen'] = isset($_POST['piclens_wall_fullscreen']);
63        $me->my_config['piclens_wall_showsearch'] = isset($_POST['piclens_wall_search']);
64        $me->my_config['piclens_wall_transparent'] =   isset($_POST['piclens_wall_transparent']);
65        $me->my_config['piclens_wall_showChrome']  = isset($_POST['piclens_wall_showChrome']);
66        $me->my_config['piclens_wall_showDescription']  = isset($_POST['piclens_wall_showDescription']);
67        $me->my_config['piclens_wall_showReflections']  = isset($_POST['piclens_wall_showReflections']);
68        $me->my_config['piclens_wall_showTutorial']  = isset($_POST['piclens_wall_showTutorial']);
69        $me->my_config['piclens_wall_showNavArrows']  = isset($_POST['piclens_wall_showNavArrows']);
70        $me->my_config['piclens_wall_nb_ligne']     = $_POST['piclens_wall_nb_ligne'];
71        $me->my_config['piclens_wall_backgroundAlpha']     = $_POST['piclens_wall_backgroundAlpha'];
72
73        $me->my_config['piclens_wall_backgroundColor']  = $_POST['piclens_wall_backgroundColor'];
74        $me->my_config['piclens_wall_glowColor']  = $_POST['piclens_wall_glowColor'];
75        $me->my_config['piclens_wall_descriptionHeight'] = $_POST['piclens_wall_descriptionHeight'];
76        $me->my_config['piclens_wall_tilt'] = $_POST['piclens_wall_tilt'];
77
78        $me->my_config['piclens_wall_backgroundImage']  = $_POST['piclens_wall_backgroundImage'];
79        $me->my_config['piclens_wall_tutorial'] = $_POST['piclens_wall_tutorial'];
80        $me->my_config['piclens_wall_tutorialtime']     = $_POST['piclens_wall_tutorialtime'];
81        $me->my_config['piclens_wall_customButtonURL'] = $_POST['piclens_wall_customButtonURL'];
82        $me->my_config['piclens_wall_customButtonTARGET'] = $_POST['piclens_wall_customButtonTARGET'];
83        $me->my_config['piclens_wall_icons']  = $_POST['piclens_wall_icons'];
84        $me->my_config['piclens_wall_linkCSS']  = $_POST['piclens_wall_linkCSS'];
85        $me->save_config();
86        array_push($page['infos'], l10n('piclens_admin_saveOK'));
87       
88}
89
90
91
92
93
94$template->assign(array(
95        $me->my_config['piclens_wall_color'].'_CHECKED'         => 'checked="checked"',
96        'PICLENS_WALL_EMBED'                                                            => ($me->my_config['piclens_wall_showembed'] ? 'checked="checked"' : '' ),
97        'PICLENS_WALL_FULLSCREEN'                                                       => ($me->my_config['piclens_wall_showfullscreen'] ? 'checked="checked"' : '' ),
98        'PICLENS_WALL_SEARCH'                                                           => ($me->my_config['piclens_wall_showsearch'] ? 'checked="checked"' : '' ),
99        'PICLENS_WALL_TRANSPARENT'                                                      => ($me->my_config['piclens_wall_transparent'] ? 'checked="checked"' : '' ),
100
101        'PICLENS_WALL_SHOWCHROME'                                                       => ($me->my_config['piclens_wall_showChrome'] ? 'checked="checked"' : '' ),
102        'PICLENS_WALL_SHOWDESCRIPTION'                                                  => ($me->my_config['piclens_wall_showDescription'] ? 'checked="checked"' : '' ),
103        'PICLENS_WALL_SHOWREFLECTIONS'                                                  => ($me->my_config['piclens_wall_showReflections'] ? 'checked="checked"' : '' ),
104        'PICLENS_WALL_SHOWTUTORIAL'                                                     => ($me->my_config['piclens_wall_showTutorial'] ? 'checked="checked"' : '' ),
105        'PICLENS_WALL_SHOWNAVARROWS'                                                    => ($me->my_config['piclens_wall_showNavArrows'] ? 'checked="checked"' : '' ),
106        'PICLENS_WALL_NB_LIGNE'                                                 => $me->my_config['piclens_wall_nb_ligne'],
107        'PICLENS_WALL_BACKGROUNDALPHA'                                          => $me->my_config['piclens_wall_backgroundAlpha'],
108       
109    'PICLENS_WALL_BACKGROUNDCOLOR'                              => $me->my_config['piclens_wall_backgroundColor'],
110        'PICLENS_WALL_GLOWCOLOR'                                        => $me->my_config['piclens_wall_glowColor'],
111        'PICLENS_WALL_DESCRIPTIONHEIGHT'                        => $me->my_config['piclens_wall_descriptionHeight'],
112        'PICLENS_WALL_TILT'                                                     => $me->my_config['piclens_wall_tilt'],
113        'PICLENS_WALL_BACKGROUNDIMAGE'                          => $me->my_config['piclens_wall_backgroundImage'],
114        'PICLENS_WALL_TUTORIALTIME'                                     => $me->my_config['piclens_wall_tutorialtime'],
115        'PICLENS_WALL_TUTORIAL'                                         => $me->my_config['piclens_wall_tutorial'],
116        'PICLENS_WALL_CUSTOMBUTTONURL'                          => $me->my_config['piclens_wall_customButtonURL'],
117        'PICLENS_WALL_CUSTOMBUTTONTARGET'                       => $me->my_config['piclens_wall_customButtonTARGET'],
118        'PICLENS_WALL_ICONS'                                            => $me->my_config['piclens_wall_icons'],
119        'PICLENS_WALL_LINKCSS'                                          => $me->my_config['piclens_wall_linkCSS'],
120       
121        ));
122
123$template->assign(array('OTHERS_SCRIPT' =>
124                        '<script type="text/javascript" src="'.PICLENS_PATH.'farbtastic/farbtastic.js"></script>
125                        <link href="'.PICLENS_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css"  />'));
126       
127$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
128
129?>
Note: See TracBrowser for help on using the repository browser.