• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP PhorumInputForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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>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:hasshy,项目名称:sahana-tw,代码行数:37,代码来源:form.php


示例3: phorum_api_file_purge_stale

//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////
if (!defined("PHORUM_ADMIN")) {
    return;
}
include_once "./include/format_functions.php";
include_once "./include/api/file_storage.php";
// Execute file purging for real?
if (count($_POST)) {
    $deleted = phorum_api_file_purge_stale(TRUE);
    phorum_admin_okmsg("Purged " . count($deleted) . " files");
}
// Retrieve a list of stale files.
$purge_files = phorum_api_file_purge_stale(FALSE);
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", count($purge_files) ? "Purge stale files now" : "Refresh screen");
$frm->hidden("module", "file_purge");
$frm->addbreak("Purging stale files...");
$frm->addmessage("It's possible that there are files stored in the Phorum system,\n         which no longer are linked to anything. For example, if users\n         write messages with attachments, but do not post them in the end,\n         the attachment files will be left behind in the database.\n         Using this maintenance tool, you can purge those stale files\n         from the system.");
$prev_reason = '';
if (count($purge_files)) {
    $frm->addbreak("There are currently " . count($purge_files) . " stale files in the database");
    foreach ($purge_files as $id => $file) {
        if ($file['reason'] != $prev_reason) {
            $prev_reason = $file['reason'];
            $frm->addsubbreak("Reason: " . $file['reason']);
        }
        $frm->addrow(htmlspecialchars($file["filename"]), phorum_filesize($file["filesize"]));
    }
} else {
    $frm->addmessage("There are currently no stale files in the database");
开发者ID:sleepy909,项目名称:cpassman,代码行数:31,代码来源:file_purge.php


示例4: 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


示例5: 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


示例6: foreach

}
// ----------------------------------------------------------------------
// Display status information about possible module problems
// ----------------------------------------------------------------------
// Show module problems to the admin.
if (count($list['problems'])) {
    foreach ($list['problems'] as $problem) {
        phorum_admin_error($problem);
    }
}
// ----------------------------------------------------------------------
// Build the form
// ----------------------------------------------------------------------
// Just used for building form elements.
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "");
$frm_url = phorum_admin_build_url();
$html = "<form id=\"modules_form\" " . "action=\"{$frm_url}\" method=\"post\">" . "<input type=\"hidden\" name=\"phorum_admin_token\"\n                value=\"{$PHORUM['admin_token']}\" />" . "<input style=\"display:none\" type=\"submit\" " . "value=\"catch [enter] key\" onclick=\"return false\"/>" . "<input type=\"hidden\" name=\"module\" value=\"mods\" />" . "<input type=\"hidden\" name=\"do_module_updates\" value=\"1\" />" . "<div class=\"PhorumAdminTitle\">Phorum module settings</div>" . "<div class=\"modules_filter\">" . "<strong>Filter:</strong> " . "show " . $frm->select_tag('filter_status', array(0 => 'all', 1 => 'enabled', 2 => 'disabled'), isset($_POST['filter_status']) ? $_POST['filter_status'] : 0, 'onchange="filter_modules(this.form)"') . " modules, matching " . $frm->text_box('filter_text', isset($_POST['filter_text']) ? $_POST['filter_text'] : '', 30, NULL, FALSE, 'onkeyup="filter_modules(this.form)" id="filter_text"') . $frm->checkbox('hide_description', 1, 'hide descriptions', isset($_POST['hide_description']) ? 1 : 0, 'style="margin-left:1em" ' . 'onchange="filter_modules(this.form)" ' . 'id="hide_descriptions"') . "</div>";
foreach ($list['modules'] as $name => $info) {
    // Disable a module if it's enabled, but should be disabled based
    // on the Phorum version.
    if ($info['version_disabled'] && $info['enabled']) {
        phorum_admin_error("Minimum Phorum-Version requirement not met for " . "module \"" . htmlspecialchars($name) . "\"<br/>" . "It requires at least version " . "\"" . htmlspecialchars($info['required_version']) . "\", " . "but the current version is \"" . PHORUM . "\".<br />" . "The module was disabled to avoid malfunction of " . "your Phorum because of that requirement.<br/>");
        phorum_api_modules_disable($name);
        phorum_api_modules_save();
        $info['version_disabled'] = TRUE;
    }
    $id = base64_encode("mods_{$name}");
    $title = $info["title"];
    if (isset($info["version"])) {
        $title .= " (version " . $info["version"] . ")";
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:mods.php


示例7: foreach

            foreach ($usergroups as $group_id => $group) {
                $group_perm = $group['user_status'];
                $group_info = phorum_db_get_groups($group_id);
                $frm->hidden("groups[{$group_id}]", "{$group_id}");
                $frm->addrow($group_info[$group_id]["name"], $frm->select_tag("group_perm[{$group_id}]", $group_options, $group_perm, $extra_opts));
            }
        }
        $frm->show();
    } else {
        echo "User Not Found.";
    }
    //display add user form
} elseif (isset($_REQUEST["add"]) || isset($addUser_error)) {
    $username = isset($user_data["username"]) ? $user_data["username"] : "";
    $real_name = isset($user_data["real_name"]) ? $user_data["real_name"] : "";
    $email = isset($user_data["email"]) ? $user_data["email"] : "";
    $admin = isset($user_data["admin"]) ? $user_data["admin"] : "";
    print "<a href=\"" . htmlspecialchars($referrer) . "\">Back to the user overview</a><br/>";
    $frm = new PhorumInputForm("", "post", "Add User");
    $frm->hidden("module", "users");
    $frm->hidden("referrer", $referrer);
    $frm->hidden("addUser", 1);
    $frm->addbreak("Add User");
    $frm->addrow("User Name", $frm->text_box("username", $username, 50));
    $frm->addrow("Real Name", $frm->text_box("real_name", $real_name, 50));
    $frm->addrow("Email", $frm->text_box("email", $email, 50));
    $frm->addrow("Password", $frm->text_box("password1", "", 0, 0, true));
    $frm->addrow("Password (Confirmation)", $frm->text_box("password2", "", 0, 0, true));
    $frm->addrow("Administrator", $frm->select_tag("admin", array("No", "Yes"), $admin));
    $frm->show();
}
开发者ID:sleepy909,项目名称:cpassman,代码行数:31,代码来源:users.php


示例8: phorum_admin_okmsg

            $value = (int) $_POST['enabled'][$tagname];
            $PHORUM['mod_bbcode']['enabled'][$tagname] = $value;
            if ($value == 2) {
                $nr_of_enabled_tags++;
            }
        }
    }
    // Store the new settings array.
    $PHORUM['DB']->update_settings(array('mod_bbcode' => $PHORUM['mod_bbcode']));
    phorum_admin_okmsg("The settings were successfully saved.");
    if ($nr_of_enabled_tags > 0 && empty($PHORUM['mods']['editor_tools'])) {
        phorum_admin_error("<b>Notice:</b> You have configured one or more BBcode tags to add a button to the editor tool bar. However, you have not enabled the Editor Tools module. If you want to use the tool buttons, then remember to activate the Editor Tools module.");
    }
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save settings");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "bbcode");
$frm->addbreak("General settings for the BBcode module");
$row = $frm->addrow("Open links in new window", $frm->checkbox("links_in_new_window", "1", "Yes", $PHORUM["mod_bbcode"]["links_in_new_window"]));
$frm->addhelp($row, "Open links in new window", "When users post links on your forum, you can choose whether to open these in a new window or not.");
$row = $frm->addrow("Turn bare URLs into clickable links", $frm->checkbox("process_bare_urls", "1", "Yes", $PHORUM["mod_bbcode"]["process_bare_urls"]));
$frm->addhelp($row, "Turn bare URLs into clickable links", "If you enable this option, then the BBcode module will try to detect bare URLs in the message (URLs that are not surrounded by [url]...[/url] BBcode tags) and turn those into clickable links (as if they were surrounded by [url]...[/url]).");
$row = $frm->addrow("Turn bare email addresses into clickable links", $frm->checkbox("process_bare_email", "1", "Yes", $PHORUM["mod_bbcode"]["process_bare_email"]));
$frm->addhelp($row, "Turn bare email addresses into clickable links", "If you enable this option, then the BBcode module will try to detect bare email addresses in the message (addresses that are not surrounded by [email]...[/email] BBcode tags) and turn those into clickable links (as if they were surrounded by [email]...[/email]).");
$row = $frm->addrow("Show full URLs", $frm->checkbox("show_full_urls", "1", "Yes", $PHORUM["mod_bbcode"]["show_full_urls"]));
$frm->addhelp($row, "Show full URLs", "By default, URLs are truncated by phorum to show only [www.example.com]. This is done to prevent very long URLs from cluttering and distrurbing the web site layout. By enabling this feature, you can suppress the truncation, so full URLs are shown.");
$row = $frm->addrow("Add 'rel=nofollow' to links that are posted in your forum", $frm->checkbox("rel_no_follow", "1", "Yes", $PHORUM["mod_bbcode"]["rel_no_follow"]));
$frm->addhelp($row, "Add 'rel=nofollow' to links", 'You can enable Google\'s rel="nofollow" tag for links that are posted in your forums. This tag is used to discourage spamming links to web sites in forums (which can be done to influence search engines by implying that the site is a popular one, because of all the links).<br/><br/>Note that this does not stop spam links from being posted, but it does mean that spammers do not get any credit from Google for that link.');
$row = $frm->addrow("Enable BBcode quoting using the [quote] tag", $frm->checkbox("quote_hook", "1", "Yes", $PHORUM["mod_bbcode"]["quote_hook"]));
$frm->addhelp($row, "Enable BBcode [quote]", "If this feature is enabled, then quoting of messages is not done using the standard Phorum method (which resembles email message quoting), but using the BBcode module's quoting method instead. This means that the quoted text is placed within a [quote Author]...[/quote] bbcode block.<br/><br/>Two of the advantages of using this quote method is that the quoted message can be styles though CSS code and that no word wrapping is applied to the text.");
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:settings.php


示例9: event_logging_getlogs

}
// Keep the current page within bounds.
if ($page <= 0) {
    $page = 1;
}
if ($page > $pages) {
    $page = $pages;
}
$filter_base .= '&page=' . $page;
// Retrieve event logs for the active page.
$logs = event_logging_getlogs($page, $pagelength, $filter);
// ----------------------------------------------------------------------
// Display header form for paging and filtering.
// ----------------------------------------------------------------------
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", $filter_mode ? "Apply filter" : "Refresh page");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "event_logging");
$frm->hidden("curpage", $page);
$frm->hidden("el_action", $filter_mode ? "filter" : "logviewer");
$frm->addrow("<span style=\"float:right;margin-right:10px\">" . $frm->select_tag("pagelength", $pagelengths, $pagelength, 'onchange="this.form.submit()"') . "&nbsp;&nbsp;&nbsp\n         <input type=\"submit\" name=\"prevpage\" value=\"&lt;&lt;\"/>\n         page " . $frm->select_tag("page", $pagelist, $page, 'onchange="this.form.submit()"') . " of {$pages}\n         <input type=\"submit\" name=\"nextpage\" value=\"&gt;&gt;\"/>\n     </span>Number of entries: {$logcount}");
if ($filter_mode) {
    $frm->hidden("filter_mode", 1);
    $loglevel_checkboxes = '';
    foreach ($strings["LOGLEVELS"] as $l => $s) {
        $loglevel_checkboxes .= '<span style="white-space: nowrap">' . $frm->checkbox("show_loglevel[{$l}]", "1", "", isset($show_loglevel[$l]) ? 1 : 0, "id=\"llcb_{$l}\"") . ' <label for="llcb_' . $l . '"><img align="absmiddle" src="' . $PHORUM["http_path"] . '/mods/event_logging/images/loglevels/' . $l . '.png"/> ' . $s . '</label></span> ';
    }
    $row = $frm->addrow("Log levels to display", $loglevel_checkboxes);
    $frm->addhelp($row, "Log levels to display", "By using these checkboxes, you can limit the log levels that are displayed. If you do not check any of them, then no filtering will be applied and all log levels will be displayed.");
    $category_checkboxes = '';
    foreach ($strings["CATEGORIES"] as $l => $s) {
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:logviewer.php


示例10: PhorumInputForm

        $alt = "";
        $uses = 2;
    }
} else {
    $title = "Update a smiley";
    $submit = "Update smiley";
    // Fill initial form data for editing smileys.
    if (!isset($_POST["smiley_id"])) {
        $smileydata = $PHORUM["mod_smileys"]["smileys"][$smiley_id];
        $search = $smileydata["search"];
        $smiley = $smileydata["smiley"];
        $alt = $smileydata["alt"];
        $uses = $smileydata["uses"];
    }
}
$frm = new PhorumInputForm("", "post", $submit);
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "smileys");
$frm->hidden("smiley_id", $smiley_id);
$frm->hidden("action", "edit_smiley");
$frm->addbreak($title);
$frm->addrow("Smiley string to match", $frm->text_box("search", $search, 20));
$row = $frm->addrow("Image to replace the string with", $frm->select_tag("smiley", array_merge(array('' => 'Select smiley ...'), $available_smileys), $smiley, "onChange=\"change_image(this.options[this.selectedIndex].value);\"") . "&nbsp;&nbsp;<div style=\"display:none;margin-top:5px\" id=\"preview_div\"><strong>Preview: </strong><img src=\"images/trans.gif\" id=\"preview_image\" /></div>");
$frm->addhelp($row, "Smiley replacement image", "The drop down list shows all images that were found in your\n     smiley prefix path. If you want to add your own smileys, simply place\n     them in \"" . htmlspecialchars($PHORUM["mod_smileys"]["prefix"]) . "\"\n     and reload this page.");
$frm->addrow("ALT attribute for the image", $frm->text_box("alt", $alt, 40));
$frm->addrow("Used for", $frm->select_tag("uses", $PHORUM_MOD_SMILEY_USES, $uses));
$frm->show();
// Make the preview image visible in case a $smiley is set.
if (!empty($smiley)) {
    ?>
    <script type="text/javascript">
开发者ID:sleepy909,项目名称:cpassman,代码行数:31,代码来源:settings.php


示例11: phorum_admin_error

        if(!$ret){
            $error="No messages deleted.<br />";
        } else {
            echo "$ret Messages deleted.<br />";
        }
    }

    if($error){
        phorum_admin_error($error);
    }

    include_once "./include/admin/PhorumInputForm.php";
        

    $frm = new PhorumInputForm ("", "post", "Delete messages");

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

    $frm->addbreak("Pruning old threads ...");
    $frm->addmessage("ATTENTION!<br />This script deletes quickly A LOT of messages. Use it on your own risk.<br />There is no further confirmation message after sending this form!");

    $frm->addrow("older than (days from today)",$frm->text_box("days", "365", 10));
    $frm->addrow("in Forum", $frm->select_tag("forumid", $forum_list,0));
    $frm->addrow("Check for", $frm->select_tag("mode", array(1=>"When the thread was started",2=>"When the last answer to the thread was posted"),0));    

    $frm->show();


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


示例12: phorum_generate_language_file

function phorum_generate_language_file($lang, $displayname, $generate_new)
{
    global $fullfile;
    $basename = preg_replace('/-.*$/', '', $lang);
    $fullfile = $basename . '-' . PHORUM . '.php';
    // Get our default language file.
    $DEFAULT = phorum_get_language(PHORUM_DEFAULT_LANGUAGE);
    // Get the languagefile to update, unless generating a new language.
    $CURRENT = array();
    if (!$generate_new) {
        $CURRENT = phorum_get_language($lang);
    } else {
        $CURRENT['STORE']['language_hide'] = 0;
        $CURRENT['STORE']['language'] = urlencode("'" . addslashes($displayname) . "'");
    }
    // Keep a copy of the languagefile.
    $CURRENT_COPY = $CURRENT;
    // Collect all language strings from the distribution files.
    $language_strings = phorum_extract_language_strings();
    $frm = new PhorumInputForm("", "post", "Download new " . htmlspecialchars($fullfile) . " language file");
    $frm->hidden("module", "manage_languages");
    $frm->hidden("action", "download_lang");
    $frm->hidden("filename", $lang);
    if (!$generate_new) {
        $frm->addmessage("<h2>Update language: " . htmlspecialchars($displayname) . "</h2>" . "Below you will see all the things that have been updated " . "to get to the new version of the language file. At the " . "bottom of the page you will find a download button to download " . "the updated language file. This language file has to be placed " . "in <b>include/lang/" . htmlspecialchars($lang) . ".php</b> to make it " . "available to Phorum (backup your old file first of course!). " . "If new language strings have been added, " . "they will be marked with '***' in the language file, so it's " . "easy for you to find them.");
        $frm->addbreak("Updates for the new language file");
    } else {
        $frm->addmessage("<h2>Generate new language: " . htmlspecialchars($displayname) . "</h2>" . "A new language file has been generated. Below you will find " . "a download button to download the new file. In this file, you " . "can replace all language strings by strings which apply to " . "\"" . htmlspecialchars($displayname) . "\". After updating the new " . "file, you will have to place it in " . "<b>include/lang/" . htmlspecialchars($basename) . ".php</b>, " . "so Phorum can use it (backup your old file first of course!).");
    }
    $notifies = 0;
    // Check for language strings that are missing.
    $missing = array();
    $count_missing = 0;
    foreach ($language_strings as $string => $data) {
        // This one is special.
        if ($string == 'TIME') {
            continue;
        }
        // Multi-dimentional string? That must be a module lang string
        // (cut at PHORUM->LANG->myarray-|>word).
        if (preg_match('/-$/', $string)) {
            continue;
        }
        if (!isset($CURRENT["DATA"]["LANG"][$string])) {
            array_push($missing, $string);
            $translation = urlencode("'" . addslashes($string) . "'");
            if (isset($DEFAULT["DATA"]["LANG"][$string])) {
                $translation = $DEFAULT["DATA"]["LANG"][$string];
            }
            $CURRENT_COPY["DATA"]["LANG"][$string] = urlencode("'***'. " . urldecode($translation));
            $count_missing++;
            if (!$generate_new) {
                $frm->addrow("MISSING ({$count_missing})", $string);
                $notifies++;
            }
        } else {
            unset($CURRENT["DATA"]["LANG"][$string]);
        }
    }
    // Check for language strings that are deprecated.
    $deprecated = array();
    $count_deprecated = 0;
    if (!$generate_new) {
        foreach ($CURRENT["DATA"]["LANG"] as $string => $translation) {
            if ($string == 'TIME') {
                continue;
            }
            // This one is special.
            $count_deprecated++;
            $deprecated[$string] = true;
            // Only notify the deprecation if not already in deprecated state.
            if (!isset($CURRENT['STORE']['DEPRECATED'][$string])) {
                $frm->addrow("DEPRECATED ({$count_deprecated})", htmlspecialchars($string));
                $notifies++;
            }
        }
    }
    $CURRENT_COPY['STORE']['DEPRECATED'] = $deprecated;
    // Restore our full current language data from the copy.
    $CURRENT = $CURRENT_COPY;
    // Copy values from our default language to the current language.
    $copyfields = array('long_date', 'long_date_time', 'short_date', 'short_date_time', 'locale', 'thous_sep', 'dec_sep');
    foreach ($copyfields as $f) {
        if (!isset($CURRENT[$f])) {
            $CURRENT[$f] = $DEFAULT[$f];
            if (!$generate_new) {
                $frm->addrow("MISSING VARIABLE", "{$f} set to default " . htmlspecialchars(urldecode($DEFAULT[$f])));
                $notifies++;
            }
        }
    }
    // Copy default values beneath DATA to the current language.
    $datafields = array('CHARSET', 'HCHARSET', 'MAILENCODING', 'LANG_META');
    foreach ($datafields as $f) {
        if (!isset($CURRENT['DATA'][$f]) || $CURRENT['DATA'][$f] == '') {
            $CURRENT['DATA'][$f] = $DEFAULT['DATA'][$f];
            if (!$generate_new) {
                $frm->addrow("MISSING VARIABLE", "DATA->{$f} set to default " . htmlspecialchars(urldecode($DEFAULT['DATA'][$f])));
                $notifies++;
            }
//.........这里部分代码省略.........
开发者ID:samuell,项目名称:Core,代码行数:101,代码来源:manage_languages.php


示例13: htmlspecialchars

                <input type="hidden" name="curr" value="<?php 
    echo htmlspecialchars($_GET['curr']);
    ?>
" />
                <input type="hidden" name="delete" value="1" />
                <input type="submit" name="confirm" value="Yes" />&nbsp;<input type="submit" name="confirm" value="No" />
            </form>
        </div>

        <?php 
} else {
    // load bad-words-list
    $banlists = phorum_db_get_banlists();
    $bad_words = $banlists[PHORUM_BAD_WORDS];
    include_once "./include/admin/PhorumInputForm.php";
    $frm = new PhorumInputForm("", "post", $submit);
    $frm->hidden("module", "badwords");
    $frm->hidden("curr", "{$curr}");
    $row = $frm->addbreak($title);
    if ($curr == 'NEW') {
        $frm->addmessage("This feature can be used to mask bad words in forum messages\n             with \"" . PHORUM_BADWORD_REPLACE . "\". All bad words will\n             automatically be replaced by that string. If you want to use\n             a different string (e.g. \"CENSORED\" or \"*****\"), then you\n             can change the definition of the constant\n             \"PHORUM_BADWORD_REPLACE\" in the Phorum file\n             include/constants.php.");
    }
    $row = $frm->addrow("Bad Word", $frm->text_box("string", $string, 50));
    $frm->addhelp($row, "Bad Word", "The word that you want to mask in forum messages.\n             Rules that apply to the matching are:\n             <ul>\n               <li><b>Only the full word</b> is matched, so \"foo\" would\n                   not mask (part of) \"foobar\";</li>\n               <li>The match is <b>case insensitive</b>, so \"foo\" would also\n                   mask \"FoO\".</li>\n             </ul>");
    $frm->addrow("Valid for Forum", $frm->select_tag("forum_id", $forum_list, $forum_id));
    $row = $frm->addrow('Comments', $frm->textarea('comments', $comments, 50, 7));
    $frm->addhelp($row, "Comments", "This field can be used to add some comments to the ban (why you\n             created it, when you did this, when the ban can be deleted, etc.)\n             These comments will only be shown on this page and are meant as\n             a means for the administrator to do some bookkeeping.");
    $frm->show();
    echo "<hr class=\"PhorumAdminHR\" />";
    if (count($bad_words)) {
        echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"PhorumAdminTable\" width=\"100%\">\n";
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:badwords.php


示例14: 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


示例15: foreach

    if (isset($_POST['vroot_forum_id']) && is_array($_POST['vroot_forum_id'])) {
        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)) {
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:settings.php


示例16: phorum_admin_error

    $vroot = 0;
}
// If we are inheriting settings from a forum,
// then disable the inherited fields in the input.
$disabled_form_input = '';
if ($inherit_id != -1) {
    $disabled_form_input = 'disabled="disabled"';
}
// ----------------------------------------------------------------------
// Handle displaying the folder settings form
// ----------------------------------------------------------------------
if ($errors) {
    phorum_admin_error(join("<br/>", $errors));
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
// Edit an existing folder.
if (defined("PHORUM_EDIT_FOLDER")) {
    $frm->hidden("module", "editfolder");
    $frm->hidden("forum_id", $forum_id);
    $title = "Edit existing folder";
} else {
    $frm->hidden("module", "newfolder");
    $title = "Add A Folder";
    $folders = $folder_data;
}
$frm->addbreak($title);
$frm->addrow("Folder Title", $frm->text_box("name", $name, 30));
$frm->addrow("Folder 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);
$frm->addrow("Put this forum below folder", $frm->select_tag('parent_id', $parent_id_options, $parent_id));
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:newfolder.php


示例17: isset

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Photo类代码示例发布时间:2022-05-23
下一篇:
PHP PhoneNumber类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap