4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: steveeyes on December 29, 2005, 07:57:48 PM

Title: Category and Subcategory the number of pictures
Post by: steveeyes 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
Title: Re: Category and Subcategory the number of pictures
Post by: V@no 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
Title: Re: Category and Subcategory the number of pictures
Post by: steveeyes on December 31, 2005, 02:47:22 AM
Thanks V@no...
Title: Re: Category and Subcategory the number of pictures
Post by: steveeyes 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.
Title: Re: Category and Subcategory the number of pictures
Post by: V@no 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)
Title: Re: Category and Subcategory the number of pictures
Post by: Sebas Bonito 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 (http://www.4homepages.de/forum/index.php?topic=4134.msg17015#msg17015). Thx!