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


PHP EB::jConfig方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->jConfig = EB::jConfig();
     $this->app = JFactory::getApplication();
     $this->input = EB::request();
     $this->config = EB::config();
     $this->apiKey = $this->config->get('integrations_facebook_api_key');
     $this->apiSecret = $this->config->get('integrations_facebook_secret_key');
     // Default redirection url
     $this->redirect = rtrim(JURI::root(), '/') . '/administrator/index.php?option=com_easyblog&task=facebook.grant';
     // Determines if there's a "system" in the url
     $system = $this->input->get('system', false, 'bool');
     if ($system) {
         $this->redirect .= '&system=1';
     }
     // Determines if there's a "userId" in the url
     $userId = $this->input->get('userId', null, 'default');
     if ($userId) {
         $this->redirect .= '&userId=' . $userId;
     }
     parent::__construct(array('appId' => $this->apiKey, 'secret' => $this->apiSecret));
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:22,代码来源:client.php

示例2: getBaseUrl

 /**
  * Retrieves the base url
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public static function getBaseUrl()
 {
     static $url = null;
     if (is_null($url)) {
         $app = JFactory::getApplication();
         $config = EB::jConfig();
         $uri = JFactory::getURI();
         $language = $uri->getVar('lang', 'none');
         $router = $app->getRouter();
         // Ensure that the language doesn't contain any strange characters.
         $language = str_ireplace(array('"', "'"), '', $language);
         $url = rtrim(JURI::base(), '/') . '/index.php?option=com_easyblog&lang=' . $language;
         $pluginEnabled = JPluginHelper::isEnabled('system', 'languagefilter');
         // When SEF is enabled, the URL should be different otherwise Joomla will keep redirecting
         if ($router->getMode() == JROUTER_MODE_SEF && $pluginEnabled) {
             $rewrite = $config->get('sef_rewrite');
             // Reset the base url
             $base = str_ireplace(JURI::root(true), '', $uri->getPath());
             // Fix the path
             $path = $rewrite ? $base : JString::substr($base, 10);
             $path = JString::trim($path, '/');
             $parts = explode('/', $path);
             // The first segment will always be the language filter
             $language = 'none';
             if ($parts) {
                 $language = reset($parts);
             }
             // Build the final url
             $url = rtrim(JURI::root(), '/') . '/index.php/' . $language . '/?option=com_easyblog';
             // When rewrite is enabled, we need to use the proper paths
             if ($rewrite) {
                 $url = rtrim(JURI::root(), '/') . '/' . $language . '/?option=com_easyblog';
                 $language = 'none';
             }
         }
         // Append the item id if necessary
         $activeMenu = $app->getMenu()->getActive();
         if ($activeMenu && isset($activeMenu->id)) {
             $url .= '&Itemid=' . $activeMenu->id;
         }
         // Some SEF components tries to do a 301 redirect from non-www prefix to www prefix.
         $currentUrl = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
         if ($currentUrl) {
             // When the url contains www and the current accessed url does not contain www, fix it.
             if (stristr($currentUrl, 'www') === false && stristr($url, 'www') !== false) {
                 $url = str_ireplace('www.', '', $url);
             }
             // When the url does not contain www and the current accessed url contains www.
             if (stristr($currentUrl, 'www') !== false && stristr($url, 'www') === false) {
                 $url = str_ireplace('://', '://www.', $url);
             }
         }
     }
     return $url;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:63,代码来源:easyblog.php

示例3: send

 /**
  * Adds an email address to the queue
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function send($emails, $emailTitle, $template, $data)
 {
     $jConfig = EB::jConfig();
     // Ensure that the title is translated.
     EB::loadLanguages();
     $emailTitle = JText::_($emailTitle);
     // Get the sender's name and email
     $fromEmail = $this->config->get('notification_from_email', $jConfig->get('mailfrom'));
     $fromName = $this->config->get('notification_from_name', $jConfig->get('fromname'));
     // Ensure that all the emails are unique and we do not send any duplicates.
     foreach ($emails as $email => $obj) {
         // Ensure that the unsubscribe link is passed into the template
         if ($obj->unsubscribe && !isset($data['unsubscribeLink'])) {
             $data['unsubscribeLink'] = $obj->unsubscribe;
         }
         $mailq = EB::table('MailQueue');
         $mailq->mailfrom = $fromEmail;
         $mailq->fromname = $fromName;
         $mailq->recipient = $obj->email;
         $mailq->subject = $emailTitle;
         // We only get the contents of the body later when we are dispatching the emails
         $mailq->body = '';
         $mailq->created = EB::date()->toSql();
         $mailq->template = $template;
         $mailq->data = json_encode($data);
         $mailq->store();
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:36,代码来源:notification.php

示例4: isSefEnabled

 /**
  * Determiens if SEF is enabled on the site
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public static function isSefEnabled()
 {
     $jConfig = EB::jConfig();
     $isSef = false;
     $isSef = EBR::isSh404Enabled();
     // If sh404sef not enabled, we need to check if joomla has it enabled
     if (!$isSef) {
         $isSef = $jConfig->get('sef');
     }
     return $isSef;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:19,代码来源:router.php

示例5: debug

 /**
  * START OF STRING RETURN FUNCTIONS
  */
 public function debug()
 {
     $jConfig = EB::jConfig();
     $prefix = $jConfig->getValue('dbprefix');
     $query = $this->buildSql();
     return str_ireplace('#__', $prefix, $query);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:sql.php


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