Author Topic: Category and Subcategory the number of pictures  (Read 5368 times)

0 Members and 1 Guest are viewing this topic.

Offline steveeyes

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Category and Subcategory the number of pictures
« on: December 29, 2005, 07:57:48 PM »
Beside each category and subcategory, it displays in parenthesis how many pictures are in that category. Is there a way to not show this number for one specific category and it's subcategories.  I don't want this for all categories, just one in particular.

Why?  I use one category as a contest category that at the end of the month if someone guesses how many pictures it will end up having in it, gets a free membership. I set the permissions for this category so they can view it, but can't enter it..... when the month ends, I open it up to all members and will announe the winner. However, that little pesty number beside the category that keeps track of the pictures added, makes it less challenging. So I want to get rid of that number for one category and it's subcategories only.

Hope someone can help.

thanks
Steve

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
Re: Category and Subcategory the number of pictures
« Reply #1 on: December 30, 2005, 01:28:00 AM »
in includes/functions.php find:
Code: [Select]
      "num_images" => $num_imagesIf you want restrict more then one category replace with:
Code: [Select]
      "num_images" => (in_array($category_id, array(1,2,3,4,5))) ? REPLACE_EMPTY : $num_imagesotherwise for only one category replace with:
Code: [Select]
      "num_images" => ($category_id == 1234) ? REPLACE_EMPTY : $num_images
Then in category_bit.html template you can use {if num_images} .. {endif num_images} tags
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 steveeyes

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Re: Category and Subcategory the number of pictures
« Reply #2 on: December 31, 2005, 02:47:22 AM »
Thanks V@no...

Offline steveeyes

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Re: Category and Subcategory the number of pictures
« Reply #3 on: December 31, 2005, 03:00:13 AM »
OOps V@no, got this error

Code: [Select]
Parse error: parse error, unexpected ',' in /home/filipina/public_html/4images/includes/functions.php on line 982
just so I know I'm doing it right, the category number is in the the address link -- right????

I'm using the mod that makes my pages search engine friendly and when I click on the category link it has this in the address bar

http://www.filipinaeyes.com/4images/cat18.htm

So I would think this would be category 18, right??????

Anyways, not sure why I got the Parse error.

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
Re: Category and Subcategory the number of pictures
« Reply #4 on: December 31, 2005, 03:17:06 AM »
"oops" is mine :oops:
after REPLACE_EMPTY replace coma with a :
(I've corrected my post above)
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 Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Category and Subcategory the number of pictures
« Reply #5 on: July 14, 2009, 03:22:35 PM »
....and how about the other way aroun?

To show the "num" of pictures in the subcategories, too?

Update: Found the right Thread here. Thx!