4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Sebas Bonito on June 24, 2009, 04:22:27 PM
-
How to modify the category-box in the home/start?
I'd like to have this way of the box in the home.html:
CATEGORY-TITLE
DROPDOWN-LIST
I've already changed the admin-settings to show 2 categories in each line.
And the Dropdown-Menu should be the same like at the bottom.
So the difficult is: How to limit the cats on the homepage to the only 4 newest?
Update:
I guess it's in the functions.php an the function get_categories
...and around the "foreach"... there how to change to 2 or 4 loops, instead of listening all?
-
Noone an idea? :?
-
I got it :D
Find this part in the functions.php and the function get_categories
$count++;
$count2++;
$categories .= "</td>\n";
After this add
if($count == 2) break;
The number is how many cats will appear on the home.
There are two probs in this case... it works, BUT
1. not only on home, also IN the categories it will cut the subcategories
2. Only 2, 4, 6 etc. are possible (no even counts)