| Current Path : /home/cbequiperp/www/modules/mod_flexicontent/tmpl/ |
| Current File : /home/cbequiperp/www/modules/mod_flexicontent/tmpl/boulangerie.php |
<?php
/**
* $caching
* $ordering
* $count
* $featured
*
* // Display parameters
* $moduleclass_sfx
* $layout
* $add_ccs
* $add_tooltips
* $width
* $height
* // standard
* $display_title
* $link_title
* $display_date
* $display_text
* $mod_readmore
* $mod_use_image
* $mod_link_image
* // featured
* $display_title_feat
* $link_title_feat
* $display_date_feat
* $display_text_feat
* $mod_readmore_feat
* $mod_use_image_feat
* $mod_link_image_feat
*
* // Fields parameters
* $use_fields
* $display_label
* $fields
* // featured
* $use_fields_feat
* $display_label_feat
* $fields_feat
*
* // Custom parameters
* $custom1
* $custom2
* $custom3
* $custom4
* $custom5
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$tooltip_class = FLEXI_J30GE ? ' hasTooltip' : ' hasTip';
$mod_width_feat = (int)$params->get('mod_width_feat', 110);
$mod_height_feat = (int)$params->get('mod_height_feat', 110);
$mod_width = (int)$params->get('mod_width', 80);
$mod_height = (int)$params->get('mod_height', 80);
$hide_label_onempty_feat = (int)$params->get('hide_label_onempty_feat', 0);
$hide_label_onempty = (int)$params->get('hide_label_onempty', 0);
// Item Dimensions featured
$inner_inline_css_feat = (int)$params->get($layout.'_inner_inline_css_feat', 0);
$padding_top_bottom_feat = (int)$params->get($layout.'_padding_top_bottom_feat', 8);
$padding_left_right_feat = (int)$params->get($layout.'_padding_left_right_feat', 12);
$margin_top_bottom_feat = (int)$params->get($layout.'_margin_left_right_feat', 4);
$margin_left_right_feat = (int)$params->get($layout.'_margin_left_right_feat', 4);
$border_width_feat = (int)$params->get($layout.'_border_width_feat', 1);
// Item Dimensions standard
$inner_inline_css = (int)$params->get($layout.'_inner_inline_css', 0);
$padding_top_bottom = (int)$params->get($layout.'_padding_top_bottom', 8);
$padding_left_right = (int)$params->get($layout.'_padding_left_right', 12);
$margin_top_bottom = (int)$params->get($layout.'_margin_left_right', 4);
$margin_left_right = (int)$params->get($layout.'_margin_left_right', 4);
$border_width = (int)$params->get($layout.'_border_width', 1);
// *****************************************************
// Content placement and default image of featured items
// *****************************************************
$content_display_feat = $params->get($layout.'_content_display_feat', 0); // 0: always visible, 1: On mouse over / item active, 2: On mouse over
$content_layout_feat = $params->get($layout.'_content_layout_feat', 0); // 0/1: floated (right/left), 2/3: cleared (above/below), 4/5/6: overlayed (top/bottom/full)
$item_img_fit_feat = $params->get($layout.'_img_fit_feat', 0); // 0: Auto-fit, 1: Auto-fit and stretch to larger
switch ($content_layout_feat) {
case 0: case 1:
$img_container_class_feat = ($content_layout_feat==0 ? 'fc_float_left' : 'fc_float_right');
$content_container_class_feat = 'fc_floated';
break;
case 2: case 3:
$img_container_class_feat = 'fc_stretch fc_clear';
$content_container_class_feat = '';
break;
case 4: case 5: case 6:
$img_container_class_feat = 'fc_stretch';
$content_container_class_feat = 'fc_overlayed '
.($content_layout_feat==4 ? 'fc_top' : '')
.($content_layout_feat==5 ? 'fc_bottom' : '')
.($content_layout_feat==6 ? 'fc_full' : '')
;
if ($content_display_feat >= 1) $content_container_class_feat .= ' fc_auto_show';
if ($content_display_feat == 1) $content_container_class_feat .= ' fc_show_active';
break;
default: $img_container_class_feat = ''; break;
}
// *****************************************************
// Content placement and default image of standard items
// *****************************************************
$content_display = $params->get($layout.'_content_display', 0); // 0: always visible, 1: On mouse over / item active, 2: On mouse over
$content_layout = $params->get($layout.'_content_layout', 0); // 0/1: floated (right/left), 2/3: cleared (above/below), 4/5/6: overlayed (top/bottom/full)
$item_img_fit = $params->get($layout.'_img_fit', 0); // 0: Auto-fit, 1: Auto-fit and stretch to larger
switch ($content_layout) {
case 0: case 1:
$img_container_class = ($content_layout==0 ? 'fc_float_left' : 'fc_float_right');
$content_container_class = 'fc_floated';
break;
case 2: case 3:
$img_container_class = 'fc_stretch fc_clear';
$content_container_class = '';
break;
case 4: case 5: case 6:
$img_container_class = 'fc_stretch';
$content_container_class = 'fc_overlayed '
.($content_layout==4 ? 'fc_top' : '')
.($content_layout==5 ? 'fc_bottom' : '')
.($content_layout==6 ? 'fc_full' : '')
;
if ($content_display >= 1) $content_container_class .= ' fc_auto_show';
if ($content_display == 1) $content_container_class .= ' fc_show_active';
break;
default: $img_container_class = ''; break;
}
// *******************************
// Default image and image fitting
// *******************************
$mod_default_img_path = $params->get('mod_default_img_path', 'components/com_flexicontent/assets/images/image.png');
$img_path = JURI::base(true) .'/';
// image of FEATURED items, auto-fit and (optionally) limit to image max-dimensions to avoid stretching
$img_force_dims_feat=" width: 100%; height: auto; display: block !important; border: 0 !important;";
$img_limit_dims=" max-width:".$mod_width_feat."px; max-height:".$mod_height_feat."px;";
if ($item_img_fit_feat==0 || $content_layout_feat <= 1) {
$img_force_dims_feat .= $img_limit_dims;
}
// image of STANDARD items, auto-fit and (optionally) limit to image max-dimensions to avoid stretching
$img_force_dims=" width: 100%; height: auto; display: block !important; border: 0 !important;";
$img_limit_dims=" max-width:".$mod_width."px; max-height:".$mod_height."px;";
if ($item_img_fit==0 || $content_layout <= 1) {
$img_force_dims .= $img_limit_dims;
}
// Featured
$item_columns_feat = $params->get('item_columns_feat', 1);
$item_placement_feat = $params->get($layout.'_item_placement_feat', 0); // 0: cleared, 1: as masonry tiles
$cols_class_feat = ($item_columns_feat <= 1) ? '' : 'cols_'.$item_columns_feat;
// Standard
$item_placement_std = $params->get($layout.'_item_placement', 0); // -1: other, 0: cleared, 1: as masonry tiles
$item_columns_std = $params->get('item_columns', 2);
$cols_class_std = ($item_columns_std <= 1) ? '' : 'cols_'.$item_columns_std;
$document = JFactory::getDocument();
if ( ($item_placement_feat == 1 && $item_columns_feat > 1) || ($item_placement_std == 1 && $item_columns_std > 1) )
{
flexicontent_html::loadFramework('masonry');
flexicontent_html::loadFramework('imagesLoaded');
}
$container_id = $module->id . (count($catdata_arr)>1 && $catdata ? '_'.$catdata->id : '');
?>
<?php
$lang = JFactory::getLanguage();
$result = $lang->getTag();
?>
<section class="page-content parallax boulangerie">
<?php
// Display FavList Information (if enabled)
include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/favlist.php');
// Display Category Information (if enabled)
include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/category.php');
$ord_titles = array(
'popular'=>JText::_( 'FLEXI_MOST_POPULAR'),
'commented'=>JText::_( 'FLEXI_MOST_COMMENTED'),
'rated'=>JText::_( 'FLEXI_BEST_RATED' ),
'added'=> JText::_( 'FLEXI_RECENTLY_ADDED'),
'addedrev'=>JText::_( 'FLEXI_RECENTLY_ADDED_REVERSE' ),
'updated'=>JText::_( 'FLEXI_RECENTLY_UPDATED'),
'alpha'=> JText::_( 'FLEXI_ALPHABETICAL'),
'alpharev'=>JText::_( 'FLEXI_ALPHABETICAL_REVERSE'),
'id'=>JText::_( 'FLEXI_HIGHEST_ITEM_ID'),
'rid'=>JText::_( 'FLEXI_LOWEST_ITEM_ID'),
'catorder'=>JText::_( 'FLEXI_CAT_ORDER'),
'random'=>JText::_( 'FLEXI_RANDOM' ),
'field'=>JText::_( 'FLEXI_CUSTOM_FIELD' ),
0=>'Default' );
$separator = "";
$rowtoggler = 0;
foreach ($ordering as $ord) :
echo $separator;
if (isset($list[$ord]['featured']) || isset($list[$ord]['standard'])) {
$separator = "<div class='ordering_separator' ></div>";
} else {
$separator = "";
continue;
}
// PREPEND ORDER if using more than 1 orderings ...
$order_name = $ord ? $ord : 'default';
$uniq_ord_id = (count($list)>1 ? $order_name : '').$container_id;
?>
<div class="container">
<div class="row">
<section class="grid_12">
<section class="heading-centered triggerAnimation animated" data-animate="bounceIn">
<?php if ($result=="fr-FR") : ?><h2>En promotion</h2><?php endif; ?>
<?php if ($result=="en-GB") : ?><h2>On discount</h2><?php endif; ?>
<?php if ($result=="de-DE") : ?><h2>Werbeartikel</h2><?php endif; ?>
<div class="trait"> </div>
</section>
</section>
</div>
<?php if ($ordering_addtitle && $ord) : ?>
<div class='order_group_title'><?php echo $ord_titles[$ord]; ?></div>
<?php endif; ?>
<!-- -------------------------------------------------------------------------------------------------------------------- -->
<?php if (isset($list[$ord]['standard'])) : ?>
<!-- BOF standard items -->
<?php $rowcount = 0; ?>
<div class="row">
<?php $oe_class = $rowtoggler ? 'odd' : 'even'; $n=-1; ?>
<?php foreach ($list[$ord]['standard'] as $item) : ?>
<?php
if ($rowcount%$item_columns_std==0) {
$oe_class = $oe_class=='odd' ? 'even' : 'odd';
$rowtoggler = !$rowtoggler;
}
$rowcount++;
$n++;
?>
<!-- BOF current item -->
<article class="grid_4">
<a href="<?php echo $item->link; ?>">
<div class="triggerAnimation animated" data-animate="fadeInLeft">
<section class="process-box" style="min-height:240px;">
<?php ob_start(); ?>
<?php if ($mod_use_image && $item->image) : ?>
<div class="img-container">
<img src="<?php echo $item->image; ?>" alt="<?php echo flexicontent_html::striptagsandcut($item->fulltitle, 60); ?>" />
</div>
<?php endif; ?>
<?php $captured_image = ob_get_clean(); $hasImage = (boolean) trim($captured_image); ?>
<?php echo $content_layout!=2 ? $captured_image : '';?>
<h5 style="font-weight:bold;"><?php echo $item->title; ?></h5>
<?php if ($hasTitle || $display_date_feat || $display_text_feat || $display_hits_feat || $display_voting_feat || $display_comments_feat || $mod_readmore_feat || ($use_fields_feat && @$item->fields && $fields_feat)) : ?>
<div class="content_featured <?php echo $content_container_class_feat;?>">
<?php echo $captured_title; ?>
<?php if ($display_text_feat && $item->text) : ?>
<div class="fc_block fcitem_text">
<?php echo $item->text; ?>
</div>
<?php endif; ?>
<?php if ($use_fields_feat && @$item->fields && $fields_feat) : ?>
<div class="fc_block fcitem_fields">
<?php foreach ($item->fields as $k => $field) : ?>
<?php if ( $hide_label_onempty_feat && !strlen($field->display) ) continue; ?>
<div class="field_block field_<?php echo $k; ?>">
<div class="remise2"><?php echo $field->display; ?></div>
</div>
<?php endforeach; ?>
</div>
<div class="clearfix"></div>
</div> <!-- EOF item's content -->
<?php endif; ?>
</section>
<?php endif; ?>
<?php echo $content_layout==2 ? $captured_image : '';?>
</div>
</a>
</article><!-- EOF wrapper -->
<!-- EOF current item -->
<?php if ($item_placement_std==0) echo !($rowcount%$item_columns_std) ? '<div class="modclear"></div>' : ''; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php
// We need this inside the loop since ... we may have multiple orderings thus we may
// have multiple container (1 item list container per order) being effected by JS
$js = ''
;
if ($js) $document->addScriptDeclaration($js);
// ***********************************************************
// Module specific styling (we use names containing module ID)
// ***********************************************************
$css = ''.
/* CONTAINER of featured items */'
#mod_fcitems_box_featured_'.$uniq_ord_id.' {
}'.
/* CONTAINER of each featured item */'
#mod_fcitems_box_featured_'.$uniq_ord_id.' div.mod_flexicontent_standard_wrapper {
}'.
/* inner CONTAINER of each standard item */'
#mod_fcitems_box_featured_'.$uniq_ord_id.' div.mod_flexicontent_standard_wrapper_innerbox {
'.($inner_inline_css_feat ? '
padding: '.$padding_top_bottom_feat.'px '.$padding_left_right_feat.'px !important;
border-width: '.$border_width_feat.'px!important;
margin: '.$margin_top_bottom_feat.'px '.$margin_left_right_feat.'px !important;
' : '').'
}'.
/* CONTAINER of standard items */'
#mod_fcitems_box_standard_'.$uniq_ord_id.' {
}'.
/* CONTAINER of each standard item */'
#mod_fcitems_box_standard_'.$uniq_ord_id.' div.mod_flexicontent_standard_wrapper {
}'.
/* inner CONTAINER of each standard item */'
#mod_fcitems_box_standard_'.$uniq_ord_id.' div.mod_flexicontent_standard_wrapper_innerbox {
'.($inner_inline_css ? '
padding: '.$padding_top_bottom.'px '.$padding_left_right.'px !important;
border-width: '.$border_width.'px!important;
margin: '.$margin_top_bottom.'px '.$margin_left_right.'px !important;
' : '').'
}'.
''
;
if ($css) $document->addStyleDeclaration($css);
if ($item_placement_feat == 1 && $item_columns_feat > 1)
{
$js = "
jQuery(document).ready(function(){
var container = document.querySelector('div#mod_fcitems_box_featured_".$uniq_ord_id."');
var msnry;
// initialize Masonry after all images have loaded
if (container) {
imagesLoaded( container, function() {
msnry = new Masonry( container );
});
}
});
";
if ($js) $document->addScriptDeclaration($js);
}
if ($item_placement_std == 1 && $item_columns_std > 1)
{
$js = "
jQuery(document).ready(function(){
var container = document.querySelector('div#mod_fcitems_box_standard_".$uniq_ord_id."');
var msnry;
// initialize Masonry after all images have loaded
if (container) {
imagesLoaded( container, function() {
msnry = new Masonry( container );
});
}
});
";
if ($js) $document->addScriptDeclaration($js);
}
?>
<?php endforeach; ?>
<?php
// Display readon of module
include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/readon.php');
?>
</section>