Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: thumbnail for a catagory  (Read 6006 times)

0 Members and 1 Guest are viewing this topic.

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
thumbnail for a catagory
« on: October 17, 2004, 07:01:04 pm »

Hi,

is there a way to show a thumbnail for each category, not only the category name?

thx,
Verena
Logged

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #1 on: October 17, 2004, 07:42:46 pm »

Sorry, I was blind...
Verena
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: thumbnail for a catagory
« Reply #2 on: October 17, 2004, 07:46:43 pm »

Does your last post mean that you found the answer?
Logged

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #3 on: October 17, 2004, 08:27:17 pm »

Yes, I found the anwser.

Or not. I just thought. Is it right that this is only possible für categories which have no subcategories?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: thumbnail for a catagory
« Reply #4 on: October 17, 2004, 09:06:02 pm »

No, it is possible for all categories, providing they have at least 1 pic somewhere in them.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #5 on: October 17, 2004, 09:37:50 pm »

this means for all categories, which includ at least one album. I can't use a pic from a album of a subcategory, right?
Logged

gorcutt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #6 on: November 13, 2004, 04:54:17 pm »

this means for all categories, which includ at least one album. I can't use a pic from a album of a subcategory, right?
I was looking for a way to avoid this. I have a category with subcategories, but the first one doesn't have any album and I wish I could add a thumbnail to it. If someone knows the answer for this I would be very grateful.
Logged

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #7 on: November 13, 2004, 05:37:14 pm »

It is possible to use any picture for a thumbnail, but not within the coppermine admin area. If you are used to phpMyAdmin or any other MySQL client look in the table 'pictures' for the picture you'd like to use and remeber the value in the column 'pid'. Change to the table 'categories', look for the category you wish to select the thumbnail for and enter in the field 'thumb' the value you remembered. Now this is your new thumbnail.
regards,
verena

Logged

gorcutt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #8 on: November 14, 2004, 04:44:33 am »

Hey Verena, thanks for the reply, but even filling the thumb field with the thumb pid number it doesn't work. Nothing shows for the category thumb. I must remember that I only have subcategories inside this one, and no album.
Thanks.
Logged

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #9 on: November 14, 2004, 11:30:42 pm »

Hi,
I'm sorry but this worked on my page. Just to be sure: you didn't make any changes to your theme which interfere with the category thumb? Create an album in this category, upload one pic, select it as thumbnail in the admin area and ascertain yourself of the correct output.
regards,
Verena
Logged

gorcutt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #10 on: November 15, 2004, 12:04:33 am »

Hey Verena, the thumbnail shows fine for a category with an album in it, but not without an album. So, in my case I have a category with no albums in it, below it a sub category, and finally some albums. What I'm looking for is a way to show a thumbnail for the first category on the hierarchy, and this one, even filling the picture ID on the DB, the thumb doesn't show on the page.
Thanks,
Guilherme
Logged

ve.ru

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #11 on: November 15, 2004, 09:30:29 am »

Sorry I forgot something: is the name of the category shown or is it hidden at all?
normally only categories are shown which have at least one pic or one album. If you want to show every category regardles of pictures and albums you have to change index.php:

search for the line
Code: [Select]
if ($pic_count == 0 && $album_count == 0) {
and comment some lines out. Afterwards it should look like this:
Code: [Select]
                // to show all categories - whether there are albums or not
//if ($pic_count == 0 && $album_count == 0) {
// $user_thumb = $ident;
                //    $cat_data[] = array($link, $subcat['description'],'cat_thumb' =>$user_thumb);
                //} else {
                    // Check if you need to show subcat_level
                    if ($level == $CONFIG['subcat_level']) {
                        $cat_albums = list_cat_albums($subcat['cid']);
                    } else {
                        $cat_albums = '';
                    }
                    $cat_data[] = array($link, $subcat['description'], $album_count, $pic_count, 'cat_albums' => $cat_albums,'cat_thumb' =>$user_thumb);
                //}

On my site I have albums in each categorie, but I wanted to use another pictures which weren't shown in the admin area. Perhaps this makes a difference but if this doesn't work I don't have another idea.

verena
« Last Edit: November 15, 2004, 09:48:57 am by ve.ru »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: thumbnail for a catagory
« Reply #12 on: November 15, 2004, 01:28:53 pm »

Sorry I forgot something: is the name of the category shown or is it hidden at all?
normally only categories are shown which have at least one pic or one album. If you want to show every category regardles of pictures and albums you have to change index.php:

Not quite correct.  It is only the 'user galleries' category that is hidden if empty.  Standard admin created categories are shown all the time.

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

gorcutt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: thumbnail for a catagory
« Reply #13 on: November 15, 2004, 06:42:42 pm »

The name of the category appears on the page, but only the name and the description. No thumbnail though. On the inner categories with albums in them, everything is ok, only the 'outer' category without an explicit album within doesn't show the thumb.
Thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.