Categories with custom select possible

Phoca Gallery - image gallery extension
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Categories with custom select possible

Post by marcel77 »

Hi all,

I think, generating of categories is based on database queries?

Is it possible to generate "virtual" categories by "giving" a database query or result to a script and I get a categorie overview like a regular category?

This could be the solution for my problem of individual filtering.

Marcel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories with custom select possible

Post by Jan »

Hi, sorry, I don't understand what do you exactly mean?

Jan
If you find Phoca extensions useful, please support the project
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Categories with custom select possible

Post by marcel77 »

Hi Jan,

I think you use database queries to select the pictures for each categories, or?

Is it possible to give a custom database query (select id from phoca_gallery where ...) to your module with, for example, post method und get the known phoca gallery sigth for custom selected pictures?

Where you generate the caegory view?

oder auf deutsch:

Ich denke, du benutzt Datenbankabfragen, um die Bilder für jede Kategorie auszuwählen, oder?

Kann ich an irgeneiner Stelle eigene Datenbankabfragen per z.B. Post-Methode an Dein Modul übergeben, und dann für individuel selektierte Bilder die gewohnte Phoca Gallery Ansicht bekommen?

Wo wird die Kategorieansicht erstellt?

Marcel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories with custom select possible

Post by Jan »

Hi, yes, if you are located in category view, it has some ID, e.g. ID = 1, then the sql query asks for all images (including pagination) which belong to category 1

components\com_phocagallery\models\category.php

So, I would change the query in this file if needed :idea:

Jan
If you find Phoca extensions useful, please support the project
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Categories with custom select possible

Post by marcel77 »

Hi Jan,

Thanks a lot! I took a look on this file. I´m wondering about finding TAG selection within the where-clause. Is it possible to use it yet? At the moment this ist one thing I´m searching for.

I will give a possibility to show all pictures of a category or only pictures with a selectable TAG. Maybe with a combo box on every site to select the TAG.

It may be perfect, if I find a way to show all pictures from one category and all subcatoegories depending a special TAG. in an extra step

Marcel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories with custom select possible

Post by Jan »

Hi, yes, you can somehow include (left join) the tag table so then you can apply the query over the tags too :idea:

Jan
If you find Phoca extensions useful, please support the project
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Categories with custom select possible

Post by marcel77 »

Oh sorry, I mean use directly in front end? Without changing Sourcecode.

Marcel
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Categories with custom select possible

Post by marcel77 »

Hi Jan,

sory, I´m not php and joomla enough to understand all the things.

I found the ready sourcecode in category.php for querries with tag selection, but I don´t found, how to use? I try to add post "?tag=1" or "?tag=landscape" to the url for a category, but nothing happend. So I think, implementation is not ready yet.

Marcel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories with custom select possible

Post by Jan »

Hi, the parameter is "tagid" and it accepts integer (or integer + alias)

e.g. tagid=1-alias

Jan
If you find Phoca extensions useful, please support the project
marcel77
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 22 Apr 2016, 12:03

Re: Categories with custom select possible

Post by marcel77 »

Hi Jan,

it´s amazing, it works :D Thanks a lot!!!

May you tell me something more about tag filtering? Do you have something like a public variable, so that the "tag filter" stays after changing the category? And ist it possible to filter all pictures, which haveing 2 selected tags

With the post method, I have to set the filter after every side switch.

Marcel
Post Reply