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


PHP build_theme_select函数代码示例

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


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

示例1: eval

         $lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']);
         eval("\$coppa_agreement = \"" . $templates->get("member_register_agreement_coppa") . "\";");
     }
     $plugins->run_hooks("member_register_agreement");
     eval("\$agreement = \"" . $templates->get("member_register_agreement") . "\";");
     output_page($agreement);
 } else {
     $plugins->run_hooks("member_register_start");
     $validator_extra = '';
     if (isset($mybb->input['timezoneoffset'])) {
         $timezoneoffset = $mybb->get_input('timezoneoffset');
     } else {
         $timezoneoffset = $mybb->settings['timezoneoffset'];
     }
     $tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);
     $stylelist = build_theme_select("style");
     if ($mybb->settings['usertppoptions']) {
         $tppoptions = '';
         $explodedtpp = explode(",", $mybb->settings['usertppoptions']);
         if (is_array($explodedtpp)) {
             foreach ($explodedtpp as $val) {
                 $val = trim($val);
                 $tpp_option = $lang->sprintf($lang->tpp_option, $val);
                 eval("\$tppoptions .= \"" . $templates->get("usercp_options_tppselect_option") . "\";");
             }
         }
         eval("\$tppselect = \"" . $templates->get("usercp_options_tppselect") . "\";");
     }
     if ($mybb->settings['userpppoptions']) {
         $pppoptions = '';
         $explodedppp = explode(",", $mybb->settings['userpppoptions']);
开发者ID:nicopinto,项目名称:fantasitura.com,代码行数:31,代码来源:member.php

示例2: array

 $ppp_options = array($lang->use_default);
 if ($mybb->settings['userpppoptions']) {
     $explodedppp = explode(",", $mybb->settings['userpppoptions']);
     if (is_array($explodedppp)) {
         foreach ($explodedppp as $ppp) {
             if ($ppp <= 0) {
                 continue;
             }
             $ppp_options[$ppp] = $ppp;
         }
     }
 }
 $thread_options = array($form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])), $form->generate_check_box("showavatars", 1, $lang->display_users_avatars, array("checked" => $mybb->input['showavatars'])), $form->generate_check_box("showquickreply", 1, $lang->show_quick_reply, array("checked" => $mybb->input['showquickreply'])), "<label for=\"ppp\">{$lang->posts_per_page}:</label><br />" . $form->generate_select_box("ppp", $ppp_options, $mybb->input['ppp'], array('id' => 'ppp')), "<label for=\"threadmode\">{$lang->default_thread_view_mode}:</label><br />" . $form->generate_select_box("threadmode", array("" => $lang->use_default, "linear" => $lang->linear_mode, "threaded" => $lang->threaded_mode), $mybb->input['threadmode'], array('id' => 'threadmode')));
 $form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">" . implode("</div><div class=\"user_settings_bit\">", $thread_options) . "</div>");
 $languages = array_merge(array('' => $lang->use_default), $lang->get_languages());
 $other_options = array($form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])), "<label for=\"style\">{$lang->theme}:</label><br />" . build_theme_select("style", $mybb->input['style'], 0, "", true), "<label for=\"language\">{$lang->board_language}:</label><br />" . $form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language')));
 $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">" . implode("</div><div class=\"user_settings_bit\">", $other_options) . "</div>");
 $form_container->end();
 echo "</div>\n";
 //
 // SIGNATURE EDITOR
 //
 $signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));
 $sig_smilies = $lang->off;
 if ($mybb->settings['sigsmilies'] == 1) {
     $sig_smilies = $lang->on;
 }
 $sig_mycode = $lang->off;
 if ($mybb->settings['sigmycode'] == 1) {
     $sig_mycode = $lang->on;
     $signature_editor .= build_mycode_inserter("signature");
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:users.php

示例3: eval

 if ($mybb->settings['allowbuddyonly'] == 1) {
     eval("\$pms_from_buddys = \"" . $templates->get("usercp_options_pms_from_buddys") . "\";");
 }
 $threadview = array('linear' => '', 'threaded' => '');
 if (isset($user['threadmode']) && is_scalar($user['threadmode'])) {
     $threadview[$user['threadmode']] = 'selected="selected"';
 }
 $daysprunesel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 100 => '', 365 => '', 9999 => '');
 if (isset($user['daysprune']) && is_numeric($user['daysprune'])) {
     $daysprunesel[$user['daysprune']] = 'selected="selected"';
 }
 if (!isset($user['style'])) {
     $user['style'] = '';
 }
 $board_style = $stylelist = '';
 $stylelist = build_theme_select("style", $user['style']);
 if (!empty($stylelist)) {
     eval('$board_style = "' . $templates->get('usercp_options_style') . '";');
 }
 $tppselect = $pppselect = '';
 if ($mybb->settings['usertppoptions']) {
     $explodedtpp = explode(",", $mybb->settings['usertppoptions']);
     $tppoptions = $tpp_option = '';
     if (is_array($explodedtpp)) {
         foreach ($explodedtpp as $key => $val) {
             $val = trim($val);
             $selected = "";
             if (isset($user['tpp']) && $user['tpp'] == $val) {
                 $selected = " selected=\"selected\"";
             }
             $tpp_option = $lang->sprintf($lang->tpp_option, $val);
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:usercp.php

示例4: eval

            // Current language matches
            if ($lang->language == $key) {
                $selected = " selected=\"selected\"";
            } else {
                $selected = '';
            }
            eval('$lang_options .= "' . $templates->get('footer_languageselect_option') . '";');
        }
        $lang_redirect_url = get_current_location(true, 'language');
        eval('$lang_select = "' . $templates->get('footer_languageselect') . '";');
    }
}
// Are we showing the quick theme selection box?
$theme_select = $theme_options = '';
if ($mybb->settings['showthemeselect'] != 0) {
    $theme_options = build_theme_select("theme", $mybb->user['style'], 0, '', false, true);
    if (!empty($theme_options)) {
        $theme_redirect_url = get_current_location(true, 'theme');
        eval('$theme_select = "' . $templates->get('footer_themeselect') . '";');
    }
}
// If we use the contact form, show 'Contact Us' link when appropriate
$contact_us = '';
if ($mybb->settings['contactlink'] == "contact.php" && $mybb->settings['contact'] == 1 && ($mybb->settings['contact_guests'] != 1 && $mybb->user['uid'] == 0 || $mybb->user['uid'] > 0) || $mybb->settings['contactlink'] != "contact.php") {
    if (my_substr($mybb->settings['contactlink'], 0, 1) != '/' && my_substr($mybb->settings['contactlink'], 0, 7) != 'http://' && my_substr($mybb->settings['contactlink'], 0, 8) != 'https://' && my_substr($mybb->settings['contactlink'], 0, 7) != 'mailto:') {
        $mybb->settings['contactlink'] = $mybb->settings['bburl'] . '/' . $mybb->settings['contactlink'];
    }
    eval('$contact_us = "' . $templates->get('footer_contactus') . '";');
}
// DST Auto detection enabled?
$auto_dst_detection = '';
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:31,代码来源:global.php

示例5: build_theme_select

/**
 * Build a theme selection menu
 *
 * @param string The name of the menu
 * @param int The ID of the selected theme
 * @param int The ID of the parent theme to select from
 * @param int The current selection depth
 * @param boolean Whether or not to override usergroup permissions (true to override)
 * @return string The theme selection list
 */
function build_theme_select($name, $selected = "", $tid = 0, $depth = "", $usergroup_override = false)
{
    global $db, $themeselect, $tcache, $lang, $mybb, $limit;
    if ($tid == 0) {
        $themeselect = "<select name=\"{$name}\">";
        $themeselect .= "<option value=\"0\">" . $lang->use_default . "</option>\n";
        $themeselect .= "<option value=\"0\">-----------</option>\n";
        $tid = 1;
    }
    if (!is_array($tcache)) {
        $query = $db->simple_select("themes", "name, pid, tid, allowedgroups", "pid != '0'", array('order_by' => 'pid, name'));
        while ($theme = $db->fetch_array($query)) {
            $tcache[$theme['pid']][$theme['tid']] = $theme;
        }
    }
    if (is_array($tcache[$tid])) {
        // Figure out what groups this user is in
        if ($mybb->user['additionalgroups']) {
            $in_groups = explode(",", $mybb->user['additionalgroups']);
        }
        $in_groups[] = $mybb->user['usergroup'];
        foreach ($tcache[$tid] as $theme) {
            $sel = "";
            // Make theme allowed groups into array
            $is_allowed = false;
            if ($theme['allowedgroups'] != "all") {
                $allowed_groups = explode(",", $theme['allowedgroups']);
                // See if groups user is in is allowed
                foreach ($allowed_groups as $agid) {
                    if (in_array($agid, $in_groups)) {
                        $is_allowed = true;
                        break;
                    }
                }
            }
            // Show theme if allowed, or if override is on
            if ($is_allowed || $theme['allowedgroups'] == "all" || $usergroup_override == true) {
                if ($theme['tid'] == $selected) {
                    $sel = " selected=\"selected\"";
                }
                if ($theme['pid'] != 0) {
                    $themeselect .= "<option value=\"" . $theme['tid'] . "\"{$sel}>" . $depth . htmlspecialchars_uni($theme['name']) . "</option>";
                    $depthit = $depth . "--";
                }
                if (array_key_exists($theme['tid'], $tcache)) {
                    build_theme_select($name, $selected, $theme['tid'], $depthit, $usergroup_override);
                }
            }
        }
    }
    if ($tid == 1) {
        $themeselect .= "</select>";
    }
    return $themeselect;
}
开发者ID:khanfusiion,项目名称:mybb,代码行数:65,代码来源:functions.php

示例6: array

    $sub_tabs['edit_spider'] = array('title' => $lang->edit_bot, 'link' => "index.php?module=config/spiders&amp;action=edit&amp;sid={$spider['sid']}", 'description' => $lang->edit_bot_desc);
    $page->output_nav_tabs($sub_tabs, "edit_spider");
    $form = new Form("index.php?module=config/spiders&amp;action=edit&amp;sid={$spider['sid']}", "post");
    if ($errors) {
        $page->output_inline_error($errors);
        $spider_data = $mybb->input;
    } else {
        $spider_data = $spider;
    }
    $form_container = new FormContainer($lang->edit_bot);
    $form_container->output_row($lang->name . " <em>*</em>", $lang->name_desc, $form->generate_text_box('name', $spider_data['name'], array('id' => 'name')), 'name');
    $form_container->output_row($lang->user_agent . " <em>*</em>", $lang->user_agent_desc, $form->generate_text_box('useragent', $spider_data['useragent'], array('id' => 'useragent')), 'useragent');
    $languages = array('' => $lang->use_board_default);
    $languages = array_merge($languages, $lang->get_languages());
    $form_container->output_row($lang->language_str, $lang->language_desc, $form->generate_select_box("language", $languages, $spider_data['language'], array("id" => "language")), 'language');
    $form_container->output_row($lang->theme, $lang->theme_desc, build_theme_select("theme", $spider_data['theme'], 0, "", 1));
    $query = $db->simple_select("usergroups", "*", "", array("order_by" => "title", "order_dir" => "asc"));
    while ($usergroup = $db->fetch_array($query)) {
        $usergroups[$usergroup['gid']] = $usergroup['title'];
    }
    if (!$spider_data['usergroup']) {
        $spider_data['usergroup'] = 1;
    }
    $form_container->output_row($lang->user_group, $lang->user_group_desc, $form->generate_select_box("usergroup", $usergroups, $spider_data['usergroup'], array("id" => "usergroup")), 'usergroup');
    $form_container->end();
    $buttons[] = $form->generate_submit_button($lang->save_bot);
    $form->output_submit_wrapper($buttons);
    $form->end();
    $page->output_footer();
}
if (!$mybb->input['action']) {
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:spiders.php

示例7: build_theme_select

/**
 * Build a theme selection menu
 *
 * @param string $name The name of the menu
 * @param int $selected The ID of the selected theme
 * @param int $tid The ID of the parent theme to select from
 * @param string $depth The current selection depth
 * @param boolean $usergroup_override Whether or not to override usergroup permissions (true to override)
 * @param boolean $footer Whether or not theme select is in the footer (true if it is)
 * @param boolean $count_override Whether or not to override output based on theme count (true to override)
 * @return string The theme selection list
 */
function build_theme_select($name, $selected = -1, $tid = 0, $depth = "", $usergroup_override = false, $footer = false, $count_override = false)
{
    global $db, $themeselect, $tcache, $lang, $mybb, $limit, $templates, $num_themes, $themeselect_option;
    if ($tid == 0) {
        $tid = 1;
        $num_themes = 0;
        $themeselect_option = '';
        if (!isset($lang->use_default)) {
            $lang->use_default = $lang->lang_select_default;
        }
    }
    if (!is_array($tcache)) {
        $query = $db->simple_select('themes', 'tid, name, pid, allowedgroups', "pid!='0'");
        while ($theme = $db->fetch_array($query)) {
            $tcache[$theme['pid']][$theme['tid']] = $theme;
        }
    }
    if (is_array($tcache[$tid])) {
        // Figure out what groups this user is in
        if (isset($mybb->user['additionalgroups'])) {
            $in_groups = explode(",", $mybb->user['additionalgroups']);
        }
        $in_groups[] = $mybb->user['usergroup'];
        foreach ($tcache[$tid] as $theme) {
            $sel = "";
            // Show theme if allowed, or if override is on
            if (is_member($theme['allowedgroups']) || $theme['allowedgroups'] == "all" || $usergroup_override == true) {
                if ($theme['tid'] == $selected) {
                    $sel = " selected=\"selected\"";
                }
                if ($theme['pid'] != 0) {
                    $theme['name'] = htmlspecialchars_uni($theme['name']);
                    eval("\$themeselect_option .= \"" . $templates->get("usercp_themeselector_option") . "\";");
                    ++$num_themes;
                    $depthit = $depth . "--";
                }
                if (array_key_exists($theme['tid'], $tcache)) {
                    build_theme_select($name, $selected, $theme['tid'], $depthit, $usergroup_override, $footer, $count_override);
                }
            }
        }
    }
    if ($tid == 1 && ($num_themes > 1 || $count_override == true)) {
        if ($footer == true) {
            eval("\$themeselect = \"" . $templates->get("footer_themeselector") . "\";");
        } else {
            eval("\$themeselect = \"" . $templates->get("usercp_themeselector") . "\";");
        }
        return $themeselect;
    } else {
        return false;
    }
}
开发者ID:ateista-pl,项目名称:forum,代码行数:65,代码来源:functions.php


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