4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Sebas Bonito on June 24, 2009, 04:22:27 PM

Title: Modified categories in home/start?
Post 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
CAT1CAT2
CAT3CAT4
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?
Title: Re: Modified categories in home/start?
Post by: Sebas Bonito on July 02, 2009, 09:51:40 PM
Noone an idea?  :?
Title: Re: Modified categories in home/start?
Post by: Sebas Bonito on July 07, 2009, 02:18:07 AM
I got it  :D

Find this part in the functions.php and the function get_categories
Code: [Select]
    $count++;
    $count2++;
    $categories .= "</td>\n";

After this add
Code: [Select]
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)