article suivant dans une categorie en mode blog

More
13 years 10 months ago #13099 by rigot
comment avoir un menu "suivant" "precedendent" dans un article faisant parti d'une catégorie et affiché en mode blog, sans avoir a revenir a la page d'affichage de tous les article de la categorie?
merci de votre aide...

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

More
13 years 10 months ago #13102 by micker
hello lis ca
flexicontent.org/forum/index.php ... =viewtopic
a+

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
13 years 9 months ago #13276 by rigot
merci pour le tuyau, mais je ne parviens pas a le faire fonctioner
A quel emplacement du fichier item.php doit on insserrer le code proposé ? je l'ai ajouté a la fin du template "defaut"

Par rapport au template blog que j'utilise d'habitude, je n'ai pas l'affichage en mode "blog" mais un affichage en mode tableau quand je selectionne "defaut" pour la categorie concernée
Comment faire?

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

More
13 years 9 months ago #13279 by micker
a l'endroit ou tu veus qu'il s'affiche ..
post ton code entre les balise code pour voir

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
13 years 9 months ago #13297 by rigot
j'ai donc modifié le code du template "default" comme suit
Code:
<?php /** * @version 1.5 stable $Id: item.php 250 2010-06-09 08:01:27Z emmanuel.danan $ * @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; ?> <div id="flexicontent" class="flexicontent item<?php echo $this->item->id; ?> type<?php echo $this->item->type_id; ?>"> <!-- BOF buttons --> <p class="buttons"> <?php echo flexicontent_html::pdfbutton( $this->item, $this->params ); ?> <?php echo flexicontent_html::mailbutton( 'items', $this->params, null , $this->item->slug ); ?> <?php echo flexicontent_html::printbutton( $this->print_link, $this->params ); ?> <?php echo flexicontent_html::editbutton( $this->item, $this->params ); ?> </p> <!-- EOF buttons --> <!-- BOF page title --> <?php if ($this->params->get( 'show_page_title', 1 ) && $this->params->get('page_title') != $this->item->title) : ?> <h1 class="componentheading"> <?php echo $this->params->get('page_title'); ?> </h1> <?php endif; ?> <!-- EOF page title --> <!-- BOF item title --> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading flexicontent"> <?php echo $this->escape($this->item->title); ?> </h2> <?php endif; ?> <!-- EOF item title --> <!-- BOF subtitle1 block --> <?php if (isset($this->item->positions['subtitle1'])) : ?> <div class="lineinfo subtitle1"> <?php foreach ($this->item->positions['subtitle1'] 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 subtitle1 block --> <!-- BOF subtitle2 block --> <?php if (isset($this->item->positions['subtitle2'])) : ?> <div class="lineinfo subtitle2"> <?php foreach ($this->item->positions['subtitle2'] 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 subtitle2 block --> <!-- BOF subtitle3 block --> <?php if (isset($this->item->positions['subtitle3'])) : ?> <div class="lineinfo subtitle3"> <?php foreach ($this->item->positions['subtitle3'] 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 subtitle3 block --> <?php if ((isset($this->item->positions['image'])) || (isset($this->item->positions['top']))) : ?> <div class="topblock"> <!-- BOF image block --> <?php if (isset($this->item->positions['image'])) : ?> <?php foreach ($this->item->positions['image'] as $field) : ?> <div class="image field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="clear"></div> </div> <?php endforeach; ?> <?php endif; ?> <!-- EOF image block --> <?php if (isset($this->item->positions['top'])) : ?> <!-- BOF top block --> <div class="infoblock <?php echo $this->params->get('top_cols', 'two'); ?>cols"> <ul> <?php foreach ($this->item->positions['top'] as $field) : ?> <li> <div> <?php if ($field->label) : ?> <div class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></div> <?php endif; ?> <div class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> </li> <?php endforeach; ?> </ul> </div> <!-- EOF top block --> <?php endif; ?> </div> <?php endif; ?> <div class="clear"></div> <?php if (isset($this->item->positions['description'])) : ?> <!-- BOF description --> <div class="description"> <?php foreach ($this->item->positions['description'] as $field) : ?> <?php if ($field->label) : ?> <div class="desc-title"><?php echo $field->label; ?></div> <?php endif; ?> <div class="desc-content"><?php echo $field->display; ?></div> <?php endforeach; ?> </div> <!-- EOF description --> <?php endif; ?> <div class="clear"></div> <?php if (isset($this->item->positions['bottom'])) : ?> <!-- BOF bottom block --> <div class="infoblock <?php echo $this->params->get('bottom_cols', 'two'); ?>cols"> <ul> <?php foreach ($this->item->positions['bottom'] as $field) : ?> <li> <div> <?php if ($field->label) : ?> <div class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></div> <?php endif; ?> <div class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> </li> <?php endforeach; ?> </ul> </div> <!-- EOF bottom block --> <?php endif; ?> <?php if ($this->params->get('comments')) : ?> <!-- BOF comments --> <div class="comments"> <?php if ($this->params->get('comments') == 1) : if (file_exists(JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php')) : require_once(JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php'); echo JComments::showComments($this->item->id, 'com_flexicontent', $this->escape($this->item->title)); endif; endif; if ($this->params->get('comments') == 2) : if (file_exists(JPATH_SITE.DS.'plugins'.DS.'content'.DS.'jom_comment_bot.php')) : require_once(JPATH_SITE.DS.'plugins'.DS.'content'.DS.'jom_comment_bot.php'); echo jomcomment($this->item->id, 'com_flexicontent'); endif; endif; ?> </div> <!-- EOF comments --> <?php endif; ?> </div> <?php $html = ''; global $mainframe; $db = & JFactory::getDBO(); $user = & JFactory::getUser(); $uid = $this->item->id; $config = & JFactory::getConfig(); // Determine sort order //a.created //a.hits //a.ordering //f.ordering $orderby = 'a.title'; $query = 'SELECT a.id,a.title,a.introtext,' . ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,' . ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug' . ' FROM #__content AS a' . ' LEFT JOIN #__categories AS cc ON cc.id = a.catid' . ' WHERE a.catid = ' . (int) $this->item->catid . ' AND a.access <= ' .(int) $user->get('aid', 0) . ' ORDER BY '. $orderby; $db->setQuery($query); $list = $db->loadObjectList('id'); // this check needed if incorrect Itemid is given resulting in an incorrect result if ( !is_array($list) ) { $list = array(); } reset($list); // location of current content item in array list $location = array_search($this->item->id, array_keys($list)); //echo $location; $rows = array_values($list); $prev = array(); $next = array(); if ($location -1 >= 0) { // the previous content item cannot be in the array position -1 $prev = $rows[$location -1]; } if (($location +1) < count($rows)) { // the next content item cannot be in an array position greater than the number of array postions $next = $rows[$location +1]; } $pnSpace = ""; if (JText::_('&lt') || JText::_('&gt')) { $pnSpace = " "; } $prevlink=JRoute::_('index.php?option=com_flexicontent&view=items&cid='.$this->item->catid.'&id='.$prev->id); $nextlink=JRoute::_('index.php?option=com_flexicontent&view=items&cid='.$this->item->catid.'&id='.$next->slug); $limit = 1000; if ($prev) { $prevTitle=$prev->title; if (JString::strlen(strip_tags($prev->introtext)) > $limit) { $limit = JString::strpos(strip_tags($prev->introtext), " ", $limit); $prevIntro = JString::substr(strip_tags($prev->introtext), 0, $limit). '...'; } } else { $prev = ''; } if ($next) { $nextTitle=$next->title; if (JString::strlen(strip_tags($next->introtext)) > $limit) { $limit = JString::strpos(strip_tags($next->introtext), " ", $limit); $nextIntro = JString::substr(strip_tags($next->introtext), 0, $limit). '...'; } } else { $next = ''; } $header='<style type="text/css"> a.PageNav:link, a.PageNav:visited { padding: 2px 8px 2px 8px; color: #DB1919;} a.PageNav:hover {background-color: #DB1919; color: #1D1916;} </style>'; $mainframe->addCustomHeadTag($header); JHTML::_('behavior.tooltip'); if ($prev || $next) { $html = '<div class="pagenav"><hr/> '; if ($prev) { $html .= '<span class="hasTip" title="'.$prevIntro.'"><a href="'. $prevlink .'" class="PageNavPrev" title="'. $prevTitle. '"> '. $prevTitle. ' </span>'; } else { $html .= '<span>&nbsp;</span>'; } if ($next) { $html .= '<span class="hasTip" style="float:right;" title="'.$nextIntro.'"><a href="'. $nextlink .'" class="PageNavNext" title="'. $nextTitle .'"> '. $nextTitle .' </span>'; } else { $html .= '<span>&nbsp;</span>'; } $html .= '<hr/></div>'; echo $html; } ?>

mais je pense qu'il y a un autre pb, car je n'arrive pas a afficher en mode blog qd je selectione ce template (j'ai tj un affichage en mode tableau et je ne trouve pas comment faire pour avoir la liste des articles d'une categorie en mode blog reduit -ie avec bouton : lire la suite)

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

More
13 years 9 months ago #13342 by rigot
je ne parviens pas a faire marcher le code page suivant /precedente.

j'ai dupliqué le template "blog" en "blog1"
et inséré le code en bas du template "vue item"
est ce bien dans celui ci qu'il faut le faire?
car j'avais auparavant modifié le template "defaut" et cela ne marche pas non plus...

Je ne comprend pas le role de ces deux templates:blog et default.
qd blog/item est il utilise?
qd blog/ catégorie est il utilisé?
qd Default/item est il utilisé?
qd default/categorie est il utilisé?

rappel : je ch a afficher en mode blog le debut de tt les articles d'une categorie, et a l'ouverture par lire la suite d'un article, de disposer d'un possibilite de passer a l'article suivant/precedent de la categorie

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

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