Author Topic: Is it possible do do this with a main category ?  (Read 3455 times)

0 Members and 1 Guest are viewing this topic.

Offline Jef

  • Pre-Newbie
  • Posts: 2
    • View Profile
Is it possible do do this with a main category ?
« on: March 14, 2003, 04:59:01 PM »
Hello, I'm a newbie here.  :D

My english is very bad but let me say that I never see a script like this one : it is REALLY REALLY great ! The best I know.

Could you help me please ? I have one main category with no images (I don't want pictures in main category) and two sub-categorys with 10 and 8 pictures. Actually, on the main category page, I can read : "0 images..." and "There is no image in this category".

What can I do to get the total number of images here (10 + 8 = 18 ) or to "erase" this message (only on the main category page of course) ?

I don't know if you could understand my poor english so tell me if not...  :wink:

Thank you very much.

Jef

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Is it possible do do this with a main category ?
« Reply #1 on: March 14, 2003, 09:21:44 PM »
Welcome aboard!  :wink:  :D
first off all, I dont know why it shows 0 and it doesnt count images from subcategories. on my site it counts both: main category and subcategories images.
but, if u'd like not to show 0 at all, u can do this:

Open /includes/functions.php
Find:
Code: [Select]
     "num_images" => $num_images
Replace with:
Code: [Select]
     "num_images" => ($num_images) ? $num_images : ""

Then, open /templates/<yourtemplate>/category_bit.html
Find:
Code: [Select]
({num_images})
Replace with:
Code: [Select]
{if num_images}({num_images}){endif num_images}
hope this can help.

[EDITED]
did u say on MAIN page?
did u mean number that shows after category name? like: Nature (12) ?
Your first three "must do" before you ask a question:
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)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jef

  • Pre-Newbie
  • Posts: 2
    • View Profile
Is it possible do do this with a main category ?
« Reply #2 on: March 14, 2003, 09:40:06 PM »
Hello and thank you for your answer :) I have try what you said but, unfortunately, I always have the same problem. As you see below, the main category OCEAN INDIEN get 0 images but the 2 sub-category get 8 images.

***************************

OCEAN INDIEN      
(Hits: 17)
--------------------------------------------------------------------------------
Sous Catégories
  Ile Maurice (5) Nouveau  
  Rodrigues (3) Nouveau  

Résultats: 0 (<<<why 0 ?) image(s) sur un total de 0 page(s). Affiche: image 0 sur 0.

Il n'y a pas d'image dans cette catégorie. (There is no images in this category)


***************************

Is it normal please ?


(no, it's not the number like "Category(12)")