本文整理汇总了PHP中KunenaForum::isCompatible方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaForum::isCompatible方法的具体用法?PHP KunenaForum::isCompatible怎么用?PHP KunenaForum::isCompatible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaForum
的用法示例。
在下文中一共展示了KunenaForum::isCompatible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(&$subject, $config)
{
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) {
return;
}
parent::__construct($subject, $config);
}
示例2: __construct
/**
* @param object $subject
* @param array $config
*/
function __construct(&$subject, $config)
{
// Check if Kunena API exists
$api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
if (!is_file ($api))
{
return;
}
jimport ( 'joomla.application.component.helper' );
// Check if Kunena component is installed/enabled
if (!JComponentHelper::isEnabled ( 'com_kunena', true ))
{
return;
}
// Load Kunena API
require_once $api;
// Do not load if Kunena version is not supported or Kunena is not installed
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('4.0') && KunenaForum::installed()))
{
return;
}
parent::__construct ( $subject, $config );
// ! Always load language after parent::construct else the name of plugin isn't yet set
$this->loadLanguage('plg_system_kunena.sys');
}
示例3: __construct
public function __construct(&$subject, $config)
{
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) {
return;
}
$app = JFactory::getApplication();
// Do not load if CommunityBuilder is not installed
$path = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
if (!is_file($path)) {
return;
}
require_once $path;
cbimport('cb.database');
cbimport('cb.tables');
cbimport('language.front');
cbimport('cb.tabs');
cbimport('cb.field');
global $ueConfig;
parent::__construct($subject, $config);
$this->loadLanguage('plg_kunena_comprofiler.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_comprofiler.sys', KPATH_ADMIN);
require_once __DIR__ . "/integration.php";
if ($app->isAdmin() && (!isset($ueConfig['version']) || version_compare($ueConfig['version'], $this->minCBVersion) < 0)) {
$app->enqueueMessage(JText::sprintf('PLG_KUNENA_COMPROFILER_WARN_VERSION', $this->minCBVersion), 'notice');
}
}
示例4: __construct
/**
* @param object $subject
* @param array $config
*/
public function __construct(&$subject, $config)
{
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('4.0') && KunenaForum::installed()))
{
return;
}
KunenaFactory::loadLanguage('plg_kunena_uddeim.sys', 'admin');
$path = JPATH_SITE . "/components/com_uddeim/uddeim.api.php";
if (!is_file($path))
{
return;
}
include_once($path);
$uddeim = new uddeIMAPI();
if ($uddeim->version() < 1)
{
return;
}
parent::__construct($subject, $config);
$this->loadLanguage('plg_kunena_uddeim.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_uddeim.sys', KPATH_ADMIN);
}
示例5: __construct
/**
* @param object $subject
* @param array $params
*/
public function __construct(&$subject, $params)
{
$this->app = JFactory::getApplication();
// Do not register plug-in in administration.
if ($this->app->isAdmin()) {
return;
}
// If scope isn't articles or Kunena, do not register plug-in.
if ($this->app->scope != 'com_content' && $this->app->scope != 'com_kunena') {
return;
}
// Kunena detection and version check
$minKunenaVersion = '3.0';
if (!class_exists('KunenaForum') || !KunenaForum::isCompatible($minKunenaVersion)) {
$this->loadLanguage();
$this->app->enqueueMessage(JText::sprintf('PLG_KUNENADISCUSS_DEPENDENCY_FAIL', $minKunenaVersion));
return;
}
// Kunena online check
if (!KunenaForum::enabled()) {
return;
}
// Initialize variables
$this->db = JFactory::getDbo();
$this->user = KunenaFactory::getUser();
$this->config = KunenaFactory::getConfig();
// Initialize plugin
parent::__construct($subject, $params);
$this->debug("Constructor called in {$this->app->scope}");
}
示例6: __construct
public function __construct(&$subject, $config) {
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) return;
parent::__construct ( $subject, $config );
$this->loadLanguage ( 'plg_kunena_joomla.sys', JPATH_ADMINISTRATOR ) || $this->loadLanguage ( 'plg_kunena_joomla.sys', KPATH_ADMIN );
}
示例7: __construct
public function __construct(&$subject, $config)
{
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) {
return;
}
JLoader::register('KunenaAvatarWoW_Avatar', __DIR__ . '/avatar.php');
parent::__construct($subject, $config);
}
示例8: kunenaInstalled
protected static function kunenaInstalled()
{
// Kunena detection and version check
$minKunenaVersion = '2.0';
if (!class_exists('KunenaForum') || !KunenaForum::isCompatible($minKunenaVersion)) {
return false;
}
return true;
}
示例9: __construct
public function __construct(&$subject, $config)
{
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) {
return;
}
parent::__construct($subject, $config);
$this->loadLanguage('plg_kunena_gravatar.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_gravatar.sys', KPATH_ADMIN);
$this->path = dirname(__FILE__) . '/gravatar';
}
示例10: __construct
public function __construct(&$subject, $config) {
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('4.0') && KunenaForum::installed())) return;
// Do not load if JomSocial is not installed
$path = JPATH_ROOT . '/components/com_community/libraries/core.php';
if (!is_file ( $path )) return;
include_once ($path);
parent::__construct ( $subject, $config );
$this->loadLanguage ( 'plg_kunena_community.sys', JPATH_ADMINISTRATOR ) || $this->loadLanguage ( 'plg_kunena_community.sys', KPATH_ADMIN );
}
示例11: __construct
/**
* Construct plugin.
*
* @param object $subject
* @param array $config
*/
public function __construct(&$subject, $config)
{
// Do not enable plugin in administration.
if (JFactory::getApplication()->isAdmin()) {
return;
}
// Do not load if Kunena version is not supported or Kunena is not installed
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('4.0') && KunenaForum::installed())) {
return;
}
parent::__construct($subject, $config);
$this->loadLanguage('plg_content_kunena.sys');
}
示例12: __construct
public function __construct(&$subject, $config)
{
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) {
return true;
}
// Check if easysocial exists
if (!$this->exists()) {
return true;
}
parent::__construct($subject, $config);
$this->loadLanguage('plg_kunena_community.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_community.sys', KPATH_ADMIN);
}
示例13: __construct
public function __construct(&$subject, $config) {
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) return;
$aup = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
if (! file_exists ( $aup ))
return;
require_once ($aup);
parent::__construct ( $subject, $config );
$this->loadLanguage ( 'plg_kunena_alphauserpoints.sys', JPATH_ADMINISTRATOR ) || $this->loadLanguage ( 'plg_kunena_alphauserpoints.sys', KPATH_ADMIN );
}
示例14: __construct
public function __construct(&$subject, $config)
{
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) {
return;
}
// Do not load if Easyblog is not installed
$path = JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php';
if (!is_file($path)) {
return;
}
include_once $path;
parent::__construct($subject, $config);
$this->loadLanguage('plg_kunena_easyblog.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_easyblog.sys', KPATH_ADMIN);
}
示例15: __construct
public function __construct(&$subject, $config) {
// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) return;
// Do not load if jomwall is not installed
$path = JPATH_ROOT . '/components/com_awdwall/models/wall.php';
if (!is_file ( $path )) return;
include_once ($path);
include_once (JPATH_ROOT . '/components/com_awdwall/helpers/user.php');
parent::__construct ( $subject, $config );
$this->loadLanguage ( 'plg_kunena_jomwall.sys', JPATH_ADMINISTRATOR ) || $this->loadLanguage ( 'plg_kunena_jomwall.sys', KPATH_ADMIN );
$this->path = dirname ( __FILE__ ) . '/jomwall';
}