1
Installation, Update & Configuration / Re: Change category sortorder to left-right (row-based)
« on: June 03, 2008, 08:34:21 PM »
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!!!
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;
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!!!

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;