4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 29, 2014, 12:41:25 PM

Login with username, password and session length
Search:     Advanced search
4images is now on facebook. Click here and become a fan!
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [Mod] Display Images from the subcategory in the main category
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 » »» Print
This topic has not yet been rated!
Author Topic: [Mod] Display Images from the subcategory in the main category  (Read 12593 times)
alvaro0022
Full Member
***
Offline Offline

Posts: 132

Thank You
-Given: 2
-Receive: 2

nada es imposible


View Profile WWW
« on: January 30, 2011, 08:58:21 AM »

Hello;

View images the subcategory in the Main category?

how to do this?
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« Reply #1 on: January 30, 2011, 10:39:10 AM »

Hi!

1.) search in categories.php:
1
2
3
$additional_sql .= ", i.".$key;
  }
}
insert below:
1
2
3
4
5
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:
1
AND i.cat_id $cat_id
and replace:
1
$sub_cat_numbers

3.) search:
1
"msg" => $msg,
insert above:
1
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),

mfg Andi
« Last Edit: April 01, 2012, 10:38:06 AM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
alvaro0022
Full Member
***
Offline Offline

Posts: 132

Thank You
-Given: 2
-Receive: 2

nada es imposible


View Profile WWW
« 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?
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« 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
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
alvaro0022
Full Member
***
Offline Offline

Posts: 132

Thank You
-Given: 2
-Receive: 2

nada es imposible


View Profile WWW
« Reply #4 on: January 31, 2011, 05:12:06 AM »

I change this so?

$sub_cat_numbers
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« Reply #5 on: January 31, 2011, 05:14:38 AM »


??? yes...
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
alvaro0022
Full Member
***
Offline Offline

Posts: 132

Thank You
-Given: 2
-Receive: 2

nada es imposible


View Profile WWW
« 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
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« Reply #7 on: January 31, 2011, 05:25:23 AM »

sry, i forgot a "}"

this is the correct code:
1
2
3
4
5
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"
}
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
alvaro0022
Full Member
***
Offline Offline

Posts: 132

Thank You
-Given: 2
-Receive: 2

nada es imposible


View Profile WWW
« Reply #8 on: January 31, 2011, 05:41:23 AM »

GENIUS!!!!!!

THANKS!!!!!!
Logged
dmitrijjuy
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 1
-Receive: 0


View Profile
« 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!
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« 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:
1
"msg" => $msg,
insert above:
1
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),

mfg Andi
« Last Edit: April 01, 2012, 10:51:12 AM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
dmitrijjuy
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #11 on: April 01, 2012, 05:05:04 PM »

Thank you so much!  Very Happy
Logged
benef4u
Pre-Newbie

Offline Offline

Posts: 7

Thank You
-Given: 2
-Receive: 1


View Profile
« 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 !
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4014

Thank You
-Given: 102
-Receive: 842

Vienna


View Profile WWW
« 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
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
JoBi
Newbie
*
Offline Offline

Posts: 39

Thank You
-Given: 5
-Receive: 0


View Profile
« 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
Logged
Pages: [1] 2 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.139 seconds with 21 queries.