/**
 * Store or update an array of values
 * @param $pArray an array of values to set
 * @param $pPackageName name of the package the feature belongs to
 * @return none
 */
function simple_set_configs($pArray, $pPackageName = NULL)
{
    foreach ($pArray as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, $pPackageName);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, $pPackageName);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, $pPackageName);
        }
    }
}
Пример #2
0
<?php

/**
 * @version $Header$
 *
 * @author lsces
 * @package nlpg
 * @subpackage functions
 */
/**
 * required setup
 */
$formNlpgDisplayOptions = array("nlpg_maplink" => array('label' => 'Include links to map pages', 'note' => 'Expand coordinate displays to include links to map packages. The maps packagas available are defined separatly.', 'type' => 'toggle'), "nlpg_default_ordering" => array('label' => 'Initial ordering of results', 'note' => 'Used to supply the initial display ordering.', 'type' => 'input'));
$gBitSmarty->assign('formNlpgDisplayOptions', $formNlpgDisplayOptions);
$formNlpgFeatureOptions = array("nlpg_edit" => array('label' => 'On-line editing', 'note' => 'Enable on-line edit pages for NLPG information. Additional to edit permission controls to allow finer management.', 'type' => 'toggle'));
$gBitSmarty->assign('formNlpgFeatureOptions', $formNlpgFeatureOptions);
if (!empty($_REQUEST['nlpg_preferences'])) {
    $nlpg_opt = array_merge($formNlpgDisplayOptions, $formNlpgFeatureOptions);
    foreach ($nlpg_opt as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, NLPG_PKG_NAME);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, NLPG_PKG_NAME);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, NLPG_PKG_NAME);
        }
    }
}
Пример #3
0
if (isset($_REQUEST['mvimg']) && isset($_REQUEST['move_gallery'])) {
    check_ticket('admin-inc-gal');
    if ($_REQUEST['mvimg'] == 'to_fs' && $prefs['gal_use_db'] == 'n' || $_REQUEST['mvimg'] == 'to_db' && $prefs['gal_use_db'] == 'y') {
        $mvresult = $imagegallib->move_gallery_store($_REQUEST['move_gallery'], $_REQUEST['mvimg']);
        $mvmsg = sprintf(tra('moved %d images, %d errors occurred.'), $mvresult['moved_images'], $mvresult['errors']);
        if ($mvresult['timeout']) {
            $mvmsg .= ' ' . tra('a timeout occurred. Hit the reload button to move the rest');
        }
        $tikifeedback[]['mes'] = $mvmsg;
    }
}
if (isset($_REQUEST['imagegallistprefs'])) {
    check_ticket('admin-inc-gal');
    $pref_toggles = array('gal_list_name', 'gal_list_parent', 'gal_list_description', 'gal_list_created', 'gal_list_lastmodif', 'gal_list_user', 'gal_list_imgs', 'gal_list_visits');
    foreach ($pref_toggles as $toggle) {
        simple_set_toggle($toggle);
    }
}
if (isset($_REQUEST['imagegalcomprefs'])) {
    check_ticket('admin-inc-gal');
    simple_set_value('image_galleries_comments_per_page');
    simple_set_value('image_galleries_comments_default_order');
}
if (isset($_REQUEST['mvimg']) && isset($_REQUEST['move_gallery'])) {
    check_ticket('admin-inc-gal');
    if ($_REQUEST['mvimg'] == 'to_fs' && $prefs['gal_use_db'] == 'n' || $_REQUEST['mvimg'] == 'to_db' && $prefs['gal_use_db'] == 'y') {
        $mvresult = $imagegallib->move_gallery_store($_REQUEST['move_gallery'], $_REQUEST['mvimg']);
        $mvmsg = sprintf(tra('moved %d images, %d errors occurred.'), $mvresult['moved_images'], $mvresult['errors']);
        if ($mvresult['timeout']) {
            $mvmsg .= ' ' . tra('a timeout occurred. Hit the reload button to move the rest');
        }
Пример #4
0
 simple_set_value('fgal_list_last_user');
 simple_set_value('fgal_list_comment');
 simple_set_value('fgal_list_files');
 simple_set_value('fgal_list_hits');
 simple_set_value('fgal_list_lastDownload');
 simple_set_value('fgal_list_deleteAfter');
 simple_set_value('fgal_show_checked');
 simple_set_value('fgal_list_share');
 simple_set_value('fgal_list_lockedby');
 $_REQUEST['fgal_sort_mode'] = (empty($_REQUEST['fgal_sortorder']) ? 'created' : $_REQUEST['fgal_sortorder']) . '_' . (empty($_REQUEST['fgal_sortdirection']) ? 'desc' : $_REQUEST['fgal_sortdirection']);
 $prefs['fgal_sort_mode'] = $_REQUEST['fgal_sort_mode'];
 simple_set_value('fgal_sort_mode');
 simple_set_toggle('fgal_show_explorer');
 simple_set_toggle('fgal_show_path');
 simple_set_toggle('fgal_show_slideshow');
 simple_set_toggle('fgal_list_ratio_hits');
 simple_set_value('fgal_default_view');
 simple_set_value('fgal_icon_fileId');
 simple_set_value('fgal_list_backlinks');
 simple_set_value('fgal_list_id_admin');
 simple_set_value('fgal_list_type_admin');
 simple_set_value('fgal_list_name_admin');
 simple_set_value('fgal_list_description_admin');
 simple_set_value('fgal_list_size_admin');
 simple_set_value('fgal_list_created_admin');
 simple_set_value('fgal_list_lastModif_admin');
 simple_set_value('fgal_list_creator_admin');
 simple_set_value('fgal_list_author_admin');
 simple_set_value('fgal_list_last_user_admin');
 simple_set_value('fgal_list_comment_admin');
 simple_set_value('fgal_list_files_admin');
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_messages.php,v 1.1.2.1 2008-03-16 17:43:14 luciash Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["messagesprefs"])) {
    ask_ticket('admin-inc-messages');
    simple_set_value('messu_mailbox_size');
    simple_set_value('messu_archive_size');
    simple_set_value('messu_sent_size');
    simple_set_toggle('allowmsg_is_optional');
    simple_set_toggle('allowmsg_by_default');
}
Пример #6
0
        $access->display_error(basename(__FILE__), $msg);
    }
    $adminlib->restore_tag($_REQUEST['tagname']);
}
if (isset($_REQUEST['removetag'])) {
    check_ticket('admin-inc-wiki');
    // Check existance
    $adminlib->remove_tag($_REQUEST['tagname']);
}
if (isset($_REQUEST['rmvunusedpic'])) {
    check_ticket('admin-inc-wiki');
    $adminlib->remove_unused_pictures();
}
if (isset($_REQUEST['wikidiscussprefs'])) {
    check_ticket('admin-inc-wiki');
    simple_set_toggle('feature_wiki_discuss');
    simple_set_value('wiki_forum_id');
}
if (isset($_REQUEST['wikifeatures'])) {
    check_ticket('admin-inc-wiki');
    if (isset($_REQUEST['feature_backlinks']) && $_REQUEST['feature_backlinks'] == 'on' && $prefs['feature_backlinks'] == 'y' || empty($_REQUEST['feature_backlinks']) && $prefs['feature_backlinks'] == 'y') {
        $backlinksChange = true;
    }
    if (isset($backlinksChange) && $backlinksChange) {
        global $wikilib;
        include_once 'lib/wiki/wikilib.php';
        $wikilib->refresh_backlinks();
    }
}
if (isset($_REQUEST['wikiset3d'])) {
    check_ticket('admin-inc-wiki');
Пример #7
0
<?php

require_once '../../../kernel/setup_inc.php';
include_once KERNEL_PKG_PATH . 'simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
$feedback = array();
$pdfSettings = array('pdf2swf_path' => array('label' => 'Path to pdf2swf', 'note' => 'Path to the pdf2swf executable.', 'type' => 'text'), 'swfcombine_path' => array('label' => 'Path to swfcombine', 'note' => 'Path to the swfcombine executable.', 'type' => 'text'), 'mwconvert_path' => array('label' => 'Path to ImageMagick convert', 'note' => 'Path to the ImageMagick convert executable.', 'type' => 'text'), 'pdf_thumbnails' => array('label' => 'PDF Upload Thumbnails', 'note' => 'Create thumbnails for PDF uploads.', 'type' => 'checkbox'));
if (function_exists('shell_exec')) {
    $pdfSettings['pdf2swf_path']['default'] = shell_exec('which pdf2swf');
    $pdfSettings['swfcombine_path']['default'] = shell_exec('which swfcombine');
    $pdfSettings['mwconvert_path']['default'] = shell_exec('which convert');
} else {
    $feedback['error'] = "You can not execute binaries on your server. You can not make use of this plugin.";
}
$gBitSmarty->assign('pdfSettings', $pdfSettings);
if (!empty($_REQUEST['plugin_settings'])) {
    foreach ($pdfSettings as $item => $data) {
        if ($data['type'] == 'checkbox') {
            simple_set_toggle($item, LIBERTY_PKG_NAME);
        } elseif ($data['type'] == 'numeric') {
            simple_set_int($item, LIBERTY_PKG_NAME);
        } else {
            simple_set_value($item, LIBERTY_PKG_NAME);
        }
    }
    $feedback['success'] = tra('The plugin was successfully updated');
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:liberty/mime/pdf/adminx.tpl', tra('PDF Plugin Settings'), array('display_mode' => 'admin'));
Пример #8
0
}
$gBitSmarty->assign('numbers', $numbers);
// allow selection of what packages can have ratings
$exclude = array('bituser', 'tikisticky', 'pigeonholes');
foreach ($gLibertySystem->mContentTypes as $cType) {
    if (!in_array($cType['content_type_guid'], $exclude)) {
        $formRatable['guids']['stars_rate_' . $cType['content_type_guid']] = $gLibertySystem->getContentTypeName($cType['content_type_guid']);
    }
}
if (!empty($_REQUEST['stars_preferences'])) {
    $stars = array_merge($formStarsOptions, $formStarsWeight);
    foreach ($stars as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, STARS_PKG_NAME);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, STARS_PKG_NAME);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, STARS_PKG_NAME);
        }
        simple_set_int('stars_icon_width', STARS_PKG_NAME);
        simple_set_int('stars_icon_height', STARS_PKG_NAME);
        simple_set_value('stars_rating_names', STARS_PKG_NAME);
    }
    foreach (array_keys($formRatable['guids']) as $ratable) {
        $gBitSystem->storeConfig($ratable, !empty($_REQUEST['ratable_content']) && in_array($ratable, $_REQUEST['ratable_content']) ? 'y' : NULL, STARS_PKG_NAME);
    }
}
if (!empty($_REQUEST['recalculate'])) {
    $stars = new LibertyStars();
    if ($stars->reCalculateRating()) {
        $feedback['success'] = tra('All ratings have been brought up to speed.');
Пример #9
0
<?php

$formFckeditorFeatures = array("fckeditor_custom_config" => array('label' => 'Custom Config File', 'note' => 'If enabled, a custom configuration is included, either <kbd>' . CONFIG_PKG_DIR . '/themes/&lt;current-style&gt;/fckeditor/fckconfig.custom.js</kbd>, or <kbd>' . FCKEDITOR_PKG_DIR . '/fckconfig.custom.js</kbd>. It may be a modified copy of <kbd>jscripts/fckconfig.js</kbd> or of <kbd>fckconfig.bitweaver.js</kbd>. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).'), "fckeditor_debug" => array('label' => 'Enabled debugging', 'note' => 'Enable support for debug message output. On first debug message a window will pop up.'), "fckeditor_on_click" => array('label' => 'Load FCKEditor on Click', 'note' => 'Delay loading the FCKEditor until the user clicks on the text area.'), "fckeditor_ask" => array('label' => 'Ask to use FCKEditor', 'note' => 'If set the user will be prompted if they want to use FCKEditor for a given textbox. This option implies Load FCKEditor on Click even if it is not set.'));
// Toolbars
$gBitSmarty->assign('formFckeditorFeatures', $formFckeditorFeatures);
$formToolbars = array('fckedit_toolbars' => array('label' => 'Toolbar Set', 'note' => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!'));
$gBitSmarty->assign('formToolbars', $formToolbars);
$gBitSmarty->assign('formToolbarChoices', array('Basic', 'Beginner', 'Intermediate', 'Advanced', 'Supported', 'All'));
// Skin
$formSkin = array('fckedit_skin' => array('label' => 'Skin', 'note' => 'The skin to use.'));
$gBitSmarty->assign('formSkin', $formSkin);
$gBitSmarty->assign('formSkinChoices', array('default', 'silver', 'office2003'));
if (!empty($_REQUEST['change_prefs'])) {
    foreach ($formFckeditorFeatures as $item => $data) {
        simple_set_toggle($item, FCKEDITOR_PKG_NAME);
    }
    $fckeditorSets = array_merge($formToolbars, $formSkin);
    foreach ($fckeditorSets as $item => $data) {
        simple_set_value($item, FCKEDITOR_PKG_NAME);
    }
}
    simple_set_value('fgal_list_description');
    simple_set_value('fgal_list_size');
    simple_set_value('fgal_list_created');
    simple_set_value('fgal_list_lastmodif');
    simple_set_value('fgal_list_creator');
    simple_set_value('fgal_list_author');
    simple_set_value('fgal_list_last_user');
    simple_set_value('fgal_list_comment');
    simple_set_value('fgal_list_files');
    simple_set_value('fgal_list_hits');
    simple_set_value('fgal_list_lockedby');
    $_REQUEST['fgal_sort_mode'] = (empty($_REQUEST['fgal_sortorder']) ? 'created' : $_REQUEST['fgal_sortorder']) . '_' . (empty($_REQUEST['fgal_sortdirection']) ? 'desc' : $_REQUEST['fgal_sortdirection']);
    $prefs['fgal_sort_mode'] = $_REQUEST['fgal_sort_mode'];
    simple_set_value('fgal_sort_mode');
    simple_set_toggle('fgal_show_explorer');
    simple_set_toggle('fgal_show_path');
}
if (isset($_REQUEST["filegalcomprefs"])) {
    check_ticket('admin-inc-fgal');
    simple_set_value("file_galleries_comments_per_page");
    simple_set_value("file_galleries_comments_default_ordering");
}
if (isset($_REQUEST["filegalhandlers"])) {
    check_ticket('admin-inc-fgal');
    $mimes = $_REQUEST["mimes"];
    foreach ($mimes as $mime => $cmd) {
        if (empty($cmd)) {
            $filegallib->delete_file_handler($mime);
        } else {
            $filegallib->change_file_handler($mime, $cmd);
        }
Пример #11
0
        $formRSSFeeds[$pkg . '_rss'] = array('label' => $pkg);
    }
}
$gBitSmarty->assign("formRSSFeeds", $formRSSFeeds);
$formRSSSettings = array('rssfeed_language' => array('label' => 'Language'), 'rssfeed_creator' => array('label' => 'Creator'), 'rssfeed_editor' => array('label' => 'Editor', 'note' => 'Email address for person responsible for editorial content. For RDF 2.0'), 'rssfeed_webmaster' => array('label' => 'Webmaster', 'note' => 'Email address for person responsible for technical issues relating to channel. For RDF 2.0'), 'rssfeed_image_url' => array('label' => 'Image URL', 'note' => 'Enter the full URL to an image that you want to associate with your RSS channels'), 'rssfeed_css_url' => array('label' => 'CSS File URL', 'note' => 'Enter the full URL to a CSS file you want to use to style your RSS Feeds.'), 'rssfeed_truncate' => array('label' => 'Truncate RSS feed', 'note' => 'Enter the number of characters you want to feed per item in the rss feeds. Default is 5000 characters.'));
$gBitSmarty->assign("formRSSSettings", $formRSSSettings);
$formRSSOptions = array('rssfeed_httpauth' => array('label' => 'Enable HTTP Authentication', 'note' => 'Use HTTP Authentication with SSL to enable Registered Users to gain access to Private Content Feeds.'));
$gBitSmarty->assign("formRSSOptions", $formRSSOptions);
$cacheTimes = array(0 => tra("(no cache)"), 60 => "1 " . tra("minute"), 300 => "5 " . tra("minutes"), 600 => "10 " . tra("minutes"), 1800 => "30 " . tra("minutes"), 3600 => "1 " . tra("hour"), 7200 => "2 " . tra("hours"), 14400 => "4 " . tra("hours"));
$gBitSmarty->assign("cacheTimes", $cacheTimes);
$feedTypes = array(0 => "RSS 0.91", 1 => "RSS 1.0", 2 => "RSS 2.0", 3 => "PIE 0.1", 4 => "MBOX", 5 => "ATOM", 6 => "ATOM 0.3", 7 => "OPML", 8 => "HTML", 9 => "JS");
$gBitSmarty->assign("feedTypes", $feedTypes);
if (!empty($_REQUEST['feed_settings'])) {
    // save package specific RSS feed settings
    foreach (array_keys($formRSSFeeds) as $item) {
        $package = preg_replace("/^rss_/", "", $item);
        simple_set_toggle($item, $package);
        simple_set_int($item . '_max_records', $package);
        simple_set_value($item . '_title', $package);
        simple_set_value($item . '_description', $package);
    }
    // deal with the RSS settings
    foreach (array_keys($formRSSSettings) as $item) {
        simple_set_value($item, RSS_PKG_NAME);
    }
    simple_set_value('rssfeed_default_version');
    simple_set_int('rssfeed_cache_time');
    foreach ($formRSSOptions as $item => $data) {
        simple_set_toggle($item, RSS_PKG_NAME);
    }
}
Пример #12
0
<?php

// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
$usersList = $gBitUser->getSelectionList();
$gBitSmarty->assign('usersList', count($usersList) < 50 ? $usersList : NULL);
if (!empty($_REQUEST['anonymous_settings'])) {
    simple_set_toggle("messages_site_contact", MESSAGES_PKG_NAME);
    simple_set_value("messages_contact_user", MESSAGES_PKG_NAME);
}
$gBitSystem->setHelpInfo('Features', 'Settings', 'Help with the features settings');
Пример #13
0
$extendedHeader = array('site_header_extended_nav' => array('label' => 'Enable Header Navigation', 'note' => 'This feature will add a number of useful links to the &lt;head&gt; section. These will help improve accessibility on this site.', 'type' => 'checkbox'), 'site_header_help' => array('label' => 'Help Link', 'note' => 'Enter the URL of where you want the help link to point to.', 'type' => 'text'), 'site_header_index' => array('label' => 'Site Index', 'note' => 'This URL should point to a site index of your website.', 'type' => 'text'), 'site_header_contents' => array('label' => 'Site Contents', 'note' => 'This URL should point to a site map of your website.', 'type' => 'text'), 'site_header_copyright' => array('label' => 'Site Copyright', 'note' => 'This link should point to a page with copyright information.', 'type' => 'text'), 'site_header_glossary' => array('label' => 'Site Glossary', 'note' => 'This link should point to a page with a glossary of terms.', 'type' => 'text'));
$gBitSmarty->assign('extendedHeader', $extendedHeader);
$formMisc = array('site_direct_pagination' => array('label' => 'Use direct pagination links', 'note' => 'Use direct pagination links instead of the small pagination box. Links are cleverly generated depending on the number of pages available.'), 'site_output_obzip' => array('label' => 'Use gzipped output', 'note' => 'Send gzip compressed data via PHP\'s output compression to browsers that support it. This feature will reduce download times and bandwidth consumption. Use it only if your server has no such mechanism enabled already (e.g., Apache\'s output compression).'), 'users_count_admin_pageviews' => array('label' => 'Count admin pageviews', 'note' => ''));
$gBitSmarty->assign('formMisc', $formMisc);
if (!empty($_REQUEST['change_prefs'])) {
    $featureToggles = array_merge($formBit, $formHelp, $formMisc, $extendedHeader);
    foreach ($featureToggles as $item => $info) {
        if (empty($info['type']) || $info['type'] == 'checkbox') {
            simple_set_toggle($item, KERNEL_PKG_NAME);
        } elseif ($info['type'] == 'text') {
            simple_set_value($item, KERNEL_PKG_NAME);
        }
    }
    $simpleValues = array("max_records", "site_url_index");
    foreach ($simpleValues as $svitem) {
        simple_set_value($svitem, KERNEL_PKG_NAME);
    }
    simple_set_toggle('site_display_reltime', KERNEL_PKG_NAME);
    // Special handling for tied fields: bit_index and site_url_index
    if (!empty($_REQUEST["site_url_index"]) && $_REQUEST["bit_index"] == 'users_custom_home') {
        $_REQUEST["bit_index"] = $_REQUEST["site_url_index"];
    }
    $refValue = array("site_long_date_format", "site_long_time_format", "site_short_date_format", "site_short_time_format", "site_long_datetime_format", "site_short_datetime_format", "bit_index");
    foreach ($refValue as $britem) {
        byref_set_value($britem, "", KERNEL_PKG_NAME);
    }
}
if (defined('ROLE_MODEL')) {
    $gBitSmarty->assign("role_model", TRUE);
}
$gBitSystem->setHelpInfo('Features', 'Settings', 'Help with the features settings');
Пример #14
0
    if (isset($_REQUEST['new']) and is_array($_REQUEST['new']) and $_REQUEST['new']['name']) {
        $new["{$_REQUEST['new']['name']}"] = $_REQUEST['new'];
        $_REQUEST['interlist'] += $new;
    }
    simple_set_value('interlist');
    simple_set_value('tiki_key');
    simple_set_value('feature_intertiki_mymaster');
    simple_set_toggle('feature_intertiki_sharedcookie');
    simple_set_toggle('feature_intertiki_import_preferences');
    simple_set_toggle('feature_intertiki_import_groups');
    simple_set_value('feature_intertiki_imported_groups');
}
if (isset($_REQUEST["intertikiserver"])) {
    check_ticket('admin-inc-intertiki');
    simple_set_toggle('feature_intertiki_sharedcookie');
    simple_set_toggle('feature_intertiki_server');
    simple_set_value('intertiki_logfile');
    simple_set_value('intertiki_errfile');
    if (isset($_REQUEST['newhost']) and is_array($_REQUEST['newhost']) and $_REQUEST['newhost']['key']) {
        $newhost["{$_REQUEST['newhost']['key']}"] = $_REQUEST['newhost'];
        $_REQUEST['known_hosts'] += $newhost;
    }
    if (!empty($_REQUEST['known_hosts'])) {
        foreach ($_REQUEST['known_hosts'] as $k => $v) {
            if (isset($_REQUEST['known_hosts'][$k]['allowusersregister'])) {
                $_REQUEST['known_hosts'][$k]['allowusersregister'] = 'y';
            }
            if (empty($_REQUEST['known_hosts'][$k]['name']) && empty($_REQUEST['known_hosts'][$k]['key']) && empty($_REQUEST['known_hosts'][$k]['ip']) && empty($_REQUEST['known_hosts'][$k]['contact'])) {
                unset($_REQUEST['known_hosts'][$k]);
            }
        }
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_faqs.php,v 1.12 2007-03-06 19:29:45 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["faqcomprefs"])) {
    check_ticket('admin-inc-faqs');
    simple_set_value('faq_comments_per_page');
    simple_set_toggle('feature_faq_comments');
    simple_set_value('faq_comments_default_ordering');
    simple_set_value('faq_prefix');
}
ask_ticket('admin-inc-faqs');
Пример #16
0
<?php

$themeSettings = array('site_use_jscalendar' => array('label' => 'Enable JSCalendar', 'note' => 'If checked, a calendar popup allows for easily selecting a date using an appealing interface.'), 'themes_collapsible_modules' => array('label' => 'Collapsible modules', 'note' => 'This allows users to collapse modules by clicking on their titles. Can be useful if you use many modules.'), 'site_disable_fat' => array('label' => "Disable fading", 'note' => "If checked, success, warning or error messages display no fading effect anymore."), 'site_disable_jstabs' => array('label' => "Disable Javascript tabs", 'note' => "If checked, admin pages flow vertically, instead of displaying in a 'tabbed pages' interface."), 'site_fancy_zoom' => array('label' => "Enable Fancy Zoom for images", 'note' => "If checked, a Javascript zooms images when clicking on them. This will modify the behaviour when viewing most images. If you are running a commercial site, please read the license notice in /util/javascript/fancyzoom/js-global/FancyZoom.js."), 'site_mods_req_admn_grp' => array('label' => 'Modules require membership', 'note' => 'If enabled, modules with group/role restrictions require the administrator to be member of the group/role. If disabled, all modules are always visible to administrators.'), 'themes_joined_js_css' => array('label' => 'Joined CSS and JS', 'note' => 'If enabled, javascript and CSS files will be concatenated into single files to reduce server requests. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_packed_js_css' => array('label' => 'Packed CSS and JS', 'note' => 'If enabled, javascript and CSS files will be reduced to their smallest possible size. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_disable_pkg_css' => array('label' => 'Disable All Package CSS', 'note' => 'If checked, all css that is automatically included by packages will be disabled. If you want to include some of the package css it is recommended you copy that css to your theme css file.'));
$gBitSmarty->assign('themeSettings', $themeSettings);
if (!empty($_REQUEST['change_prefs'])) {
    $pref_simple_values = array("site_biticon_display_style", "site_icon_size", "themes_jquery_hosting", "default_icon_style");
    foreach ($pref_simple_values as $svitem) {
        simple_set_value($svitem, THEMES_PKG_NAME);
    }
    foreach (array_keys($themeSettings) as $toggle) {
        simple_set_toggle($toggle, THEMES_PKG_NAME);
    }
    // due to the packing / joining options, we will remove the cache and reload the page
    $gBitThemes->mThemeCache->expungeCache();
    bit_redirect(KERNEL_PKG_URL . "admin/index.php?page=themes");
}
// set the options biticon takes
$biticon_display_options = array('icon' => tra('Icon'), 'text' => tra('Text'), 'icon_text' => tra('Icon and Text'));
$gBitSmarty->assign("biticon_display_options", $biticon_display_options);
// get the icon styles
$subDirs = array('style_info');
$iconStyles = $gBitThemes->getStylesList(CONFIG_PKG_PATH . "styles/icons/", NULL, $subDirs);
foreach ($iconStyles as $key => $style) {
    $iconStyles[$key] = str_replace("_", " ", $style['style']);
}
$gBitSmarty->assign_by_ref("iconStyles", $iconStyles);
$biticon_sizes = array('small' => tra('Small'), 'large' => tra('Large'));
$gBitSmarty->assign("biticon_sizes", $biticon_sizes);
// These numbers are intentionally off by 1 due to the way IE fixes name their js
$jqueryOptions = array('jquery' => tra('Google Hosted'), 'jquerylocal' => tra('Local'));
$gBitSmarty->assign('jqueryOptions', $jqueryOptions);
Пример #17
0
<?php

// $Header$
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
include_once CITIZEN_PKG_PATH . 'Citizen.php';
$formCitizenListFeatures = array("citizen_list_id" => array('label' => 'Citizen Number'), "citizen_list_forename" => array('label' => 'Forname'), "citizen_list_surname" => array('label' => 'Surname'), "citizen_list_home_phone" => array('label' => 'Home Phone'), "citizen_list_mobile_phone" => array('label' => 'Mobile Phone'), "citizen_list_email" => array('label' => 'eMail Address', 'help' => 'Primary citizen email address - additional citizen details can be found in the full record'), "citizen_list_edit_details" => array('label' => 'Creation and editing details', 'help' => 'Enable the record modification data in the citizen list. Useful to allow checking when deatils were last changed.'), "citizen_list_last_modified" => array('label' => 'Last Modified', 'help' => 'Can be selected to enable filter button, without enabling the details section to allow fast checking of the last citizen records that have been modified.'));
$gBitSmarty->assign('formCitizenListFeatures', $formCitizenListFeatures);
if (isset($_REQUEST["citizenlistfeatures"])) {
    foreach ($formCitizenListFeatures as $item => $data) {
        simple_set_toggle($item, CITIZEN_PKG_NAME);
    }
}
Пример #18
0
<?php

// $Header$
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
include_once CONTACTS_PKG_PATH . 'Contacts.php';
$formContactListFeatures = array("contacts_list_id" => array('label' => 'Contact Number'), "contacts_list_forename" => array('label' => 'Forname'), "contacts_list_surname" => array('label' => 'Surname'), "contacts_list_home_phone" => array('label' => 'Home Phone'), "contacts_list_mobile_phone" => array('label' => 'Mobile Phone'), "contacts_list_email" => array('label' => 'eMail Address', 'help' => 'Primary contact email address - additional contact details can be found in the full record'), "contacts_list_edit_details" => array('label' => 'Creation and editing details', 'help' => 'Enable the record modification data in the contact list. Useful to allow checking when deatils were last changed.'), "contacts_list_last_modified" => array('label' => 'Last Modified', 'help' => 'Can be selected to enable filter button, without enabling the details section to allow fast checking of the last contact records that have been modified.'));
$gBitSmarty->assign('formContactListFeatures', $formContactListFeatures);
if (isset($_REQUEST["contactlistfeatures"])) {
    foreach ($formContactListFeatures as $item => $data) {
        simple_set_toggle($item, CONTACTS_PKG_NAME);
    }
}
    simple_set_value('shib_affiliation');
    simple_set_toggle('shib_usegroup');
    simple_set_value('shib_group');
}
// Users Defaults
if (isset($_REQUEST['users_defaults'])) {
    check_ticket('admin-inc-login');
    // numerical and text values
    $_prefs = array('users_prefs_theme', 'users_prefs_userbreadCrumb', 'users_prefs_language', 'users_prefs_display_timezone', 'users_prefs_user_information', 'users_prefs_mailCharset', 'users_prefs_mess_maxRecords', 'users_prefs_minPrio', 'users_prefs_user_dbl', 'users_prefs_diff_versions', 'users_prefs_mess_archiveAfter', 'users_prefs_tasks_maxRecords');
    foreach ($_prefs as $pref) {
        simple_set_value($pref);
    }
    // boolean values
    $_prefs = array('users_prefs_show_mouseover_user_info', 'users_prefs_allowMsgs', 'users_prefs_mytiki_pages', 'users_prefs_mytiki_blogs', 'users_prefs_mytiki_gals', 'users_prefs_mytiki_msgs', 'users_prefs_mytiki_tasks', 'users_prefs_mytiki_items', 'users_prefs_mytiki_workflow', 'users_prefs_mytiki_forum_topics', 'users_prefs_mytiki_forum_replies', 'users_prefs_mess_sendReadStatus');
    foreach ($_prefs as $pref) {
        simple_set_toggle($pref);
    }
}
$smarty->assign("phpcas_enabled", $phpcas_enabled);
$smarty->assign('gd_lib_found', function_exists('gd_info') ? 'y' : 'n');
// Get list of available languages
$languages = array();
$languages = $tikilib->list_languages(false, null, true);
$smarty->assign_by_ref('languages', $languages);
$smarty->assign("styles", $tikilib->list_styles());
$listTrackers = $tikilib->list_trackers(0, -1, "name_desc", "");
$smarty->assign("listTrackers", $listTrackers['list']);
$listgroups = $userlib->get_groups(0, -1, 'groupName_desc', '', '', 'n');
$smarty->assign("listgroups", $listgroups['data']);
// Users Defaults
$mailCharsets = array('utf-8', 'iso-8859-1');
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_polls.php,v 1.14 2007-10-12 07:55:24 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["pollprefs"])) {
    check_ticket('admin-inc-polls');
    if (isset($_REQUEST["poll_comments_per_page"])) {
        $tikilib->set_preference("poll_comments_per_page", $_REQUEST["poll_comments_per_page"]);
    }
    if (isset($_REQUEST["poll_comments_default_ordering"])) {
        $tikilib->set_preference("poll_comments_default_ordering", $_REQUEST["poll_comments_default_ordering"]);
    }
    if (isset($_REQUEST["feature_poll_comments"]) && $_REQUEST["feature_poll_comments"] == "on") {
        $tikilib->set_preference("feature_poll_comments", 'y');
    } else {
        $tikilib->set_preference("feature_poll_comments", 'n');
    }
    if (isset($_REQUEST["feature_poll_anonymous"]) && $_REQUEST["feature_poll_anonymous"] == "on") {
        $tikilib->set_preference("feature_poll_anonymous", 'y');
    } else {
        $tikilib->set_preference("feature_poll_anonymous", 'n');
    }
    simple_set_toggle('poll_list_categories');
    simple_set_toggle('poll_list_objects');
}
ask_ticket('admin-inc-polls');
Пример #21
0
<?php

// $Header$
// Copyright (c) 2005 bitweaver SiteHome
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once SITEHOME_PKG_PATH . 'BitSiteHome.php';
if (isset($_REQUEST["homeTabSubmit"]) && isset($_REQUEST["homeSiteHome"])) {
    $gBitSystem->storeConfig("home_sitehome", $_REQUEST["homeSiteHome"], SITEHOME_PKG_NAME);
    $gBitSmarty->assign('home_sitehome', $_REQUEST["homeSiteHome"]);
}
$formSiteHomeLists = array("sitehome_list_sitehome_id" => array('label' => 'Id', 'note' => 'Display the sitehome id.'), "sitehome_list_title" => array('label' => 'Title', 'note' => 'Display the title.'), "sitehome_list_description" => array('label' => 'Description', 'note' => 'Display the description.'), "sitehome_list_data" => array('label' => 'Text', 'note' => 'Display the text.'));
$gBitSmarty->assign('formSiteHomeLists', $formSiteHomeLists);
$processForm = set_tab();
if ($processForm) {
    $sitehomeToggles = array_merge($formSiteHomeLists);
    foreach ($sitehomeToggles as $item => $data) {
        simple_set_toggle($item, 'sitehomes');
    }
}
$formSiteHomeOpts = array("sitehome_display_title" => array('label' => 'Title', 'note' => 'Display the title.'), "sitehome_display_description" => array('label' => 'Description', 'note' => 'Display the description.'), "sitehome_display_date" => array('label' => 'Date', 'note' => 'Display the creation and modification dates.'));
$gBitSmarty->assign('formSiteHomeOpts', $formSiteHomeOpts);
if (isset($_REQUEST["optsTabSubmit"])) {
    foreach ($formSiteHomeOpts as $item => $data) {
        simple_set_toggle($item, SITEHOME_PKG_NAME);
    }
}
$sitehome = new BitSiteHome();
$sitehomes = $sitehome->getList($_REQUEST);
$gBitSmarty->assign_by_ref('sitehomes', $sitehomes);
Пример #22
0
<?php

require_once '../../kernel/setup_inc.php';
require_once KERNEL_PKG_PATH . '/simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
$formEnable = array('dbreport_direct' => array('label' => 'Allow Direct DSN Entries', 'note' => 'Allow direct input of DSN connection data to allow remote report generation.', 'page' => 'DBReportDirect'), 'dbreport_manage' => array('label' => 'Allow Managed DB Entries', 'note' => 'Allow DSN information from the managed list of tables and querirs.', 'page' => 'DBReportManage'));
$gBitSmarty->assign('formEnable', $formEnable);
$formStyle = array('dbreport_group' => array('label' => 'Allow Group entries', 'note' => 'Allow generation of group footers.', 'page' => 'DBReportGroup'), 'dbreport_total' => array('label' => 'Allow Total Entries', 'note' => 'Allow generation of total footer.', 'page' => 'DBReportTotal'));
$gBitSmarty->assign('formStyle', $formStyle);
$feedback = array();
if (!empty($_REQUEST['change_prefs'])) {
    $featureToggles = array_merge($formEnable, $formStyle);
    foreach ($featureToggles as $item => $info) {
        if (empty($info['type']) || $info['type'] == 'checkbox') {
            simple_set_toggle($item, KERNEL_PKG_NAME);
        } elseif ($info['type'] == 'text') {
            simple_set_value($item, KERNEL_PKG_NAME);
        }
    }
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:tasks/data_dbreport_admin.tpl', tra('Data DBReport Plugin Settings'), array('display_mode' => 'admin'));
Пример #23
0
<?php

// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: include_calendar.php 44444 2013-01-05 21:24:24Z changi67 $
include_once 'lib/calendar/calendarlib.php';
$rawcals = $calendarlib->list_calendars();
if (array_key_exists('data', $rawcals)) {
    $rawcals = $rawcals['data'];
    $smarty->assign('rawcals', $rawcals);
}
// This script may only be included - so its better to die if called directly.
if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
    header('location: index.php');
    exit;
}
if (isset($_REQUEST['calprefs'])) {
    check_ticket('admin-inc-cal');
    simple_set_toggle('feature_jscalendar');
    simple_set_value('feature_default_calendars');
    simple_set_value('default_calendars', '', true);
}
ask_ticket('admin-inc-cal');
Пример #24
0
<?php

// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
$formCmsSettings = array('articles_attachments' => array('label' => 'File Attachments', 'note' => 'Allow the attachment of files to an article. This feature is required if you want to have individual article images.'), 'articles_display_filter_bar' => array('label' => 'Articles Filter', 'note' => 'Allows admins to quickly filter articles based on status, topic and type.'), 'articles_submissions_rnd_img' => array('label' => 'Prevent Spam', 'note' => 'This will generate a random number as an image which the user has to confirm.'), 'articles_auto_approve' => array('label' => 'Auto Approve Articles', 'note' => 'Allow User ratings to Auto Approve Articles'));
$gBitSmarty->assign('formCmsSettings', $formCmsSettings);
$articleDateThreshold = array('' => tra('never'), 'always' => tra('always'), 'year' => tra('up to a year'), 'month' => tra('up to a month'), 'week' => tra('up to a week'), 'day' => tra('up to a day'), 'hour' => tra('up to an hour'));
$gBitSmarty->assign('articleDateThreshold', $articleDateThreshold);
$formArticleListing = array("articles_list_title" => array('label' => 'Title', 'note' => 'List the title of the article.'), "articles_list_type" => array('label' => 'Type', 'note' => 'Display what type of article it is.'), "articles_list_topic" => array('label' => 'Topic', 'note' => 'Display the article topic.'), "articles_list_date" => array('label' => 'Creation Date', 'note' => 'Display when the article was submitted first.'), "articles_list_expire" => array('label' => 'Expiration Date', 'note' => 'Display when the article will expire.'), "articles_list_author" => array('label' => 'Author', 'note' => 'Display the name of the author of an article.'), "articles_list_reads" => array('label' => 'Hits', 'note' => 'Display the number of times a given article has been accessed.'), "articles_list_size" => array('label' => 'Size', 'note' => 'Display the size of any given article.'), "articles_list_img" => array('label' => 'Image', 'note' => 'Display the image that is associated with a given article.'), "articles_list_status" => array('label' => 'Status', 'note' => 'This will indicate whether a given article has been submitted or has been approved.'));
$gBitSmarty->assign('formArticleListing', $formArticleListing);
$gBitSmarty->assign('imageSizes', get_image_size_options(FALSE));
if (!empty($_REQUEST['store_settings'])) {
    $featureToggles = array_merge($formArticleListing, $formCmsSettings);
    foreach ($featureToggles as $item => $data) {
        simple_set_toggle($item, ARTICLES_PKG_NAME);
    }
    simple_set_int("articles_max_list", ARTICLES_PKG_NAME);
    simple_set_int("articles_description_length", ARTICLES_PKG_NAME);
    simple_set_value("articles_image_size", ARTICLES_PKG_NAME);
}
Пример #25
0
<?php

// $Header$
// any setting preceded by packager_rem_ will be copied to the client when they update.
// we could copy settings like: pretty urls and the like to the client
$packagerSettings = array('packager_rem_host' => array('label' => 'Hostname', 'note' => 'Set this to your package repository host, such as www.bitweaver.org. Leave blank to access packages hosted on www.bitweaver.org.', 'type' => 'text'));
$gBitSmarty->assign('packagerSettings', $packagerSettings);
if (!empty($_REQUEST['packager_settings'])) {
    foreach ($packagerSettings as $item => $data) {
        if ($data['type'] == 'checkbox') {
            simple_set_toggle($item, PACKAGER_PKG_NAME);
        } elseif ($data['type'] == 'numeric') {
            simple_set_int($item, PACKAGER_PKG_NAME);
        } else {
            $gBitSystem->storeConfig($item, !empty($_REQUEST[$item]) ? $_REQUEST[$item] : NULL, PACKAGER_PKG_NAME);
        }
    }
    $copySettings = array('packager_rem_pretty_urls' => 'pretty_urls');
    foreach ($copySettings as $packager => $kernel) {
        $gBitSystem->storeConfig($packager, $gBitSystem->getConfig($kernel));
    }
}
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_directory.php,v 1.13 2007-03-06 19:29:45 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["directory"])) {
    check_ticket('admin-inc-directory');
    simple_set_toggle('directory_validate_urls');
    simple_set_toggle('directory_cool_sites');
    simple_set_toggle('directory_country_flag');
    simple_set_value('directory_columns');
    simple_set_value('directory_links_per_page');
    simple_set_value('directory_open_links');
}
ask_ticket('admin-inc-directory');
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["mouseoverfeatures"])) {
    check_ticket('admin-inc-community');
    simple_set_toggle("feature_community_mouseover");
    simple_set_toggle("feature_community_mouseover_name");
    simple_set_toggle("feature_community_mouseover_picture");
    simple_set_toggle("feature_community_mouseover_friends");
    simple_set_toggle("feature_community_mouseover_score");
    simple_set_toggle("feature_community_mouseover_country");
    simple_set_toggle("feature_community_mouseover_email");
    simple_set_toggle("feature_community_mouseover_lastlogin");
    simple_set_toggle("feature_community_mouseover_distance");
}
/* This is desired future feature
if (isset($_REQUEST["friendshipfeatures"])) {
	check_ticket('admin-inc-community');
	simple_set_toggle("feature_community_friends_permission");
	simple_set_int("feature_community_friends_permission_dep");

}
*/
ask_ticket('admin-inc-community');
?>


Пример #28
0
$listHash['sort_mode'] = 'created_desc';
$blogList = $blog->getList($listHash);
$gBitSmarty->assignByRef('blogList', $blogList);
if (!empty($_REQUEST["set_blog_home"])) {
    $blog_home = @BitBase::verifyId($_REQUEST['blog_home']) ? $_REQUEST['blog_home'] : NULL;
    $gBitSystem->storeConfig("blog_home", $blog_home, BLOGS_PKG_NAME);
    $gBitSmarty->assign('blog_home', $blog_home);
}
$formBlogLists = array("blog_list_title" => array('label' => 'Title'), "blog_list_description" => array('label' => 'Description'), "blog_list_created" => array('label' => 'Creation date'), "blog_list_lastmodif" => array('label' => 'Last modification time'), "blog_list_user" => array('label' => 'Creator', 'note' => 'The creator of a particular blog.'), "blog_list_posts" => array('label' => 'Posts', 'note' => 'Number of posts submitted to any given blog.'), "blog_list_visits" => array('label' => 'Visits', 'note' => 'Number of times a given blog has been visited.'));
$gBitSmarty->assign('formBlogLists', $formBlogLists);
$formBlogFeatures = array("blog_rankings" => array('label' => 'Rankings', 'note' => 'Enable the use of rankings based on page hits.'), "blog_posts_comments" => array('label' => 'Blog Post Comments', 'note' => 'Allow the addition of comments to blog posts.'), "blog_posts_autosplit" => array('label' => 'Use 2 Text Fields To Auto Split Blog Posts', 'note' => 'Display two text fields when editing a post, for intro and read more sections. Disabling will display one text field and requires use of ...split... to create a read more section'), "blog_ajax_more" => array('label' => 'Ajax Read More', 'note' => 'Ajax the "read more" text inline into the short description lists of posts.'), "blog_show_image" => array('label' => 'Auto Display Primary Attachment', 'note' => 'Blog posts can automatically display any attachment, typically an image, that is marked as the "Primary Attachment" during editing. This is especially useful for automatically inserting a photograph into a post.'), "blog_hide_empty_usr_list" => array('label' => 'Hide empty blog message on user pages', 'note' => 'Enable to hide the "No Records Found" on user\'s blog rolls'));
$gBitSmarty->assign('formBlogFeatures', $formBlogFeatures);
$formBlogInputs = array("blog_top_post_count" => array('label' => 'Top Post Count', 'note' => 'How many posts per blog in the rankings should be shown.'));
$gBitSmarty->assign('formBlogInputs', $formBlogInputs);
$processForm = set_tab();
if ($processForm) {
    $blogToggles = array_merge($formBlogLists, $formBlogFeatures);
    foreach ($blogToggles as $item => $data) {
        simple_set_toggle($item, BLOGS_PKG_NAME);
    }
    /** @TODO: Fix. Lazy error handling to ensure numeric. **/
    $gBitSystem->storeConfig("blog_top_post_count", isset($_REQUEST["blog_top_post_count"]) && is_numeric($_REQUEST["blog_top_post_count"]) ? $_REQUEST["blog_top_post_count"] : "3");
    $gBitSystem->storeConfig("blog_posts_max_list", isset($_REQUEST["blog_posts_max_list"]) && is_numeric($_REQUEST["blog_posts_max_list"]) ? $_REQUEST["blog_posts_max_list"] : "10");
    $gBitSystem->storeConfig("blog_posts_comments", isset($_REQUEST["blog_posts_comments"]) ? 'y' : 'n', BLOGS_PKG_NAME);
    $gBitSystem->storeConfig("blog_list_order", $_REQUEST["blog_list_order"], BLOGS_PKG_NAME);
    $gBitSystem->storeConfig("blog_list_user_as", $_REQUEST["blog_list_user_as"], BLOGS_PKG_NAME);
    $gBitSystem->storeConfig("blog_posts_description_length", $_REQUEST["blog_posts_description_length"], BLOGS_PKG_NAME);
    $gBitSystem->storeConfig("blog_posts_autosplit", isset($_REQUEST["blog_posts_autosplit"]) ? 'y' : 'n', BLOGS_PKG_NAME);
    $gBitSmarty->assign('blog_list_order', $_REQUEST["blog_list_order"]);
    $gBitSmarty->assign('blog_list_user_as', $_REQUEST['blog_list_user_as']);
}
Пример #29
0
require_once KERNEL_PKG_PATH . "simple_form_functions_lib.php";
//$gBitSmarty->assign( 'loadDragDrop', TRUE );
//$gBitSystem->setOnloadScript('initDragDrop();');
$gBitSystem->verifyPermission('p_admin');
$formMenuSettings = array('site_top_bar_dropdown' => array('label' => 'Dropdown menu', 'note' => 'Use the CSS driven dropdown menus in the top bar. Compatibility and further reading can be found at <a class="external" href="http://www.htmldog.com/articles/suckerfish/dropdowns/">Suckerfish Dropdowns</a>.'), 'site_hide_my_top_bar_link' => array('label' => 'Hide "My" Link', 'note' => 'Hide the <strong>My &lt;sitename&gt;</strong> link from users that are not logged in.'));
$gBitSmarty->assign('formMenuSettings', $formMenuSettings);
$formMenuJsSettings = array('site_top_bar_js' => array('label' => 'Enhance Dropdown with Javascript', 'note' => 'This small javascript will delay the menu slightly making it easier to navigate. Also you can apply below effects. Please see <a class="external" href="http://www.twinhelix.com">TwinHelix</a> for details.'), 'site_top_bar_js_fade' => array('label' => 'Fade Effect', 'note' => 'Fade in menu dropdown elements.'), 'site_top_bar_js_swipe' => array('label' => 'Swipe Effect', 'note' => 'Sweep the menu from the top down.'), 'site_top_bar_js_clip' => array('label' => 'Clip Effect', 'note' => 'Similar to the swipe effect.'));
if (!empty($_REQUEST['menu_settings'])) {
    foreach (array_keys($formMenuSettings) as $item) {
        simple_set_toggle($item, THEMES_PKG_NAME);
    }
    simple_set_value('site_menu_title', THEMES_PKG_NAME);
}
if (!empty($_REQUEST['menu_js_settings'])) {
    foreach (array_keys($formMenuJsSettings) as $item) {
        simple_set_toggle($item, THEMES_PKG_NAME);
    }
}
if (!empty($_REQUEST['update_menus'])) {
    foreach (array_keys($gBitSystem->mAppMenu['bar']) as $menuPackage) {
        if (empty($_REQUEST["menu_{$menuPackage}"])) {
            // the package menu is off - store it off
            $gBitSystem->storeConfig("menu_{$menuPackage}", 'n', THEMES_PKG_NAME);
        } elseif ($gBitSystem->getConfig("menu_{$menuPackage}") == 'n') {
            // the package menu was off and now is on. Just delete the pref since on is the assumed state
            $gBitSystem->storeConfig("menu_{$menuPackage}", NULL, THEMES_PKG_NAME);
        }
        if (!empty($_REQUEST["{$menuPackage}_menu_text"])) {
            // someone thinks that our default package names aren't good enough! HA!
            $gBitSystem->storeConfig("{$menuPackage}_menu_text", $_REQUEST["{$menuPackage}_menu_text"], constant(strtoupper($menuPackage) . '_PKG_NAME'));
        }
    simple_set_toggle("feature_community_mouseover");
    simple_set_toggle("feature_community_mouseover_name");
    simple_set_toggle("feature_community_mouseover_picture");
    simple_set_toggle("feature_community_mouseover_friends");
    simple_set_toggle("feature_community_mouseover_score");
    simple_set_toggle("feature_community_mouseover_country");
    simple_set_toggle("feature_community_mouseover_email");
    simple_set_toggle("feature_community_mouseover_lastlogin");
    simple_set_toggle("feature_community_mouseover_distance");
}
if (isset($_REQUEST["listfeatures"])) {
    check_ticket('admin-inc-community');
    simple_set_toggle("feature_community_list_name");
    simple_set_toggle("feature_community_list_score");
    simple_set_toggle("feature_community_list_country");
    simple_set_toggle("feature_community_list_distance");
    simple_set_value("user_list_order");
}
/* This is desired future feature
if (isset($_REQUEST["friendshipfeatures"])) {
	check_ticket('admin-inc-community');
	simple_set_toggle("feature_community_friends_permission");
	simple_set_int("feature_community_friends_permission_dep");

}
*/
ask_ticket('admin-inc-community');
?>