Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2487 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  [Joomla] Module "ANNONCES" modifier ORDER BY

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[Joomla] Module "ANNONCES" modifier ORDER BY

n°2001676
zenith
Là-haut perché dans la pensée.
Posté le 15-06-2010 à 10:07:55  profilanswer
 

Bonjour,  :hello:  
 
J'utilise un module qui s'appelle ANNONCES qui permet donc de publier en front end sous forme de tableau des annonces introduites dans la BD sql en back end. Je créer un site d'annonces de vente de moto.
 
Mon problème :
 
Ce module ne permet que de classer la première colonne qui est le Constructeur:
 

Code :
  1. PHP
  2. $this->setState('filter_order', JRequest::getCmd('filter_order', 'a.constructeur'));
  3. $this->setState('filter_order_dir', JRequest::getCmd('filter_order_Dir', 'ASC'));


 
 
 
Je souhaiterai classer la seconde colonne Cm3 en fonction de la première en DESC.
 
ce qui donne en SQL :
 

Code :
  1. $sql = "SELECT * FROM `nom_base` WHERE 1 ORDER BY `constructeur` ASC , `propriete1` DESC LIMIT 0, 30 ";


 
Mais comment modifié le code du module pour qu'il prenne en compte mon choix de classement ?
 
Merci
 
S'il faut d'autres précisions ou morceaux de code n'hésitez pas  :o  
 

mood
Publicité
Posté le 15-06-2010 à 10:07:55  profilanswer
 

n°2002396
erwan83
Du Shift DEL tu te méfieras !
Posté le 17-06-2010 à 09:03:15  profilanswer
 

oui oui le code entre les deux citations de ton post aiderait sans doute !
merci !


---------------
http://www.ypikay.com
n°2002427
zenith
Là-haut perché dans la pensée.
Posté le 17-06-2010 à 10:34:58  profilanswer
 

Ok alors voila le code du "model" de joomla :
 

Code :
  1. <?php
  2. /**
  3. * @version  1.0 simple ads - petites annonces $
  4. * @package  simple_ads_-_petites_annonces
  5. * @copyright Copyright © 2010 - All rights reserved.
  6. * @license  GNU/GPL
  7. * @author  Anthony JULOU
  8. * @author mail ajulou@yahoo.fr
  9. *
  10. *
  11. **/
  12. /* Hagen Graf - cocoate.com */
  13. // Check to ensure this file is included in Joomla!
  14. defined('_JEXEC') or die();
  15. jimport('joomla.application.component.model');
  16. /**
  17. *Auto Component Auto Model
  18. *
  19. */
  20. class AnnoncesModelAnnonces extends JModel
  21. {
  22. var $_total = null;
  23. var $_pagination = null;
  24. /**
  25.  * Constructeur
  26.  * @return unknown_type
  27.  */
  28. function __construct()
  29. {
  30.  parent::__construct();
  31.  global $mainframe;
  32.  $parametrage = Util::parametrage();
  33.  // Get the paramaters of the active menu item
  34.  $params  = & $mainframe->getParams();
  35.  //get the number of events from database
  36.  $limit        = $mainframe->getUserStateFromRequest('com_annonces.limit', 'limit', $parametrage->nbpage, 'int');
  37.  $limitstart  = JRequest::getInt('limitstart');
  38.  $this->setState('limit', $limit);
  39.  $this->setState('limitstart', $limitstart);
  40.  // Get the filter request variables
  41.  $this->setState('filter_order', JRequest::getCmd('filter_order', 'a.constructeur', 'a.propriete1'));
  42.  $this->setState('filter_order_dir', JRequest::getCmd('filter_order_Dir', 'ASC', 'DESC'));
  43. }
  44. /**
  45.  * Construit la requete SQL
  46.  * @param unknown_type $options
  47.  * @param unknown_type $parametres
  48.  * @return unknown_type
  49.  */
  50. function _getAutoQuery( &$options, $parametres )
  51. {
  52.  $db   = JFactory::getDBO();
  53.  $id   = @$options['id'];
  54.  $select = 'a.*, c.catname, c.showYear, c.showDimensions, c.showConstructor, u.name ';
  55.  $from = '#__annonces AS a ';
  56.  $orderby = $this->_buildCategoryOrderBy();
  57.  $wheres[] = 'c.published =1 and a.published = 1 AND a.approuved = 1';
  58.  $catid = @$options['categorie'];
  59.  if ( $catid )
  60.   $wheres[] = 'categorie = ' . (int) $catid;
  61.  if ( $parametres->published_days && $parametres->published_days != 0 ) 
  62.   $wheres [] = 'a.date > \'' . date( 'Y-m-d', strtotime("-".$parametres->published_days." day" )) .'\'';
  63.  $query = "SELECT " . $select .
  64.    "\n FROM " . $from .
  65.    "\n LEFT JOIN #__annonces_categories AS c ON c.id = a.categorie".
  66.    "\n LEFT JOIN #__users AS u ON a.vendeurId = u.id".
  67.    "\n WHERE " . implode( "\n  AND ", $wheres ).
  68.    "\n " . $this->filterWhere().
  69.    "\n " . $orderby;
  70.  return $query;
  71. }
  72. /**
  73.  *  
  74.  * @return unknown_type
  75.  */
  76. function filterWhere()
  77. {
  78.  $filter   = JRequest::getString('filter', '', 'request');
  79.  $filter_type  = JRequest::getWord('filter_type', '', 'request');
  80.  $where = "";
  81.  if ($filter)
  82.  {
  83.   // clean filter variables
  84.   $filter   = JString::strtolower($filter);
  85.   $filter   = $this->_db->Quote( '%'.$this->_db->getEscaped( $filter, true ).'%', false );
  86.   $filter_type  = JString::strtolower($filter_type);
  87.   $where = ' AND (';
  88.   $where .= ' LOWER( a.objet ) LIKE '.$filter;
  89.   $where .= ' OR LOWER( c.catname ) LIKE '.$filter;
  90.   $where .= ' OR LOWER( a.villeObjet ) LIKE '.$filter;
  91.   $where .= ' OR LOWER( a.description ) LIKE '.$filter;
  92.   $where .= ' )';
  93.  }
  94.  return $where;
  95. }
  96. /**
  97.  * Total nr of ads
  98.  *
  99.  * @access public
  100.  * @return integer
  101.  */
  102. function getTotal( $options, $parametres )
  103. {
  104.  if (empty($this->_total))
  105.  {
  106.   $query = $this->_getAutoQuery($options, $parametres);
  107.   $this->_total = $this->_getListCount($query);
  108.  }
  109.  return $this->_total;
  110. }
  111. /**
  112.  * Method to get a pagination object for the ads
  113.  *
  114.  * @access public
  115.  * @return integer
  116.  */
  117. function getPagination()
  118. {
  119.  if (empty($this->_pagination))
  120.  {
  121.   jimport('joomla.html.pagination');
  122.   $this->_pagination = new JPagination( $this->_total, $this->getState('limitstart'), $this->getState('limit') );
  123.  }
  124.  return $this->_pagination;
  125. }
  126. /**
  127.  * Construit la liste des annonces
  128.  * @param $options
  129.  * @param $parametres
  130.  * @return unknown_type
  131.  */
  132. function getListeAnnonces( $options=array(), $parametres )
  133. {
  134.  $query = $this->_getAutoQuery( $options, $parametres );
  135.  $result = $this->_getList( $query, $this->getState('limitstart'), $this->getState('limit') );
  136.  return @$result;
  137. }
  138. /**
  139.  * Build the order clause
  140.  *
  141.  * @access private
  142.  * @return string
  143.  */
  144. function _buildCategoryOrderBy()
  145. {
  146.  $filter_order  = $this->getState('filter_order');
  147.  $filter_order_dir = $this->getState('filter_order_dir');
  148.  $orderby  = ' ORDER BY '.$filter_order.' '.$filter_order_dir;
  149.  return $orderby;
  150. }
  151. /**
  152.  * Cherche les colonnes a afficher
  153.  * @param $listeAnnonces
  154.  * @return unknown_type
  155.  */
  156. function getShowColumns( $listeAnnonces )
  157. {
  158.  $show = new stdclass();
  159.  $show->showYear = false;
  160.  $show->showDimensions = false;
  161.  $show->showConstructor = true;
  162.  foreach ( $listeAnnonces as $annonce )
  163.  {
  164.   $show->showYear |= $annonce->showYear;
  165.   $show->showDimensions |= $annonce->showDimensions;
  166.  }
  167.  return $show;
  168. }
  169. /**
  170.  * Initialise la nouvelle categorie dans l'annonce
  171.  *  
  172.  * @param $annonce
  173.  * @param $categorie
  174.  * @return unknown_type
  175.  */
  176. function getListCategorieLiens( $catidSelected )
  177. {
  178.  if ( ! $catidSelected )
  179.   $catidSelected = 0;
  180.  $query = 'SELECT c.catname, c.id, COUNT(*) AS nb'
  181.  . ' FROM #__annonces_categories c '
  182.  . ' LEFT JOIN #__annonces a ON a.categorie = c.id'
  183.  . ' WHERE a.published = 1 and c.published=1'
  184.  . ' GROUP BY c.catname'
  185.  . ' ORDER BY c.ordering'
  186.  ;
  187.  $this->_db->setQuery( $query );
  188.  $listeCategorie = $this->_db->loadObjectList();
  189.  $listeLiens = array();
  190.  $tteCategorie = new stdclass();
  191.  $tteCategorie->libelle = JText::_('ALLE');
  192.  $tteCategorie->lien = 'index.php?option=com_annonces&view=annonces';
  193.  $listeLiens[] = $tteCategorie;
  194.  $total = 0;
  195.  foreach ( $listeCategorie as $categorie ) {
  196.   $uneCategorie = new stdclass();
  197.   $uneCategorie->libelle = $categorie->catname;
  198.   if ( $catidSelected != $categorie->id )
  199.    $uneCategorie->lien = 'index.php?option=com_annonces&view=annonces&catid='.$categorie->id;
  200.   else
  201.    $uneCategorie->lien = 'index.php?option=com_annonces&view=annonces&catid='.$categorie->id;
  202.   $uneCategorie->nbAnnonces = $categorie->nb;
  203.   $total+=$categorie->nb;
  204.   $listeLiens[] = $uneCategorie;
  205.  }
  206.  $tteCategorie->nbAnnonces = $total;
  207.  return $listeLiens;
  208. }
  209. }
  210. ?>


 
et voici le code du view.html.php
 

Code :
  1. <?php
  2. /**
  3. * @version  1.0 simple ads - petites annonces $
  4. * @package  simple_ads_-_petites_annonces
  5. * @copyright Copyright © 2010 - All rights reserved.
  6. * @license  GNU/GPL
  7. * @author  Anthony JULOU
  8. * @author mail ajulou@yahoo.fr
  9. *
  10. *
  11. **/
  12. /* Hagen Graf - cocoate.com - Nov. 2007 */
  13. jimport( 'joomla.application.component.view');
  14. /**
  15. * HTML View class for the auto Component
  16. */
  17. class AnnoncesViewAnnonces extends JView
  18. {
  19. function display($tpl = null)
  20. {
  21.  global $mainframe;
  22.  $document  = & JFactory::getDocument();
  23.  $user  =& JFactory::getUser();
  24.  $menu  = & JSite::getMenu();
  25.  $item     = $menu->getActive();
  26.  $model   = &$this->getModel();
  27.  $uri   = & JFactory::getURI();
  28.  $parametrage = Util::parametrage();
  29.  $catid = JRequest::getInt('catid', 0);
  30.  $lists = $this->_buildSortLists($parametrage);
  31.     $annonces     = $model->getListeAnnonces( array( 'categorie' => $catid ), $parametrage );
  32.     $showColumns = $model->getShowColumns( $annonces );
  33.     $total   = $model->getTotal( array( 'categorie' => $catid ), $parametrage );
  34.     $listeCategories = $model->getListCategorieLiens( $catid );
  35.     $limitstart  = JRequest::getInt('limitstart');
  36.  $limit        = $mainframe->getUserStateFromRequest('com_annonces.limit', 'limit', $parametrage->nbpage, 'int');
  37.  
  38.     $document->addStyleSheet($this->baseurl.'/components/com_annonces/assets/annonces.css');
  39.     // Create the pagination object
  40.  jimport('joomla.html.pagination');
  41.  $pageNav = new JPagination($total, $limitstart, $limit);
  42.  
  43.  // fil d'ariane
  44.  $pathway = $mainframe->getPathWay();
  45.  if ( isset( $item ) == false )
  46.   $pathway->addItem( JText::_("ADS" ), JRoute::_('index.php?view=annonces&view=annonces') );
  47.  $k = 0;
  48.  for($i = 0; $i <  count( $annonces ); $i++)
  49.  {
  50.   $annonce =& $annonces[$i];
  51.   //$contact->link = JRoute::_('index.php?option=com_contact&view=contact&id='.$contact->slug.'&catid='.$contact->catslug, false);
  52.   $annonce->odd = $k;
  53.   $annonce->count = $i;
  54.   $userVendeur = JFactory::getUser($annonce->vendeurId);
  55.   $annonce->vendeur = $userVendeur->name;
  56.   $annonce->vignette_url= Image::vignetteExists( $annonce->id, 1 );
  57.   $k = 1 - $k;
  58.  }
  59.  if ($lists['filter']) {
  60.   $uri->setVar('filter', $lists['filter']);
  61.  } else {
  62.   $uri->delVar('filter');
  63.  }
  64.  $this->assign('lists', $lists);
  65.  $this->assignRef('annonces'  , $annonces);
  66.  $this->assignRef('user'   , $user);
  67.  $this->assignRef('parametrage', $parametrage);
  68.  $this->assignRef('listeCategories', $listeCategories );
  69.  $this->assignRef('showColumns', $showColumns );
  70.  $this->assign('action', $uri->toString());
  71.  $this->assignRef('pageNav', $pageNav);
  72.  $this->assignRef('item', $item);
  73.  parent::display($tpl);
  74. }
  75. function _buildSortLists($parametrage)
  76. {
  77.  // Table ordering values
  78.  $filter_order  = JRequest::getCmd('filter_order', 'a.propriete1');
  79.  $filter_order_Dir = JRequest::getCmd('filter_order_Dir', 'DESC');
  80.  $filter    = JRequest::getString('filter');
  81.  $filter_type  = JRequest::getString('filter_type');
  82.  $sortselects = array();
  83.  $sortselects[] = JHTML::_('select.option', 'type', 'Type' );
  84.  $sortselect  = JHTML::_('select.genericlist', $sortselects, 'filter_type', 'size="1" class="inputbox"', 'value', 'text', $filter_type );
  85.  $lists['order_Dir']  = $filter_order_Dir;
  86.  $lists['order']   = $filter_order;
  87.  $lists['filter']   = $filter;
  88.  $lists['filter_type']  = $sortselect;
  89.  return $lists;
  90. }
  91. }
  92. ?>


 
et enfin le code du tmpl :
 

Code :
  1. <?php
  2. /**
  3. * @version  1.0 simple ads - petites annonces $
  4. * @package  simple_ads_-_petites_annonces
  5. * @copyright Copyright � 2010 - All rights reserved.
  6. * @license  GNU/GPL
  7. * @author  Anthony JULOU
  8. * @author mail ajulou@yahoo.fr
  9. *
  10. *
  11. **/
  12. /* Hagen Graf - cocoate.com - Nov. 2007 */
  13. defined('_JEXEC') or die('Restricted access');
  14. ?>
  15. <div class="componentheading"><?php echo JText::_( 'ADS' ); ?>
  16. </div>
  17. <div class="contentpane">
  18. <div style="margin-bottom:5px"><?php echo JText::_( 'INTRO_EXPLAIN' ); ?><br/>
  19. </div>
  20. <form action="<?php echo $this->action; ?>" method="post" id="adminForm">
  21. <?php if ( $this->parametrage->searchActive == true ) : ?>
  22. <div id="recherche_ads">
  23.  <label for="filter"><?php echo JText::_('SEARCH') ?>: </label>
  24.  <input type="text" name="filter" id="filter" value="<?php echo $this->lists['filter'];?>" class="text_area" onchange="document.getElementById('adminForm').submit();" />
  25.  <button onclick="document.getElementById('adminForm').submit();" class="button"><?php echo JText::_( 'OK' ); ?></button>
  26. </div>
  27. <?php endif; ?>
  28. <div id="categorie">
  29. <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="border: 1px dotted <?php echo $this->parametrage->headerBgColor?>">
  30. <tr>
  31.  <td class="sectiontableentry2"><strong><?php echo JText::_('CATEGORY')?>: </strong>
  32.  <?php
  33.   foreach ( $this->listeCategories as $uneCategorie ) { ?>
  34.    <a href="<?php echo $uneCategorie->lien ?>"><?php echo $uneCategorie->libelle ?>
  35.    (<?php echo $uneCategorie->nbAnnonces ?> )</a>-
  36.   <?php
  37.   }
  38.  ?>
  39.  </td>
  40. </tr>
  41. </table>
  42. </div>
  43. <script type="text/javascript">
  44. function tableOrdering( order, dir, view )
  45. {
  46.  var form = document.getElementById("adminForm" );
  47.  form.filter_order.value  = order;
  48.  form.filter_order_Dir.value = dir;
  49.  form.submit( view );
  50. }
  51. </script>
  52. <?php if ( count( $this->annonces) > 0 ) { ?>
  53. <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="border: 1px dotted <?php echo $this->parametrage->headerBgColor?>">
  54.  <tr class="sortable">
  55.             <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">&#160;</td>
  56.             <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  57.              <strong>
  58.               <?php echo JHTML::_('grid.sort', 'Marque', 'a.constructeur', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  59.              </strong>
  60.             </td>
  61.             <?php if ( $this->showColumns->showDimensions )  : ?>
  62.              <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  63.               <strong>
  64.                <?php echo JHTML::_('grid.sort', 'Size', 'a.longueur', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  65.               </strong>
  66.              </td>
  67.             <?php endif; ?>
  68.             <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  69.              <strong>
  70.               <?php echo JHTML::_('grid.sort', 'Cm3', 'a.propriete1', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  71.              </strong>
  72.             </td>
  73.   <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  74.              <strong>
  75.               <?php echo JHTML::_('grid.sort', 'Modèle', 'a.objet', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  76.              </strong>
  77.             </td>
  78.              <?php if ( $this->showColumns->showYear )  : ?>
  79.              <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  80.               <strong>
  81.                <?php echo JHTML::_('grid.sort', 'Year', 'a.annee', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  82.               </strong>
  83.              </td>
  84.             <?php endif; ?>
  85.   <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  86.              <strong>
  87.               <?php echo JHTML::_('grid.sort', 'Kms', 'a.propriete2', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  88.              </strong>
  89.             </td>
  90.   <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  91.              <strong>
  92.               <?php echo JHTML::_('grid.sort', 'Price', 'a.prix', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  93.              </strong>
  94.             </td>
  95.             <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">
  96.              <strong>
  97.               <?php echo JHTML::_('grid.sort', 'Stock', 'a.propriete4', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  98.              </strong>
  99.             </td>
  100.   <td class="sectiontableheader" style="background:<?php echo $this->parametrage->headerBgColor?>">&nbsp;</td>
  101.         </tr>
  102.         <?php  foreach ($this->annonces as $row)
  103.   {
  104.   ?>
  105.   <tr class="sectiontableentry<?php echo ($row->odd +1 )?>" >
  106.              <td><?php echo '<a href="'. JRoute::_('index.php?option=com_annonces&view=annonce&id='.$row->id.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">' ?><img src="<?php echo $row->vignette_url?>" alt="" /></a></td>
  107.             <td><?php echo '<a href="'. JRoute::_('index.php?option=com_annonces&view=annonce&id='.$row->id.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'"><strong>'. $row->constructeur .'</strong></a>'; ?>
  108.    </td>
  109.        <?php if ( $this->showColumns->showDimensions )  : ?>
  110.              <td align="center">
  111.               <?php if ( $row->showDimensions ) :?>
  112.                L: <?php echo number_format($row->longueur, 2, '.', ' ') . ' ' . $this->parametrage->metric ?><br />
  113.                l: <?php echo number_format($row->largeur, 2, '.', ' ') . ' ' . $this->parametrage->metric ?>
  114.               <?php endif;?>
  115.              </td>
  116.          <?php endif; ?>
  117.             <td>
  118.              <strong><?php echo str_replace(" ", utf8_encode("\xA0" ), number_format($row->propriete1, 0, '.', '')) ?></strong>
  119.             </td
  120.    ><td>
  121.                  <strong><?php echo ($row->objet) ?></strong>
  122.                 </td>
  123.                 <?php if ( $this->showColumns->showYear )  : ?>
  124.         <td>
  125.          <strong><?php echo ( $row->showYear ? $row->annee : '') ?></strong>
  126.            </td>
  127.          <?php endif; ?>
  128.    <td>
  129.              <strong><?php echo str_replace(" ", utf8_encode("\xA0" ), number_format($row->propriete2, 0, '.', '')) ?></strong>
  130.             </td>
  131.             <td>
  132.                  <strong><?php echo str_replace(" ", utf8_encode("\xA0" ), number_format($row->prix, 0, '.', ' ')) .'&nbsp;'. $this->parametrage->currency ?></strong>
  133.                 </td>
  134.    <td>
  135.         <strong><FONT color="green"><?php echo ($row->propriete4) ?></FONT></strong>
  136.          </td>
  137.          <td>
  138.              <div class="actionUser">
  139.               <?php echo Util::editLink( false, $row->vendeurId, JText::_('MODIFY'), 'edit', 'edit', $row->id, 'itemid'); ?>
  140.               <?php echo Util::editLink( false, $row->vendeurId, JText::_('DELETE'), 'annonces', 'delete', $row->id, 'itemid'); ?>
  141.     </div>
  142.               <?php echo '<a href="'. JRoute::_('index.php?option=com_annonces&view=annonce&id='.$row->id.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'" class="button">'. JText::_('DETAIL') .'</a>'; ?>
  143.             </td>
  144.   </tr>         
  145.   <?php } ?>
  146. </table>
  147. <div class="pageslinks" >
  148.  <?php echo $this->pageNav->getPagesLinks(); ?>
  149. </div>
  150. <input type="hidden" name="option" value="com_annonces" />
  151. <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  152. <input type="hidden" name="filter_order_Dir" value="" />
  153. <input type="hidden" name="view" value="annonces" />
  154. <input type="hidden" name="task" value="<?php echo $this->task; ?>" />
  155. <input type="hidden" name="id" value="<?php echo $this->categorie; ?>" />
  156. <input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
  157. </form>
  158. <?php } else { ?>
  159. <p><strong><?php echo JText::_('NO ADS') ?></strong></p>
  160. <?php } ?>
  161. <ul>
  162.      <li><?php echo JText::_('EXPLAIN1')?></li>
  163.      <?php if ( $this->parametrage->published_days != 0 ) : ?>
  164.       <li><?php echo JText::sprintf('EXPLAIN2', $this->parametrage->published_days)?></li>
  165.      <?php endif; ?>
  166. </ul>
  167. <?php if ($this->user->id != 0 && $this->parametrage->unableSubmitAdInList == true ) : ?>
  168.  <div align="right" style="margin-bottom:10px">
  169.   <form action="/index.php?option=com_annonces&view=edit&Itemid=<?php echo  JRequest::getVar('Itemid', 1, 'get', 'int')?>" method="post">
  170.    <input type="submit" class="button" value="<?php echo JText::_('DEPOT') ?>" />
  171.   </form>
  172.  </div>
  173. <?php endif; ?>
  174. </div>


 
En fait ça classe les colonnes quand on clique sur le titre de la colonne en ASC puis quand on reclique ça classe en DESC, je n'ai pas besoin de cette fonction et elle peut être supprimée.
 


Message édité par zenith le 17-06-2010 à 10:37:29
n°2231272
danydev
Posté le 18-06-2014 à 16:36:51  profilanswer
 

Salut j'utilise le même composant pour publier des annonces sur un site jommla 1.5. Mais là je dois upgrade mon site en joomla 2.5. Comment je peux upbgrade le composant s'il vous plait ?


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  [Joomla] Module "ANNONCES" modifier ORDER BY

 

Sujets relatifs
requêtes modifier et supprimer ??Probléme avec Joomla , admin
Comment faire 2 tris différents ORDER BY dans chaque SELECT avec UNION[C#][WOrd 2003] Modifier fichier Word
[Résolu] Tri personnalisé avec "order by"Module Commentaire Facebook
Modifier div par une selection d'une autre divmodifier visu url intranet
Plus de sujets relatifs à : [Joomla] Module "ANNONCES" modifier ORDER BY


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR