function display($cachable = true, $urlparams = null) { $app = JFactory::getApplication(); $view = $app->input->get('view'); $id = $app->input->getInt('id'); if ($view == 'itemform' && !$this->checkEditId('com_djcatalog2.edit.itemform', $id)) { $app->redirect(JRoute::_(DJCatalogHelperRoute::getMyItemsRoute(), false), JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); return true; } $noncachable = array('itemform', 'myitems', 'cart', 'order', 'orders', 'quote'); if (in_array($view, $noncachable)) { $cachable = false; } DJCatalog2ThemeHelper::setThemeAssets(); $urlparams = array('id' => 'STRING', 'cid' => 'STRING', 'pid' => 'STRING', 'aid' => 'STRING', 'search' => 'STRING', 'task' => 'STRING', 'order' => 'STRING', 'dir' => 'STRING', 'cm' => 'INT', 'l' => 'STRING', 'Itemid' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'start' => 'UINT', 'lang' => 'CMD', 'tmpl' => 'CMD', 'ind' => 'RAW', 'template' => 'STRING', 'price_from' => 'STRING', 'price_to' => 'STRING', 'type' => 'STRING', 'print' => 'INT', 'pdf' => 'INT', 'layout' => 'STRING', 'ms_unit' => 'STRING', 'ms_radius' => 'INT', 'mapsearch' => 'STRING', 'eid' => 'STRING', 'ecid' => 'STRING'); $db = JFactory::getDbo(); $db->setQuery('select alias from #__djc2_items_extra_fields where type=\'checkbox\' or type=\'radio\' or type=\'select\''); $extra_fields = $db->loadColumn(); if (count($extra_fields) > 0) { foreach ($extra_fields as $extra_field) { $urlparams['f_' . $extra_field] = 'RAW'; // stupid, stupid, stupid me $urlparams[str_replace('-', '_', 'f_' . $extra_field)] = 'RAW'; } } parent::display($cachable, $urlparams); }
public function __construct($config = array()) { parent::__construct($config); $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/query'); $theme = DJCatalog2ThemeHelper::getThemeName(); if ($theme && $theme != 'default') { $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/query'); } }
public function __construct($config = array()) { parent::__construct($config); $app = JFactory::getApplication(); $theme = DJCatalog2ThemeHelper::getThemeName(); // Items view fallback $this->_addPath('template', JPATH_COMPONENT . '/views/items/tmpl'); $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_djcatalog2/items'); $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/items'); if ($theme && $theme != 'default') { $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/items'); } $this->_addPath('template', JPATH_COMPONENT . '/views/archived/tmpl'); $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_djcatalog2/archived'); $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/archived'); if ($theme && $theme != 'default') { $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/archived'); } }
} ?> <div id="djcatalog" class="djc_archived_list djc_list<?php echo $this->params->get('pageclass_sfx') . ' djc_theme_' . $this->params->get('theme', 'default'); ?> "> <?php if (!empty($this->feedlink) && $this->params->get('rss_feed_icon', 0) == '1' && $this->params->get('rss_enabled', '1') == '1' && !($this->params->get('showcatdesc') && $this->item && $this->item->id > 0)) { ?> <a class="djc_rss_link" href="<?php echo $this->feedlink; ?> "><img alt="RSS" src="<?php echo DJCatalog2ThemeHelper::getThemeImage('rss_icon.png'); ?> " /></a> <?php } ?> <?php if (count($this->items) > 0 && ($this->params->get('show_category_orderby') > 0 || $this->params->get('show_producer_orderby') > 0 || $this->params->get('show_name_orderby') > 0 || $this->params->get('show_price_orderby') > 0 || count($this->sortables) > 0)) { ?> <div class="djc_order djc_clearfix"> <?php echo $this->loadTemplate('order'); ?> </div> <?php
* */ defined('_JEXEC') or die('Restricted access'); if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); } require_once dirname(__FILE__) . DS . 'helper.php'; require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'defines.djcatalog2.php'; require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'route.php'; require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'html.php'; require_once JPATH_BASE . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'theme.php'; require_once JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_djcatalog2' . DS . 'lib' . DS . 'categories.php'; require_once JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_djcatalog2' . DS . 'helpers' . DS . 'image.php'; $document = JFactory::getDocument(); $module_id = $module->id; DJCatalog2ThemeHelper::setThemeAssets(); $module_css = array(); $module_float = $params->get('module_float', ''); $module_width = $params->get('module_width', ''); $module_height = $params->get('module_height', ''); $module_text_align = $params->get('module_text_align', ''); if ($module_float == 'left') { $module_css[] = 'float: left;'; //$module_css[] = 'clear: right;'; $module_css[] = 'margin: auto;'; } else { if ($module_float == 'right') { $module_css[] = 'float: right;'; //$module_css[] = 'clear: left;'; $module_css[] = 'margin: auto;'; }
" title="<?php echo JText::_('COM_DJCATALOG2_GRID_LAYOUT'); ?> "><img src="<?php echo DJCatalog2ThemeHelper::getThemeImage('grid.png'); ?> " alt="<?php echo JText::_('COM_DJCATALOG2_GRID_LAYOUT'); ?> " /></a></li> <li><a class="btn<?php if ($active == 'table') { echo ' active'; } ?> " href="<?php echo JRoute::_($layoutUrl . '&l=table'); ?> " title="<?php echo JText::_('COM_DJCATALOG2_TABLE_LAYOUT'); ?> "><img src="<?php echo DJCatalog2ThemeHelper::getThemeImage('table.png'); ?> " alt="<?php echo JText::_('COM_DJCATALOG2_TABLE_LAYOUT'); ?> " /></a></li> </ul> </div>
echo $this->params->get('social_code'); ?> </div> <?php } ?> <?php $this->item->images = DJCatalog2ImageHelper::getImages('item', $this->item->id); if ($this->item->images && (int) $this->params->get('show_image_item', 1) > 0) { echo $this->loadTemplate('images'); } ?> <h2 class="djc_title"> <?php if ($this->item->featured == 1) { echo '<img class="djc_featured_image" alt="' . JText::_('COM_DJCATALOG2_FEATURED_ITEM') . '" title="' . JText::_('COM_DJCATALOG2_FEATURED_ITEM') . '" src="' . DJCatalog2ThemeHelper::getThemeImage('featured.png') . '" />'; } ?> <?php if ((int) $this->params->get('fed_edit_button', 0) == 1 && $edit_auth) { ?> <a class="btn btn-primary btn-mini button djc_edit_button" href="<?php echo JRoute::_('index.php?option=com_djcatalog2&task=itemform.edit&id=' . $this->item->id); ?> "><?php echo JText::_('COM_DJCATALOG2_EDIT'); ?> </a> <?php } ?>
public static function orderDirImage($order_current, $order = 'i.ordering', $dir = 'asc') { if ($dir == 'desc') { $dir = 'asc'; } else { $dir = 'desc'; } if ($order_current == $order) { return '<img class="djcat_order_dir" alt="' . $dir . '" src="' . DJCatalog2ThemeHelper::getThemeImage($dir . '.png') . '" />'; } else { return ''; } }
} ?> <?php if ($user->authorise('core.delete', 'com_djcatalog2') || $user->authorise('core.delete.own', 'com_djcatalog2')) { ?> <a class="djc_formbutton djc_button_delete" href="<?php echo JRoute::_('index.php?option=com_djcatalog2&task=myitems.delete&id=' . $item->id . '&' . JSession::getFormToken() . '=1'); ?> " onclick="return confirm('<?php echo $this->escape(JText::_('COM_DJCATALOG2_DELETE_CONFIRM_MSG')); ?> ');"> <img src="<?php echo DJCatalog2ThemeHelper::getThemeImage('btn_delete.png'); ?> " alt="<?php echo JText::_('COM_DJCATALOG2_DELETE'); ?> " /> <span><?php echo JText::_('COM_DJCATALOG2_DELETE'); ?> </span> </a> <?php } ?> </td> </tr>
public static function getThemeName() { if (!self::$themeName) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); //$params = $app->getParams('com_djcatalog2'); $params = Djcatalog2Helper::getParams(); self::$themeName = $params->get('theme', 'bootstrapped'); } return self::$themeName; }