本文整理汇总了PHP中Komento::isJoomla15方法的典型用法代码示例。如果您正苦于以下问题:PHP Komento::isJoomla15方法的具体用法?PHP Komento::isJoomla15怎么用?PHP Komento::isJoomla15使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Komento
的用法示例。
在下文中一共展示了Komento::isJoomla15方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toFormat
public function toFormat( $format='%Y-%m-%d %H:%M:%S' )
{
if( Komento::joomlaVersion() >= '3.0' )
{
if( JString::stristr( $format, '%' ) !== false )
{
Komento::import( 'helper', 'date' );
$format = KomentoDateHelper::strftimeToDate( $format );
}
return $this->date->format( $format, true );
}
else
{
// There is no way to have cross version working, except for detecting % in the format
if( JString::stristr( $format , '%' ) === false )
{
if( Komento::isJoomla15() )
{
// forced fallback for Joomla 15 if format doesn't have %
$format = '%c';
}
else
{
return $this->date->format( $format , true );
}
}
return $this->date->toFormat( $format, true );
}
}
示例2: send
public function send( $max = 5 )
{
$konfig = Komento::getKonfig();
if( $konfig->get( 'disable_mailq' ) )
{
return false;
}
$db = Komento::getDBO();
$config = Komento::getConfig();
$sql = Komento::getSql();
$sql->select( '#__komento_mailq' )
->column( 'id' )
->where( 'status', 0 )
->order( 'created' )
->limit( $max );
$result = $sql->loadObjectList();
if(! empty($result))
{
foreach($result as $mail)
{
$mailq = Komento::getTable('mailq');
$mailq->load($mail->id);
$sendHTML = $mailq->type == 'html' ? 1 : 0;
$state = 0;
if( empty( $mailq->recipient ) )
{
$state = 1;
}
//send emails.
if( Komento::isJoomla15() )
{
$state = JUtility::sendMail($mailq->mailfrom, $mailq->fromname, $mailq->recipient, $mailq->subject, $mailq->body, $sendHTML);
}
else
{
$mail = JFactory::getMailer();
$state = $mail->sendMail($mailq->mailfrom, $mailq->fromname, $mailq->recipient, $mailq->subject, $mailq->body, $sendHTML);
}
if( $state )
{
// update the status to 1 == proccessed
$mailq->status = 1;
$mailq->store();
}
}
}
}
示例3: getUsergroups
public static function getUsergroups()
{
$sql = Komento::getSql();
if (Komento::isJoomla15()) {
$sql->select('#__core_acl_aro_groups')->column('id')->column('name', 'title')->column('0', 'depth', '', true)->where('(')->where('id', '17', '>')->where('id', '26', '<')->where(')')->where('id', '29', '=', 'or')->order('lft');
} else {
$query = "SELECT `x`.*, COUNT(`y`.`id`) - 1 AS `depth` FROM `#__usergroups` AS `x` INNER JOIN `#__usergroups` AS `y` ON `x`.`lft` BETWEEN `y`.`lft` AND `y`.`rgt` GROUP BY `x`.`id` ORDER BY `x`.`lft`";
$sql->raw($query);
}
return $sql->loadObjectList();
}
示例4: defined
* 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');
require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'toolbar.php';
$submenus = array('komento' => JText::_('COM_KOMENTO_TAB_HOME'), 'system' => JText::_('COM_KOMENTO_TAB_SYSTEM'), 'integrations' => JText::_('COM_KOMENTO_TAB_INTEGRATIONS'), 'comments' => JText::_('COM_KOMENTO_TAB_COMMENTS'), 'pending' => JText::_('COM_KOMENTO_TAB_PENDINGS'), 'reports' => JText::_('COM_KOMENTO_TAB_REPORTS'), 'subscribers' => JText::_('COM_KOMENTO_TAB_SUBSCRIBERS'), 'acl' => JText::_('COM_KOMENTO_TAB_ACL'), 'migrators' => JText::_('COM_KOMENTO_TAB_MIGRATORS'), 'mailq' => JText::_('COM_KOMENTO_TAB_MAILQ'));
$current = JRequest::getVar('view', 'komento');
$user = JFactory::getUser();
// @task: For the frontpage, we just show the the icons.
if ($current == 'komento') {
$submenus = array('komento' => JText::_('COM_KOMENTO_TAB_HOME'));
}
foreach ($submenus as $view => $title) {
// Check submenus to add based on JACL
if (!Komento::isJoomla15()) {
$jacl = $current === 'komento' ? 'core.manage' : 'komento.manage.' . $view;
if (!$user->authorise($jacl, 'com_komento')) {
continue;
}
}
$isActive = $current == $view;
$notification = '';
$count = 0;
switch ($view) {
case 'pendings':
$count = Komento::getModel('comments')->getCount('all', 'all', array('published' => 2));
break;
case 'reports':
$count = Komento::getModel('reports', true)->getTotal();
break;
示例5: if
</li>
</ul>
<div class="kmt-login-body">
<div class="float-r">
<button type="submit" class="input button kmt-login-button"><?php echo JText::_( 'COM_KOMENTO_LOGIN_BUTTON' ); ?></button>
</div>
<div class="float-r">
<?php if( JPluginHelper::isEnabled( 'system', 'remember' ) ) { ?>
<label for="remember">
<input id="remember" type="checkbox" name="remember" value="yes" alt="<?php echo JText::_( 'COM_KOMENTO_LOGIN_REMEMBER_ME' ); ?>" />
<span><?php echo JText::_( 'COM_KOMENTO_LOGIN_REMEMBER_ME' ); ?></span>
</label>
<?php } ?>
</div>
</div>
<?php if( Komento::isJoomla15() ){ ?>
<input type="hidden" value="com_user" name="option">
<input type="hidden" value="login" name="task">
<input type="hidden" name="return" value="<?php echo base64_encode( JRequest::getURI() ); ?>" />
<?php } else { ?>
<input type="hidden" value="com_users" name="option">
<input type="hidden" value="user.login" name="task">
<input type="hidden" name="return" value="<?php echo base64_encode( JRequest::getURI() ); ?>" />
<?php } ?>
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<div class="kmt-login-footer">
<a href="<?php echo Komento::getHelper( 'login' )->getRegistrationLink(); ?>" class="kmt-login-link link-register"><i></i><?php echo JText::_( 'COM_KOMENTO_LOGIN_REGISTER' ); ?></a>
<a href="<?php echo Komento::getHelper( 'login' )->getResetPasswordLink(); ?>" class="kmt-login-link link-forgot"><i></i><?php echo JText::_( 'COM_KOMENTO_LOGIN_FORGOT_PASSWORD' ); ?></a>
</div>
示例6: getContext
public function getContext()
{
if (Komento::isJoomla15()) {
return true;
}
// Entry view's context is definitely com_content.article
if ($this->isEntryView()) {
return 'com_tz_portfolio.comment';
}
// Due to a change in the latest Joomla (Joomla 2.5.14 and Joomla 3.1.5)
// The context in listing pages is no longer com_content.article
// Return array with all 3 context here to support prior Joomla version, as well as the latest Joomla version
if ($this->isListingView()) {
return array('com_tz_portfolio.article', 'com_tz_portfolio.category', 'com_tz_portfolio.featured');
}
return false;
}
示例7: getRemindUsernameLink
public function getRemindUsernameLink()
{
$config = Komento::getConfig();
$link = JRoute::_( 'index.php?option=com_users&view=remind' );
switch( $config->get( 'login_provider' ) )
{
case 'easysocial':
$es = Komento::getHelper( 'EasySocial' );
if( $es->exists() )
{
$link = FRoute::profile( array( 'layout' => 'forgetPassword' ) );
}
break;
default:
if( Komento::isJoomla15() )
{
$link = JRoute::_( 'index.php?option=com_user&view=remind' );
}
else
{
$link = JRoute::_( 'index.php?option=com_users&view=remind' );
}
break;
}
return $link;
}
示例8: getContext
public function getContext()
{
return Komento::isJoomla15() ? true : 'com_content.article';
}