>
													<option value="" style="background-color:LightGray"><?php 
            echo gettext('none');
            ?>
</option>
													<?php 
            $curdir = getcwd();
            $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
            chdir($root);
            $filelist = safe_glob('*.php');
            $list = array();
            foreach ($filelist as $file) {
                $file = filesystemToInternal($file);
                $list[$file] = str_replace('.php', '', $file);
            }
            $list = array_diff($list, standardScripts());
            generateListFromArray(array(getThemeOption('custom_index_page', $album, $themename)), $list, false, true);
            chdir($curdir);
            ?>
												</select>
											</td>
											<td><?php 
            echo gettext("If this option is not empty, the Gallery Index URL that would normally link to the theme <code>index.php</code> script will instead link to this script. This frees up the <code>index.php</code> script so that you can create a customized <em>Home page</em> script. This option applies only to the main theme for the <em>Gallery</em>.");
            ?>
</td>
										</tr>
										<?php 
        }
        if (count($supportedOptions) > 0) {
            ?>
										<tr class="alt1" >
    function handleOption($option, $currentValue)
    {
        global $gallery;
        switch ($option) {
            case 'register_user_page':
                ?>
				<table>
					<tr>
						<td style="margin:0; padding:0"><?php 
                echo gettext('script');
                ?>
</td>
						<td style="margin:0; padding:0">
							<input type="hidden" name="_ZP_CUSTOM_selector-register_user_page_page" value="0" />
							<select id="register_user_page_page" name="register_user_page_page">
								<option value="" style="background-color:LightGray"><?php 
                echo gettext('*no page selected');
                ?>
</option>
								<?php 
                $curdir = getcwd();
                $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $gallery->getCurrentTheme() . '/';
                chdir($root);
                $filelist = safe_glob('*.php');
                $list = array();
                foreach ($filelist as $file) {
                    $list[] = str_replace('.php', '', filesystemToInternal($file));
                }
                $list = array_diff($list, standardScripts());
                generateListFromArray(array(getOption('register_user_page_page')), $list, false, false);
                chdir($curdir);
                ?>
							</select>
						</td>
					</tr>
					<tr>
						<td style="margin:0; padding:0"><?php 
                echo gettext('Link text');
                ?>
</td>
						<td style="margin:0; padding:0">
							<input type="hidden" name="_ZP_CUSTOM_text-register_user_page_link" value="0" />
							<?php 
                print_language_string_list(getOption('register_user_page_link'), 'register_user_page_link', false, NULL, '', TEXTAREA_COLUMNS_SHORT, 'language_string_list_short');
                ?>
						</td>
					</tr>
					<tr>
						<td style="margin:0; padding:0"><?php 
                echo gettext('Hint text');
                ?>
</td>
						<td style="margin:0; padding:0">
							<input type="hidden" name="_ZP_CUSTOM_text-register_user_page_tip" value="0" />
							<?php 
                print_language_string_list(getOption('register_user_page_tip'), 'register_user_page_tip', false, NULL, '', TEXTAREA_COLUMNS_SHORT, 'language_string_list_short');
                ?>
						</td>
					</tr>
				</table>
				<?php 
                break;
            case 'register_user_user_rights':
                printAdminRightsTable('register_user', '', '', getOption('register_user_user_rights'));
                break;
        }
    }
Exemple #3
0
 function getOptionsSupported()
 {
     global $_zp_gallery;
     $themename = $_zp_gallery->getCurrentTheme();
     $curdir = getcwd();
     $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
     chdir($root);
     $filelist = safe_glob('*.php');
     $list = array();
     foreach ($filelist as $file) {
         $file = filesystemToInternal($file);
         $list[$file] = str_replace('.php', '', $file);
     }
     $list = array_diff($list, standardScripts());
     $options = array(gettext('Link text') => array('key' => 'favorites_linktext', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 2, 'desc' => gettext('The text for the link to the favorites page.')), gettext('Multiple sets') => array('key' => 'favorites_multi', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('If enabled a user may have multiple (named) favorites.')), gettext('Add button') => array('key' => 'favorites_add_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 6, 'desc' => gettext('Default text for the <em>add to favorites</em> button.')), gettext('Remove button') => array('key' => 'favorites_remove_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 7, 'desc' => gettext('Default text for the <em>remove from favorites</em> button.')), gettext('Title') => array('key' => 'favorites_title', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 3, 'desc' => gettext('The favorites page title text.')), gettext('Description') => array('key' => 'favorites_desc', 'type' => OPTION_TYPE_TEXTAREA, 'multilingual' => true, 'order' => 5, 'desc' => gettext('The favorites page description text.')), gettext('Sort albums by') => array('key' => 'favorites_albumsort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 9, 'desc' => ''), gettext('Sort images by') => array('key' => 'favorites_imagesort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 10, 'desc' => ''));
     if (!MOD_REWRITE) {
         $options['note'] = array('key' => 'favorites_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => gettext('<p class="notebox">Favorites requires the <code>mod_rewrite</code> option be enabled.</p>'));
     }
     return $options;
 }
 function getOptionsSupported()
 {
     global $_zp_gallery;
     $themename = $_zp_gallery->getCurrentTheme();
     $curdir = getcwd();
     $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
     chdir($root);
     $filelist = safe_glob('*.php');
     $list = array();
     foreach ($filelist as $file) {
         $file = filesystemToInternal($file);
         $list[$file] = str_replace('.php', '', $file);
     }
     $list = array_diff($list, standardScripts());
     $all = query_full_array('SELECT `aux` FROM ' . prefix('plugin_storage') . ' WHERE `type`="favorites"');
     $disable = false;
     $text = gettext('If enabled a user may have multiple (named) favorites.');
     foreach ($all as $aux) {
         $instance = getSerializedArray($aux['aux']);
         if (isset($instance[1])) {
             $disable = true;
             $text .= '<br /><span class="warningbox">' . gettext('Named favorites are present.') . '</span>';
             break;
         }
     }
     $options = array(gettext('Link text') => array('key' => 'favorites_linktext', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 2, 'desc' => gettext('The text for the link to the favorites page.')), gettext('Multiple sets') => array('key' => 'favorites_multi', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'disabled' => $disable, 'desc' => $text), gettext('Add button') => array('key' => 'favorites_add_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 6, 'desc' => gettext('Default text for the <em>add to favorites</em> button.')), gettext('Remove button') => array('key' => 'favorites_remove_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 7, 'desc' => gettext('Default text for the <em>remove from favorites</em> button.')), gettext('Title') => array('key' => 'favorites_title', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 3, 'desc' => gettext('The favorites page title text.')), gettext('Description') => array('key' => 'favorites_desc', 'type' => OPTION_TYPE_TEXTAREA, 'multilingual' => true, 'order' => 5, 'desc' => gettext('The favorites page description text.')), gettext('Sort albums by') => array('key' => 'favorites_albumsort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 9, 'desc' => ''), gettext('Sort images by') => array('key' => 'favorites_imagesort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 10, 'desc' => ''));
     if (!MOD_REWRITE) {
         $options['note'] = array('key' => 'favorites_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => gettext('<p class="notebox">Favorites requires the <code>mod_rewrite</code> option be enabled.</p>'));
     }
     return $options;
 }