当前位置: 首页>>代码示例>>PHP>>正文


PHP PhorumInputForm::hidden方法代码示例

本文整理汇总了PHP中PhorumInputForm::hidden方法的典型用法代码示例。如果您正苦于以下问题:PHP PhorumInputForm::hidden方法的具体用法?PHP PhorumInputForm::hidden怎么用?PHP PhorumInputForm::hidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhorumInputForm的用法示例。


在下文中一共展示了PhorumInputForm::hidden方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: phorum_htmlpurifier_show_form

function phorum_htmlpurifier_show_form()
{
    if (phorum_htmlpurifier_config_file_exists()) {
        phorum_htmlpurifier_show_config_info();
        return;
    }
    global $PHORUM;
    $config = phorum_htmlpurifier_get_config();
    $frm = new PhorumInputForm("", "post", "Save");
    $frm->hidden("module", "modsettings");
    $frm->hidden("mod", "htmlpurifier");
    // this is the directory name that the Settings file lives in
    if (!empty($error)) {
        echo "{$error}<br />";
    }
    $frm->addbreak("Edit settings for the HTML Purifier module");
    $frm->addMessage('<p>The box below sets <code>$PHORUM[\'mod_htmlpurifier\'][\'wysiwyg\']</code>.
    When checked, contents sent for edit are now purified and the
    informative message is disabled. If your WYSIWYG editor is disabled for
    admin edits, you can safely keep this unchecked.</p>');
    $frm->addRow('Use WYSIWYG?', $frm->checkbox('wysiwyg', '1', '', $PHORUM['mod_htmlpurifier']['wysiwyg']));
    $frm->addMessage('<p>The box below sets <code>$PHORUM[\'mod_htmlpurifier\'][\'suppress_message\']</code>,
    which removes the big how-to use
    HTML Purifier message.</p>');
    $frm->addRow('Suppress information?', $frm->checkbox('suppress_message', '1', '', $PHORUM['mod_htmlpurifier']['suppress_message']));
    $frm->addMessage('<p>Click on directive links to read what each option does
    (links do not open in new windows).</p>
    <p>For more flexibility (for instance, you want to edit the full
    range of configuration directives), you can create a <tt>config.php</tt>
    file in your <tt>mods/htmlpurifier/</tt> directory. Doing so will,
    however, make the web configuration interface unavailable.</p>');
    require_once 'HTMLPurifier/Printer/ConfigForm.php';
    $htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s');
    $htmlpurifier_form->setTextareaDimensions(23, 7);
    // widen a little, since we have space
    $frm->addMessage($htmlpurifier_form->render($config, $PHORUM['mod_htmlpurifier']['directives'], false));
    $frm->addMessage("<strong>Warning: Changing HTML Purifier's configuration will invalidate\r\n      the cache. Expect to see a flurry of database activity after you change\r\n      any of these settings.</strong>");
    $frm->addrow('Reset to defaults:', $frm->checkbox("reset", "1", "", false));
    // hack to include extra styling
    echo '<style type="text/css">' . $htmlpurifier_form->getCSS() . '
    .hp-config {margin-left:auto;margin-right:auto;}
    </style>';
    $js = $htmlpurifier_form->getJavaScript();
    echo '<script type="text/javascript">' . "<!--\n{$js}\n//-->" . '</script>';
    $frm->show();
}
开发者ID:sebbie42,项目名称:casebox,代码行数:46,代码来源:form.php

示例2: phorum_htmlpurifier_show_migrate_sigs_form

function phorum_htmlpurifier_show_migrate_sigs_form()
{
    $frm = new PhorumInputForm('', "post", "Migrate");
    $frm->hidden("module", "modsettings");
    $frm->hidden("mod", "htmlpurifier");
    $frm->hidden("migrate-sigs", "1");
    $frm->addbreak("Migrate user signatures to HTML");
    $frm->addMessage('This operation will migrate your users signatures
        to HTML. <strong>This process is irreversible and must only be performed once.</strong>
        Type in yes in the confirmation field to migrate.');
    if (!file_exists(dirname(__FILE__) . '/../migrate.php')) {
        $frm->addMessage('Migration file does not exist, cannot migrate signatures.
            Please check <tt>migrate.bbcode.php</tt> on how to create an appropriate file.');
    } else {
        $frm->addrow('Confirm:', $frm->text_box("confirmation", ""));
    }
    $frm->show();
}
开发者ID:odsherred,项目名称:subsites.odsherred.dk,代码行数:18,代码来源:migrate-sigs-form.php

示例3: time

    if ($user_id && phorum_api_user_set_active_user(PHORUM_ADMIN_SESSION, $user_id) && phorum_api_user_session_create(PHORUM_ADMIN_SESSION)) {
        // update the token and time
        $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token_time'] = time();
        $sig_data = $GLOBALS["PHORUM"]["user"]['user_id'] . time() . $GLOBALS["PHORUM"]["user"]['username'];
        $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token'] = phorum_api_sign($sig_data);
        $GLOBALS["PHORUM"]['admin_token'] = $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token'];
        $tmp_user = array('user_id' => $GLOBALS["PHORUM"]["user"]['user_id'], 'settings_data' => $GLOBALS["PHORUM"]["user"]['settings_data']);
        phorum_api_user_save($tmp_user);
        if (!empty($_POST["target"])) {
            $target_url = phorum_admin_build_url($_POST['target'], TRUE);
            phorum_api_redirect($target_url);
        } else {
            $redir_url = phorum_admin_build_url(NULL, TRUE);
            phorum_api_redirect($redir_url);
        }
        exit;
    } else {
        /**
         * TODO Move to User API.
         */
        phorum_api_hook("failed_login", array("username" => $_POST["username"], "password" => $_POST["password"], "location" => "admin"));
    }
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
if (!empty($_SERVER["QUERY_STRING"])) {
    $frm->hidden("target", htmlspecialchars($_SERVER["QUERY_STRING"], ENT_COMPAT, $PHORUM["DATA"]['CHARSET']));
}
$frm->addrow("Username", $frm->text_box("username", "", 30));
$frm->addrow("Password", $frm->text_box("password", "", 30, 0, true));
$frm->show();
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:login.php

示例4: PhorumInputForm

     $frm->addrow("Admin Password", $frm->text_box("admin_pass", "", 30, 0, true));
     $frm->addrow("(again)", $frm->text_box("admin_pass2", "", 30, 0, true));
     $frm->show();
     break;
 case "done":
     $cont_url = phorum_admin_build_url();
     $PHORUM['DB']->update_settings(array("installed" => 1));
     echo "The setup is complete.  You can now go to <a href=\"{$cont_url}\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"{$_SERVER['PHP_SELF']}?module=settings\">The General Settings page</a><br /><br /><a href=\"{$_SERVER['PHP_SELF']}?module=mods\">Pre-installed modules</a><br /><br /><a href=\"docs/faq.txt\">The FAQ</a><br /><br /><a href=\"docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
     break;
 case "modules":
     // Retrieve a list of available modules.
     require_once './include/api/modules.php';
     $list = phorum_api_modules_list();
     $frm = new PhorumInputForm("", "post", "Continue ->");
     $frm->addbreak("Optional modules");
     $frm->hidden("module", "install");
     $frm->hidden("sanity_checks_done", "1");
     $frm->hidden("step", "modules");
     $frm->hidden("do_modules_update", "1");
     $frm->addmessage("Phorum has a very robust module system.  The following modules are\n             included with the distribution.  You can find more modules at the\n             Phorum web site.  Some modules may have additional configuration\n             options, which are not available during install.  To configure the\n             modules, click the \"Modules\" menu item in the admin interface\n             after installation is done.");
     foreach ($list['modules'] as $name => $info) {
         // Skip the compatibility modules.
         // These are enabled automatically by Phorum when required.
         if (!empty($info['compat'])) {
             continue;
         }
         // Should not happen.
         if ($info['version_disabled']) {
             continue;
         }
         $text = $info["title"];
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:install.php

示例5: elseif

        }
    }
    $forum_settings["vroot"] = $vroot;
} elseif (defined("PHORUM_EDIT_FOLDER")) {
    $forums = phorum_db_get_forums($_REQUEST["forum_id"]);
    $forum_settings = $forums[$_REQUEST["forum_id"]];
    extract($forum_settings);
}
if ($error) {
    phorum_admin_error($error);
}
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post");
$folder_data = phorum_get_folder_info();
if (defined("PHORUM_EDIT_FOLDER")) {
    $frm->hidden("module", "editfolder");
    $frm->hidden("forum_id", $forum_id);
    $title = "Edit Folder";
    $this_folder = $folder_data[$_REQUEST["forum_id"]];
    foreach ($folder_data as $folder_id => $folder) {
        // remove children from the list
        if ($folder_id != $_REQUEST["forum_id"] && substr($folder, 0, strlen($this_folder) + 2) != "{$this_folder}::") {
            $folders[$folder_id] = $folder;
        }
    }
    if ($vroot == $forum_id) {
        $vroot = 1;
    } else {
        $foreign_vroot = $vroot;
        $vroot = 0;
    }
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:newfolder.php

示例6: elseif

                    $err = true;
                }
                elseif ($fp = fopen($PHORUM["cache"] . "/phorum-install-test", "w+")) {
                    unlink($PHORUM["cache"] . "/phorum-install-test");
                }
                else {
                    $err = true;
                }

            }
            error_reporting(E_WARN);
            if ($message == "") {
                if($err){
                    $message.="Your cache directory is not writable. Please change the permissions on '/cache' inside the Phorum directory to allow writing. In Unix, you may have to use this command: chmod 777 cache<br /><br />If you want to continue anyway and set a cache directory manually, press continue. Note that you must do this, Phorum will not work without a valid cache.";
                } else {
                    $message.="Cache directory set.  Next we will create a user with administrator privileges.  Press continue when ready.";
                }
            }

            $frm = new PhorumInputForm ("", "post", "Continue ->");
            $frm->hidden("module", "install");
            $frm->addbreak("Checking cache....");
            $frm->addmessage($message);
            $frm->hidden("step", "4");
            $frm->show();

            break;
    }

?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:30,代码来源:install.php

示例7: extract

    $forum = phorum_api_forums_save(array('forum_id' => NULL, 'folder_flag' => 0, 'inherit_id' => 0, 'parent_id' => $parent_id, 'name' => ''), PHORUM_FLAG_PREPARE);
    extract($forum);
}
// ----------------------------------------------------------------------
// Handle displaying the forum settings form
// ----------------------------------------------------------------------
if ($errors) {
    phorum_admin_error(join("<br/>", $errors));
}
if (isset($_GET['okmsg'])) {
    phorum_admin_okmsg(htmlspecialchars($_GET['okmsg']));
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
if (defined("PHORUM_DEFAULT_OPTIONS")) {
    $frm->hidden("module", "forum_defaults");
    $title = "Edit the default forum settings";
} elseif (defined("PHORUM_EDIT_FORUM")) {
    $frm->hidden("module", "editforum");
    $frm->hidden("forum_id", $forum_id);
    $title = "Edit settings for forum \"{$name}\" (Id: {$forum_id})";
} else {
    $frm->hidden("module", "newforum");
    $title = "Create a new forum";
}
$frm->addbreak($title);
// Options that are only required when editing or creating a forum.
if (!defined("PHORUM_DEFAULT_OPTIONS")) {
    $frm->addrow("Forum Title", $frm->text_box("name", $name, 30, 50));
    $frm->addrow("Forum Description", $frm->textarea("description", $description, $cols = 60, $rows = 10, "style=\"width: 100%;\""), "top");
    $parent_id_options = phorum_api_forums_get_parent_id_options($forum_id);
开发者ID:netovs,项目名称:Core,代码行数:31,代码来源:newforum.php

示例8: foreach

        foreach ($_POST['vroot_forum_id'] as $vroot_id => $vroot_forum_id) {
            $PHORUM["mod_announcements"]["vroot"][$vroot_id] = (int) $vroot_forum_id;
        }
    }
    $PHORUM["mod_announcements"]["forum_id"] = (int) $_POST["forum_id"];
    $PHORUM["mod_announcements"]["pages"] = $_POST["pages"];
    $PHORUM["mod_announcements"]["disable_autodisplay"] = isset($_POST["disable_autodisplay"]) ? 1 : 0;
    $PHORUM["mod_announcements"]["only_show_unread"] = isset($_POST["only_show_unread"]) ? 1 : 0;
    $PHORUM["mod_announcements"]["number_to_show"] = (int) $_POST["number_to_show"];
    $PHORUM["mod_announcements"]["days_to_show"] = (int) $_POST["days_to_show"];
    phorum_db_update_settings(array("mod_announcements" => $PHORUM["mod_announcements"]));
    phorum_admin_okmsg("Announcement settings updated");
}
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "announcements");
$frm->addbreak("Announcement Settings");
$page_list = $frm->checkbox("pages[home]", 1, "Home page, root level forum list (index.php)", $PHORUM["mod_announcements"]["pages"]["home"]) . "<br/>" . $frm->checkbox("pages[index]", 1, "Any forum List (index.php)", $PHORUM["mod_announcements"]["pages"]["index"]) . "<br/>" . $frm->checkbox("pages[list]", 1, "Message List (list.php)", $PHORUM["mod_announcements"]["pages"]["list"]) . "<br/>" . $frm->checkbox("pages[read]", 1, "Read Message (read.php)", $PHORUM["mod_announcements"]["pages"]["read"]);
$frm->addrow("Announcements Appear On", $page_list);
$row = $frm->addrow("Disable automatic displaying of announcements?", $frm->checkbox("disable_autodisplay", 1, "Disable automatic displaying", $PHORUM["mod_announcements"]["disable_autodisplay"]));
$frm->addhelp($row, "Disable automatic displaying", "By default, the announcements will be displayed after the page header automatically. If you need more control over the exact placement, then enable this option. Then you can specify where you want the announcements to appear yourself by placing the code {MOD_ANNOUNCEMENTS} in your templates.");
$frm->addrow("Show only unread messages to the user?", $frm->checkbox("only_show_unread", 1, "Show only unread", $PHORUM["mod_announcements"]["only_show_unread"]));
$frm->addrow("Number To Show", $frm->text_box("number_to_show", $PHORUM["mod_announcements"]["number_to_show"], 10));
$frm->addrow("Maximum Days To Show", $frm->text_box("days_to_show", $PHORUM["mod_announcements"]["days_to_show"], 10) . " (0 = forever)");
$forum_list_global = phorum_get_forum_info(1, 0);
$frm->addrow("Announcement Forum", $frm->select_tag("forum_id", $forum_list_global, $PHORUM["mod_announcements"]["forum_id"]));
//$vroot_folders = phorum_db_get_forums(0, NULL, '\'forum_id\'');
$vroot_folders = phorum_get_forum_info(3, -1);
if (count($vroot_folders)) {
    $frm->addbreak("Announcement Forums for Virtual Root Folders");
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:settings.php

示例9: array

<?php

if (!defined("PHORUM_ADMIN")) {
    return;
}
require_once 'defaults.php';
// save settings
if (count($_POST)) {
    $PHORUM['mod_sphinx_search'] = array('hostname' => $_POST['hostname'], 'port' => $_POST['port']);
    if (!phorum_db_update_settings(array('mod_sphinx_search' => $PHORUM['mod_sphinx_search']))) {
        phorum_admin_error("Updating the settings in the database failed.");
    } else {
        phorum_admin_okmsg("Settings updated");
    }
}
?>
<div style="font-size: xx-large; font-weight: bold">Sphinx Search Module</div>
 This module uses the sphinx fulltext search engine to gather the results of the phorum-search.<br />
 On this page you can set the hostname and port of your sphinx search daemon.

<br style="clear:both" />
<?php 
include_once PHORUM_INCLUDES_DIR . '/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "sphinx_search");
$frm->addbreak("Hostname and port");
$row = $frm->addrow("What is the hostname of the sphinx daemon? (e.g. 127.0.0.1){$warn}", $frm->text_box("hostname", $PHORUM["mod_sphinx_search"]["hostname"], 30));
$row = $frm->addrow("What is the port of the sphinx daemon? (e.g. 9312){$warn}", $frm->text_box("port", $PHORUM["mod_sphinx_search"]["port"], 30));
$frm->show();
开发者ID:raul72,项目名称:phorum-sphinx_search,代码行数:30,代码来源:settings.php

示例10: PhorumInputForm

        echo "Settings Updated<br />";
    }
}
// Apply default values for the settings.
if (!isset($PHORUM["mod_example_settings"]["displaytext"])) {
    $PHORUM["mod_example_settings"]["displaytext"] = "";
}
if (!isset($PHORUM["mod_example_settings"]["displaycount"])) {
    $PHORUM["mod_example_settings"]["displaycount"] = 1;
}
// We build the settings form by using the PhorumInputForm object. When
// creating your own settings screen, you'll only have to change the
// "mod" hidden parameter to the name of your own module.
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "example_settings");
// Here we display an error in case one was set by saving
// the settings before.
if (!empty($error)) {
    echo "{$error}<br />";
}
// This adds a break line to your form, with a description on it.
// You can use this to separate your form into multiple sections.
$frm->addbreak("Edit settings for the example_settings module");
// This adds a text message to your form. You can use this to
// explain things to the user.
$frm->addmessage("This is the settings screen for the example_settings module. This module is only written for demonstrating the use of a settings screen for you own modules. The module itself will display a configurable text for a configurable number of times on screen.");
// This adds a row with a form field for entering the display text.
$frm->addrow("Text to display (default: Hello, world!)", $frm->text_box('displaytext', $PHORUM["mod_example_settings"]["displaytext"], 50));
// This adds another row with a form field for entering the display count.
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:settings.php

示例11: basename

    return;
}
require_once './include/api/modules.php';
// Retrieve a list of available modules.
$list = phorum_api_modules_list();
// ----------------------------------------------------------------------
// Process posted form data
// ----------------------------------------------------------------------
// Request for module information file?
if (isset($_GET['info']) && isset($_GET['mod'])) {
    $mod = basename($_GET['mod']);
    $file = basename($_GET['info']);
    if (($file == 'README' || $file == 'INSTALL' || $file == 'Changelog') && file_exists("./mods/{$mod}/{$file}")) {
        include_once "./include/admin/PhorumInputForm.php";
        $frm = new PhorumInputForm("", "post", "Back to Modules admin");
        $frm->hidden('module', 'mods');
        $frm->addbreak("{$file} for module {$mod}:");
        $info = file_get_contents("./mods/{$mod}/{$file}");
        $frm->addmessage("<pre>" . htmlspecialchars($info) . "</pre>");
        $frm->show();
    } else {
        phorum_admin_error("Denied access to illegal module information file request!");
    }
    return;
}
if (!empty($_POST['do_module_updates'])) {
    foreach ($list['modules'] as $mod => $info) {
        $key = base64_encode('mods_' . $mod);
        if (isset($_POST[$key])) {
            phorum_api_modules_enable($mod);
        } else {
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:mods.php

示例12: array

<?php

if (!defined("PHORUM_ADMIN")) {
    return;
}
// Apply default settings.
require_once './mods/editor_tools/defaults.php';
// Save the settings to the database.
if (count($_POST)) {
    $PHORUM["mod_editor_tools"] = array("enable_help" => $_POST["enable_help"] ? 1 : 0);
    $PHORUM['DB']->update_settings(array("mod_editor_tools" => $PHORUM["mod_editor_tools"]));
    phorum_admin_okmsg("The settings were successfully saved.");
}
// Build the settings form.
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "editor_tools");
$frm->addbreak("Edit settings for the Editor Tools module");
$row = $frm->addrow("Enable Help tool", $frm->checkbox("enable_help", "1", "", $PHORUM["mod_editor_tools"]["enable_help"]) . ' Yes');
$frm->addhelp($row, "Enable Help tool", "If you enable this option, then a help button will be added to\n     the tool bar. This help button can be used to open help pages\n     that are registered by other modules (e.g. to show a list of\n     smileys or available BBcode tags).");
$frm->show();
开发者ID:samuell,项目名称:Core,代码行数:22,代码来源:settings.php

示例13: isset

$settings =& $GLOBALS["PHORUM"]["mod_event_logging"];
$eventtypes =& $GLOBALS["PHORUM"]["DATA"]["MOD_EVENT_LOGGING"]["EVENT_TYPES"];
if (count($_POST)) {
    $settings["resolve_hostnames"] = isset($_POST["resolve_hostnames"]) ? 1 : 0;
    $settings["max_log_entries"] = (int) $_POST["max_log_entries"];
    $settings["min_log_level"] = (int) $_POST["min_log_level"];
    foreach ($eventtypes as $type => $desc) {
        $settings["do_log_{$type}"] = isset($_POST["do_log_{$type}"]) ? 1 : 0;
    }
    phorum_db_update_settings(array("mod_event_logging" => $settings));
    phorum_admin_okmsg("The settings were successfully saved.");
}
// Create the settings form.
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save settings");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "event_logging");
$frm->hidden("el_action", "settings");
$frm->addbreak("General Settings");
$row = $frm->addrow("Minimum log level", $frm->select_tag("min_log_level", $GLOBALS["PHORUM"]["DATA"]["MOD_EVENT_LOGGING"]["LOGLEVELS"], $settings["min_log_level"]));
$frm->addhelp($row, "Minimum log level", "This option configures the minimum log level for which log messages are written to the event log. Events with a lower log level will not be written.<br/><br/>\"Debug\" is the lowest log level and \"Alert\" the highest, so to log all events, set this option to \"Debug\".");
$row = $frm->addrow("Maximum amount of stored event logs (0 = unlimited)", $frm->text_box("max_log_entries", $settings["max_log_entries"], 5));
$frm->addhelp($row, "Maximum amount of stored event logs", "This option configures the maximum amount of event logs that can be stored in the database at a given time. If the amount of event logs grows larger than this configured maximum, then old entries will be automatically cleaned up.<br/><br/>If you do not want a limit on the number of event logs, then set this option to 0 (zero).");
$row = $frm->addrow("Resolve IP addresses to host names when writing the event log", $frm->checkbox("resolve_hostnames", "1", "", $settings["resolve_hostnames"]));
$frm->addhelp($row, "Resolve IP addresses", "If this option is enabled, the IP address of the visitor will immediately be resolved into its hostname. Enabling this option can result in delays for the user, in case hostname lookups are slow for some reason.<br/><br/><b>Because of the performance penalty, we do not recommend enabling this option, unless you really need it and know what you are doing.</b>");
$row = $frm->addbreak("Which events to log");
$frm->addhelp($row, "Which events to log", "Below, you see the events which the Event Logging module can log for you. Enable the checkbox for each event type that you wish to appear in the event log. You can use this to limit the amount of entries, in case you are not interested in some of them.<br/><br/>Note that other modules can also write entries to the event log. If you need to suppress logging for those, then please consult the settings and documentation of those modules.");
foreach ($eventtypes as $type => $desc) {
    if ($desc === NULL) {
        $frm->addsubbreak($type);
    } else {
开发者ID:sheldon,项目名称:dejavu,代码行数:31,代码来源:settings.php

示例14: PhorumInputForm

                                $frm->checkbox("forum_permissions[$forum_id][".PHORUM_USER_ALLOW_MODERATE_USERS."]", 1, "Moderate Users", ($perms & PHORUM_USER_ALLOW_MODERATE_USERS))."&nbsp;&nbsp;".

                    $frm->hidden("forums[$forum_id]", $forum_id);

                    $row=$frm->addrow($forums[$forum_id]["name"]."<br />".$frm->checkbox("delforum[$forum_id]", 1, "Delete"), $perm_frm);

                }
            }

            $frm->show();

            echo "<br /><hr class=\"PhorumAdminHR\" /><br /><a name=\"groups\"></a>";

            $frm = new PhorumInputForm ("", "post", "Update");

            $frm->hidden("user_id", $_REQUEST["user_id"]);

            $frm->hidden("module", "users");

            $frm->hidden("section", "groups");

            $extra_opts = "";
            // if its an admin, let the user know that the admin will be able to act as a moderator no matter what
            if ($user["admin"]){
                $row=$frm->addbreak("Edit Groups (Admins can act as a moderator of every group, regardless of these values)");
            }
            else{
                $row=$frm->addbreak("Edit Groups");
            }

            $groups= phorum_db_get_groups();
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:users.php

示例15: isset

    $settings["min_length"] = (int) $_POST["min_length"];
    $settings["only_lowercase"] = isset($_POST["only_lowercase"]) ? 1 : 0;
    // Valid chars is a bit special.
    $settings["valid_chars"] = isset($_POST["valid_chars"]) ? implode("", array_keys($_POST["valid_chars"])) : "";
    // Take care of applying sane settings.
    if ($settings["min_length"] < 0) {
        $settings["min_length"] = 0;
    }
    if ($settings["max_length"] < $settings["min_length"] && $settings["max_length"] != 0) {
        $settings["max_length"] = $settings["min_length"];
    }
    // Save settings array.
    $PHORUM["mod_username_restrictions"] = $settings;
    phorum_db_update_settings(array("mod_username_restrictions" => $settings));
    phorum_admin_okmsg("The module settings were successfully saved.");
}
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "username_restrictions");
$frm->addbreak("Edit settings for the username restrictions module");
$frm->addrow("Minimum username length (0 = no restriction)", $frm->text_box('min_length', $PHORUM["mod_username_restrictions"]["min_length"], 6));
$frm->addrow("Maximum username length (0 = no restriction)", $frm->text_box('max_length', $PHORUM["mod_username_restrictions"]["max_length"], 6));
$checkboxes = '';
foreach ($valid_chars_options as $k => $v) {
    $enabled = strpos($PHORUM["mod_username_restrictions"]["valid_chars"], $k) === FALSE ? 0 : 1;
    $checkboxes .= $frm->checkbox("valid_chars[{$k}]", "1", "", $enabled) . " {$v}<br/>";
}
$frm->addrow("Valid username characters (check none for no restrictions)", $checkboxes);
$frm->addrow("Allow only lower case characters", $frm->checkbox("only_lowercase", "1", "", $PHORUM["mod_username_restrictions"]["only_lowercase"]) . ' Yes');
$frm->show();
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:settings.php


注:本文中的PhorumInputForm::hidden方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。