taille des intros de description en mode catégorie

More
14 years 4 months ago #1248 by xav33
j'essaie ! Et je vous dis...

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

More
14 years 4 months ago #1251 by xav33
Bon ben je viens d'essayer...donc :
1. j'ai bien le menu souhaité qui apparaît : cool :D
2. je ne sais pas m'en servir : car je n'arrive pas à faire apparaître qu'une partie de la description :(

En fait quand j'utilise le template blog de base je ne mets aucun champ dans la catégorie, uniquement dans l'item et là ça marche bien... les paramètres sont respectés.
Par contre si je fais pareil sur la catégorie ben rien ne se passe... seul le titre apparait ? Si je mets les champs dans le template catégorie dans ce cas j'ai toute la description qui apparait :?

Bon je suis un peu nul je sais mais je ne comprends pas :)

Ne serait-il pas mieux de créer la taille des intros et des textes dans le champ description ou les "textarea"

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

More
14 years 4 months ago #1253 by kim
ayé, j'ai une solution...

J'ai mis en "dur" une boucle qui va chercher ton texte et surlaquelle tu pourras faire joue-joue avec les paramètres.
Y'a peut-être une autre solution... (faut demander à Manu)

Je te file les fichiers.

Pour categoy-items.php
Code:
<?php /** * @version 1.5 beta 5 $Id: default_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; ?> <script type="text/javascript"> function tableOrdering( order, dir, task ) { var form = document.getElementById("adminForm"); form.filter_order.value = order; form.filter_order_Dir.value = dir; document.getElementById("adminForm").submit( task ); } </script> <?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->filters) : ?> <div class="fc_fright"> <?php 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 if ($this->items) : // routine to determine all used columns for this table $columns = array(); foreach ($this->items as $item) : if (isset($item->positions['table'])) : foreach ($item->positions['table'] as $pos) : if (!in_array($pos->name, $columns)) : $columns[$pos->name] = $item->fields[$pos->name]->label; endif; endforeach; endif; endforeach; ?> <table id="flexitable" class="flexitable" width="100%" border="0" cellspacing="0" cellpadding="0" summary="<?php echo $this->category->name; ?>"> <thead> <tr> <th id="flexi_title" scope="col"><?php echo JText::_( 'FLEXI_ITEMS' ); ?></th> <th id="flexi_title" scope="col"><?php echo JText::_( 'Description' ); ?></th> <?php foreach ($columns as $name => $label) : ?> <th id="field_<?php echo $name; ?>" scope="col"><?php echo $label; ?></th> <?php endforeach; ?> </tr> </thead> <tbody> <?php foreach ($this->items as $item) : ?> <tr class="sectiontableentry"> <!-- BOF item title --> <th scope="row" class="table-titles"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $this->category->slug)); ?>]<?php echo $this->escape($item->title); ?>[/url] <?php else : echo $this->escape($item->title); endif; ?> </th> <th scope="row" class="table-titles"> <?php if ($this->params->get('lead_strip_html', 1)) : echo flexicontent_html::striptagsandcut( $item->introtext, $this->params->get('lead_cut_text', 400) ); else : echo $item->introtext; endif; ?> </th> <!-- BOF item title --> <!-- BOF fields --> <?php foreach ($columns as $name => $label) : ?> <td><?php echo isset($item->positions['table']->{$name}->display) ? $item->positions['table']->{$name}->display : ''; ?></td> <?php endforeach; ?> <!-- EOF fields --> </tr> <?php endforeach; ?> </tbody> </table> <?php else : ?> <div class="noitems"><?php echo JText::_( 'FLEXI_NO_ITEMS_CAT' ); ?></div> <?php endif; ?>

Pour le category.xml (que tu peux simplifier si tu veux que le paramètre cut_text)
Code:
<?xml version="1.0" encoding="utf-8"?> <metadata> <author>Emmanuel Danan</author> <website>www.flexicontent.org</website> <email>emmanuel@vistamedia.fr</email> <license>GPLv2</license> <version>1.1</version> <release>25 november 2009</release> <description>Category layout similar to the Joomla blog layout. Title, description and image are set as category parameters</description> <params addpath="/administrator/components/com_flexicontent/elements"> <param name="@spacer" type="spacer" default="" label="" description="" /> <param name="@spacer" type="" default="" label="FLEXI_LEADING_ITEMS" description="FLEXI_LEADING_ITEMS_DESC" /> <param name="lead_strip_html" type="list" default="1" label="FLEXI_STRIP_HTML" description="FLEXI_STRIP_HTML_DESC"> <option value="0">No</option> <option value="1">Yes</option> </param> <param name="lead_cut_text" type="text" size="4" default="400" label="FLEXI_CUT_INTRO" description="FLEXI_CUT_INTRO_DESC" /> <param name="lead_use_image" type="list" default="1" label="FLEXI_USE_IMAGE" description="FLEXI_USE_IMAGE_DESC"> <option value="0">No</option> <option value="1">Yes</option> </param> <param name="lead_image" type="fcimage" size="10" default="" label="FLEXI_IMAGE_SOURCE" description="FLEXI_IMAGE_SOURCE_DESC" /> <param name="lead_position" type="list" default="1" label="FLEXI_IMAGE_POSITION" description="FLEXI_IMAGE_POSITION_DESC"> <option value="0">FLEXI_IMAGE_LEFT</option> <option value="1">FLEXI_IMAGE_RIGHT</option> </param> <param name="lead_link_image" type="list" default="1" label="FLEXI_LINK_IMAGE" description="FLEXI_LINK_IMAGE_DESC"> <option value="0">No</option> <option value="1">Yes</option> </param> <param name="lead_image_size" type="list" default="" label="FLEXI_INTRO_IMAGE_SIZE" description="FLEXI_INTRO_IMAGE_SIZE_DESC"> <option value="">FLEXI_USE_PARAMS</option> <option value="s">FLEXI_SMALL</option> <option value="m">FLEXI_MEDIUM</option> <option value="l">FLEXI_LARGE</option> </param> <param name="lead_width" type="text" size="4" default="180" label="FLEXI_IMAGE_WIDTH" description="FLEXI_IMAGE_WIDTH" /> <param name="lead_height" type="text" size="4" default="180" label="FLEXI_IMAGE_HEIGHT" description="FLEXI_IMAGE_HEIGHT" /> <param name="lead_method" type="list" default="0" label="FLEXI_PROCESSING_METHOD" description="FLEXI_PROCESSING_METHOD"> <option value="0">FLEXI_SCALE</option> <option value="1">FLEXI_CROP</option> </param> </params> <fieldgroups> <group>table</group> </fieldgroups> <csscategory> <file>css/category.css</file> </csscategory> <jscategory> </jscategory> </metadata>

En espérant que ca t'aidera pour la suite...

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

More
14 years 4 months ago #1255 by xav33
eh bien c'est ..... GENIAL !
Merci beaucoup Kim... bon maintenant que j'ai fait les copiés collés je vais prendre le temps de voir ce que tu as fait.
Vraiment merci.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.270 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