aide pour une option de trie supplémentaire dans un template

More
14 years 7 months ago #5916 by micker
le problème c'est que enlève les articles des mois d'avant ... donc les tableau se vides et les données ne sont accessible ... il faudrait que les articles ne soient plus dépublier pour que ca marche bien .....
t'aurais une autre idée ?
Merci pour aide

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #5919 by micker
hello je crois que je me pomme ...
le template de tableau fonctionne bien sauf peut être pour le changement d'année (ta plus d'infos ladessus ?)
la en fait je parler de faire un template d'accueil qui ne montre que les articles donc la date de fin n'ait pas passé
Code:
<?php /** * @version 1.5 beta 5 $Id: blog_items.php 85 2009-10-10 13:48:04Z vistamedia $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); // first define the template name $tmpl = $this->tmpl; ?> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search')) || ($this->params->get('show_alpha', 1))) : ?> <form action="<?php echo $this->action; ?>" method="post" id="adminForm"> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search'))) : ?> <div id="fc_filter" class="floattext"> <?php if ($this->params->get('use_search')) : ?> <div class="fc_fleft"> <input type="text" name="filter" id="filter" value="<?php echo $this->lists['filter'];?>" class="text_area" onchange="document.getElementById('adminForm').submit();" /> <button onclick="document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_GO' ); ?></button> <button onclick="document.getElementById('filter').value='';document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_RESET' ); ?></button> </div> <?php endif; ?> <?php if (($this->params->get('use_filters', 0)) && $this->filters) : ?> <div class="fc_fright"> <?php /* echo '<span class="filter">'; echo 'Saison: ' . $this->filters['field24']->html; echo '</span>'; */ foreach ($this->filters as $filt) : echo '<span class="filter">'; echo $filt->html; echo '</span>'; endforeach; ?> </div> <?php endif; ?> </div> <?php endif; ?> <?php if ($this->params->get('show_alpha', 1)) : echo $this->loadTemplate('alpha'); endif; ?> <input type="hidden" name="option" value="com_flexicontent" /> <input type="hidden" name="filter_order" value="<?php echo $this->lists['filter_order']; ?>" /> <input type="hidden" name="filter_order_Dir" value="" /> <input type="hidden" name="view" value="category" /> <input type="hidden" name="letter" value="" id="alpha_index" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="id" value="<?php echo $this->category->id; ?>" /> </form> <?php endif; ?> <?php $items = $this->items; $count = count($items); if ($count) : ?> <div class="content"> <?php $leadnum = $this->params->get('lead_num', 2); $leadnum = ($leadnum >= $count) ? $count : $leadnum; if ($this->limitstart == 0) : ?> <ul class="leadingblock"> <?php for ($i=0; $i<$leadnum; $i++) : ?> <li> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> <?php if ($this->params->get('lead_use_image', 1)) : if ($this->params->get('lead_image')) : if (isset($items[$i]->fields[$this->params->get('lead_image')]->value[0])) : $dir{$i} = $items[$i]->fields[$this->params->get('lead_image')]->parameters->get('dir'); $value{$i} = unserialize($items[$i]->fields[$this->params->get('lead_image')]->value[0]); $image{$i} = $value{$i}['originalname']; $scr{$i} = $dir{$i}.($this->params->get('lead_image_size') ? '/'.$this->params->get('lead_image_size').'_' : '/l_').$image{$i}; else : $scr{$i} = ''; endif; $src = $scr{$i}; else : $src = flexicontent_html::extractimagesrc($items[$i]); endif; $w = '&w=' . $this->params->get('lead_width', 200); $h = '&h=' . $this->params->get('lead_height', 200); $aoe = '&aoe=1'; $q = '&q=95'; $zc = $this->params->get('lead_method') ? '&zc=' . $this->params->get('lead_method') : ''; $conf = $w . $h . $aoe . $q . $zc; if (!$this->params->get('lead_image_size')) : $thumb = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.JURI::base(true).'/'.$src.$conf; else : $thumb = $src; endif; if ($src) : // case source ?> <div class="image<?php echo $this->params->get('lead_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('lead_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . $this->escape($items[$i]->title); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php endif; ?> <div class="clear"></div> </div> <?php endif; // case source endif; ?> <!-- BOF date block --> <?php if (isset($items[$i]->positions['date'])) : ?> <div class="date"> <?php foreach ($items[$i]->positions['date'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF date block --> <!-- BOF tarif block --> <?php if (isset($items[$i]->positions['tarif'])) : ?> <div class="tarif"> <?php foreach ($items[$i]->positions['tarif'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF tarif block --> <p> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $items[$i]->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $items[$i]->introtext; endif; ?> </p> <!-- BOF mp3 block --> <?php if (isset($items[$i]->positions['mp3'])) : ?> <div class="mp3"> <?php foreach ($items[$i]->positions['mp3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mp3 block --> <!-- BOF fnac block --> <?php if (isset($items[$i]->positions['fnac'])) : ?> <div id="fnac"> <?php foreach ($items[$i]->positions['fnac'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> </div> </li> <?php endfor; ?> </ul> <?php endif; if ($count > $leadnum || $this->limitstart != 0) : ?> <ul class="introblock <?php echo ($this->params->get('intro_cols', 2) == 1) ? 'one' : 'two'; ?>"> <?php for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : ?> <li class="<?php echo (($this->limitstart == 0) ? ($i+$leadnum)%2 : $i%2) ? 'even' : 'odd'; ?>"> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> <?php if ($this->params->get('intro_use_image', 1)) : if ($this->params->get('intro_image')) : if (isset($items[$i]->fields[$this->params->get('intro_image')]->value[0])) : $dir{$i} = $items[$i]->fields[$this->params->get('intro_image')]->parameters->get('dir'); $value{$i} = unserialize($items[$i]->fields[$this->params->get('intro_image')]->value[0]); $image{$i} = $value{$i}['originalname']; $scr{$i} = $dir{$i}.($this->params->get('intro_image_size') ? '/'.$this->params->get('intro_image_size').'_' : '/l_').$image{$i}; else : $scr{$i} = ''; endif; $src = $scr{$i}; else : $src = flexicontent_html::extractimagesrc($items[$i]); endif; $w = '&w=' . $this->params->get('intro_width', 200); $h = '&h=' . $this->params->get('intro_height', 200); $aoe = '&aoe=1'; $q = '&q=95'; $zc = $this->params->get('intro_method') ? '&zc=' . $this->params->get('intro_method') : ''; $conf = $w . $h . $aoe . $q . $zc; if (!$this->params->get('intro_image_size')) : $thumb = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.JURI::base(true).'/'.$src.$conf; else : $thumb = $src; endif; if ($src) : // case source ?> <div class="image<?php echo $this->params->get('intro_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('intro_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . $this->escape($items[$i]->title); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php endif; ?> <div class="clear"></div> </div> <?php endif; // case source endif; ?> <!-- BOF date block --> <?php if (isset($items[$i]->positions['date'])) : ?> <div class="date"> <?php foreach ($items[$i]->positions['date'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF above-description-line1 block --> <p> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $items[$i]->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $items[$i]->introtext; endif; ?> </p> <!-- BOF mp3 block --> <?php if (isset($items[$i]->positions['mp3'])) : ?> <div class="mp3"> <?php foreach ($items[$i]->positions['mp3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mp3 block --> <!-- BOF tarif block --> <?php if (isset($items[$i]->positions['tarif'])) : ?> <div class="tarif"> <?php foreach ($items[$i]->positions['tarif'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF tarif block --> <!-- BOF fnac block --> <?php if (isset($items[$i]->positions['fnac'])) : ?> <div class="fnac"> <?php foreach ($items[$i]->positions['fnac'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> </div> </li> <?php endfor; ?> </ul> <?php endif; ?> </div> <?php else : ?> <div class="noitems"><?php echo JText::_( 'FLEXI_NO_ITEMS_CAT' ); ?></div> <?php endif; ?>
je pensai à cette boucle ?
Code:
<?php $items = $this->items; $count = count($items); if ($count) : ?>
si je rajoute la comparaison des dates
Code:
<?php $now = date("Y-m-d"); $enddate = $item->fields['Dfin']->display; if ($enddate <= $now) { echo $items = $this->items; $count = count($items); if ($count); ?>
Mais ca ne marche pas ...je pense que c'est normal vus que je débute .. des idées de correction ?
Merci d'avance

ps ta vus j'essaie de faire du code ... quel débutant :|

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6262 by yopyop001
Salut,

Est-ce que tu fais bien ton test dans la boucle d'affichage des éléments?
c'est à dire:
entre ça :
Code:
<?php for ($i=0; $i<$leadnum; $i++) :
et ça :
Code:
<?php endfor; ?>

et/ou, entre ça :
Code:
<?php for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : ?>
et ça:
Code:
<?php endfor; ?>

En gros, remplacer:
Code:
<?php for ($i=0; $i<$leadnum; $i++) : ?>
par ça:
Code:
<?php for ($i=0; $i<$leadnum; $i++) : $enddate = $item[$i]->fields['Dfin']->display; if ($enddate <= $now) : ?> <li>...
en ajoutant
Code:
<?php endif; ?>
avant le
Code:
<?php endfor; ?>

et
Code:
<?php for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : ?>
par
Code:
<?php for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : $enddate = $item[$i]->fields['Dfin']->display; if ($enddate <= $now) : ?> <li class="...">
en ajoutant
Code:
<?php endif; ?>
avant le
Code:
<?php endfor; ?>

Sans oublier le
Code:
$now= date("Y-m-d")
(même format que celui de ton champs date Dfin) que tu peux mettre en début de ton fichier (après
Code:
$tmpl = $this->tmpl;
par exemple.

J'espère que je ne me suis pas trop embrouillé dans les explications.
A plus tard

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6281 by micker
cool merci je vais regarder tout ca !!!!
Mille merci encore

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #6422 by micker
hello alors je commencé à suivre la procedure
le template ne plante pas j'ai fait un echo de la date now et j'ai afficher la date de fin pour avoir une correspondance, les dates ont l'air ok par contre il m'affiche toujour les dates qui sont dépassés
le lien en direct
www.le-bijou.net/newbijou/
je te met le template actuel
Code:
<?php /** * @version 1.5 beta 5 $Id: blog_items.php 85 2009-10-10 13:48:04Z vistamedia $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); // first define the template name $tmpl = $this->tmpl; $now= date("Y-m-d"); ?> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search')) || ($this->params->get('show_alpha', 1))) : ?> <form action="<?php echo $this->action; ?>" method="post" id="adminForm"> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search'))) : ?> <div id="fc_filter" class="floattext"> <?php if ($this->params->get('use_search')) : ?> <div class="fc_fleft"> <input type="text" name="filter" id="filter" value="<?php echo $this->lists['filter'];?>" class="text_area" onchange="document.getElementById('adminForm').submit();" /> <button onclick="document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_GO' ); ?></button> <button onclick="document.getElementById('filter').value='';document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_RESET' ); ?></button> </div> <?php endif; ?> <?php if (($this->params->get('use_filters', 0)) && $this->filters) : ?> <div class="fc_fright"> <?php /* echo '<span class="filter">'; echo 'Saison: ' . $this->filters['field24']->html; echo '</span>'; */ foreach ($this->filters as $filt) : echo '<span class="filter">'; echo $filt->html; echo '</span>'; endforeach; ?> </div> <?php endif; ?> </div> <?php endif; ?> <?php if ($this->params->get('show_alpha', 1)) : echo $this->loadTemplate('alpha'); endif; ?> <input type="hidden" name="option" value="com_flexicontent" /> <input type="hidden" name="filter_order" value="<?php echo $this->lists['filter_order']; ?>" /> <input type="hidden" name="filter_order_Dir" value="" /> <input type="hidden" name="view" value="category" /> <input type="hidden" name="letter" value="" id="alpha_index" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="id" value="<?php echo $this->category->id; ?>" /> </form> <?php endif; ?> <?php $items = $this->items; $count = count($items); if ($count) : ?> <div class="content"> <?php $leadnum = $this->params->get('lead_num', 2); $leadnum = ($leadnum >= $count) ? $count : $leadnum; if ($this->limitstart == 0) : ?> <ul class="leadingblock"> <?php for ($i=0; $i<$leadnum; $i++) : $enddate = $item[$i]->fields['Dfin']->display; if ($enddate <= $now) : echo $now; ?> <li> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> <?php if ($this->params->get('lead_use_image', 1)) : if ($this->params->get('lead_image')) : if (isset($items[$i]->fields[$this->params->get('lead_image')]->value[0])) : $dir{$i} = $items[$i]->fields[$this->params->get('lead_image')]->parameters->get('dir'); $value{$i} = unserialize($items[$i]->fields[$this->params->get('lead_image')]->value[0]); $image{$i} = $value{$i}['originalname']; $scr{$i} = $dir{$i}.($this->params->get('lead_image_size') ? '/'.$this->params->get('lead_image_size').'_' : '/l_').$image{$i}; else : $scr{$i} = ''; endif; $src = $scr{$i}; else : $src = flexicontent_html::extractimagesrc($items[$i]); endif; $w = '&w=' . $this->params->get('lead_width', 200); $h = '&h=' . $this->params->get('lead_height', 200); $aoe = '&aoe=1'; $q = '&q=95'; $zc = $this->params->get('lead_method') ? '&zc=' . $this->params->get('lead_method') : ''; $conf = $w . $h . $aoe . $q . $zc; if (!$this->params->get('lead_image_size')) : $thumb = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.JURI::base(true).'/'.$src.$conf; else : $thumb = $src; endif; if ($src) : // case source ?> <div class="image<?php echo $this->params->get('lead_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('lead_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . $this->escape($items[$i]->title); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php endif; ?> <div class="clear"></div> </div> <?php endif; // case source endif; ?> <!-- BOF date block --> <?php if (isset($items[$i]->positions['date'])) : ?> <div class="date"> <?php foreach ($items[$i]->positions['date'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF date block --> <!-- BOF tarif block --> <?php if (isset($items[$i]->positions['tarif'])) : ?> <div class="tarif"> <?php foreach ($items[$i]->positions['tarif'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF tarif block --> <p> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $items[$i]->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $items[$i]->introtext; endif; ?> </p> <!-- BOF mp3 block --> <?php if (isset($items[$i]->positions['mp3'])) : ?> <div class="mp3"> <?php foreach ($items[$i]->positions['mp3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mp3 block --> <!-- BOF fnac block --> <?php if (isset($items[$i]->positions['fnac'])) : ?> <div id="fnac"> <?php foreach ($items[$i]->positions['fnac'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> </div> </li> <?php endif; ?> <?php endfor; ?> </ul> <?php endif; if ($count > $leadnum || $this->limitstart != 0) : ?> <ul class="introblock <?php echo ($this->params->get('intro_cols', 2) == 1) ? 'one' : 'two'; ?>"> <?php for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : $enddate = $item[$i]->fields['Dfin']->display; if ($enddate <= $now) : ?> <li class="<?php echo (($this->limitstart == 0) ? ($i+$leadnum)%2 : $i%2) ? 'even' : 'odd'; ?>"> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> <?php if ($this->params->get('intro_use_image', 1)) : if ($this->params->get('intro_image')) : if (isset($items[$i]->fields[$this->params->get('intro_image')]->value[0])) : $dir{$i} = $items[$i]->fields[$this->params->get('intro_image')]->parameters->get('dir'); $value{$i} = unserialize($items[$i]->fields[$this->params->get('intro_image')]->value[0]); $image{$i} = $value{$i}['originalname']; $scr{$i} = $dir{$i}.($this->params->get('intro_image_size') ? '/'.$this->params->get('intro_image_size').'_' : '/l_').$image{$i}; else : $scr{$i} = ''; endif; $src = $scr{$i}; else : $src = flexicontent_html::extractimagesrc($items[$i]); endif; $w = '&w=' . $this->params->get('intro_width', 200); $h = '&h=' . $this->params->get('intro_height', 200); $aoe = '&aoe=1'; $q = '&q=95'; $zc = $this->params->get('intro_method') ? '&zc=' . $this->params->get('intro_method') : ''; $conf = $w . $h . $aoe . $q . $zc; if (!$this->params->get('intro_image_size')) : $thumb = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.JURI::base(true).'/'.$src.$conf; else : $thumb = $src; endif; if ($src) : // case source ?> <div class="image<?php echo $this->params->get('intro_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('intro_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . $this->escape($items[$i]->title); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php endif; ?> <div class="clear"></div> </div> <?php endif; // case source endif; ?> <!-- BOF date block --> <?php if (isset($items[$i]->positions['date'])) : ?> <div class="date"> <?php foreach ($items[$i]->positions['date'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF above-description-line1 block --> <p> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $items[$i]->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $items[$i]->introtext; endif; ?> </p> <!-- BOF mp3 block --> <?php if (isset($items[$i]->positions['mp3'])) : ?> <div class="mp3"> <?php foreach ($items[$i]->positions['mp3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mp3 block --> <!-- BOF tarif block --> <?php if (isset($items[$i]->positions['tarif'])) : ?> <div class="tarif"> <?php foreach ($items[$i]->positions['tarif'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF tarif block --> <!-- BOF fnac block --> <?php if (isset($items[$i]->positions['fnac'])) : ?> <div class="fnac"> <?php foreach ($items[$i]->positions['fnac'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> </div> </li> <?php endif; ?> <?php endfor; ?> </ul> <?php endif; ?> </div> <?php else : ?> <div class="noitems"><?php echo JText::_( 'FLEXI_NO_ITEMS_CAT' ); ?></div> <?php endif; ?>

Merci pour aide

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #6427 by micker
hello en fait j'ai nettoyer mon code car je n'avais pas besoin des 2 boucles du template
je charge tout dans la boucle intro
ce qui donne
Code:
<?php /** * @version 1.5 beta 5 $Id: blog_items.php 85 2009-10-10 13:48:04Z vistamedia $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); // first define the template name $tmpl = $this->tmpl; $now= date("Y-m-d"); ?> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search')) || ($this->params->get('show_alpha', 1))) : ?> <form action="<?php echo $this->action; ?>" method="post" id="adminForm"> <?php if ((($this->params->get('use_filters', 0)) && $this->filters) || ($this->params->get('use_search'))) : ?> <div id="fc_filter" class="floattext"> <?php if ($this->params->get('use_search')) : ?> <div class="fc_fleft"> <input type="text" name="filter" id="filter" value="<?php echo $this->lists['filter'];?>" class="text_area" onchange="document.getElementById('adminForm').submit();" /> <button onclick="document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_GO' ); ?></button> <button onclick="document.getElementById('filter').value='';document.getElementById('adminForm').submit();"><?php echo JText::_( 'FLEXI_RESET' ); ?></button> </div> <?php endif; ?> <?php if (($this->params->get('use_filters', 0)) && $this->filters) : ?> <div class="fc_fright"> <?php /* echo '<span class="filter">'; echo 'Saison: ' . $this->filters['field24']->html; echo '</span>'; */ foreach ($this->filters as $filt) : echo '<span class="filter">'; echo $filt->html; echo '</span>'; endforeach; ?> </div> <?php endif; ?> </div> <?php endif; ?> <?php if ($this->params->get('show_alpha', 1)) : echo $this->loadTemplate('alpha'); endif; ?> <input type="hidden" name="option" value="com_flexicontent" /> <input type="hidden" name="filter_order" value="<?php echo $this->lists['filter_order']; ?>" /> <input type="hidden" name="filter_order_Dir" value="" /> <input type="hidden" name="view" value="category" /> <input type="hidden" name="letter" value="" id="alpha_index" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="id" value="<?php echo $this->category->id; ?>" /> </form> <?php endif; ?> <?php $items = $this->items; $count = count($items); if ($count) : ?> <div class="content"> <?php $leadnum = $this->params->get('lead_num', 2); $leadnum = ($leadnum >= $count) ? $count : $leadnum; if ($this->limitstart == 0) : ?> <ul class="leadingblock"> <?php for ($i=0; $i<$leadnum; $i++) : $enddate = $item[$i]->fields['Dfin']->display; if ($enddate <= $now) : echo $now; ?> <li> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> <?php if ($this->params->get('lead_use_image', 1)) : if ($this->params->get('lead_image')) : if (isset($items[$i]->fields[$this->params->get('lead_image')]->value[0])) : $dir{$i} = $items[$i]->fields[$this->params->get('lead_image')]->parameters->get('dir'); $value{$i} = unserialize($items[$i]->fields[$this->params->get('lead_image')]->value[0]); $image{$i} = $value{$i}['originalname']; $scr{$i} = $dir{$i}.($this->params->get('lead_image_size') ? '/'.$this->params->get('lead_image_size').'_' : '/l_').$image{$i}; else : $scr{$i} = ''; endif; $src = $scr{$i}; else : $src = flexicontent_html::extractimagesrc($items[$i]); endif; $w = '&w=' . $this->params->get('lead_width', 200); $h = '&h=' . $this->params->get('lead_height', 200); $aoe = '&aoe=1'; $q = '&q=95'; $zc = $this->params->get('lead_method') ? '&zc=' . $this->params->get('lead_method') : ''; $conf = $w . $h . $aoe . $q . $zc; if (!$this->params->get('lead_image_size')) : $thumb = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.JURI::base(true).'/'.$src.$conf; else : $thumb = $src; endif; if ($src) : // case source ?> <div class="image<?php echo $this->params->get('lead_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('lead_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $this->category->slug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . $this->escape($items[$i]->title); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo $this->escape($items[$i]->title); ?>" /> <?php endif; ?> <div class="clear"></div> </div> <?php endif; // case source endif; ?> <!-- BOF date block --> <?php if (isset($items[$i]->positions['date'])) : ?> <div class="date"> <?php foreach ($items[$i]->positions['date'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF date block --> <!-- BOF tarif block --> <?php if (isset($items[$i]->positions['tarif'])) : ?> <div class="tarif"> <?php foreach ($items[$i]->positions['tarif'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF tarif block --> <p> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $items[$i]->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $items[$i]->introtext; endif; ?> </p> <!-- BOF mp3 block --> <?php if (isset($items[$i]->positions['mp3'])) : ?> <div class="mp3"> <?php foreach ($items[$i]->positions['mp3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mp3 block --> <!-- BOF fnac block --> <?php if (isset($items[$i]->positions['fnac'])) : ?> <div id="fnac"> <?php foreach ($items[$i]->positions['fnac'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> </div> </li> <?php endif; ?> <?php endfor; ?> </ul> <?php endif; ?> </div> <?php else : ?> <div class="noitems"><?php echo JText::_( 'FLEXI_NO_ITEMS_CAT' ); ?></div> <?php endif; ?>
Mais ca marche toujour pas (j'ai essayer des == strict mais rien ne bouge)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.488 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline