Changeset 11587 for trunk/include
- Timestamp:
- Jul 1, 2011, 3:19:35 PM (13 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r11511 r11587 107 107 @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php'); 108 108 } 109 110 // that's for migration from 2.2, will be deprecated in 2.4 111 if (isset($conf['order_by'])) 112 { 113 $conf['order_by_custom'] = $conf['order_by']; 114 } 115 if (isset($conf['order_by_inside_category'])) 116 { 117 $conf['order_by_inside_category_custom'] = $conf['order_by_inside_category']; 118 } 119 109 120 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 110 121 … … 143 154 144 155 load_plugins(); 156 157 // users can have defined a custom order pattern, incompatible with GUI form 158 if (isset($conf['order_by_custom'])) 159 { 160 $conf['order_by'] = $conf['order_by_custom']; 161 } 162 if (isset($conf['order_by_inside_category_custom'])) 163 { 164 $conf['order_by_inside_category'] = $conf['order_by_inside_category_custom']; 165 } 145 166 146 167 include(PHPWG_ROOT_PATH.'include/user.inc.php'); -
trunk/include/config_default.inc.php
r10685 r11587 44 44 // +-----------------------------------------------------------------------+ 45 45 46 // order_by : how to change the order of display for images in a category ? 47 // 48 // There are several fields that can order the display : 49 // 50 // - date_available : the date of the adding to the gallery 51 // - file : the name of the file 52 // - id : element identifier 53 // - date_creation : date of element creation 54 // 55 // Once you've chosen which field(s) to use for ordering, you must chose the 56 // ascending or descending order for each field. examples : 57 // 58 // 1. $conf['order_by'] = " order by date_available desc, file asc"; 59 // will order pictures by date_available descending & by filename ascending 60 // 61 // 2. $conf['order_by'] = " order by file asc"; 62 // will only order pictures by file ascending without taking into account 63 // the date_available 64 $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC'; 46 // order_by_custom and order_by_inside_category_custom : for non common pattern 47 // you can define special ORDER configuration 48 // 49 // $conf['order_by_custom'] = ' ORDER BY date_available DESC, file ASC, id ASC'; 65 50 66 51 // order_by_inside_category : inside a category, images can also be ordered 67 52 // by rank. A manually defined rank on each image for the category. 68 53 // 69 // In addition to fields of #images table, you can use the 70 // #image_category.rank column 71 // 72 // $conf['order_by_inside_category'] = ' ORDER BY rank'; 73 // will sort images by the manually defined rank of images in this album. 74 $conf['order_by_inside_category'] = $conf['order_by']; 54 // $conf['order_by_inside_category_custom'] = $conf['order_by_custom']; 75 55 76 56 // file_ext : file extensions (case sensitive) authorized
Note: See TracChangeset
for help on using the changeset viewer.