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


PHP view::setTitle方法代码示例

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


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

示例1: edit

 public function edit()
 {
     // Get URI vars
     $groupID = (int) uri::segment(6);
     // Get group
     $group = array();
     if ($groupID && !($group = $this->banners_groups_model->getGroup($groupID))) {
         view::setError(__('no_group', 'banners'));
         router::redirect('cp/content/banners/groups');
     }
     // Assign vars
     view::assign(array('groupID' => $groupID, 'group' => $group));
     // Process form values
     if (input::post('do_save_group')) {
         $this->_saveGroup($groupID);
     }
     // Set title
     view::setTitle($groupID ? __('group_edit', 'banners') : __('group_new', 'banners'));
     // Set trail
     view::setTrail('cp/content/banners/groups/edit/' . ($groupID ? $groupID : ''), $groupID ? __('group_edit', 'banners') . ' - ' . text_helper::entities($group['name']) : __('group_new', 'banners'));
     // Assign actions
     if ($groupID) {
         view::setAction('cp/content/banners/browse/' . $groupID, __('banners', 'banners'), array('class' => 'icon-text icon-banners'));
     }
     // Load view
     view::load('cp/content/banners/groups/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:27,代码来源:groups.php

示例2: view

 public function view()
 {
     // Get URI vars
     $newsID = (int) uri::segment(3);
     // Get news entry
     if (!$newsID || !($news = $this->news_model->getEntry($newsID, 'in_view')) || !$news['active']) {
         error::show404();
     }
     // Do we have views enabled?
     if (config::item('news_views', 'news')) {
         // Update views counter
         $this->news_model->updateViews($newsID);
     }
     // Load ratings
     if (config::item('news_rating', 'news') == 'stars') {
         // Load votes model
         loader::model('comments/votes');
         // Get votes
         $news['user_vote'] = $this->votes_model->getVote('news', $newsID);
     } elseif (config::item('news_rating', 'news') == 'likes') {
         // Load likes model
         loader::model('comments/likes');
         // Get likes
         $news['user_vote'] = $this->likes_model->getLike('news', $newsID);
     }
     // Assign vars
     view::assign(array('newsID' => $newsID, 'news' => $news));
     // Set title
     view::setTitle($news['data_title']);
     // Set meta tags
     view::setMetaDescription($news['data_meta_description']);
     view::setMetaKeywords($news['data_meta_keywords']);
     // Load view
     view::load('news/view');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:35,代码来源:news.php

示例3: edit

 public function edit()
 {
     // Get URI vars
     $templateID = (int) uri::segment(6);
     // Get template
     $template = array();
     if ($templateID && !($template = $this->newsletters_templates_model->getTemplate($templateID, false))) {
         view::setError(__('no_template', 'newsletters_templates'));
         router::redirect('cp/content/newsletters/templates');
     }
     // Assign vars
     view::assign(array('templateID' => $templateID, 'template' => $template));
     // Process form values
     if (input::post('do_save_template')) {
         $this->_saveTemplate($templateID);
     }
     // Set title
     view::setTitle($templateID ? __('template_edit', 'newsletters_templates') : __('template_new', 'newsletters_templates'));
     // Set trail
     view::setTrail('cp/content/newsletters/templates/edit/' . ($templateID ? $templateID : ''), $templateID ? __('template_edit', 'newsletters_templates') . ' - ' . text_helper::entities($template['name']) : __('template_new', 'newsletters_templates'));
     // Load ckeditor
     view::includeJavascript('externals/ckeditor/ckeditor.js');
     // Load view
     view::load('cp/content/newsletters/templates/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:25,代码来源:templates.php

示例4: edit

 public function edit()
 {
     // Get URI vars
     $subjectID = (int) uri::segment(6);
     // Get subject
     $subject = array();
     if ($subjectID && !($subject = $this->reports_subjects_model->getSubject($subjectID, false))) {
         view::setError(__('no_subject', 'reports_subjects'));
         router::redirect('cp/content/reports/subjects');
     }
     // Assign vars
     view::assign(array('subjectID' => $subjectID, 'subject' => $subject));
     // Process form values
     if (input::post('do_save_subject')) {
         $this->_saveSubject($subjectID);
     }
     // Set title
     view::setTitle($subjectID ? __('subject_edit', 'reports_subjects') : __('subject_new', 'reports_subjects'));
     // Set trail
     view::setTrail('cp/content/reports/subjects/edit/' . ($subjectID ? $subjectID : ''), $subjectID ? __('subject_edit', 'reports_subjects') . ' - ' . text_helper::entities($subject['name']) : __('subject_new', 'reports_subjects'));
     // Set actions
     if (count(config::item('languages', 'core', 'keywords')) > 1) {
         view::setAction('translate', '');
     }
     // Load view
     view::load('cp/content/reports/subjects/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:27,代码来源:subjects.php

示例5: invoices

 public function invoices()
 {
     // Get page
     $page = is_numeric(input::get('page')) && input::get('page') > 0 ? input::get('page') : 1;
     // Parameters
     $params = array('join_columns' => array('`t`.`user_id`=' . session::item('user_id')));
     // Process query string
     $qstring = $this->parseQuerystring(config::item('invoices_per_page', 'billing'), session::item('total_transactions'));
     // Get invoices
     $invoices = array();
     if (session::item('total_transactions')) {
         $invoices = $this->transactions_model->getTransactions($params['join_columns'], '', $qstring['limit']);
     } else {
         view::setInfo(__('no_invoices_user', 'billing_transactions'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('billing/invoices?'), 'total_items' => session::item('total_transactions'), 'items_per_page' => config::item('invoices_per_page', 'billing'), 'current_page' => $page, 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('invoices' => $invoices, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('invoices', 'billing_transactions'));
     // Load view
     view::load('billing/invoices');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:25,代码来源:invoices.php

示例6: edit

 public function edit()
 {
     // Get URI vars
     $fieldID = (int) uri::segment(7);
     // Set title
     view::setTitle($fieldID ? __('edit_field', 'system_fields') : __('new_field', 'system_fields'));
     // Set trail
     view::setTrail('cp/system/fields/blogs/browse', __('fields', 'system_fields'));
     // Hide options array
     $hidden = array('html' => 0, 'in_search_advanced' => 0);
     if ($fieldID) {
         $field = $this->fields_model->getField($fieldID);
         if ($field) {
             switch ($field['keyword']) {
                 case 'title':
                     $hidden['required'] = 1;
                     $hidden['in_search'] = 0;
                     $hidden['system'] = 1;
                     break;
                 case 'body':
                     $hidden['required'] = 1;
                     $hidden['in_search'] = 0;
                     $hidden['system'] = 1;
                     break;
             }
         }
     }
     // Additional field configuration array
     $config = array(array('label' => __('config_in_view', 'system_fields'), 'keyword' => 'in_view', 'type' => 'boolean', 'rules' => array('intval')), array('label' => __('config_in_account', 'system_fields'), 'keyword' => 'in_account', 'type' => 'boolean', 'rules' => array('intval')), array('label' => __('config_in_list', 'system_fields'), 'keyword' => 'in_list', 'type' => 'boolean', 'rules' => array('intval')));
     // Edit custom field
     $this->editField('blogs', 'blogs_data', 0, $fieldID, $config, $hidden);
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:32,代码来源:blogs.php

示例7: set

 public function set($plugin, $keyword, $replace = array(), $pageTitle = true)
 {
     if (!($data = $this->cache->item('core_meta_tags_' . $plugin . '_' . session::item('language')))) {
         $data = array();
         $result = $this->db->query("SELECT * FROM `:prefix:core_meta_tags` WHERE `plugin`=?", array($plugin))->result();
         foreach ($result as $tags) {
             $data[$tags['keyword']]['title'] = $tags['meta_title_' . session::item('language')];
             $data[$tags['keyword']]['description'] = $tags['meta_description_' . session::item('language')];
             $data[$tags['keyword']]['keywords'] = $tags['meta_keywords_' . session::item('language')];
         }
         $this->cache->set('core_meta_tags_' . $plugin . '_' . session::item('language'), $data, 60 * 60 * 24 * 30);
     }
     foreach ($replace as $section => $array) {
         foreach ($array as $k => $v) {
             $k = '[' . $section . '.' . $k . ']';
             if (is_array($v)) {
                 $v = count($v) == 1 ? current($v) : implode(',', $v);
             }
             $data[$keyword]['title'] = utf8::str_replace($k, $v, $data[$keyword]['title']);
             $data[$keyword]['description'] = utf8::str_replace($k, $v, $data[$keyword]['description']);
             $data[$keyword]['keywords'] = utf8::str_replace($k, $v, $data[$keyword]['keywords']);
         }
     }
     if (isset($data[$keyword])) {
         if ($pageTitle) {
             view::setTitle($data[$keyword]['title']);
         } else {
             view::setMetaTitle($data[$keyword]['title']);
         }
         view::setMetaDescription($data[$keyword]['description']);
         view::setMetaKeywords($data[$keyword]['keywords']);
     }
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:33,代码来源:metatags.php

示例8: payment

 public function payment()
 {
     // Get URI vars
     $packageID = (int) uri::segment(4);
     // Get package
     if (!$packageID || !($package = $this->credits_model->getPackage($packageID)) || !$package['active']) {
         view::setError(__('no_package', 'billing_credits'));
         router::redirect('billing/credits');
     }
     // Get gateways
     if (!($gateways = $this->gateways_model->getGateways())) {
         view::setError(__('no_gateways_user', 'billing_gateways'));
         router::redirect('billing/credits');
     }
     // Product
     $package['product_id'] = $packageID;
     $package['name'] = __('credits_info', 'billing_credits', array('%s' => $package['credits']));
     $package['type'] = 'credits';
     // Assign vars
     view::assign(array('product' => $package, 'gateways' => $gateways, 'location' => 'billing/credits/payment/' . $packageID));
     // Set title
     view::setTitle(__('payment', 'billing_transactions'));
     // Set trail
     view::setTrail('billing/credits', __('credits', 'billing_credits'));
     // Load view
     view::load('billing/payment');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:27,代码来源:credits.php

示例9: payment

 public function payment()
 {
     // Get URI vars
     $planID = (int) uri::segment(4);
     // Get plan
     if (!$planID || !($plan = $this->plans_model->getPlan($planID)) || !$plan['active']) {
         view::setError(__('no_plan', 'billing_plans'));
         router::redirect('billing/plans');
     }
     // Get gateways
     if (!($gateways = $this->gateways_model->getGateways())) {
         view::setError(__('no_gateways_user', 'billing_gateways'));
         router::redirect('billing/plans');
     }
     // Product
     $plan['product_id'] = $planID;
     $plan['type'] = 'plans';
     // Assign vars
     view::assign(array('product' => $plan, 'gateways' => $gateways, 'location' => 'billing/plans/payment/' . $planID));
     // Set title
     view::setTitle(__('payment', 'billing_transactions'));
     // Set trail
     view::setTrail('billing/plans', __('plans', 'billing_plans'));
     // Load view
     view::load('billing/payment');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:26,代码来源:plans.php

示例10: manage

 public function manage()
 {
     // Assign user from session to variable
     $user = session::section('session');
     // Get fields
     $fields = array();
     foreach (config::item('usertypes', 'core', 'keywords') as $categoryID => $keyword) {
         $fields[$categoryID] = $this->fields_model->getFields('users', $categoryID, 'view', 'in_list');
     }
     // Parameters
     $params = array('total' => $user['total_blocked'], 'profiles' => true);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Get blocked users
     $users = array();
     if ($params['total']) {
         $users = $this->users_blocked_model->getUsers(session::item('user_id'), $qstring['order'], $qstring['limit'], $params);
     } else {
         view::setInfo(__('no_blocked_users', 'users_blocked'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('users/blocked/manage?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => config::item('blocked_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('user' => $user, 'users' => $users, 'fields' => $fields, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('blacklist', 'users'));
     // Load view
     view::load('users/blocked/manage');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:blocked.php

示例11: settings

 public function settings()
 {
     // Get URI vars
     $keyword = uri::segment(5);
     // Get service
     if (!$keyword || !($service = $this->users_authentication_model->getService($keyword))) {
         view::setError(__('no_service', 'users_authentication'));
         router::redirect('cp/users/authentication');
     }
     // Get manifest
     $manifest = $this->users_authentication_model->getManifest($keyword);
     // Is demo mode enabled?
     if (input::demo(0)) {
         foreach ($service['settings'] as $k => $v) {
             if ($v) {
                 $service['settings'][$k] = 'hidden in this demo';
             }
         }
     }
     // Assign vars
     view::assign(array('manifest' => $manifest, 'service' => $service));
     // Process form values
     if (input::post('do_save_settings')) {
         $this->_saveSettings($keyword, $manifest, $service);
     }
     // Set title
     view::setTitle(__('settings', 'system'));
     // Set trail
     view::setTrail('cp/users/authentication/settings/' . $keyword, __('settings', 'system') . ' - ' . text_helper::entities($service['name']));
     // Load view
     view::load('cp/users/authentication/settings');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:32,代码来源:authentication.php

示例12: edit

 public function edit()
 {
     // Get URI vars
     $templateID = (int) uri::segment(6);
     // Get template
     $template = array();
     if ($templateID && !($template = $this->messages_templates_model->getTemplate($templateID, false))) {
         view::setError(__('no_template', 'messages_templates'));
         router::redirect('cp/plugins/messages/templates');
     }
     // Assign vars
     view::assign(array('templateID' => $templateID, 'template' => $template));
     // Process form values
     if (input::post('do_save_template')) {
         $this->_saveTemplate($templateID);
     }
     // Set title
     view::setTitle($templateID ? __('template_edit', 'messages_templates') : __('template_new', 'messages_templates'));
     // Set trail
     view::setTrail('cp/plugins/messages/templates/edit/' . ($templateID ? $templateID : ''), $templateID ? __('template_edit', 'messages_templates') . ' - ' . text_helper::entities($template['name']) : __('template_new', 'messages_templates'));
     // Set actions
     if (count(config::item('languages', 'core', 'keywords')) > 1) {
         view::setAction('translate', '');
     }
     // Load view
     view::load('cp/plugins/messages/templates/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:27,代码来源:templates.php

示例13: results

 public function results()
 {
     if (!input::get('search_id')) {
         $this->index();
         return;
     }
     // Parameters
     $params = array('join_columns' => array('`u`.`verified`=1', '`u`.`active`=1', '`u`.`group_id` IN (' . implode(',', session::permission('users_groups_browse', 'users')) . ')', '`u`.`type_id` IN (' . implode(',', session::permission('users_types_browse', 'users')) . ')'), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring($params['max']);
     // Get users
     $users = array();
     if ($params['total']) {
         $users = $this->users_model->getUsers('in_list', isset($params['values']['type_id']) ? $params['values']['type_id'] : 0, $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Get fields
     $fields = $this->fields_model->getFields('users', isset($params['values']['type_id']) ? $params['values']['type_id'] : 0, 'view', 'in_list');
     // Set pagination
     $config = array('base_url' => config::siteURL('users/results?' . $qstring['url']), 'total_items' => $params['total'], 'max_items' => config::item('max_search_results', 'system'), 'items_per_page' => config::item('users_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('users' => $users, 'fields' => $fields, 'pagination' => $pagination));
     // Set meta tags
     $this->metatags_model->set('users', 'users_search_results');
     // Set title
     view::setTitle(__('search_results', 'system'), false);
     // Assign actions
     view::setAction('users?' . substr($qstring['url'], 0, -1), __('search_modify', 'system'), array('class' => 'icon-text icon-users-search-edit'));
     // Load view
     view::load('users/index');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:33,代码来源:users.php

示例14: index

 public function index()
 {
     // Process form values
     if (input::post('do_send_feedback')) {
         $this->_sendFeedback();
     }
     // Set meta tags
     $this->metatags_model->set('feedback', 'feedback_index');
     // Set title
     view::setTitle(__('feedback_contact', 'system_navigation'), false);
     // Load view
     view::load('feedback/index');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:13,代码来源:feedback.php

示例15: index

 public function index()
 {
     // Get license details
     if (!($license = $this->license_model->getLicense())) {
         view::setError(__('no_license', 'system_license'));
         router::redirect('cp/help/license/change');
     }
     // Assign vars
     view::assign(array('license' => $license));
     // Set title
     view::setTitle(__('help_license', 'system_navigation'));
     // Load view
     view::load('cp/help/license/view');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:14,代码来源:license.php


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