本文整理汇总了PHP中KunenaForum类的典型用法代码示例。如果您正苦于以下问题:PHP KunenaForum类的具体用法?PHP KunenaForum怎么用?PHP KunenaForum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了KunenaForum类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(&$subject, $config)
{
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) {
return;
}
parent::__construct($subject, $config);
}
开发者ID:b2un0,项目名称:joomla-plugin-kunena-battlefield-signature,代码行数:7,代码来源:battlefield_sig.php
示例2: getModel
/**
* Gets the model description for CB Forums
*
* @return stdClass
*/
public static function getModel()
{
global $_CB_framework;
static $cache = array();
$plugin = cbforumsClass::getPlugin();
$forum = $plugin->params->get('forum_model', 1);
if (!isset($cache[$forum])) {
$path = $_CB_framework->getCfg('absolute_path');
$model = new stdClass();
if (in_array($forum, array(1, 3, 4, 5, 6)) && file_exists($path . '/administrator/components/com_kunena/api.php')) {
/** @noinspection PhpIncludeInspection */
require_once $path . '/administrator/components/com_kunena/api.php';
if (!class_exists('KunenaForum') || !KunenaForum::installed()) {
$model->file = null;
} else {
KunenaForum::setup();
$model->file = $plugin->absPath . '/models/kunena20.php';
}
$model->detected = $forum == 6 ? CBTxt::T('Kunena 3.x') : CBTxt::T('Kunena 2.x');
$model->type = $forum == 6 ? 6 : 5;
} else {
$model->file = null;
$model->detected = CBTxt::T('None');
$model->type = 0;
}
if ($model->file) {
/** @noinspection PhpIncludeInspection */
require_once $model->file;
$model->class = new cbforumsModel();
}
$cache[$forum] = $model;
}
return $cache[$forum];
}
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:39,代码来源:cbforums.php
示例3: getInput
/**
* @return string
*/
protected function getInput()
{
if (!class_exists('KunenaForum') || !KunenaForum::installed()) {
echo '<a href="index.php?option=com_kunena">PLEASE COMPLETE KUNENA INSTALLATION</a>';
return '';
}
KunenaFactory::loadLanguage('com_kunena');
$size = $this->element['size'];
$class = $this->element['class'];
$attribs = ' ';
if ($size) {
$attribs .= 'size="' . $size . '"';
}
if ($class) {
$attribs .= 'class="' . $class . '"';
} else {
$attribs .= 'class="inputbox"';
}
if (!empty($this->element['multiple'])) {
$attribs .= ' multiple="multiple"';
}
// Get the field options.
$options = $this->getOptions();
return JHtml::_('kunenaforum.categorylist', $this->name, 0, $options, $this->element, $attribs, 'value', 'text', $this->value);
}
开发者ID:proyectoseb,项目名称:University,代码行数:28,代码来源:kunenacategorylist.php
示例4: shKUGetVersion
function shKUGetVersion()
{
static $version = null;
if (is_null($version)) {
// Make sure that Kunena API has been loaded
$api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
if (is_file($api)) {
require_once $api;
}
if (class_exists('KunenaForum')) {
$version = KunenaForum::versionMajor();
// Initialize Kunena 2.0 support
kimport('kunena.forum.category');
kimport('kunena.forum.topic');
} elseif (class_exists('Kunena')) {
$version = '1.6';
// Initialize Kunena 1.6 support
require_once KUNENA_PATH . '/router.php';
KunenaRouter::loadCategories();
} elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.defines.php')) {
$version = '1.5';
} elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.version.php')) {
$version = '1.0';
} else {
$version = false;
}
}
return $version;
}
开发者ID:sangkasi,项目名称:joomla,代码行数:29,代码来源:com_kunena.php
示例5: display
/**
* Display module contents.
*/
public final function display()
{
// Load CSS only once
if (static::$css) {
$this->document->addStyleSheet(JURI::root(true) . static::$css);
static::$css = null;
}
// Use caching also for registered users if enabled.
if ($this->params->get('owncache', 0)) {
/** @var $cache JCacheControllerOutput */
$cache = JFactory::getCache('com_kunena', 'output');
$me = KunenaFactory::getUser();
$cache->setLifeTime($this->params->get('cache_time', 180));
$hash = md5(serialize($this->params));
if ($cache->start("display.{$me->userid}.{$hash}", 'mod_kunenalatest')) {
return;
}
}
// Initialize Kunena.
KunenaForum::setup();
// Display module.
$this->_display();
// Store cached page.
if (isset($cache)) {
$cache->end();
}
}
开发者ID:giabmf11,项目名称:Kunena-Forum,代码行数:30,代码来源:module.php
示例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;
}
$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');
}
}
开发者ID:juanferden,项目名称:adoperp,代码行数:26,代码来源:comprofiler.php
示例7: onSystemStart
function onSystemStart()
{
if (!self::kunenaInstalled()) {
return;
}
//initialize the toolbar object
$toolbar = CFactory::getToolbar();
$user = JFactory::getUser();
// Kunena online check
if (!KunenaForum::enabled()) {
$toolbar->addGroup('KUNENAMENU', JText::_('PLG_COMMUNITY_KUNENAMENU_KUNENA_OFFLINE'), KunenaRoute::_('index.php?option=com_kunena'));
return;
}
//adding new 'tab' 'Forum Settings' to JomSocial toolbar
$toolbar->addGroup('KUNENAMENU', JText::_('PLG_COMMUNITY_KUNENANENU_FORUM'), 'index.php?option=com_kunena&view=user&layout=default&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=default'));
if ($this->params->get('sh_editprofile', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_EDITPROFILE', JText::_('PLG_COMMUNITY_KUNENAMENU_EDITPROFILE'), 'index.php?option=com_kunena&view=user&layout=edit&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=edit'));
}
if ($this->params->get('sh_myprofile', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_PROFILE', JText::_('PLG_COMMUNITY_KUNENAMENU_PROFILE'), 'index.php?option=com_kunena&view=user&layout=default&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=default'));
}
if ($this->params->get('sh_myposts', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_POSTS', JText::_('PLG_COMMUNITY_KUNENAMENU_POSTS'), 'index.php?option=com_kunena&view=topics&layout=posts&mode=recent&userid=' . $user->id . '&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=posts&mode=recent&userid=' . $user->id . '&sel=-1'));
}
if ($this->params->get('sh_mysubscriptions', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_SUBSCRIBES', JText::_('PLG_COMMUNITY_KUNENAMENU_SUBSCRIBTIONS'), 'index.php?option=com_kunena&view=topics&layout=user&mode=subscriptions&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=user&mode=subscriptions&sel=-1'));
}
if ($this->params->get('sh_myfavorites', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_FAVORITES', JText::_('PLG_COMMUNITY_KUNENAMENU_FAVORITES'), 'index.php?option=com_kunena&view=topics&layout=user&mode=favorites&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=user&mode=favorite&sel=-1s'));
}
}
开发者ID:juanferden,项目名称:adoperp,代码行数:31,代码来源:kunenamenu.php
示例8: __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);
}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:32,代码来源:uddeim.php
示例9: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
if (!class_exists('KunenaForum') || !KunenaForum::installed()) {
echo '<a href="index.php?option=com_kunena">PLEASE COMPLETE KUNENA INSTALLATION</a>';
return;
}
KunenaFactory::loadLanguage('com_kunena');
$none = $node->attributes('none');
$options = array();
foreach ($node->children() as $option) {
$options[] = JHTML::_('select.option', $option->attributes('value'), JText::_($option->data()));
}
$ctrl = $control_name . '[' . $name . ']';
$size = $node->attributes('size');
$class = $node->attributes('class');
$attribs = ' ';
if ($size) {
$attribs .= 'size="' . $size . '"';
}
if ($class) {
$attribs .= 'class="' . $class . '"';
} else {
$attribs .= 'class="inputbox"';
}
if ($node->attributes('multiple')) {
$attribs .= ' multiple="multiple"';
$ctrl .= '[]';
}
return JHTML::_('kunenaforum.categorylist', $ctrl, 0, $options, $node->attributes(), $attribs, 'value', 'text', $value);
}
开发者ID:laiello,项目名称:senluonirvana,代码行数:30,代码来源:kunenacategorylist.php
示例10: parseKunenaInstallFile
public static function parseKunenaInstallFile($path) {
$xml = simplexml_load_file($path);
if (!$xml || $xml->getName() != 'kinstall') {
return false;
}
$data = new stdClass();
$data->name = (string) $xml->name;
$data->type = (string) $xml->attributes()->type;
$data->creationdate = (string) $xml->creationDate;
$data->author = (string) $xml->author;
$data->copyright = (string) $xml->copyright;
$data->authorEmail = (string) $xml->authorEmail;
$data->authorUrl = (string) $xml->authorUrl;
$data->version = (string) $xml->version;
$data->description = (string) $xml->description;
$data->thumbnail = (string) $xml->thumbnail;
if ($data->version == '@kunenaversion@') $data->version = KunenaForum::version();
if ($data->creationdate == '@kunenaversiondate@') $data->creationdate = KunenaForum::versionDate();
if (!$data->version) $data->version = JText::_('Unknown');
if (!$data->creationdate) $data->creationdate = JText::_('Unknown');
if (!$data->author) $data->author = JText::_('Unknown');
return $data;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:27,代码来源:helper.php
示例11: getModel
/**
* Returns the forum model instance
*
* @return null|ModelInterface
*/
static public function getModel()
{
global $_CB_framework, $_PLUGINS;
static $model = null;
if ( ! $model ) {
static $params = null;
if ( ! $params ) {
$plugin = $_PLUGINS->getLoadedPlugin( 'user/plug_cbgroupjive/plugins', 'cbgroupjiveforums' );
$params = $_PLUGINS->getPluginParams( $plugin );
}
switch( $params->get( 'groups_forums_model', 'kunena' ) ) {
case 'kunena':
$api = $_CB_framework->getCfg( 'absolute_path' ) . '/administrator/components/com_kunena/api.php';
if ( file_exists( $api ) ) {
require_once( $api );
if ( class_exists( 'KunenaForum' ) ) {
\KunenaForum::setup();
}
$model = new Model\Kunena\Model();
}
break;
}
}
return $model;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:38,代码来源:CBGroupJiveForums.php
示例12: __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);
}
开发者ID:b2un0,项目名称:joomla-plugin-kunena-wow-avatar,代码行数:8,代码来源:wow_avatar.php
示例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;
parent::__construct ( $subject, $config );
$this->loadLanguage ( 'plg_kunena_joomla.sys', JPATH_ADMINISTRATOR ) || $this->loadLanguage ( 'plg_kunena_joomla.sys', KPATH_ADMIN );
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:joomla.php
示例14: _load_rules
function _load_rules()
{
$app = JFactory::getApplication();
$db = JFactory::getDBO();
$total = 0;
$filter_category = $app->getUserStateFromRequest('com_alphauserpoints' . '.filter_category', 'filter_category', 'all', 'word');
// Get the pagination request variables
$limit = $app->getUserStateFromRequest('com_alphauserpoints.limit', 'limit', $app->getCfg('list_limit'), 'int');
$limitstart = JFactory::getApplication()->input->get('limitstart', 0, 'int');
// In case limit has been changed, adjust limitstart accordingly
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
if ($filter_category != 'all') {
$filter = "WHERE r.category = '{$filter_category}'";
} else {
$filter = "";
}
// check if Kunena forum is installed to show pre-installed rules for Kunena
// Dectects Kunena 2.0+
if (class_exists('KunenaForum') && KunenaForum::enabled()) {
$filter != '' ? $filter .= " AND " : ($filter .= "WHERE ");
$filter .= "(r.plugin_function!='plgaup_newtopic_kunena' AND r.plugin_function!='plgaup_reply_kunena' )";
// Detects Kunena 1.6 and 1.7
} elseif (class_exists('Kunena') && Kunena::enabled()) {
if (substr(Kunena::version(), 0, 3) == '1.7') {
$filter != '' ? $filter .= " AND " : ($filter .= "WHERE ");
$filter .= "(r.plugin_function!='plgaup_newtopic_kunena' AND r.plugin_function!='plgaup_reply_kunena' )";
} else {
$filter != '' ? $filter .= " AND " : ($filter .= "WHERE ");
$filter .= "(r.plugin_function!='plgaup_kunena_topic_create' AND r.plugin_function!='plgaup_kunena_topic_reply' AND r.plugin_function!='plgaup_kunena_message_delete' AND r.plugin_function!='plgaup_kunena_message_thankyou')";
}
}
// end check Kunena pre_installed rules
$query = "SELECT r.*, g.title AS groupname FROM #__alpha_userpoints_rules AS r LEFT JOIN #__viewlevels AS g ON g.id=r.access " . $filter . " ORDER BY r.category";
$total = @$this->_getListCount($query);
$result = $this->_getList($query, $limitstart, $limit);
$lists = array();
$options[] = JHTML::_('select.option', '', JText::_('AUP_NONE'));
$options[] = JHTML::_('select.option', 'us', JText::_('AUP_CAT_USER'));
$options[] = JHTML::_('select.option', 'co', JText::_('AUP_CAT_COMMUNITY'));
$options[] = JHTML::_('select.option', 'ar', JText::_('AUP_CAT_ARTICLE'));
$options[] = JHTML::_('select.option', 'li', JText::_('AUP_CAT_LINK'));
$options[] = JHTML::_('select.option', 'po', JText::_('AUP_CAT_POLL_QUIZZ'));
$options[] = JHTML::_('select.option', 're', JText::_('AUP_CAT_RECOMMEND_INVITE'));
$options[] = JHTML::_('select.option', 'fo', JText::_('AUP_CAT_COMMENT_FORUM'));
$options[] = JHTML::_('select.option', 'vi', JText::_('AUP_CAT_VIDEO'));
$options[] = JHTML::_('select.option', 'ph', JText::_('CAT_CAT_PHOTO'));
$options[] = JHTML::_('select.option', 'mu', JText::_('AUP_CAT_MUSIC'));
$options[] = JHTML::_('select.option', 'sh', JText::_('AUP_CAT_SHOPPING'));
$options[] = JHTML::_('select.option', 'pu', JText::_('AUP_CAT_PURCHASING'));
$options[] = JHTML::_('select.option', 'cd', JText::_('AUP_CAT_COUPON_CODE'));
$options[] = JHTML::_('select.option', 'su', JText::_('AUP_CAT_SUBSCRIPTION'));
$options[] = JHTML::_('select.option', 'sy', JText::_('AUP_CAT_SYSTEM'));
$options[] = JHTML::_('select.option', 'ot', JText::_('AUP_CAT_OTHER'));
$options[] = JHTML::_('select.option', 'all', JText::_('AUP_ALL'));
$lists['filter_category'] = JHTML::_('select.genericlist', $options, 'filter_category', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $filter_category);
return array($result, $total, $limit, $limitstart, $lists);
}
开发者ID:q0821,项目名称:esportshop,代码行数:57,代码来源:rules.php
示例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;
}
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';
}
开发者ID:laiello,项目名称:senluonirvana,代码行数:10,代码来源:gravatar.php
示例16: kunena_upgrade_161_delfiles
function kunena_upgrade_161_delfiles($parent) {
if (KunenaForum::isSVN()) return;
//Import filesystem libraries.
jimport ( 'joomla.filesystem.folder' );
$path = JPATH_COMPONENT.'/views/article';
if(JFolder::exists($path)) JFolder::delete($path);
return array('action'=>'', 'name'=>JText::_ ( 'COM_KUNENA_INSTALL_161_DELFILES' ), 'success'=>true);
}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:11,代码来源:upgrade-1.6.1_delfiles.php
示例17: __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 );
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:13,代码来源:alphauserpoints.php
示例18: __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);
}
开发者ID:Ruud68,项目名称:Kunena-Forum,代码行数:13,代码来源:easysocial.php
示例19: __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 );
}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:13,代码来源:community.php
示例20: __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');
}
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:19,代码来源:kunena.php
注:本文中的KunenaForum类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论