示例#1
0
文件: forum.php 项目: samuell/Core
function phorum_cc_get_template_info()
{
    global $PHORUM;
    $langs = phorum_api_template_list();
    $profile = $PHORUM['DATA']['PROFILE'];
    $f_langs = array();
    if (!isset($profile['user_template'])) {
        $defsel = " selected=\"selected\"";
    } else {
        $defsel = "";
    }
    $f_langs[] = array('file' => '', 'name' => $PHORUM['DATA']['LANG']['Default'], 'sel' => $defsel);
    foreach ($langs as $entry => $name) {
        $sel = "";
        if (isset($profile['user_template']) && $profile['user_template'] == $entry) {
            $sel = " selected=\"selected\"";
        }
        $f_langs[] = array('file' => $entry, 'name' => $name, 'sel' => $sel);
    }
    return $f_langs;
}
示例#2
0
文件: newforum.php 项目: netovs/Core
    }
    $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, $disabled_form_input_inherit) . $add_inherit_text);
}
$frm->addbreak("Moderation / Permissions");
$row = $frm->addrow("Moderate Messages", $frm->select_tag("moderation", array(PHORUM_MODERATE_OFF => "Disabled", PHORUM_MODERATE_ON => "Enabled"), $moderation, $disabled_form_input));
$frm->addhelp($row, "Moderate Messages", "This setting determines whether messages are visible to users immediately after they are posted.  If enabled, all messages will remain hidden until approved by a moderator.");
$frm->addrow("Email Messages To Moderators", $frm->select_tag("email_moderators", array(PHORUM_EMAIL_MODERATOR_OFF => "Disabled", PHORUM_EMAIL_MODERATOR_ON => "Enabled"), $email_moderators, $disabled_form_input));
$pub_perm_frm = $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $pub_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $pub_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $pub_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input) . "<br />" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $pub_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input);
$frm->addrow("Public Anonymous Users", $pub_perm_frm);
$reg_perm_frm = $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $reg_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $reg_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $reg_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input) . "<br />" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts", $reg_perms & PHORUM_USER_ALLOW_EDIT, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $reg_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input) . "<br/>" . $frm->checkbox('allow_email_notify', 1, 'Allow email notification for following topics', $allow_email_notify, $disabled_form_input);
$row = $frm->addrow("Registered Users", $reg_perm_frm);
$frm->addhelp($row, "Registered Users", "These are the permissions that apply to registered users. Note that these permissions can be overridden by permissions that were granted directly to the user or to a group to which a user belongs.");
$frm->addbreak("Display Settings");
$frm->addrow("Fixed Display-Settings (user can't override them)", $frm->select_tag("display_fixed", array("No", "Yes"), $display_fixed, $disabled_form_input));
$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));
$frm->addrow("List View", $frm->select_tag("threaded_list", array("Flat", "Threaded"), $threaded_list, $disabled_form_input));
$frm->addrow("Read View", $frm->select_tag("threaded_read", array("Flat", "Threaded", "Hybrid"), $threaded_read, $disabled_form_input));
$frm->addrow("Reverse Threading", $frm->select_tag("reverse_threading", array("No", "Yes"), $reverse_threading, $disabled_form_input));
$frm->addrow("Move Threads On Reply", $frm->select_tag("float_to_top", array("No", "Yes"), $float_to_top, $disabled_form_input));
$frm->addrow("Message List Length (Flat Mode)", $frm->text_box("list_length_flat", $list_length_flat, 10, false, false, $disabled_form_input));
$frm->addrow("Message List Length (Threaded Mode, Nr. of Threads)", $frm->text_box("list_length_threaded", $list_length_threaded, 10, false, false, $disabled_form_input));
$frm->addrow("Read Page Length", $frm->text_box("read_length", $read_length, 10, false, false, $disabled_form_input));
$frm->addrow("Display IP Addresses <small>(note: admins always see it)</small>", $frm->select_tag("display_ip_address", array("No", "Yes"), $display_ip_address, $disabled_form_input));
$frm->addrow("Count views", $frm->select_tag("count_views", array(0 => "No", 1 => "Yes, show views added to subject", 2 => "Yes, show views as extra column"), $count_views, $disabled_form_input));
$row = $frm->addrow("Count views per thread for non-threaded list views", $frm->select_tag("count_views_per_thread", array(0 => "No", 1 => "Yes"), $count_views_per_thread, $disabled_form_input));
$frm->addhelp($row, "Count views per thread for non-threaded list", "By default, Phorum only counts views per message. While this is okay\n     for a forum that runs in threaded view (since there you will always\n     show only one message at a time), it might not work well for forums\n     that run in a non-threaded view (there only one message will get\n     its view count updated, although multiple messages might show).\n     Additionally, if the list view is flat and the read view is threaded, the\n     view count on the list view will only show how often the first message\n     in the thread was viewed.<br/>\n     <br/>\n     With this option enabled, a separate view counter will be updated\n     for the full thread when viewing any of the read pages for that thread.\n     For non-threaded list views, this counter will then be used as the view\n     count for the thread. Note that this does require an extra SQL query\n     to update the separate counter, so on very busy servers you might not\n     want to enable this option.");
$frm->addbreak("Posting Settings");
$frm->addrow("Check for Duplicates", $frm->select_tag("check_duplicate", array("No", "Yes"), $check_duplicate, $disabled_form_input));
$frm->addbreak("Attachment Settings");