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


PHP seo::text方法代码示例

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


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

示例1: after

 /**
  * Fill in default values for our properties before rendering the output.
  */
 public function after()
 {
     parent::after();
     if ($this->auto_render === TRUE) {
         // Add custom CSS if enabld and front controller
         if (is_subclass_of($this, 'Auth_Controller') === FALSE and ($custom_css = Theme::get_custom_css()) !== FALSE) {
             Theme::$styles = array_merge(Theme::$styles, array($custom_css => 'screen'));
         }
         //cookie consent
         if (Core::config('general.cookie_consent') == 1) {
             Theme::$styles = array_merge(Theme::$styles, array('css/jquery.cookiebar.css' => 'screen'));
             $this->template->scripts['footer'][] = 'js/jquery.cookiebar.js';
             $this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'cookieconsent'));
         }
         //adblock detection
         if (Core::config('general.adblock') == 1) {
             Theme::$styles = array_merge(Theme::$styles, array('css/adi.js/jquery.adi.css' => 'screen'));
             Theme::$scripts['footer'][] = 'js/advertisement.js';
             Theme::$scripts['footer'][] = 'js/jquery.adi.js';
             $this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'adi'));
         }
         // Add defaults to template variables.
         $this->template->styles = array_merge_recursive(Theme::$styles, $this->template->styles);
         $this->template->scripts = array_reverse(array_merge_recursive(Theme::$scripts, $this->template->scripts));
         //in case theres no description given
         if ($this->template->meta_description == '') {
             $this->template->meta_description = $this->template->title;
         }
         //title concatenate the site name
         if ($this->template->title != '') {
             $this->template->title .= ' - ';
         }
         $this->template->title .= core::config('general.site_name');
         //auto generate keywords and description from content
         seo::$charset = Kohana::$charset;
         $this->template->title = seo::text($this->template->title, 70);
         //not meta keywords given
         //remember keywords are useless :( http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html
         if ($this->template->meta_keywords == '') {
             $this->template->meta_keywords = seo::keywords($this->template->meta_description);
         }
         $this->template->meta_description = seo::text($this->template->meta_description);
     }
     $this->response->body($this->template->render());
 }
开发者ID:Chinese1904,项目名称:openclassifieds2,代码行数:48,代码来源:controller.php


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