4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: kleiner_Hobbit on January 25, 2006, 08:40:30 PM
-
Hi Leute,
in der normalen Kategorie-Übersicht werden bei meinem Template die Kategorien wie folgt angezeigt:
my actual Category-Overview looks like this:
(http://www.photo-empire.de/forum/kat-ist.jpg)
Ich suche eine Möglichkeit, dass jede Unterkategorie in einer neuen Zeile angezeigt wird, also in etwa so:
I´m looking for a code to show the categories and subcategories like this (a new line for each subcategory) :
Asien
Japan-Reisebericht
Kambodscha
Laos
Thailand ....
Kann mir jemand dabei helfen?
Can anybody help me with this problem?
Viele Grüße / best wishes
Claudia
-
Hallo Claudia,
1. ... tolle Bilder auf deiner Seite ... :wink:
2. ... finde in /includes/functions.php folgendes ...
foreach ($visible_cat_cache as $subcat_id) {
if ($i <= $num_subs && $i <= $config['num_subcats']) {
$sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".$cat_cache[$subcat_id]['cat_name']."</a>";
if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= ", ";
}
if ($i == $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= " ...\n";
}
}
$i++;
}
... und ändere es wie folgt ...
foreach ($visible_cat_cache as $subcat_id) {
if ($i <= $num_subs && $i <= $config['num_subcats']) {
$sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".$cat_cache[$subcat_id]['cat_name']."</a>";
if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= "<br>";
}
if ($i == $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= " ...\n";
}
}
$i++;
}
... das war's dann schon ...
mawenzi
-
Boah ... das war ja schneller als die Feuerwehr!
Ich habe es gleich probiert und es funktioniert wunderbar! DANKE!!!
Ich hätte da gleich noch eine Frage zur Kategorieansicht :?:
Kann man auch ggf eine weitere Ebene Unterkategorien anzeigen lassen, dass es dann in etwa so aussieht:
Just another question to show categories.
Is it possible to show the next level of subcategories (sub-subcategory) in an Overview?
Deutschland
Berlin
- Berlin - Diverse
- Berlin - Regierungsviertel
- Festival of Lights 2005
Potsdam
Viele Grüße
Claudia
-
Sorry to interrupt but I'm simply curious to know what are the significations of this topic. Could someone (probably Mawenzi - if possible) translate the subject in english ? ;)
-
@TheOracle
Didn´t you read the blue lines in my first post?
I did my best to translate my problem in english :mrgreen:
-
Ah ! just got it. Sorry for interrupting this. :mrgreen:
-
Hallo Claudia,
... das ist sicher machbar, doch ist dieses Problem nicht so leicht wie oben zu lösen ... :?
... dazu müsste in der functions.php einiges neu gecodet werden ...
-
Schade ... aber trotzdem vielen Dank für die Antwort :)
Falls mal jemand Lust hat den Code zu ändern würde ich mich sehr freuen :mrgreen: