4images Forum & Community
4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: thevilone on June 02, 2008, 09:55:31 PM
-
Hi All,
I would like to change the automatic category sortorder.
Currently, the overview page sorts the categories columnbased. As we use the gallery for displaying party-images, this results in the most recent parties to be displayed on the lower half of the page.
I would the categories to be sorted row-based. To make it a more understandable, here's an example:
Current situation:
Party01 Party05 Party09
Party02 Party06 Party10
Party03 Party07 Party11
Party04 Party08 Party12
What I would Like:
Party01 Party02 Party03
Party04 Party05 Party06
Party07 Party08 Party09
Party10 Party11 Party12
Many thanks for your follow-up!
-
... there is a modification by v@no here in the forum exactly for your request ...
... but I can't find the thread to give you a link ... sorry ...
-
Hi Mawenzi,
An advanced search with the username you provided drastically limited the number of search results, after only a few minutes I was able to find the solution! Thanks BIG TIME!!! :D
For all you out there looking for the same, here's how to do it:
In includes/functions.php find:
Code:
foreach ($visible_cat_cache as $key => $category_id) {
$categories .= "<tr>\n<td valign=\"top\">\n";
Replace with Code:
$categories .= "<tr>\n";
foreach ($visible_cat_cache as $key => $category_id) {
$categories .= "<td valign=\"top\">\n";
Find Code:
$categories .= "</td>\n</tr>\n";
if ($count == $table_rows && $count2 < sizeof($visible_cat_cache)) {
$categories .= "</table></td>\n";
$categories .= "<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
$categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";
$total = $total - $count2;
$table_columns = $table_columns - 1;
Replace with Code:
$categories .= "</td>\n";
if ($count == $table_columns && $count2 < sizeof($visible_cat_cache)) {
$categories .= "</tr>\n<tr>\n";
$total = $total - $count2;
$table_rows = $table_rows - 1;