static function getListTour($params) { $xheight = $params->get('iheight', 200); $xwidth = $params->get('iwidth', 200); require_once JPATH_ROOT . '/administrator/components/com_bookpro/models/tours.php'; $source = $params->get('source', 'latest'); $model = new BookProModelTours(); $state = $model->getState(); $state->set('filter.days', $params->get('duration', null)); $state->set('filter.cat_id', $params->get('cat_id', null)); $state->set('filter.dest_id', $params->get('dest_id', null)); $state->set('filter.featured', $params->get('featured', null)); $state->set('list.limit', $params->get('count', null)); $state->set('list.start', 0); $state->set('filter.state', 1); $data = $model->getItems(); $config = JComponentHelper::getParams('com_bookpro'); $itemId = $params->get('Itemid'); foreach ($data as $i => $row) { $data[$i]->text = $data[$i]->description; $data[$i]->title = $row->title; $data[$i]->link = JRoute::_('index.php?option=com_bookpro&view=tour&id=' . $data[$i]->id . '&Itemid=' . $itemId); if ($data[$i]->img_path) { $thumb = AImage::thumb($data[$i]->img_path, $xwidth, $xheight); } else { $ipath = 'components/com_bookpro/assets/images/no_image.jpg'; $thumb = AImage::thumb($ipath, $xwidth, $xheight); } $data[$i]->image_html = '<img src="' . $thumb . '">'; } return $data; }
protected function getInput() { jimport('joomla.filesystem.folder'); $bar = JToolBar::getInstance('toolbar_image'); $bar->addButtonPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'toolbar'); /* @var $bar JToolBar */ $bar->appendButton('Popup', 'new1', 'Add', ARoute::view(VIEW_IMAGES, null, null, array('tmpl' => 'component', 'type' => '1')), 800, 600); $bar->appendButton('ALink', 'delete', 'Delete', 'javascript:AImages.removeMain()', 'imageMainRemove'); $html[] = $bar->render(); $thumb = AImage::thumb(BookProHelper::getIPath($this->image), null, ADMIN_SET_IMAGES_WIDTH); $html[] = '<img src="' . $thumb . '" alt="" id="imageMainSource" class="thumb' . $thumb ? '' : ' blind' . '" />'; if (!$thumb) { $html[] = ADocument::addDomreadyEvent('AImages.hideRemoveMain()'); } $html[] = '<input type="hidden" name="image" id="imageMainHidden" value="' . $this->escape($this->image) . '" />'; return implode("\n", $html); }
?> <legend><?php echo $this->title; ?> </legend> <?php } ?> <div class="row-fluid"> <?php $i = 0; foreach ($this->destinations as $dest) { $link = JRoute::_('index.php?option=com_bookpro&view=tours&dest_id=' . $dest->id . '&Itemid=' . $this->tour_itemid); //$ipath = BookProHelper::getIPath($dest->image); $thumb = AImage::thumb($dest->image, $this->width, $this->height); $model = new BookProModelTours(); $state = $model->getState(); $state->set('list.start', 0); $state->set('list.limit', 0); $state->set('filter.state', 1); $state->set('filter.dest_id', $dest->id); $numberTours = count($model->getItems()); if ($i == 0) { echo '<div class="row-fluid">'; } ?> <div class="span<?php echo 12 / $this->products_per_row; ?> ">
<?php AImporter::helper('tour'); ?> <div class="div2_overview_nav_tabs text-left"> <?php if ($displayData) { foreach ($displayData as $t => $data) { $thumb = AImage::thumb($data->image); $spanafter = 12; ?> <div class="itinerary-row"> <div class="row-fluid"> <?php if ($data->image) { $spanafter = 10; ?> <div class="span2"> <img src="<?php echo $data->image; ?> " alt="<?php echo $data->title; ?> " class="thumbnail" style="width:95%;"> </div > <?php } ?> <div class="span<?php echo $spanafter; ?>
<?php /** * @package Bookpro * @author Ngo Van Quan * @link http://joombooking.com * @copyright Copyright (C) 2011 - 2012 Ngo Van Quan * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * @version $Id$ **/ defined('_JEXEC') or die('Restricted access'); $configJ = JComponentHelper::getParams('com_bookpro'); $images = $displayData; $gall_with = $configJ->get('display_gallery_preview_subject_detail_width', 1600); $gall_height = $configJ->get('display_gallery_preview_subject_detail_height', 900); if (count($images) > 1) { ?> <div class="fotorama" data-nav="thumbs" data-width="100%" data-fit="cover" data-ratio="<?php echo $gall_with / $gall_height; ?> "> <?php for ($i = 0; $i < count($images); $i++) { $ipath = $images[$i]->path; $thumb = AImage::thumb($ipath, $gall_with, $gall_height); echo '<img src="' . $thumb . '">'; } ?> </div> <?php }