Author Topic: [Mod] Display Images from the subcategory in the main category  (Read 28709 times)

0 Members and 1 Guest are viewing this topic.

Offline alvaro0022

  • Full Member
  • ***
  • Posts: 132
  • nada es imposible
    • View Profile
    • Wallpapers
[Mod] Display Images from the subcategory in the main category
« on: January 30, 2011, 08:58:21 AM »
Hello;

View images the subcategory in the Main category?

how to do this?

Rembrandt

  • Guest
Re: Display Images from the subcategory in the main category
« Reply #1 on: January 30, 2011, 10:39:10 AM »
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
« Last Edit: April 01, 2012, 10:38:06 AM by Rembrandt »

Offline alvaro0022

  • Full Member
  • ***
  • Posts: 132
  • nada es imposible
    • View Profile
    • Wallpapers
Re: Display Images from the subcategory in the main category
« Reply #2 on: January 31, 2011, 12:36:26 AM »
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?

Rembrandt

  • Guest
Re: Display Images from the subcategory in the main category
« Reply #3 on: January 31, 2011, 04:30:21 AM »
that:
WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id

Offline alvaro0022

  • Full Member
  • ***
  • Posts: 132
  • nada es imposible
    • View Profile
    • Wallpapers
Re: Display Images from the subcategory in the main category
« Reply #4 on: January 31, 2011, 05:12:06 AM »
I change this so?

$sub_cat_numbers

Rembrandt

  • Guest
Re: Display Images from the subcategory in the main category
« Reply #5 on: January 31, 2011, 05:14:38 AM »
I change this so?

$sub_cat_numbers

??? yes...

Offline alvaro0022

  • Full Member
  • ***
  • Posts: 132
  • nada es imposible
    • View Profile
    • Wallpapers
Re: Display Images from the subcategory in the main category
« Reply #6 on: January 31, 2011, 05:19:31 AM »
this error :

Parse error: syntax error, unexpected $end in /home/jueggaco/public_html/juegga/categories.php on line 215

Rembrandt

  • Guest
Re: Display Images from the subcategory in the main category
« Reply #7 on: January 31, 2011, 05:25:23 AM »
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"
}

Offline alvaro0022

  • Full Member
  • ***
  • Posts: 132
  • nada es imposible
    • View Profile
    • Wallpapers
Re: Display Images from the subcategory in the main category
« Reply #8 on: January 31, 2011, 05:41:23 AM »
GENIUS!!!!!!

THANKS!!!!!!

Offline dmitrijjuy

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: Display Images from the subcategory in the main category
« Reply #9 on: April 01, 2012, 03:04:21 AM »
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!

Rembrandt

  • Guest
Re: Display Images from the subcategory in the main category
« Reply #10 on: April 01, 2012, 10:36:13 AM »
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
« Last Edit: April 01, 2012, 10:51:12 AM by Rembrandt »

Offline dmitrijjuy

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: Display Images from the subcategory in the main category
« Reply #11 on: April 01, 2012, 05:05:04 PM »
Thank you so much!  :D

Offline benef4u

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Mod] Display Images from the subcategory in the main category
« Reply #12 on: July 19, 2012, 10:11:48 AM »
i use this mod with [Mod] Same Image in multiple Categories 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 !

Rembrandt

  • Guest
Re: [Mod] Display Images from the subcategory in the main category
« Reply #13 on: July 19, 2012, 02:49:05 PM »
...
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

Offline JoBi

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Display Images from the subcategory in the main category
« Reply #14 on: December 13, 2012, 08:41:36 PM »
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