本文整理汇总了PHP中RSMembershipHelper::isJ3方法的典型用法代码示例。如果您正苦于以下问题:PHP RSMembershipHelper::isJ3方法的具体用法?PHP RSMembershipHelper::isJ3怎么用?PHP RSMembershipHelper::isJ3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSMembershipHelper
的用法示例。
在下文中一共展示了RSMembershipHelper::isJ3方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_rsmembership/tables');
$document = JFactory::getDocument();
$config = RSMembershipConfig::getInstance();
$version = (string) new RSMembershipVersion();
// Load our CSS
$document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/rsmembership.css?v=' . $version);
// Load our JS
$document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/rsmembership.js?v=' . $version);
if (!RSMembershipHelper::isJ3()) {
// Load 2.5 CSS
$document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/j2.css?v=' . $version);
// Load Bootstrap on 2.5.x
if ($config->get('load_bootstrap')) {
$document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/bootstrap.min.css?v=' . $version);
$document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/jquery.min.js?v=' . $version);
$document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/jquery.noconflict.js?v=' . $version);
$document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/bootstrap.min.js?v=' . $version);
}
} else {
// Load 3.x CSS
$document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/j3.css?v=' . $version);
// Load Bootstrap on 3.x
if ($config->get('load_bootstrap')) {
JHtml::_('bootstrap.framework');
}
}
}
示例2: display
function display($tpl = null)
{
$app = JFactory::getApplication();
$params = clone $app->getParams('com_rsmembership');
$this->params = $params;
$this->item = $this->get('Item');
if (empty($this->item->id) || !$this->item->published) {
JError::raiseWarning(500, JText::_('COM_RSMEMBERSHIP_MEMBERSHIP_NOT_EXIST'));
$app->redirect(JRoute::_(RSMembershipRoute::Memberships()));
}
$currency = RSMembershipHelper::getConfig('currency');
// {price} placeholder
$price = RSMembershipHelper::getPriceFormat($this->item->price);
// {extras} placeholder
$viewclass = RSMembershipHelper::isJ3() ? 'JViewLegacy' : 'JView';
if ($viewclass == 'JView') {
jimport('joomla.application.component.view');
}
$view = new $viewclass(array('name' => 'extras', 'base_path' => JPATH_SITE . '/components/com_rsmembership'));
$view->model = JModelLegacy::getInstance('Extras', 'RSMembershipModel');
$view->extras = $view->model->getItems();
$view->item = $this->item;
$view->show_subscribe_btn = $this->item->stock == -1 ? false : true;
$this->extras = $view->loadTemplate();
$placeholders = array('{price}' => $price, '{buy}' => '', '{extras}' => '', '{stock}' => $this->item->stock > -1 ? $this->item->stock == 0 ? JText::_('COM_RSMEMBERSHIP_UNLIMITED') : $this->item->stock : JText::_('COM_RSMEMBERSHIP_OUT_OF_STOCK_PLACEHOLDER'), '<hr id="system-readmore" />' => '');
$replace = array_keys($placeholders);
$with = array_values($placeholders);
$this->item->description = str_replace($replace, $with, $this->item->description);
// prepare the Pathway
$pathway = $app->getPathway();
$this->Itemid = JFactory::getApplication()->input->get('Itemid', 0, 'int');
$layout = JFactory::getApplication()->input->get('layout', '', 'cmd');
if ($this->item->category_id) {
$pathway->addItem($this->item->category_name, JRoute::_(RSMembershipRoute::Memberships($this->item->category_id, $this->Itemid, $layout)));
}
$pathway->addItem($this->item->name, '');
// Title
if (!$params->get('page_title')) {
$this->document->setTitle($this->item->name);
} else {
$this->document->setTitle($params->get('page_title') . ' - ' . $this->item->name);
}
// Description
if ($params->get('menu-meta_description')) {
$this->document->setDescription($params->get('menu-meta_description'));
}
// Keywords
if ($params->get('menu-meta_keywords')) {
$this->document->setMetadata('keywords', $params->get('menu-meta_keywords'));
}
// Robots
if ($params->get('robots')) {
$this->document->setMetadata('robots', $params->get('robots'));
}
parent::display();
}
示例3: getListQuery
protected function getListQuery()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$layout = JFactory::getApplication()->input->get('layout', '', 'cmd');
$filter_word = $this->getState($this->context . '.filter.search', '');
$listOrdering = $this->getState('list.ordering', 'ordering');
$listDirection = $this->getState('list.direction', 'ASC');
switch ($layout) {
case 'article':
$query->select('a.*, ' . $db->qn('c.title', 'categorytitle'))->from($db->qn('#__content', 'a'))->join('left', $db->qn('#__categories', 'c') . ' ON ' . $db->qn('c.id') . ' = ' . $db->qn('a.catid'));
if ($filter_word) {
$query->where($db->qn('a.title') . ' LIKE ' . $db->q('%' . $filter_word . '%'));
}
$query->order($listOrdering . ' ' . $listDirection);
break;
case 'category':
$query->select('*')->from($db->qn('#__categories'))->where($db->qn('extension') . ' LIKE ' . $db->q('com_content'));
if ($filter_word) {
$query->where($db->qn('title') . ' LIKE ' . $db->q('%' . $filter_word . '%'));
}
$listOrdering = $db->qn('id');
// we don't have an ordering column for
$query->order($listOrdering . ' ' . $listDirection);
break;
case 'module':
$query->select('*')->from($db->qn('#__modules'));
if ($filter_word) {
$query->where($db->qn('title') . ' LIKE ' . $db->q('%' . $filter_word . '%') . ' OR ' . $db->qn('module') . ' LIKE ' . $db->q('%' . $filter_word . '%'));
}
$query->order($listOrdering . ' ' . $listDirection);
break;
case 'menu':
$query->select($db->qn('id') . ', ' . $db->qn('title', 'name') . ', ' . $db->qn('menutype') . ', ' . $db->qn('published'))->from($db->qn('#__menu', 'm'))->where($db->qn('published') . ' != ' . $db->q('-2') . ' AND ' . $db->qn('client_id') . ' = ' . $db->q('0') . ' AND ' . $db->qn('parent_id') . ' > ' . $db->q('0'));
if ($filter_word) {
$query->where($db->qn('title') . ' LIKE ' . $db->q('%' . $filter_word . '%') . ' OR ' . $db->qn('menutype') . ' LIKE ' . $db->q('%' . $filter_word . '%'));
}
if (RSMembershipHelper::isJ3()) {
$listOrdering = $db->qn('lft');
}
$query->order($listOrdering . ' ' . $listDirection);
break;
}
return $query;
}
示例4:
<table class="adminform table table-striped">
<tr>
<td width="100%">
<?php
echo JText::_('SEARCH');
?>
<input type="text" name="search" id="search" value="<?php
echo $this->filter_word;
?>
" class="text_area input input-normal" onChange="document.adminForm.submit();" />
<button onclick="this.form.submit();" class="btn btn-medium"><i class="icon-search"></i><?php
echo !RSMembershipHelper::isJ3() ? JText::_('Go') : '';
?>
</button>
<button onclick="this.form.getElementById('search').value='';this.form.submit();" class="btn btn-medium btn-warning" ><i class="icon-remove"></i><?php
echo !RSMembershipHelper::isJ3() ? JText::_('Reset') : '';
?>
</button>
</td>
<td nowrap="nowrap"></td>
</tr>
</table>
<div id="editcell1">
<table class="adminlist table table-striped">
<thead>
<tr>
<th width="5"><?php
echo JText::_('#');
?>
</th>
<th width="20"><input type="checkbox" name="checkall-toggle" value="" onclick="Joomla.checkAll(this);"/></th>
示例5:
?>
</td>
</tr>
</tfoot>
</table>
<?php
echo JHTML::_('form.token');
?>
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="extra_id" value="<?php
echo JFactory::getApplication()->input->get('extra_id', 0, 'int');
?>
" />
<input type="hidden" name="task" value="" />
<?php
if (!RSMembershipHelper::isJ3()) {
?>
<input type="hidden" name="filter_order" value="<?php
echo $listOrder;
?>
" />
<input type="hidden" name="filter_order_Dir" value="<?php
echo $listDirn;
?>
" />
<?php
}
?>
</div>
</form>
示例6: buildHead
public static function buildHead()
{
$doc = JFactory::getDocument();
$version = (string) new RSMembershipVersion();
$doc->addStyleSheet('components/com_rsmembership/assets/css/style.css?v=' . $version);
if (RSMembershipHelper::isJ3()) {
JHtml::_('jquery.framework', true);
$doc->addStyleSheet('components/com_rsmembership/assets/css/j3.css?v=' . $version);
} else {
$doc->addScript('components/com_rsmembership/assets/js/jquery.js');
$doc->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/jquery.noconflict.js');
$doc->addStyleSheet('components/com_rsmembership/assets/css/j2.css?v=' . $version);
}
$doc->addScript('components/com_rsmembership/assets/js/script.js?v=' . $version);
}