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


PHP Theme::file方法代码示例

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


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

示例1: showLogo

 /**
  * Show configured logo.
  *
  * @return nothing
  */
 function showLogo()
 {
     $this->elementStart('address', array('id' => 'site_contact', 'class' => 'vcard'));
     if (Event::handle('StartAddressData', array($this))) {
         if (common_config('singleuser', 'enabled')) {
             $url = common_local_url('showstream', array('nickname' => common_config('singleuser', 'nickname')));
         } else {
             $url = common_local_url('public');
         }
         $this->elementStart('a', array('class' => 'url home bookmark', 'href' => $url));
         if (common_config('site', 'logo') || file_exists(Theme::file('logo.png'))) {
             $this->element('img', array('class' => 'logo photo', 'src' => common_config('site', 'logo') ? common_config('site', 'logo') : Theme::path('logo.png'), 'alt' => common_config('site', 'name')));
         }
         $this->text(' ');
         $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
         $this->elementEnd('a');
         Event::handle('EndAddressData', array($this));
     }
     $this->elementEnd('address');
 }
开发者ID:Br3nda,项目名称:StatusNet,代码行数:25,代码来源:action.php

示例2: _showLogo

 function _showLogo($action)
 {
     $action->elementStart('address', 'vcard');
     $action->elementStart('a', array('class' => 'url home bookmark', 'href' => common_local_url('public')));
     if (common_config('site', 'mobilelogo') || file_exists(Theme::file('logo.png')) || file_exists(Theme::file('mobilelogo.png'))) {
         $action->element('img', array('class' => 'photo', 'src' => common_config('site', 'mobilelogo') ? common_config('site', 'mobilelogo') : (file_exists(Theme::file('mobilelogo.png')) ? Theme::path('mobilelogo.png') : Theme::path('logo.png')), 'alt' => common_config('site', 'name')));
     }
     $action->element('span', array('class' => 'fn org'), common_config('site', 'name'));
     $action->elementEnd('a');
     $action->elementEnd('address');
 }
开发者ID:himmelex,项目名称:NTW,代码行数:11,代码来源:MobileProfilePlugin.php

示例3: _showLogo

 function _showLogo($action)
 {
     $action->elementStart('address', 'vcard');
     if (common_config('singleuser', 'enabled')) {
         $user = User::singleUser();
         $url = common_local_url('showstream', array('nickname' => $user->nickname));
     } else {
         $url = common_local_url('public');
     }
     $action->elementStart('a', array('class' => 'url home bookmark', 'href' => $url));
     if (common_config('site', 'mobilelogo') || file_exists(Theme::file('logo.png')) || file_exists(Theme::file('mobilelogo.png'))) {
         $action->element('img', array('class' => 'photo', 'src' => common_config('site', 'mobilelogo') ? common_config('site', 'mobilelogo') : (file_exists(Theme::file('mobilelogo.png')) ? Theme::path('mobilelogo.png') : Theme::path('logo.png')), 'alt' => common_config('site', 'name')));
     }
     $action->element('span', array('class' => 'fn org'), common_config('site', 'name'));
     $action->elementEnd('a');
     $action->elementEnd('address');
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:17,代码来源:MobileProfilePlugin.php

示例4: showLogo

 /**
  * Show configured logo.
  *
  * @return nothing
  */
 function showLogo()
 {
     $this->elementStart('address', array('id' => 'site_contact', 'class' => 'vcard'));
     if (Event::handle('StartAddressData', array($this))) {
         if (common_config('singleuser', 'enabled')) {
             $user = User::singleUser();
             $url = common_local_url('showstream', array('nickname' => $user->nickname));
         } else {
             $url = common_local_url('public');
         }
         $this->elementStart('a', array('class' => 'url home bookmark', 'href' => $url));
         if (StatusNet::isHTTPS()) {
             $logoUrl = common_config('site', 'ssllogo');
             if (empty($logoUrl)) {
                 // if logo is an uploaded file, try to fall back to HTTPS file URL
                 $httpUrl = common_config('site', 'logo');
                 if (!empty($httpUrl)) {
                     $f = File::staticGet('url', $httpUrl);
                     if (!empty($f) && !empty($f->filename)) {
                         // this will handle the HTTPS case
                         $logoUrl = File::url($f->filename);
                     }
                 }
             }
         } else {
             $logoUrl = common_config('site', 'logo');
         }
         if (empty($logoUrl) && file_exists(Theme::file('logo.png'))) {
             // This should handle the HTTPS case internally
             $logoUrl = Theme::path('logo.png');
         }
         if (!empty($logoUrl)) {
             $this->element('img', array('class' => 'logo photo', 'src' => $logoUrl, 'alt' => common_config('site', 'name')));
         }
         $this->text(' ');
         $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
         $this->elementEnd('a');
         Event::handle('EndAddressData', array($this));
     }
     $this->elementEnd('address');
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:46,代码来源:action.php

示例5: cssLink

 /**
  * output a css link
  *
  * @param string $src     relative path within the theme directory, or an absolute path
  * @param string $theme        'theme' that contains the stylesheet
  * @param string media         'media' attribute of the tag
  *
  * @return void
  */
 function cssLink($src, $theme = null, $media = null)
 {
     if (Event::handle('StartCssLinkElement', array($this, &$src, &$theme, &$media))) {
         $url = parse_url($src);
         if (empty($url['scheme']) && empty($url['host']) && empty($url['query']) && empty($url['fragment'])) {
             if (file_exists(Theme::file($src, $theme))) {
                 $src = Theme::path($src, $theme);
             } else {
                 $src = common_path($src, GNUsocial::isHTTPS());
             }
             $src .= '?version=' . GNUSOCIAL_VERSION;
         }
         $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $src, 'media' => $media));
         Event::handle('EndCssLinkElement', array($this, $src, $theme, $media));
     }
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:25,代码来源:htmloutputter.php


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