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
Categories with custom select possible
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
- Jan
- Phoca Hero
- Posts: 47883
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Categories with custom select possible
Hi, sorry, I don't understand what do you exactly mean?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
Re: Categories with custom select possible
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
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
- Jan
- Phoca Hero
- Posts: 47883
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Categories with custom select possible
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
Jan
components\com_phocagallery\models\category.php
So, I would change the query in this file if needed
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
Re: Categories with custom select possible
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
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
- Jan
- Phoca Hero
- Posts: 47883
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Categories with custom select possible
Hi, yes, you can somehow include (left join) the tag table so then you can apply the query over the tags too
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
Re: Categories with custom select possible
Oh sorry, I mean use directly in front end? Without changing Sourcecode.
Marcel
Marcel
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
Re: Categories with custom select possible
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
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
- Jan
- Phoca Hero
- Posts: 47883
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Categories with custom select possible
Hi, the parameter is "tagid" and it accepts integer (or integer + alias)
e.g. tagid=1-alias
Jan
e.g. tagid=1-alias
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 79
- Joined: 22 Apr 2016, 12:03
Re: Categories with custom select possible
Hi Jan,
it´s amazing, it works 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
it´s amazing, it works 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