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


PHP EB::init方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     EB::loadLanguages(JPATH_ADMINISTRATOR);
     // Load our own js library
     EB::init('admin');
     // $this->doc = JFactory::getDocument();
     // $this->doc->addStylesheet(rtrim(JURI::base(), '/') . '/components/com_easyblog/themes/default/css/elements.css');
     JHTML::_('behavior.modal');
     $this->app = JFactory::getApplication();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:abstract.php

示例2: defined

<?php

/**
* @package      EasyBlog
* @copyright    Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.filesystem.file');
$engine = JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php';
$my = JFactory::getUser();
$config = EB::config();
if (!JFile::exists($engine) || $my->guest || !$config->get('main_microblog')) {
    return;
}
require_once $engine;
// Ensure that all script are loaded
EB::init('module');
// Attach modules stylesheet
EB::stylesheet('module')->attach();
JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT);
require JModuleHelper::getLayoutPath('mod_easyblogquickpost');
开发者ID:knigherrant,项目名称:decopatio,代码行数:27,代码来源:mod_easyblogquickpost.php

示例3: renderHeaders

 /**
  * Responsible to render the css files on the head
  *
  * @since   4.0
  * @access  public
  * @param   string
  * @return
  */
 public function renderHeaders()
 {
     // Load js stuffs
     $view = $this->input->get('view', '', 'cmd');
     // Determines which js section to initialize
     $section = 'site';
     if ($view == 'dashboard' || $view == 'composer') {
         $section = $view;
     }
     EB::init($section);
     // Get the theme on the site
     $theme = $this->config->get('theme_site');
     // @since 4.0
     // Attach the theme's css
     $stylesheet = EB::stylesheet('site', $theme);
     $stylesheet->attach();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:25,代码来源:views.php

示例4: display

 /**
  * Override parent's implementation
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function display($tpl = null)
 {
     // Set the appropriate namespace
     $namespace = 'admin/' . $tpl;
     // Get the child contents
     $output = $this->theme->output($namespace);
     // Get the sidebar
     $sidebar = $this->getSidebar();
     // Determine if this is a tmpl view
     $tmpl = $this->input->get('tmpl', '', 'word');
     // Prepare the structure
     $theme = EB::getTemplate();
     // Get current version
     $version = EB::getLocalVersion();
     // Render a different structure prefix when tmpl=component
     $prefix = $tmpl == 'component' ? 'eb-window' : '';
     // Initialize all javascript frameworks
     EB::init('admin');
     // Collect all javascripts attached so that we can output them at the bottom of the page
     $scripts = EB::scripts()->getScripts();
     $theme->set('info', $this->info);
     $theme->set('prefix', $prefix);
     $theme->set('version', $version);
     $theme->set('heading', $this->heading);
     $theme->set('desc', $this->desc);
     $theme->set('output', $output);
     $theme->set('tmpl', $tmpl);
     $theme->set('sidebar', $sidebar);
     $theme->set('jscripts', $scripts);
     $contents = $theme->output('admin/structure/default');
     // If the toolbar registration exists, load it up
     if (method_exists($this, 'registerToolbar')) {
         $this->registerToolbar();
     }
     echo $contents;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:44,代码来源:views.php

示例5: prepareUpdateBlogStream

 private function prepareUpdateBlogStream(&$item)
 {
     $post = EB::post($item->contextId);
     // Format the likes for the stream
     $likes = Foundry::likes();
     $likes->get($item->contextId, 'blog', 'update');
     $item->likes = $likes;
     $url = EBR::_('index.php?option=com_easyblog&view=entry&id=' . $post->id);
     // Apply comments on the stream
     $item->comments = Foundry::comments($item->contextId, 'blog', 'update', SOCIAL_APPS_GROUP_USER, array('url' => $url));
     // We might want to use some javascript codes.
     EB::init('site');
     $date = EB::date($post->created);
     $config = EB::config();
     $source = $config->get('integrations_easysocial_stream_newpost_source', 'intro');
     $content = isset($post->{$source}) && !empty($post->{$source}) ? $post->{$source} : $post->intro;
     $content = $this->truncateContent($content);
     $appParams = $this->getParams();
     $alignment = 'pull-' . $appParams->get('imagealignment', 'right');
     $this->set('alignment', $alignment);
     // See if there's any audio files to process.
     $audios = EB::audio()->getItems($content);
     // Get videos attached in the content
     $video = $this->getVideo($content);
     // Remove videos from the source
     $content = EB::videos()->strip($content);
     // Remove audios from the content
     $content = EB::audio()->strip($content);
     $catUrl = EBR::_('index.php?option=com_easyblog&view=categories&layout=listings&id=' . $post->category_id, true, null, false, true);
     $this->set('categorypermalink', $catUrl);
     $this->set('video', $video);
     $this->set('audios', $audios);
     $this->set('date', $date);
     $this->set('permalink', $url);
     $this->set('blog', $post);
     $this->set('actor', $item->actor);
     $this->set('content', $content);
     $item->title = parent::display('streams/' . $item->verb . '.title');
     $item->content = parent::display('streams/' . $item->verb . '.content');
     // Add image to the og:image
     if ($post->getImage()) {
         $item->opengraph->addImage($post->getImage('frontpage'));
     }
     $item->opengraph->addDescription($content);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:45,代码来源:easysocial.php


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