Annonce

#1 2004-02-09 09:05:36

jacopis
Membre
2004-01-20
26

Affichage Images

Salut...

Je veux modifier l'ordre d'affichage de mes image en les classant par ordre alphabétique.

Pour cela j'ai changé

Code:

CODE  
$conf['order_by'] = " order by file asc"; 

à la place de 
CODE  
$conf['order_by'] = " order by date_available desc, file asc"; 

Cela ne marche pas.
Je pense que cela vient de mes categorie :
J'utilise 4 categories differentes et quand je les mais a jour, cela ne me les classe pas par ordre alphabétique.

Comment faire ??

Hors ligne

#2 2004-02-10 19:42:16

jacopis
Membre
2004-01-20
26

Re: Affichage Images

Je cherche toujours comment trier les sous categorie par ordre alphabétique.

Merci de pouvoir m'aider.

Hors ligne

#3 2004-02-10 22:18:03

plg
Équipe Piwigo
Nantes, France, Europe
2002-04-05
12644

Re: Affichage Images

attention à ne pas confondre l'ordre d'affichage des catégories avec celui des images !

Pour les catégories, c'est à toi de donner l'ordre que tu veux, via la partie administration.

Pour les images, c'est bien dans include/config.inc.php (1.3)


Les historiens ont établi que Pierrick était le premier utilisateur connu de Piwigo.

Hors ligne

#4 2004-02-11 10:16:43

jacopis
Membre
2004-01-20
26

Re: Affichage Images

Salut..

J'ai bien fait ce que tu ma dit mais sa ne marche toujours pas.

Voila mon fichier include/config.inc.php

Code:

<?php
/***************************************************************************
 *                              config.inc.php                             *
 *                            -------------------                          *
 *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
 *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
 *                                                                         *
 *   $Id: config.inc.php,v 1.17.2.1 2003/10/12 16:23:10 z0rglub Exp $
 *                                                                         *
 ***************************************************************************

 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation;                                         *
 *                                                                         *
 ***************************************************************************/
unset( $conf, $page, $user, $lang );
$conf = array();
$page = array();
$user = array();
$lang = array();

include_once( PREFIX_INCLUDE.'./include/functions.inc.php' );
include_once( PREFIX_INCLUDE.'./include/vtemplate.class.php' );
// How to change the order of display for images in a category ?
//
// You have to modify $conf['order_by'].
// There are several fields that can order the display :
//  - date_available : the date of the adding to the gallery
//  - file : the name of the file
// Once you've chosen which field(s) to use for ordering,
// you must chose the ascending or descending order for each field.
// examples :
// 1. $conf['order_by'] = " order by file asc";
//    will order pictures by date_available descending & by filename ascending
// 2. $conf['order_by'] = " order by file asc";
//    will only order pictures by file ascending
//    without taking into account the date_available

$conf['order_by'] = " order by file asc";


$conf['nb_image_row']       = array(2,3,4,5,6,7,8);
$conf['nb_row_page']        = array(2,3,4,5,6,7,10,20,1000);
$conf['slideshow_period']   = array(2,5,10);
$conf['last_days']          = array(1,2,3,10,30,365);
$conf['version']            = '1.3';
$conf['site_url']           = 'http://www.phpwebgallery.net';
$conf['forum_url']          = 'http://forum.phpwebgallery.net';
$conf['picture_ext']        = array('jpg','JPG','gif','GIF','png','PNG');
$conf['document_ext']       = array('doc','pdf','zip');
$conf['top_number']         = 10;
$conf['anti-flood_time']    = 60; // seconds between 2 comments : 0 to disable

database_connection();
// rertieving the configuration informations for site
// $infos array is used to know the fields to retrieve in the table "config"
// Each field becomes an information of the array $conf.
// Example :
//            prefix_thumbnail --> $conf['prefix_thumbnail']
$infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access',
                'session_id_size', 'session_keyword', 'session_time',
                'max_user_listbox', 'show_comments', 'nb_comment_page',
                'upload_available', 'upload_maxfilesize', 'upload_maxwidth',
                'upload_maxheight', 'upload_maxwidth_thumbnail',
                'upload_maxheight_thumbnail','log','comments_validation',
                'comments_forall','authorize_cookies','mail_notification' );

$query  = 'SELECT ';
foreach ( $infos as $i => $info ) {
  if ( $i > 0 ) $query.= ',';
  $query.= $info;
}
$query.= ' FROM '.PREFIX_TABLE.'config;';

$row = mysql_fetch_array( mysql_query( $query ) );

// affectation of each field of the table "config" to an information of the
// array $conf.
foreach ( $infos as $info ) {
  $conf[$info] = $row[$info];
  // If the field is true or false, the variable is transformed into a boolean
  // value.
  if ( $row[$info] == 'true' or $row[$info] == 'false' )
  {
    $conf[$info] = get_boolean( $row[$info] );
  }
}
?>

Dans mes sous categorie tout reste dans l'ordre d'envoie des images.
Ma gallerie http://www.mangawallpapers.net/gallerie

Hors ligne

#5 2004-02-13 13:12:06

jacopis
Membre
2004-01-20
26

Re: Affichage Images

Je cherche toujours...

Hors ligne

Pied de page des forums

Propulsé par FluxBB

github twitter newsletter Faire un don Piwigo.org © 2002-2024 · Contact