<?php # # Annotate setup page # // Do the include and authorization checking ritual -- don't change this section. include '../../../include/db.php'; include '../../../include/authenticate.php'; if (!checkperm('a')) { exit($lang['error-permissiondenied']); } include '../../../include/general.php'; // Specify the name of this plugin and the heading to display for the page. $plugin_name = 'annotate'; $plugin_page_heading = $lang['annotate_configuration']; // Build the $page_def array of descriptions of each configuration variable the plugin uses. $page_def[] = config_add_text_list_input('annotate_ext_exclude', $lang['extensions_to_exclude']); $page_def[] = config_add_multi_rtype_select('annotate_rt_exclude', $lang['resource_types_to_exclude']); $page_def[] = config_add_single_select('annotate_font', $lang['annotate_font'], array('helvetica', 'dejavusanscondensed'), false); $page_def[] = config_add_boolean_select('annotate_debug', $lang['annotatedebug']); $page_def[] = config_add_boolean_select('annotate_public_view', $lang['annotate_public_view']); $page_def[] = config_add_boolean_select('annotate_show_author', $lang['annotate_show_author']); $page_def[] = config_add_boolean_select('annotate_pdf_output', $lang["annotate_pdf_output"]); $page_def[] = config_add_boolean_select('annotate_pdf_output_only_annotated', $lang["annotate_pdf_output_only_annotated"]); // Do the page generation ritual -- don't change this section. $upload_status = config_gen_setup_post($page_def, $plugin_name); include '../../../include/header.php'; config_gen_setup_html($page_def, $plugin_name, $upload_status, $plugin_page_heading); include '../../../include/footer.php';
$page_intro = str_replace("[lastcheck]", nicedate($last_checkmail, true), $lang['checkmail_lastcheck'] . "<br /><br />"); $timediff = strtotime($now) - strtotime($last_checkmail); if ($timediff > 300) { $page_intro .= $lang['checkmail_cronjobprob']; } } } // Build configuration variable descriptions $page_def[] = config_add_text_input("checkmail_imap_server", $lang["checkmail_imap_server"]); $page_def[] = config_add_text_input("checkmail_email", $lang["checkmail_email"]); $page_def[] = config_add_text_input("checkmail_password", $lang["checkmail_password"], true); $page_def[] = config_add_multi_user_select("checkmail_users", $lang["checkmail_users"]); $page_def[] = config_add_single_ftype_select("checkmail_subject_field", $lang["checkmail_subject_field"]); $page_def[] = config_add_single_ftype_select("checkmail_body_field", $lang["checkmail_body_field"]); $page_def[] = config_add_single_select("checkmail_default_access", $lang["checkmail_default_access"], array(2 => $lang["access2"], 1 => $lang["access1"], 0 => $lang["access0"])); $page_def[] = config_add_single_select("checkmail_default_archive", $lang["checkmail_default_archive"], array(-2 => $lang["status-2"], -1 => $lang["status-1"], 0 => $lang["status0"], 1 => $lang["status1"], 2 => $lang["status2"], 3 => $lang["status3"])); $page_def[] = config_add_boolean_select("checkmail_html", $lang["checkmail_html"]); $page_def[] = config_add_boolean_select("checkmail_purge", $lang["checkmail_purge"]); $page_def[] = config_add_boolean_select("checkmail_confirm", $lang["checkmail_confirm"]); // extensions. This technique of dynamic config form generation (based on installation-specifics) might be generally useful. $page_def[] = config_add_section_header($lang['checkmail_extension_mapping'], $lang['checkmail_extension_mapping_desc']); $page_def[] = config_add_single_rtype_select("checkmail_default_resource_type", $lang['checkmail_default_resource_type']); $resource_types = get_resource_types(); foreach ($resource_types as $resource_type) { $safe_varname = "resourcetype" . $resource_type['ref']; if (!isset(${$safe_varname})) { ${$safe_varname} = $resource_type['allowed_extensions']; if (${$safe_varname} == "") { $page_def[] = config_add_text_input($safe_varname, $resource_type['name']); } else { $page_def[] = config_add_text_input($safe_varname, $resource_type['name'] . " " . $lang['checkmail_resource_type_population']);
$page_def[] = config_add_boolean_select('terms_download', $lang['systemconfig_terms_download_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_boolean_select('terms_login', $lang['systemconfig_terms_login_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_boolean_select('user_rating', $lang['systemconfig_user_rating_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_html('</div>'); // Security section $page_def[] = config_add_html('<h3 class="CollapsibleSectionHead collapsed">' . $lang['systemconfig_security'] . '</h3><div id="SystemConfigSecuritySection" class="CollapsibleSection">'); $page_def[] = config_add_single_select('password_min_length', $lang['systemconfig_password_min_length_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_min_alpha', $lang['systemconfig_password_min_alpha_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_min_numeric', $lang['systemconfig_password_min_numeric_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_min_uppercase', $lang['systemconfig_password_min_uppercase_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_min_special', $lang['systemconfig_password_min_special_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_expiry', $lang['systemconfig_password_expiry_label'], array_merge(array(0 => $lang['never']), range(1, 90)), true, 300, '', true); $page_def[] = config_add_single_select('max_login_attempts_per_ip', $lang['systemconfig_max_login_attempts_per_ip_label'], range(10, 50), false, 300, '', true); $page_def[] = config_add_single_select('max_login_attempts_per_username', $lang['systemconfig_max_login_attempts_per_username_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('max_login_attempts_wait_minutes', $lang['systemconfig_max_login_attempts_wait_minutes_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_single_select('password_brute_force_delay', $lang['systemconfig_password_brute_force_delay_label'], range(0, 30), false, 300, '', true); $page_def[] = config_add_html('</div>'); // Let plugins hook onto page definition and add their own configs if needed // or manipulate the list $plugin_specific_definition = hook('add_system_config_page_def', '', array($page_def)); if (is_array($plugin_specific_definition) && !empty($plugin_specific_definition)) { $page_def = $plugin_specific_definition; } config_generate_html($page_def); ?> </div> <script>registerCollapsibleSections(false);</script> <?php config_generate_AutoSaveConfigOption_function($baseurl . '/pages/admin/admin_system_config.php'); ?> </div>
// Do the include and authorization checking ritual. include '../../../include/db.php'; include '../../../include/general.php'; include '../../../include/authenticate.php'; if (!checkperm('a')) { exit($lang['error-permissiondenied']); } // Specify the name of this plugin and the heading to display for the page. $plugin_name = 'magictouch'; $plugin_page_heading = $lang['magictouch_configuration']; // Build the $page_def array of descriptions of each configuration variable the plugin uses. // Each element of $page_def describes one configuration variable. Each description is // created by one of the config_add_xxxx helper functions. See their definitions and // descriptions in include/plugin_functions for more information. $page_def[] = config_add_text_input('magictouch_account_id', $lang['magic_touch_key']); $page_def[] = config_add_single_select('magictouch_secure', $lang['https'], array('https', 'http'), false); $page_def[] = config_add_text_list_input('magictouch_ext_exclude', $lang['extensions_to_exclude']); $page_def[] = config_add_multi_rtype_select('magictouch_rt_exclude', $lang['resource_types_to_exclude']); $page_def[] = config_add_text_list_input('magictouch_view_page_sizes', $lang['view_page_sizes']); $page_def[] = config_add_text_list_input('magictouch_preview_page_sizes', $lang['preview_page_sizes']); // Do the page generation ritual. $upload_status = config_gen_setup_post($page_def, $plugin_name); include '../../../include/header.php'; $frontm = ''; if ($magictouch_account_id == '') { $frontm .= $lang['get-magictouch']; $frontm .= '<br /><br />'; $frontm .= $lang['configure-account-id-and-register-domain']; $frontm .= '<br /><br />'; } config_gen_setup_html($page_def, $plugin_name, $upload_status, $plugin_page_heading, $frontm);
$identcommand = $identify_fullpath . ' -list font | grep Font:'; $identoutput = run_command($identcommand); # Get a list of available fonts from IM $imfonts = explode("\n", $identoutput); $imfontcount = count($imfonts); for ($n = 0; $n < $imfontcount; $n++) { $imfonts[$n] = trim_spaces(str_replace("Font: ", "", $imfonts[$n])); } natsort($imfonts); // Specify the name of this plugin and the heading to display for the page. $plugin_name = 'image_text'; $plugin_page_heading = $lang['image_text_configuration']; // Build the $page_def array of descriptions of each configuration variable the plugin uses. $page_def[] = config_add_html($lang['image_text_summary']); $page_def[] = config_add_single_ftype_select('image_text_field_select', $lang['image_text_field_select']); $page_def[] = config_add_multi_rtype_select('image_text_restypes', $lang['image_text_restypes']); $page_def[] = config_add_text_list_input('image_text_filetypes', $lang['image_text_filetypes']); $page_def[] = config_add_multi_group_select('image_text_override_groups', $lang['image_text_override_groups']); $page_def[] = config_add_text_input('image_text_default_text', $lang['image_text_default_text']); $page_def[] = config_add_single_select('image_text_font', $lang['image_text_font'], array_filter($imfonts), false); $page_def[] = config_add_single_select('image_text_position', $lang['image_text_position'], $lang['image_text_position_list']); $page_def[] = config_add_single_select('image_text_banner_position', $lang['image_text_banner_position'], $lang['image_text_banner_position_list']); //$page_def[] = config_add_text_input('image_text_font',$lang['image_text_font']); $page_def[] = config_add_text_input('image_text_height_proportion', $lang['image_text_height_proportion']); $page_def[] = config_add_text_input('image_text_max_height', $lang['image_text_max_height']); $page_def[] = config_add_text_input('image_text_min_height', $lang['image_text_min_height']); // Do the page generation ritual -- don't change this section. $upload_status = config_gen_setup_post($page_def, $plugin_name); include '../../../include/header.php'; config_gen_setup_html($page_def, $plugin_name, $upload_status, $plugin_page_heading); include '../../../include/footer.php';
$identcommand = $identify_fullpath . ' -list font | grep Font:'; $identoutput = run_command($identcommand); # Get a list of available fonts from IM $imfonts = explode("\n", $identoutput); $imfontcount = count($imfonts); for ($n = 0; $n < $imfontcount; $n++) { $imfonts[$n] = trim_spaces(str_replace("Font: ", "", $imfonts[$n])); } sort($imfonts, SORT_NATURAL); // Specify the name of this plugin and the heading to display for the page. $plugin_name = 'image_text'; $plugin_page_heading = $lang['image_text_configuration']; // Build the $page_def array of descriptions of each configuration variable the plugin uses. $page_def[] = config_add_html($lang['image_text_summary']); $page_def[] = config_add_single_ftype_select('image_text_field_select', $lang['image_text_field_select']); $page_def[] = config_add_multi_rtype_select('image_text_restypes', $lang['image_text_restypes']); $page_def[] = config_add_text_list_input('image_text_filetypes', $lang['image_text_filetypes']); $page_def[] = config_add_multi_group_select('image_text_override_groups', $lang['image_text_override_groups']); $page_def[] = config_add_text_input('image_text_default_text', $lang['image_text_default_text']); $page_def[] = config_add_single_select('image_text_font', $lang['image_text_font'], array_filter($imfonts), false); $page_def[] = config_add_single_select('image_text_position', $lang['image_text_position'], array("east", "west", "center"), false); $page_def[] = config_add_single_select('image_text_banner_position', $lang['image_text_banner_position'], array("top", "bottom"), false); //$page_def[] = config_add_text_input('image_text_font',$lang['image_text_font']); $page_def[] = config_add_text_input('image_text_height_proportion', $lang['image_text_height_proportion']); $page_def[] = config_add_text_input('image_text_max_height', $lang['image_text_max_height']); $page_def[] = config_add_text_input('image_text_min_height', $lang['image_text_min_height']); // Do the page generation ritual -- don't change this section. $upload_status = config_gen_setup_post($page_def, $plugin_name); include '../../../include/header.php'; config_gen_setup_html($page_def, $plugin_name, $upload_status, $plugin_page_heading); include '../../../include/footer.php';
$sort_order_fields['field' . $sf[$x]['ref']] = htmlspecialchars($sf[$x]['title']); } } $page_def[] = config_add_html('<h2 class="CollapsibleSectionHead">' . $lang['resultsdisplay'] . '</h2><div id="UserPreferenceResultsDisplaySection" class="CollapsibleSection">'); $page_def[] = config_add_single_select('default_sort', $lang['userpreference_default_sort_label'], $sort_order_fields, true, 300, '', true); $page_def[] = config_add_single_select('default_perpage', $lang['userpreference_default_perpage_label'], array(24, 48, 72, 120, 240), false, 300, '', true); $page_def[] = config_add_single_select('default_display', $lang['userpreference_default_display_label'], array('smallthumbs' => $lang['smallthumbstitle'], 'thumbs' => $lang['largethumbstitle'], 'xlthumbs' => $lang['xlthumbstitle'], 'list' => $lang['listtitle']), true, 300, '', true); $page_def[] = config_add_boolean_select('use_checkboxes_for_selection', $lang['userpreference_use_checkboxes_for_selection_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_boolean_select('resource_view_modal', $lang['userpreference_resource_view_modal_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_html('</div>'); ?> <?php // User interface section $page_def[] = config_add_html('<h2 class="CollapsibleSectionHead">' . $lang['userpreference_user_interface'] . '</h2><div id="UserPreferenceUserInterfaceSection" class="CollapsibleSection">'); $page_def[] = config_add_single_select('thumbs_default', $lang['userpreference_thumbs_default_label'], array('show' => $lang['showthumbnails'], 'hide' => $lang['hidethumbnails']), true, 300, '', true); $page_def[] = config_add_boolean_select('basic_simple_search', $lang['userpreference_basic_simple_search_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_html('</div>'); // Email section $page_def[] = config_add_html('<h2 class="CollapsibleSectionHead">' . $lang['email'] . '</h2><div id="UserPreferenceEmailSection" class="CollapsibleSection">'); $page_def[] = config_add_boolean_select('cc_me', $lang['userpreference_cc_me_label'], $enable_disable_options, 300, '', true); $page_def[] = config_add_html('</div>'); // Let plugins hook onto page definition and add their own configs if needed // or manipulate the list $plugin_specific_definition = hook('add_user_preference_page_def', '', array($page_def)); if (is_array($plugin_specific_definition) && !empty($plugin_specific_definition)) { $page_def = $plugin_specific_definition; } config_generate_html($page_def); ?> </div>
$plugin_name = 'sample'; $page_heading = $lang['sample_plugin_heading']; $page_intro = '<p>' . $lang['sample_frontm'] . '</p>'; // Build the $page_def array of descriptions of each configuration variable the sample uses. // Each element of $page_def describes one configuration variable. Each description is // created by one of the config_add_xxxx helper functions. See their definitions and // descriptions in include/plugin_functions for more information. // // The sample plugin has four configuration variables: // // 1) $sample_pets_owned is a string array variable whose values are drawn from // the indices of the array $lang['sample_pet_type_list']. For the UI the textual // description for this variable is in $lang['sample_pets_owned']. We use // config_add_multi_select() because we want a multi-select UI for this variable. // 2) $sample_favorite_pet_type is a string variable whose value is drawn from the indices // of the array $lang['sample_pet_type_list']. Its UI description is in // $lang['sample_favorite_pet_type']. We want a single-select UI. // 3) $sample_favorite_pet_name is a string variable whose value is typed by the user. // The description for the UI is in $lang['sample_favorite_pet_name'] // 4) $sample_favorite_pet_living is a boolean variable. Normally the UI for a boolean // displays the choices "False" and "True" (in the local language) but here we // specify we want it to show "No" and "Yes" (in the local language). $page_def[] = config_add_multi_select('sample_pets_owned', $lang['sample_pets_owned'], $lang['sample_pet_type_list']); $page_def[] = config_add_single_select('sample_favorite_pet_type', $lang['sample_favorite_pet_type'], $lang['sample_pet_type_list']); $page_def[] = config_add_text_input('sample_favorite_pet_name', $lang['sample_favorite_pet_name']); $page_def[] = config_add_boolean_select('sample_favorite_pet_living', $lang['sample_favorite_pet_living'], $lang['no-yes']); // Do the page generation ritual $upload_status = config_gen_setup_post($page_def, $plugin_name); include '../../../include/header.php'; config_gen_setup_html($page_def, $plugin_name, $upload_status, $page_heading, $page_intro); include '../../../include/footer.php';