4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: alvaro0022 on January 30, 2011, 08:58:21 AM
-
Hello;
View images the subcategory in the Main category?
how to do this?
-
Hi!
1.) search in categories.php:
$additional_sql .= ", i.".$key;
}
}
insert below:
if(!empty($cat_parent_cache[$cat_id])){
$sub_cat_numbers = "AND i.cat_id in($cat_id,".implode(',', $cat_parent_cache[$cat_id]).")";
}else{
$sub_cat_numbers = "AND i.cat_id = $cat_id";
}
2.) search:
AND i.cat_id = $cat_id
and replace:
$sub_cat_numbers
3.) search:
"msg" => $msg,
insert above:
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),
mfg Andi
-
Thanks for responding
does not work!
not find
AND i.cat_id = $cat_id
WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
That must change?
-
that:
WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
-
I change this so?
$sub_cat_numbers
-
I change this so?
$sub_cat_numbers
??? yes...
-
this error :
Parse error: syntax error, unexpected $end in /home/jueggaco/public_html/juegga/categories.php on line 215
-
sry, i forgot a "}"
this is the correct code:
if(!empty($cat_parent_cache[$cat_id])){
$sub_cat_numbers = "AND i.cat_id in($cat_id,".implode(',', $cat_parent_cache[$cat_id]).")";
}else{
$sub_cat_numbers = "AND i.cat_id = $cat_id";
}
-
GENIUS!!!!!!
THANKS!!!!!!
-
Hello, Rembrandt!
Can you tell me how to do that in the main category {cat_name} display its name, but not the name subcategory of image at the bottom of the page?
For example, if the name of the main category "Nature"... is displayed "Landscapes" (the name of subcategory of the lower image at the bottom of the page).
Can anyone help me?
I am using version 1.7.10
And since this mod is very-very good!
-
Welcome to the Forum!
...For example, if the name of the main category "Nature"... is displayed "Landscapes" (the name of subcategory of the lower image at the bottom of the page).
...
search in categories.php:
"msg" => $msg,
insert above:
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),
mfg Andi
-
Thank you so much! :D
-
i use this mod with [Mod] Same Image in multiple Categories http://www.4homepages.de/forum/index.php?topic=27570.0 (http://www.4homepages.de/forum/index.php?topic=27570.0)
and now images are not displayed when Multi Cat is active (original cat = images displayed)
if you can do something for , that will be awesome !
-
...
it works for me, but "multicat" images in subcategories not displayed in a main categories, only Original Images from subcategories displayed in a main categories.
mfg Andi
-
Hallo Andi! Danke erstmal für den genialen MOD. Hab's heute installiert! Ich hab zwei Fragen dazu
1. So wie ich das sehe wird nur eine Kategorie unter der hauptkategorie angezeigt (z.B Hauptkategorie ist Sport und die erste Unterkategorie ist Fußball ). wenn ich also Sagen wir in Fußball noch eine Unterkategorie für die jeweilige Spielpaarung (z. B. Austria Wien - Rapid Wien) anlegen würde, würde es die Bilder erst nach Klick auf Fußball anzeigen und nicht schon nach Klick auf Sport ! Stimmt ja oder???
Meine Kategoriestruktur sieht so aus: Hauptkategorie Sport ----> Unterkategorie Fussball ----> Unterunterkategorie Bundesliga ----> Unterunterunterkategorie Rapid Wien - Austria Wien
Also quasi 3 Unterkategorien unter der Hauptkategorie. Könnte man also die Bilder der 3 Spielpaarung auch schon nach Klick auf die Hauptkategorie oder die Unterkategorie (in meinem Fall Fußball) anzeigen lassen.
2. Wäre es möglich nicht die einzelnen Bilder darzustellen sondern wie in deinem Mod Neueste Kategorien auf der Startseite auch die ganze. Kategorien zu zeigen
Hoffe ich hab's halbwegs verständlich geschrieben !!!
Über eine Antwort wùrde ich mich sehr freuen
VG
Josef
-
Hi!
.... Könnte man also die Bilder der 3 Spielpaarung auch schon nach Klick auf die Hauptkategorie ...anzeigen lassen.
...
Schritt 1.) in diesen Mod ersetze mit diesem:
if(!empty($cat_parent_cache[$cat_id])){
$subcat_ids = array();
get_subcat_ids($cat_id, $cat_id, $cat_parent_cache);
$sub_cat_numbers = "AND i.cat_id in(".implode(',', $subcat_ids[$cat_id]).")";
}else{
$sub_cat_numbers = "AND i.cat_id = $cat_id";
}
mfg Andi
-
Hallo Rembrand
Kannst du auch die Seitenauswahl "{paging}" dazu fügen? Es zeigt nur die Anzahl an die man als Anzahl der Bilder pro Seite in den Kategorien eingestellt hat.
Und über den Bilder hätte ich gern Platzhalter für Text. Zum beispiel: Top Bilder aus den aus den Unterkategorien oder wenn {paging} dazugefügt ist etc. damit die Leute wissen warum unter den Sub Kategorien die Bilder sind.
-
jetzt wirds kompliziert :)
1.) entferne schritt 1.) aus diesen Mod
2.) suche in der categories.php:
$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] : 0;
füge darüber ein:
$sum_images = 0;
if(!empty($cat_parent_cache[$cat_id])){
$subcat_ids = array();
get_subcat_ids($cat_id, $cat_id, $cat_parent_cache);
foreach($subcat_ids[$cat_id] as $val){
$sum_images += $cat_cache[$val]['num_images'];
}
$sub_cat_numbers = "AND i.cat_id in(".implode(',', $subcat_ids[$cat_id]).")";
}else{
$sub_cat_numbers = "AND i.cat_id = $cat_id";
}
suche:
$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] : 0;
und ersetze es mit:
$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] + $sum_images : 0;
mfg Andi
-
Danke :-)
Fehlt nur noch der Platzhalter für die Überschrift. Zum Beispiel: Alle Bilder im Überblick..
Kann man den in die PHP einbauen