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


PHP user::lang方法代码示例

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


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

示例1: on_kernel_exception

 /**
  * This listener is run when the KernelEvents::EXCEPTION event is triggered
  *
  * @param GetResponseForExceptionEvent $event
  * @return null
  */
 public function on_kernel_exception(GetResponseForExceptionEvent $event)
 {
     $exception = $event->getException();
     $message = $exception->getMessage();
     if ($exception instanceof \phpbb\exception\exception_interface) {
         $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($message), $exception->get_parameters()));
     }
     if (!$event->getRequest()->isXmlHttpRequest()) {
         page_header($this->user->lang('INFORMATION'));
         $this->template->assign_vars(array('MESSAGE_TITLE' => $this->user->lang('INFORMATION'), 'MESSAGE_TEXT' => $message));
         $this->template->set_filenames(array('body' => 'message_body.html'));
         page_footer(true, false, false);
         $response = new Response($this->template->assign_display('body'), 500);
     } else {
         $data = array();
         if (!empty($message)) {
             $data['message'] = $message;
         }
         if (defined('DEBUG')) {
             $data['trace'] = $exception->getTrace();
         }
         $response = new JsonResponse($data, 500);
     }
     if ($exception instanceof HttpExceptionInterface) {
         $response->setStatusCode($exception->getStatusCode());
         $response->headers->add($exception->getHeaders());
     }
     $event->setResponse($response);
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:35,代码来源:kernel_exception_subscriber.php

示例2: main

 public function main($id, $mode)
 {
     global $phpbb_container;
     // Initialization
     $this->config = $phpbb_container->get('config');
     $this->db = $phpbb_container->get('dbal.conn');
     $this->user = $phpbb_container->get('user');
     $this->template = $phpbb_container->get('template');
     $this->request = $phpbb_container->get('request');
     $action = $this->request->variable('action', '', true);
     $submit = $this->request->is_set_post('submit') ? true : false;
     $this->form_key = 'acp_advancedpolls';
     add_form_key($this->form_key);
     $display_vars = array('title' => 'AP_TITLE_ACP', 'vars' => array('legend1' => 'AP_GLOBAL_SETTINGS', 'wolfsblvt.advancedpolls.activate_incremental_votes' => array('lang' => 'AP_ACT_INCREMENTAL_VOTES', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.activate_closed_voting' => array('lang' => 'AP_ACT_CLOSED_VOTING', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.activate_no_vote' => array('lang' => 'AP_ACT_POLL_NO_VOTE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.activate_poll_end' => array('lang' => 'AP_ACT_POLL_END', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.activate_notifications' => array('lang' => 'AP_ACT_POLL_NOTIFICATIONS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'legend2' => 'AP_PER_POLL_SETTINGS', 'wolfsblvt.advancedpolls.activate_poll_scoring' => array('lang' => 'AP_ACT_POLL_SCORING', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.default_poll_votes_change' => array('lang' => 'AP_DEFAULT_VOTES_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'wolfsblvt.advancedpolls.activate_poll_votes_hide' => array('lang' => 'AP_ACT_VOTES_HIDE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.default_poll_votes_hide' => array('lang' => 'AP_DEFAULT_VOTES_HIDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'wolfsblvt.advancedpolls.activate_poll_voters_show' => array('lang' => 'AP_ACT_VOTERS_SHOW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.default_poll_voters_show' => array('lang' => 'AP_DEFAULT_VOTERS_SHOW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'wolfsblvt.advancedpolls.activate_poll_voters_limit' => array('lang' => 'AP_ACT_VOTERS_LIMIT', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.default_poll_voters_limit' => array('lang' => 'AP_DEFAULT_VOTERS_LIMIT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'wolfsblvt.advancedpolls.activate_poll_show_ordered' => array('lang' => 'AP_ACT_SHOW_ORDERED', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 'wolfsblvt.advancedpolls.default_poll_show_ordered' => array('lang' => 'AP_DEFAULT_SHOW_ORDERED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'legend3' => 'ACP_SUBMIT_CHANGES'));
     #region Submit
     if ($submit) {
         $submit = $this->do_submit_stuff($display_vars);
         // If the submit was valid, so still submitted
         if ($submit) {
             trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action), E_USER_NOTICE);
         }
     }
     #endregion
     $this->generate_stuff_for_cfg_template($display_vars);
     // Output page template file
     $this->tpl_name = 'acp_advancedpolls';
     $this->page_title = $this->user->lang($display_vars['title']);
 }
开发者ID:Galixte,项目名称:advancedpolls,代码行数:28,代码来源:advancedpolls_module.php

示例3: display

    /**
     * Display the user ranks page
     *
     * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
     * @access public
     */
    public function display($name)
    {
        // Get the rank details
        $sql = 'SELECT *
			FROM ' . RANKS_TABLE . '
			ORDER BY rank_special DESC, rank_min ASC, rank_title ASC';
        $result = $this->db->sql_query($sql);
        while ($row = $this->db->sql_fetchrow($result)) {
            if ($this->config['userranks_special'] || $this->config['userranks_special_admin'] && $this->auth->acl_get('a_') || !$this->config['userranks_special'] && !$row['rank_special']) {
                $rank_row = array('S_RANK_IMAGE' => $row['rank_image'] ? true : false, 'S_SPECIAL_RANK' => $row['rank_special'] ? true : false, 'RANK_IMAGE' => $this->path_helper->get_web_root_path() . $this->config['ranks_path'] . '/' . $row['rank_image'], 'RANK_TITLE' => $row['rank_title'], 'MIN_POSTS' => $row['rank_min']);
                $this->template->assign_block_vars('ranks', $rank_row);
                // Are we displaying members?
                if ($this->config['userranks_members'] || $this->config['userranks_members_admin'] && $this->auth->acl_get('a_')) {
                    $rank_users = $this->get_user_rank_data($row['rank_id']);
                    if (sizeof($rank_users) > 0) {
                        foreach ($rank_users as $row_rank) {
                            $this->template->assign_block_vars('ranks.rank_member', array('MEMBERS' => get_username_string('full', $row_rank['user_id'], $row_rank['username'], $row_rank['user_colour'])));
                        }
                    } else {
                        $this->template->assign_block_vars('ranks.rank_member', array('MEMBERS' => $this->user->lang('NO_MEMBERS')));
                    }
                }
            }
        }
        $this->db->sql_freeresult($result);
        // Assign breadcrumb template vars for the user ranks page
        $this->template->assign_block_vars('navlinks', array('U_VIEW_FORUM' => $this->helper->route('david63_userranks_main_controller', array('name' => 'ranks')), 'FORUM_NAME' => $this->user->lang('USER_RANKS')));
        // Send all data to the template file
        return $this->helper->render('user_ranks.html', $name);
    }
开发者ID:Galixte,项目名称:david63-userranks,代码行数:36,代码来源:main_controller.php

示例4: main

 function main($id, $mode)
 {
     global $phpbb_container, $user, $template, $config, $request;
     $this->phpbb_container = $phpbb_container;
     $this->user = $user;
     $this->template = $template;
     $this->config = $config;
     $this->request = $request;
     $this->log = $this->phpbb_container->get('log');
     $this->tpl_name = 'acp_codebox_plus';
     $this->page_title = $this->user->lang('CODEBOX_PLUS_TITLE');
     add_form_key('o0johntam0o/acp_codebox_plus');
     if ($this->request->is_set_post('submit')) {
         if (!check_form_key('o0johntam0o/acp_codebox_plus')) {
             trigger_error('FORM_INVALID');
         }
         $this->config->set('codebox_plus_syntax_highlighting', $request->variable('codebox_plus_syntax_highlighting', 0));
         $this->config->set('codebox_plus_expanded', $request->variable('codebox_plus_expanded', 0));
         $this->config->set('codebox_plus_download', $request->variable('codebox_plus_download', 0));
         $this->config->set('codebox_plus_login_required', $request->variable('codebox_plus_login_required', 0));
         $this->config->set('codebox_plus_prevent_bots', $request->variable('codebox_plus_prevent_bots', 0));
         $this->config->set('codebox_plus_captcha', $request->variable('codebox_plus_captcha', 0));
         $this->config->set('codebox_plus_max_attempt', $request->variable('codebox_plus_max_attempt', 0));
         $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'CODEBOX_PLUS_LOG_MSG');
         trigger_error($this->user->lang('CODEBOX_PLUS_SAVED') . adm_back_link($this->u_action));
     }
     $this->template->assign_vars(array('U_ACTION' => $this->u_action, 'S_CODEBOX_PLUS_VERSION' => isset($this->config['codebox_plus_version']) ? $this->config['codebox_plus_version'] : 0, 'S_CODEBOX_PLUS_SYNTAX_HIGHLIGHTING' => isset($this->config['codebox_plus_syntax_highlighting']) ? $this->config['codebox_plus_syntax_highlighting'] : 0, 'S_CODEBOX_PLUS_EXPANDED' => isset($this->config['codebox_plus_expanded']) ? $this->config['codebox_plus_expanded'] : 0, 'S_CODEBOX_PLUS_DOWNLOAD' => isset($this->config['codebox_plus_download']) ? $this->config['codebox_plus_download'] : 0, 'S_CODEBOX_PLUS_LOGIN_REQUIRED' => isset($this->config['codebox_plus_login_required']) ? $this->config['codebox_plus_login_required'] : 0, 'S_CODEBOX_PLUS_PREVENT_BOTS' => isset($this->config['codebox_plus_prevent_bots']) ? $this->config['codebox_plus_prevent_bots'] : 0, 'S_CODEBOX_PLUS_CAPTCHA' => isset($this->config['codebox_plus_captcha']) ? $this->config['codebox_plus_captcha'] : 0, 'S_CODEBOX_PLUS_MAX_ATTEMPT' => isset($this->config['codebox_plus_max_attempt']) ? $this->config['codebox_plus_max_attempt'] : 0));
 }
开发者ID:sujith84,项目名称:phpBB-Extension-Codebox-Plus,代码行数:28,代码来源:main_module.php

示例5: add_page_viewonline

 /**
  *
  */
 public function add_page_viewonline($event)
 {
     if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/mchat') === 0) {
         $event['location'] = $this->user->lang('MCHAT_TITLE');
         $event['location_url'] = $this->helper->route('dmzx_mchat_controller');
     }
 }
开发者ID:EntropyRy,项目名称:mChat-Extension,代码行数:10,代码来源:listener.php

示例6: main

 public function main($id, $mode)
 {
     global $phpbb_container, $table_prefix;
     if (!defined('CHAT_TABLE')) {
         $chat_table = $table_prefix . 'ajax_chat';
         define('CHAT_TABLE', $chat_table);
     }
     $this->id = $id;
     $this->mode = $mode;
     // Initialization
     $this->auth = $phpbb_container->get('auth');
     $this->config = $phpbb_container->get('config');
     $this->db = $phpbb_container->get('dbal.conn');
     $this->user = $phpbb_container->get('user');
     $this->template = $phpbb_container->get('template');
     $this->request = $phpbb_container->get('request');
     $this->u_action = $this->request->variable('action', '', true);
     $submit = $this->request->is_set_post('submit') ? true : false;
     $this->form_key = 'acp_ajax_chat';
     add_form_key($this->form_key);
     $display_vars = ['title' => 'ACP_AJAX_CHAT_TITLE', 'vars' => ['legend1' => 'AJAX_CHAT_SETTINGS', 'display_ajax_chat' => ['lang' => 'DISPLAY_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'index_display_ajax_chat' => ['lang' => 'INDEX_DISPLAY_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'whois_chatting' => ['lang' => 'WHOIS_CHATTING', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'rule_ajax_chat' => ['lang' => 'RULE_AJAX_CHAT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true], 'ajax_chat_archive_amount' => ['lang' => 'ARCHIVE_AMOUNT_AJAX_CHAT', 'validate' => 'int', 'type' => 'number:5:500', 'explain' => true], 'ajax_chat_popup_amount' => ['lang' => 'POPUP_AMOUNT_AJAX_CHAT', 'validate' => 'int', 'type' => 'number:5:150', 'explain' => true], 'ajax_chat_index_amount' => ['lang' => 'INDEX_AMOUNT_AJAX_CHAT', 'validate' => 'int', 'type' => 'number:5:150', 'explain' => true], 'ajax_chat_chat_amount' => ['lang' => 'CHAT_AMOUNT_AJAX_CHAT', 'validate' => 'int', 'type' => 'number:5:150', 'explain' => true], 'ajax_chat_time_setting' => ['lang' => 'TIME_SETTING_AJAX_CHAT', 'validate' => 'string', 'type' => 'text:10:20', 'explain' => true], 'refresh_online_chat' => ['lang' => 'REFRESH_ONLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'refresh_idle_chat' => ['lang' => 'REFRESH_IDLE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'refresh_offline_chat' => ['lang' => 'REFRESH_OFFLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'status_online_chat' => ['lang' => 'STATUS_ONLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'status_idle_chat' => ['lang' => 'STATUS_IDLE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'status_offline_chat' => ['lang' => 'STATUS_OFFLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'legend2' => 'AJAX_CHAT_LOCATION', 'location_ajax_chat_override' => ['lang' => 'LOCATION_AJAX_CHAT_OVERRIDE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'location_ajax_chat' => ['lang' => 'LOCATION_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true], 'legend3' => 'AJAX_CHAT_POSTS', 'ajax_chat_forum_posts' => ['lang' => 'FORUM_POSTS_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_topic' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_reply' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_REPLY', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_edit' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_EDIT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_quote' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_QUOTE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'legend4' => 'AJAX_CHAT_PRUNE', 'prune_ajax_chat' => ['lang' => 'PRUNE_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'prune_keep_ajax_chat' => ['lang' => 'PRUNE_KEEP_AJAX_CHAT', 'validate' => 'int', 'type' => 'number', 'explain' => false], 'prune_now' => ['lang' => 'PRUNE_NOW', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'prune_chat'], 'truncate_now' => ['lang' => 'TRUNCATE_NOW', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'truncate_chat'], 'ajax_chat_counter' => ['lang' => 'CHAT_COUNTER', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'chat_counter'], 'legend5' => 'ACP_SUBMIT_CHANGES']];
     #region Submit
     if ($submit) {
         $submit = $this->do_submit_stuff($display_vars);
         // If the submit was valid, so still submitted
         if ($submit) {
             trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action), E_USER_NOTICE);
         }
     }
     #endregion
     $this->generate_stuff_for_cfg_template($display_vars);
     // Output page template file
     $this->tpl_name = 'ajax_chat';
     $this->page_title = $this->user->lang($display_vars['title']);
 }
开发者ID:Reaper88,项目名称:ajaxchat,代码行数:35,代码来源:ajaxchat_module.php

示例7: main

 public function main($id, $mode)
 {
     global $config, $request, $template, $user;
     $this->config = $config;
     $this->request = $request;
     $this->template = $template;
     $this->user = $user;
     // Add the common lang file
     $this->user->add_lang(array('acp/common'));
     // Add the board snowstormlights ACP lang file
     $this->user->add_lang_ext('prosk8er/snowstormlights', 'info_acp_snowstorm_lights');
     // Load a template from adm/style for our ACP page
     $this->tpl_name = 'snowstorm_lights';
     // Set the page title for our ACP page
     $this->page_title = $user->lang['ACP_SNOWSTORM_LIGHTS'];
     // Define the name of the form for use as a form key
     $form_key = 'acp_snowstorm_lights';
     add_form_key($form_key);
     // If form is submitted or previewed
     if ($this->request->is_set_post('submit')) {
         // Test if form key is valid
         if (!check_form_key($form_key)) {
             trigger_error('FORM_INVALID');
         }
         // Store the config enable/disable state
         $scl_enabled = $this->request->variable('scl_enabled', 0);
         $this->config->set('scl_enabled', $scl_enabled);
         $snow_enabled = $request->variable('snow_enabled', 0);
         $this->config->set('snow_enabled', $snow_enabled);
         // Output message to user for the update
         trigger_error($this->user->lang('SNOWSTORM_LIGHTS_SAVED') . adm_back_link($this->u_action));
     }
     // Output data to the template
     $this->template->assign_vars(array('SCL_ENABLED' => isset($this->config['scl_enabled']) ? $this->config['scl_enabled'] : '', 'SNOW_ENABLED' => isset($this->config['snow_enabled']) ? $this->config['snow_enabled'] : '', 'U_ACTION' => $this->u_action));
 }
开发者ID:Mauron,项目名称:Snowstorm-Lights,代码行数:35,代码来源:snowstorm_lights_module.php

示例8: viewonline_page

 /**
  * Show users as viewing the portals on Who Is Online page
  *
  * @param object $event The event object
  * @return null
  */
 public function viewonline_page($event)
 {
     if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/portal') === 0) {
         $event['location'] = $this->user->lang('VIEWING_PORTAL');
         $event['location_url'] = $this->controller_helper->route('board3_portal_controller');
     }
 }
开发者ID:sgtevmckay,项目名称:Board3-Portal,代码行数:13,代码来源:listener.php

示例9: manage_list

 /**
  * @param string $list_name whitelist or blacklist
  * @param string $u_action phpbb acp-u_action
  */
 private function manage_list($u_action, $list_name)
 {
     $list_name_upper = strtoupper($list_name);
     // Define the name of the form for use as a form key
     $form_name = 'topictags';
     add_form_key($form_name);
     $errors = array();
     if ($this->request->is_set_post('submit')) {
         if (!check_form_key($form_name)) {
             trigger_error('FORM_INVALID');
         }
         $this->config->set(prefixes::CONFIG . '_' . $list_name . '_enabled', $this->request->variable(prefixes::CONFIG . '_' . $list_name . '_enabled', 0));
         $list = rawurldecode(base64_decode($this->request->variable(prefixes::CONFIG . '_' . $list_name, '')));
         if (!empty($list)) {
             $list = json_decode($list, true);
             $tags = array();
             for ($i = 0, $size = sizeof($list); $i < $size; $i++) {
                 $tags[] = $list[$i]['text'];
             }
             $list = json_encode($tags);
         }
         // store the list
         $this->config_text->set(prefixes::CONFIG . '_' . $list_name, $list);
         trigger_error($this->user->lang('TOPICTAGS_' . $list_name_upper . '_SAVED') . adm_back_link($u_action));
     }
     // display
     $list = $this->config_text->get(prefixes::CONFIG . '_' . $list_name);
     $list = base64_encode(rawurlencode($list));
     $this->template->assign_vars(array('TOPICTAGS_VERSION' => $this->user->lang('TOPICTAGS_INSTALLED', $this->config[prefixes::CONFIG . '_version']), 'TOPICTAGS_' . $list_name_upper . '_ENABLED' => $this->config[prefixes::CONFIG . '_' . $list_name . '_enabled'], 'TOPICTAGS_' . $list_name_upper => $list, 'S_RH_TOPICTAGS_INCLUDE_NG_TAGS_INPUT' => true, 'S_RH_TOPICTAGS_INCLUDE_CSS' => true, 'TOPICTAGS_CONVERT_SPACE_TO_MINUS' => $this->config[prefixes::CONFIG . '_convert_space_to_minus'] ? 'true' : 'false', 'S_ERROR' => sizeof($errors) ? true : false, 'ERROR_MSG' => implode('<br />', $errors), 'U_ACTION' => $u_action));
 }
开发者ID:NuLeaf,项目名称:phpbb-ext-tags,代码行数:34,代码来源:white_and_blacklist_controller.php

示例10: main

 public function main($id, $mode)
 {
     global $config, $request, $template, $user;
     $this->config = $config;
     $this->request = $request;
     $this->template = $template;
     $this->user = $user;
     $this->user->add_lang('acp/common');
     $this->user->add_lang_ext('phpbbmodders/holidayflare', 'holidayflare_acp');
     $this->tpl_name = 'acp_holidayflare';
     $this->page_title = $this->user->lang('ACP_HOLIDAYFLARE');
     $form_key = 'acp_holidayflare';
     add_form_key($form_key);
     if ($this->request->is_set_post('submit')) {
         if (!check_form_key($form_key)) {
             trigger_error($user->lang('FORM_INVALID') . adm_back_link($this->u_action), E_USER_WARNING);
         }
         /* XMAS Start */
         $enable_xmas = $this->request->variable('enable_xmas', 0);
         $this->config->set('enable_xmas', $enable_xmas);
         /* XMAS Stop */
         /* Valentine Start */
         $enable_valentine = $this->request->variable('enable_valentine', 0);
         $this->config->set('enable_valentine', $enable_valentine);
         /* Valentine Stop */
         trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
     }
     $this->template->assign_vars(array('S_ENABLE_XMAS' => isset($this->config['enable_xmas']) ? $this->config['enable_xmas'] : '', 'S_ENABLE_VALENTINE' => isset($this->config['enable_valentine']) ? $this->config['enable_valentine'] : '', 'U_ACTION' => $this->u_action));
 }
开发者ID:TWEagle,项目名称:holiday_flare,代码行数:29,代码来源:holidayflare_module.php

示例11: get_config

 /**
  * {@inheritdoc}
  */
 public function get_config(array $settings)
 {
     $forum_options = $this->forum_options->get_all();
     $topic_type_options = $this->_get_topic_type_options();
     $range_options = $this->_get_range_options();
     $attach_type_options = array('' => 'ALL', 'IMAGES' => 'IMAGES', 'ARCHIVES' => 'ARCHIVES');
     return array('legend1' => $this->user->lang('SETTINGS'), 'forum_ids' => array('lang' => 'SELECT_FORUMS', 'validate' => 'string', 'type' => 'multi_select', 'options' => $forum_options, 'default' => array(), 'explain' => false), 'topic_type' => array('lang' => 'TOPIC_TYPE', 'validate' => 'string', 'type' => 'checkbox', 'options' => $topic_type_options, 'default' => array(), 'explain' => false), 'first_only' => array('lang' => 'FIRST_POST_ONLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false, 'default' => false), 'post_ids' => array('lang' => 'ATTACHMENTS_FROM_POSTS', 'validate' => 'string', 'type' => 'textarea:3:40', 'maxlength' => 2, 'explain' => true, 'default' => ''), 'date_range' => array('lang' => 'LIMIT_POST_TIME', 'validate' => 'string', 'type' => 'select', 'options' => $range_options, 'default' => '', 'explain' => false), 'limit' => array('lang' => 'LIMIT', 'validate' => 'int:0:20', 'type' => 'number:0:20', 'maxlength' => 2, 'explain' => false, 'default' => 5), 'ext_type' => array('lang' => 'EXTENSION_GROUP', 'validate' => 'string', 'type' => 'radio', 'options' => $attach_type_options, 'default' => '', 'explain' => false));
 }
开发者ID:3D-I,项目名称:phpBB-ext-sitemaker,代码行数:11,代码来源:attachments.php

示例12: _get_message

 /**
  * @param int $menu_id
  * @param bool $editing
  * @return string
  */
 protected function _get_message($menu_id, $editing)
 {
     $msg_key = '';
     if ($editing) {
         $msg_key = $menu_id ? 'MENU_NO_ITEMS' : 'SELECT_MENU';
     }
     return $this->user->lang($msg_key);
 }
开发者ID:3D-I,项目名称:phpBB-ext-sitemaker,代码行数:13,代码来源:menu_block.php

示例13: handle

 public function handle()
 {
     if (!function_exists('display_forums')) {
         include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
     }
     display_forums('', $this->config['load_moderators']);
     $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang('FORUM'), 'U_VIEW_FORUM' => $this->helper->route('blitze_sitemaker_forum')));
     return $this->helper->render('index_body.html', $this->user->lang('FORUM_INDEX'));
 }
开发者ID:BogusCurry,项目名称:phpBB-ext-sitemaker,代码行数:9,代码来源:forum.php

示例14: display

 /**
  * {@inheritdoc}
  */
 public function display(array $settings, $edit_mode = false)
 {
     $content = '';
     $content .= $this->user->lang('TOTAL_POSTS_COUNT', (int) $this->config['num_posts']) . '<br />';
     $content .= $this->user->lang('TOTAL_TOPICS', (int) $this->config['num_topics']) . '<br />';
     $content .= $this->user->lang('TOTAL_USERS', (int) $this->config['num_users']) . '<br />';
     $content .= $this->user->lang('NEWEST_USER', get_username_string('full', $this->config['newest_user_id'], $this->config['newest_username'], $this->config['newest_user_colour']));
     return array('title' => 'STATISTICS', 'content' => $content);
 }
开发者ID:BogusCurry,项目名称:phpBB-ext-sitemaker,代码行数:12,代码来源:stats.php

示例15: viewonline_page

 public function viewonline_page($event)
 {
     if ($event['on_page'][1] == 'app') {
         if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/contact') === 0) {
             $event['location'] = $this->user->lang('CONTACTFORM_VIEWONLINE');
             $event['location_url'] = $this->helper->route('phpbbde_contactform_main_controller');
         }
     }
 }
开发者ID:phpbb-de,项目名称:phpbb-ext-contact-form,代码行数:9,代码来源:base_events.php


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