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


PHP PhorumInputForm::addrow方法代码示例

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


在下文中一共展示了PhorumInputForm::addrow方法的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: foreach

    $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 {
        $frm->addrow($desc, $frm->checkbox("do_log_{$type}", "1", "", $settings["do_log_{$type}"]));
    }
}
$frm->show();
开发者ID:sheldon,项目名称:dejavu,代码行数:31,代码来源:settings.php

示例4: PhorumInputForm

        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"];
            if (isset($info["desc"])) {
                $text .= "<div class=\"small\">" . wordwrap($info["desc"], 90, "<br />") . "</div>";
            }
            $frm->addrow($text, $frm->select_tag(base64_encode("mods_{$name}"), array("Off", "On"), $info['enabled']));
        }
        $frm->show();
        break;
}
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:install.php

示例5: array

        }
    }
    if ($vroot == $forum_id) {
        $vroot = 1;
    } else {
        $foreign_vroot = $vroot;
        $vroot = 0;
    }
} else {
    $frm->hidden("module", "newfolder");
    $title = "Add A Folder";
    $folders = $folder_data;
    $vroot = 0;
    $active = 1;
    $template = $PHORUM["default_forum_options"]["template"];
}
$frm->hidden("folder_flag", "1");
$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");
$frm->addrow("Folder", $frm->select_tag("parent_id", $folders, $parent_id));
$frm->addrow("Visible", $frm->select_tag("active", array("No", "Yes"), $active));
$frm->addbreak("Display Settings");
$frm->addrow("Template", $frm->select_tag("template", phorum_get_template_info(), $template));
$frm->addrow("Language", $frm->select_tag("language", phorum_get_language_info(), $language));
$frm->addrow("Virtual Root for descending forums/folders", $frm->checkbox("vroot", "1", "enabled", $vroot ? 1 : 0));
if ($foreign_vroot > 0) {
    $frm->addrow("This folder is in the Virtual Root of:", $folders[$foreign_vroot]);
}
phorum_hook("admin_editfolder_form", $frm, $forum_settings);
$frm->show();
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:newfolder.php

示例6: PhorumInputForm

            $frm->hidden("step", "6");
            $frm->hidden("module", "install");
            $frm->show();

            break;

        case 4:

            $frm = new PhorumInputForm ("", "post");
            $frm->hidden("step", "5");
            $frm->hidden("module", "install");
            $frm->addbreak("Creating An Administrator");
            $frm->addmessage("Please enter the following information.  This can be your user information or you can create an administrator that is separate from yourself.<br /><br />Note: If you are using a pre-existing authentication database, please enter the username and password of the admin user that already exists.");
            $admin_user = isset($_POST["admin_user"]) ? $_POST["admin_user"] : "";
            $admin_email = isset($_POST["admin_email"]) ? $_POST["admin_email"] : "";
            $frm->addrow("Admin User Name", $frm->text_box("admin_user", $admin_user, 30));
            $frm->addrow("Admin Email Address", $frm->text_box("admin_email", $admin_email, 30));
            $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 5:

            phorum_db_update_settings( array("installed"=>1) );
            echo "The setup is complete.  You can now go to <a href=\"$_SERVER[PHP_SELF]\">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 6:
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:install.php

示例7: PhorumInputForm

$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);
    $frm->addrow("Put this forum below folder", $frm->select_tag('parent_id', $parent_id_options, $parent_id));
    if ($vroot > 0) {
        $frm->addrow("This forum is in the Virtual Root of:", $folder_list[$vroot]);
    }
    $row = $frm->addrow("Make this forum visible in the forum index?", $frm->select_tag("active", array("No", "Yes"), $active));
    $frm->addhelp($row, "Make this forum visible in the forum index?", 'If this option is set to "No", then this forum will not be visible
         in the forum index. This is mainly an option for temporarily keeping
         a forum hidden to your users (e.g. while you are creating and
         configuring a forum or for testing out features).<br/>
         <br/>
         <b>This is not a security option!</b><br/>
         <br/>
         A forum that is not visible is still accessible by all users
开发者ID:netovs,项目名称:Core,代码行数:31,代码来源:newforum.php

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

示例9: PhorumInputForm

        </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";
        echo "<tr>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Word</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Valid for Forum</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">&nbsp;</td>\n";
        echo "</tr>\n";
        foreach ($bad_words as $key => $item) {
            $edit_url = phorum_admin_build_url(array('module=badwords', 'edit=1', "curr={$key}"));
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:badwords.php

示例10: isset

    $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");
    foreach ($vroot_folders as $vroot_folder_id => $vroot_path) {
        $forum_list_vroot = phorum_get_forum_info(1, $vroot_folder_id);
        $forum_list_vroot[0] = 'No Announcements for this Virtual Root';
        asort($forum_list_vroot);
开发者ID:mgs2,项目名称:kw-forum,代码行数:31,代码来源:settings.php

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

示例12: PhorumInputForm

    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));
$frm->addrow("Make this forum visible in the forum index?", $frm->select_tag("active", array("No", "Yes"), $active));
$row = $frm->addrow("Virtual Root for descending forums/folders", $frm->checkbox("vroot", "1", "enabled", $vroot ? 1 : 0));
$frm->addhelp($row, "Virtual Root for descending forums/folders", "If you enable the virtual root feature for a folder, then this folder\n     will act as a separate Phorum installation. The folder will not be\n     visible in its parent folder anymore and if you visit the folder, it will\n     behave as if it were a Phorum root folder. This way you can run\n     multiple separated forums on a single Phorum installation.<br/><br/>\n     The users will be able to access all virtual root folders, unless you\n     use the permission system to setup different access rules.");
if ($foreign_vroot > 0) {
    $frm->addrow("This folder is in the Virtual Root of:", $folders[$foreign_vroot]);
}
$frm->addbreak("Inherit Folder Settings");
$inherit_id_options = phorum_api_forums_get_inherit_id_options($forum_id);
$row = $frm->addrow("Inherit the settings below this option from", $frm->select_tag("inherit_id", $inherit_id_options, $inherit_id) . $add_inherit_text);
$frm->addbreak("Display Settings");
$frm->addrow("Template", $frm->select_tag("template", phorum_api_template_list(TRUE), $template, $disabled_form_input));
$frm->addrow("Language", $frm->select_tag("language", phorum_api_lang_list(TRUE), $language, $disabled_form_input));
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:newfolder.php

示例13: PhorumInputForm

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.
$frm->addrow("Number of times to display", $frm->text_box('displaycount', $PHORUM["mod_example_settings"]["displaycount"], 5));
// We are done building the settings screen.
// By calling show(), the screen will be displayed.
$frm->show();
开发者ID:samuell,项目名称:Core,代码行数:31,代码来源:settings.php

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

示例15: PhorumInputForm

    // 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">
    change_image('<?php 
    print addslashes($smiley);
    ?>
');
    </script><?php 
}
开发者ID:sleepy909,项目名称:cpassman,代码行数:31,代码来源:settings.php


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