thumbnail for a catagory thumbnail for a catagory
 

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]

Main Menu

thumbnail for a catagory

Started by ve.ru, October 17, 2004, 07:01:04 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ve.ru

Hi,

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

thx,
Verena

ve.ru


Tranz

Does your last post mean that you found the answer?

ve.ru

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?

Casper

No, it is possible for all categories, providing they have at least 1 pic somewhere in them.
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

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

gorcutt

Quote from: ve.ru 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?
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.

ve.ru

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


gorcutt

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.

ve.ru

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

gorcutt

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

ve.ru

#11
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
if ($pic_count == 0 && $album_count == 0) {

and comment some lines out. Afterwards it should look like this:

                // 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

Casper

Quote from: ve.ru 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:

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

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

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.