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


PHP helper::route方法代码示例

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


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

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

示例2: article

 /**
  * Display an article
  *
  * @param	string	$article	URL of the article
  * @return	object
  */
 public function article($article)
 {
     $this->user->add_lang_ext('tas2580/wiki', 'common');
     if (!$this->auth->acl_get('u_wiki_view')) {
         trigger_error('NOT_AUTHORISED');
     }
     $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang['WIKI'], 'U_VIEW_FORUM' => $this->helper->route('tas2580_wiki_index', array())));
     $this->template->assign_vars(array('WIKI_FOOTER' => $this->user->lang('WIKI_FOOTER', base64_decode('aHR0cHM6Ly90YXMyNTgwLm5ldA=='), base64_decode('dGFzMjU4MA=='))));
     include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
     include $this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext;
     $action = $this->request->variable('action', '');
     $id = $this->request->variable('id', 0);
     switch ($action) {
         case 'edit':
             return $this->edit->edit_article($article);
         case 'versions':
             return $this->compare->view_versions($article);
         case 'compare':
             $from = $this->request->variable('from', 0);
             $to = $this->request->variable('to', 0);
             return $this->compare->compare_versions($article, $from, $to);
         case 'delete':
             return $this->delete->version($id);
         case 'detele_article':
             return $this->delete->article($article);
         case 'active':
             return $this->edit->active($id);
         case 'deactivate':
             return $this->edit->deactivate($article);
         default:
             return $this->view->view_article($article, $id);
     }
 }
开发者ID:tas2580,项目名称:wiki,代码行数:39,代码来源:main.php

示例3: page_header

 /**
  * Add link to header
  *
  * @param	object	$event	The event object
  * @return	null
  * @access	public
  */
 public function page_header($event)
 {
     if ($this->auth->acl_get('u_usermap_view')) {
         $this->user->add_lang_ext('tas2580/usermap', 'link');
         $this->template->assign_vars(array('U_USERMAP' => $this->helper->route('tas2580_usermap_index', array())));
     }
 }
开发者ID:phpbb-addons,项目名称:usermap,代码行数:14,代码来源:listener.php

示例4: page

    /**
     * Controller for route /paypal
     *
     * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
     */
    public function page()
    {
        $this->user->add_lang_ext('tas2580/paypal', 'common');
        $amount_list = '';
        $sql = 'SELECT *
			FROM ' . $this->table_amount . '
			ORDER BY amount_value';
        $result = $this->db->sql_query($sql);
        while ($row = $this->db->sql_fetchrow($result)) {
            $amount_list .= '<option value="' . number_format($row['amount_value'] / 100, 2) . '">' . number_format($row['amount_value'] / 100, 2) . '</option>';
        }
        $sql = 'SELECT *
			FROM ' . $this->table_items . '
			ORDER BY item_name';
        $result = $this->db->sql_query($sql);
        while ($row = $this->db->sql_fetchrow($result)) {
            $this->template->assign_block_vars('items', array('ITEM_NAME' => $row['item_name'], 'ITEM' => generate_text_for_display($row['item_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], 7), 'ITEM_ID' => $row['item_id']));
        }
        $sql = 'SELECT *
			FROM ' . $this->table_config;
        $result = $this->db->sql_query($sql);
        $row = $this->db->sql_fetchrow($result);
        $this->template->assign_vars(array('PAYPAL_TITLE' => $row['paypal_title'], 'PAYPAL_TEXT' => generate_text_for_display($row['paypal_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], 7), 'PAYPAL_EMAIL' => $row['paypal_email'], 'AMOUNT_LIST' => $amount_list, 'PAYPAL_ACTION' => $row['paypal_sandbox'] == 1 ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr', 'S_SANDBOX' => $row['paypal_sandbox'] == 1 ? true : false, 'S_CURL' => function_exists('curl_init'), 'CURRENCY_CODE' => $this->currency_code_select($row['paypal_currency']), 'CURRENCY' => $row['paypal_currency'], 'USER_ID' => $this->user->data['user_id'], 'IPN_URL' => $this->helper->route('tas2580_paypal_ipn', array(), true, '', \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL), 'RETURN_URL' => $this->helper->route('tas2580_paypal_controller', array(), true, '', \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL)));
        return $this->helper->render('paypal_body.html', $row['paypal_title']);
    }
开发者ID:tas2580,项目名称:paypal,代码行数:30,代码来源:main.php

示例5: prepare_user_reputation_data

 /**
  * Display user reputation on user profile page
  *
  * @param object $event The event object
  * @return null
  * @access public
  */
 public function prepare_user_reputation_data($event)
 {
     $data = $event['data'];
     $template_data = $event['template_data'];
     $template_data = array_merge($template_data, array('USER_REPUTATION' => $data['user_reputation'], 'U_VIEW_USER_REPUTATION' => $this->helper->route('reputation_details_controller', array('uid' => $data['user_id'])), 'U_RATE_USER' => $this->helper->route('reputation_user_rating_controller', array('uid' => $data['user_id'])), 'U_REPUTATION_REFERER' => $this->helper->get_current_url(), 'S_RATE_USER' => $this->config['rs_user_rating'] && $this->auth->acl_get('u_rs_rate') ? true : false, 'S_VIEW_REPUTATION' => $this->auth->acl_get('u_rs_view') ? true : false));
     $event['template_data'] = $template_data;
 }
开发者ID:rampmaster,项目名称:phpBB-Reputation-System,代码行数:14,代码来源:memberlist_listener.php

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

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

示例8: location_viewonline

 public function location_viewonline($event)
 {
     if ($event['on_page'][1] == 'app') {
         if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/rating') === 0) {
             $event['location'] = $this->user->lang['VIEWING_RATING'];
             $event['location_url'] = $this->helper->route("bb3top_rating_top");
         }
     }
 }
开发者ID:bb3mobi,项目名称:bb3top,代码行数:9,代码来源:listener.php

示例9: page_header

 public function page_header($event)
 {
     $nru_group_id = $this->functions->getnruid();
     if (!$this->config['appform_nru'] && $nru_group_id === (int) $this->user->data['group_id'] || $this->user->data['is_bot'] || $this->user->data['user_id'] == ANONYMOUS) {
         $this->template->assign_var('U_APP_FORM', false);
         return;
     }
     $this->user->add_lang_ext('rmcgirr83/applicationform', 'common');
     $this->template->assign_var('U_APP_FORM', $this->helper->route('rmcgirr83_applicationform_displayform'));
 }
开发者ID:alhitary,项目名称:phpBB-3.1-applicationform,代码行数:10,代码来源:listener.php

示例10: add_page_header_links

 public function add_page_header_links($event)
 {
     $this->template->assign_vars(array('DONATION_ACHIEVEMENT_ENABLE' => isset($this->config['donation_achievement_enable']) ? $this->config['donation_achievement_enable'] : false, 'DONATION_ACHIEVEMENT' => isset($this->config['donation_achievement']) ? $this->config['donation_achievement'] : false, 'DONATION_INDEX_ENABLE' => isset($this->config['donation_index_enable']) ? $this->config['donation_index_enable'] : false, 'DONATION_INDEX_TOP' => isset($this->config['donation_index_top']) ? $this->config['donation_index_top'] : false, 'DONATION_INDEX_BOTTOM' => isset($this->config['donation_index_bottom']) ? $this->config['donation_index_bottom'] : false, 'DONATION_GOAL_ENABLE' => isset($this->config['donation_goal_enable']) ? $this->config['donation_goal_enable'] : false, 'DONATION_GOAL' => isset($this->config['donation_goal']) ? $this->config['donation_goal'] : false, 'DONATION_GOAL_CURRENCY_ENABLE' => isset($this->config['donation_goal_currency_enable']) ? $this->config['donation_goal_currency_enable'] : false, 'DONATION_GOAL_CURRENCY' => isset($this->config['donation_goal_currency']) ? $this->config['donation_goal_currency'] : false, 'S_DONATE_ENABLED' => isset($this->config['donation_enable']) ? $this->config['donation_enable'] : false));
     if (!empty($this->config['donation_goal_enable']) && $this->config['donation_goal'] > 0) {
         $donation_goal_number = $this->config['donation_achievement'] * 100 / $this->config['donation_goal'];
         $donation_goal_rest = $this->config['donation_goal'] - $this->config['donation_achievement'];
         $this->template->assign_vars(array('DONATION_GOAL_NUMBER' => round($donation_goal_number), 'DONATION_GOAL_REST' => $donation_goal_rest));
     }
     $this->template->assign_vars(array('U_DONATE' => $this->controller_helper->route('dmzx_donation_controller')));
 }
开发者ID:3D-I,项目名称:paypaldonation,代码行数:10,代码来源:listener.php

示例11: attachments_data

    public function attachments_data($event)
    {
        $topic_id = $event['topic_id'];
        $sql = 'SELECT COUNT(attach_id) as num_attachments
			FROM ' . ATTACHMENTS_TABLE . " a\n\t\t\tWHERE topic_id = {$topic_id}\n\t\t\t\tAND a.is_orphan = 0";
        $result = $this->db->sql_query($sql);
        $num_attachments = $this->db->sql_fetchfield('num_attachments');
        $this->db->sql_freeresult($result);
        $this->template->assign_vars(array('U_ATTACHMENTS_TOPIC' => $this->helper->route("bb3mobi_attach_cat", array('t' => $topic_id)), 'TOTAL_ATTACH_TOPIC' => (int) $num_attachments));
    }
开发者ID:bb3mobi,项目名称:attachments,代码行数:10,代码来源:listener.php

示例12: show_collapsible_categories

 /**
  * Set category display states
  *
  * @param object $event The event object
  *
  * @return null
  * @access public
  */
 public function show_collapsible_categories($event)
 {
     if (!isset($this->categories)) {
         $this->categories = $this->operator->get_user_categories();
     }
     $fid = 'fid_' . $event['row']['forum_id'];
     $row = isset($event['cat_row']) ? 'cat_row' : 'forum_row';
     $event_row = $event[$row];
     $event_row += array('S_FORUM_HIDDEN' => in_array($fid, $this->categories), 'U_COLLAPSE_URL' => $this->helper->route('phpbb_collapsiblecategories_main_controller', array('forum_id' => $fid, 'hash' => generate_link_hash("collapsible_{$fid}"))));
     $event[$row] = $event_row;
 }
开发者ID:phpbb-addons,项目名称:collapsible-categories,代码行数:19,代码来源:listener.php

示例13: page_header

 public function page_header($event)
 {
     $nru_group_id = $this->applicationform->getnruid();
     if (!$this->config['appform_nru'] && $nru_group_id === (int) $this->user->data['group_id'] || $this->user->data['is_bot'] || $this->user->data['user_id'] == ANONYMOUS) {
         $this->template->assign_var('U_APP_FORM', false);
         return false;
     }
     $version = phpbb_version_compare($this->config['version'], '3.2.0-b2', '>=');
     $this->user->add_lang_ext('rmcgirr83/applicationform', 'common');
     $this->template->assign_vars(array('U_APP_FORM' => $this->helper->route('rmcgirr83_applicationform_displayform'), 'S_FORUM_VERSION' => $version));
 }
开发者ID:rmcgirr83,项目名称:phpBB-3.1-applicationform,代码行数:11,代码来源:listener.php

示例14: main

    function main()
    {
        $sql = 'SELECT *
				FROM ' . $this->points_values_table;
        $result = $this->db->sql_query($sql);
        $points_values = $this->db->sql_fetchrow($result);
        $this->db->sql_freeresult($result);
        // Add part to bar
        $this->template->assign_block_vars('navlinks', array('U_VIEW_FORUM' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'info')), 'FORUM_NAME' => sprintf($this->user->lang['POINTS_INFO'], $this->config['points_name'])));
        // Read out all the need values
        $info_attach = $points_values['points_per_attach'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_attach']) . '&nbsp;' . $this->config['points_name']);
        $info_addtional_attach = $points_values['points_per_attach_file'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_attach_file']) . '&nbsp;' . $this->config['points_name']);
        $info_poll = $points_values['points_per_poll'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_poll']) . '&nbsp;' . $this->config['points_name']);
        $info_poll_option = $points_values['points_per_poll_option'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_poll_option']) . '&nbsp;' . $this->config['points_name']);
        $info_topic_word = $points_values['points_per_topic_word'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_topic_word']) . '&nbsp;' . $this->config['points_name']);
        $info_topic_character = $points_values['points_per_topic_character'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_topic_character']) . '&nbsp;' . $this->config['points_name']);
        $info_post_word = $points_values['points_per_post_word'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_post_word']) . '&nbsp;' . $this->config['points_name']);
        $info_post_character = $points_values['points_per_post_character'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_post_character']) . '&nbsp;' . $this->config['points_name']);
        $info_cost_warning = $points_values['points_per_warn'] == 0 ? sprintf($this->user->lang['INFO_NO_COST'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_warn']) . '&nbsp;' . $this->config['points_name']);
        $info_reg_bonus = $points_values['reg_points_bonus'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['reg_points_bonus']) . '&nbsp;' . $this->config['points_name']);
        $info_points_bonus = $points_values['points_bonus_chance'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->user->lang['INFO_BONUS_CHANCE_EXPLAIN'], $this->functions_points->number_format_points($points_values['points_bonus_chance']), $this->functions_points->number_format_points($points_values['points_bonus_min']), $this->functions_points->number_format_points($points_values['points_bonus_max']), $this->config['points_name']);
        $this->template->assign_vars(array('USER_POINTS' => sprintf($this->functions_points->number_format_points($this->user->data['user_points'])), 'POINTS_NAME' => $this->config['points_name'], 'LOTTERY_NAME' => $points_values['lottery_name'], 'BANK_NAME' => $points_values['bank_name'], 'POINTS_INFO_DESCRIPTION' => sprintf($this->user->lang['POINTS_INFO_DESCRIPTION'], $this->config['points_name']), 'INFO_ATTACH' => $info_attach, 'INFO_ADD_ATTACH' => $info_addtional_attach, 'INFO_POLL' => $info_poll, 'INFO_POLL_OPTION' => $info_poll_option, 'INFO_TOPIC_WORD' => $info_topic_word, 'INFO_TOPIC_CHARACTER' => $info_topic_character, 'INFO_POST_WORD' => $info_post_word, 'INFO_POST_CHARACTER' => $info_post_character, 'INFO_COST_WARNING' => $info_cost_warning, 'INFO_REG_BONUS' => $info_reg_bonus, 'INFO_POINTS_BONUS' => $info_points_bonus, 'U_TRANSFER_USER' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'transfer_user')), 'U_LOGS' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'logs')), 'U_LOTTERY' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'lottery')), 'U_BANK' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'bank')), 'U_ROBBERY' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'robbery')), 'U_INFO' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'info')), 'U_USE_TRANSFER' => $this->auth->acl_get('u_use_transfer'), 'U_USE_LOGS' => $this->auth->acl_get('u_use_logs'), 'U_USE_LOTTERY' => $this->auth->acl_get('u_use_lottery'), 'U_USE_BANK' => $this->auth->acl_get('u_use_bank'), 'U_USE_ROBBERY' => $this->auth->acl_get('u_use_robbery')));
        // Generate the page
        page_header($this->user->lang['POINTS_INFO']);
        // Generate the page template
        $this->template->set_filenames(array('body' => 'points/points_info.html'));
        page_footer();
    }
开发者ID:rampmaster,项目名称:Ultimate-Points-Extension,代码行数:28,代码来源:points_info.php

示例15: display

 /**
  * Display the page
  *
  * @param string $route The route name for a page
  * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
  * @throws http_exception
  * @access public
  */
 public function display($route)
 {
     // Add the pages controller language file
     $this->user->add_lang_ext('phpbb/pages', 'pages_controller');
     // Load the page data to display
     $page = $this->load_page_data($route);
     // Set the page title
     $page_title = $page->get_title();
     // Assign the page data to template variables
     $this->template->assign_vars(array('PAGE_TITLE' => $page_title, 'PAGE_CONTENT' => $page->get_content_for_display()));
     // Create breadcrumbs
     $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $page_title, 'U_VIEW_FORUM' => $this->helper->route('phpbb_pages_main_controller', array('route' => $route))));
     // Send all data to the template file
     return $this->helper->render($page->get_template(), $page_title);
 }
开发者ID:R3gi,项目名称:pages,代码行数:23,代码来源:main_controller.php


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