Assigning an image to multiple categories: Any solution?

anmolgoel
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 26 May 2010, 10:42

Assigning an image to multiple categories: Any solution?

Post 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. :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
anmolgoel
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 26 May 2010, 10:42

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

Post 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.. :|
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
mpotvin
Phoca Member
Phoca Member
Posts: 10
Joined: 25 Feb 2010, 21:55

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

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, thank you for this info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply