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


PHP EasyBlogHelper::getThemeObject方法代码示例

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


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

示例1: getThemes

 public function getThemes()
 {
     $path = EBLOG_THEMES;
     $result = JFolder::folders($path, '.', false, true, $exclude = array('.svn', 'CVS', '.', '.DS_Store'));
     $themes = array();
     // Cleanup output
     foreach ($result as $item) {
         $name = basename($item);
         if ($name != 'dashboard') {
             $obj = EasyBlogHelper::getThemeObject($name);
             if ($obj) {
                 $themes[] = $obj;
             }
         }
     }
     return $themes;
 }
开发者ID:alexinteam,项目名称:joomla3,代码行数:17,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.theme', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     JHTML::_('behavior.tooltip');
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $config = EasyBlogHelper::getConfig();
     $element = JRequest::getWord('element');
     $theme = EasyBlogHelper::getThemeObject($element);
     $blogImageFile = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $element . DIRECTORY_SEPARATOR . 'image.ini';
     $blogImage = false;
     jimport('joomla.filesystem.file');
     if (JFile::exists($blogImageFile)) {
         $contents = JFile::read($blogImageFile);
         require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'json.php';
         $json = new Services_JSON();
         $types = $json->decode($contents);
         foreach ($types as $type) {
             if ($type->name == 'frontpage' || $type->name == 'entry') {
                 $blogImage[$type->name] = $type;
             }
         }
     }
     $this->assign('blogimages', $this->getBlogImages($theme->element));
     $this->assign('param', $this->getParams($theme->element));
     $this->assign('blogImage', $blogImage);
     $this->assign('theme', $theme);
     $this->assign('config', $config);
     parent::display($tpl);
 }
开发者ID:alexinteam,项目名称:joomla3,代码行数:38,代码来源:view.html.php


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