Page 1 of 1

Assigning an image to multiple categories: Any solution?

Posted: 26 May 2010, 10:55
by anmolgoel
Hi,

I am very new to Joomla and Phoca gallery, but I have tried my best to gather as much information about them as possible. After searching through the internet for hours and going through the forum, I am still unable to find a solution to my problem. :(

I am developing a website to display our range of corporate gifting products. These products are multi-featured so they have to be in more than one categories.
(For eg- If a product has a Item code B3, and is a digital clock with world time & photo frame in it, I want the image to appear under the section of 'digital clocks', 'world time', 'photo frames', and also under the section 'B' )
I have structured my site accordingly, so that the visitor can view the products according to their features, or according to their item code.

But I am unable to find a way through which I can assign an image to more than one category; or assign tags to the image so that I can make HTML link to display all images with that tag.

Any help will be greatly appreciated, since it is the main purpose I am developing a dynamic website.
Thanks in advance. :)

Re: Assigning an image to multiple categories: Any solution?

Posted: 31 May 2010, 12:16
by Jan
Hi, you need to add the image to more categories (the thumnails are the same) in administration to have one image in more categories.

There are metatag and metakeyword fields which can be used for tagging - but such feature needs to be customized.

Jan

Re: Assigning an image to multiple categories: Any solution?

Posted: 21 Jun 2010, 09:53
by anmolgoel
Thank you for taking out time to reply Jan.

Please help me figure this out; categories are created first, and then images are uploaded into the categories...
How can an image then belong to multiple categories.. The only way i see it would be to re-upload the pics by making new categories.. but that will make everything heavy and would defy the purpose...

Thanks again.. :|

Re: Assigning an image to multiple categories: Any solution?

Posted: 24 Jun 2010, 10:56
by Jan
Hi, yes you can do this way, only images and category will be added to database, thumbnails and original images on server (filesystem) will be not changed. Different images in different categories can use one the same original and thumbnail image.

Jan

Re: Assigning an image to multiple categories: Any solution?

Posted: 02 Oct 2010, 17:12
by Jan
:( Hi, no there is no such option, this needs to be customized but this is not easy as after add different features are running (like creating thumbnails, etc. :-( )

Jan

Re: Assigning an image to multiple categories: Any solution?

Posted: 25 Mar 2011, 18:12
by mpotvin
Hi, I developed a sql query that copies multiple images to another existing category.
I am using jseblod fields for retrieving information.

CREATE TEMPORARY TABLE to_delete (
title VARCHAR (200), min_id INT(4) NOT NULL);
INSERT INTO to_delete SELECT title, MIN(id) FROM cas_phocagallery
GROUP BY title HAVING COUNT(*) > 1;
DELETE from cas_phocagallery
WHERE EXISTS(
SELECT * from to_delete
WHERE to_delete.title = cas_phocagallery.title and to_delete.min_id != cas_phocagallery.id
);
REPLACE INTO cas_phocagallery(title, catid, alias, filename, description, date,published,approved)
SELECT title, '12' AS catid, alias, filename, description, date, '1' AS published , '1' AS approved FROM cas_phocagallery
WHERE description REGEXP 'Oui' ;


It works but my problem is finding a way to integrate this sql without using phpmyadmin or any other database management component. I would like to create a button in phocagallery admin that execute this sql query. Any help or advice would be much appreciated. I have a small budget to get this done.
Thank you for your cooperation. Answer in French if prefered.

The URL to visit the site in preprod.
http://www.charlem.com/castelet/index.php?lang=en
When the field Nouveauté is selected I can execute the query and VOILA the image and all the information and the thumbnail are copied to the new category. :twisted:
Image

Re: Assigning an image to multiple categories: Any solution?

Posted: 26 Mar 2011, 01:47
by Jan
Hi, thank you for this info.

Jan