No category image when asking for one category link in article

Phoca Gallery - image gallery extension
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 22
Joined: 06 Sep 2023, 20:32

No category image when asking for one category link in article

Post by phunsoft »

This is Joomla 5.3 and PhocaGallery 5.1.1., and PhocaGallery Plugin 5.0.0

The following code is put into an article:

Code: Select all

{phocagallery view=categories|categoryid=21|imagecategories=1}
This shows a shadowed icon with the name of the selected category, but there is no image, just the "folder" icon.

Image

What am I missing?
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9780
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: No category image when asking for one category link in article

Post by Benno »

Hi,
da Dein Screenshot deutschsprachig ist, weiter auf Deutsch:
1.) Zunächst einmal ist die Syntax Deines Plugin-Codes falsch. Ab Phoca Gallery für Joomla 4 werden nicht mehr Kategorien ausgewählt, sondern Kategorien, die nicht angezeigt werden sollen, abgewählt. Installiere Dir das Phoca Gallery Button Plugin, damit erzeugst Du validen Code, z.B:

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=1|hidecategories=1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
Image

2.) Hast Du denn für die Kategorie in der Phoca Gallery Komponente ein Bild festgelegt und hast Du in den Optionen festgelegt, das ein Bild anstelle des Verzeichnis-Icons angezeigt werden soll?
backend --> Komponenten --> Phoca Gallery --> Kontrollzentrum --> Optionen --> Kategorie-Ansicht --> Kategorie-Ansicht-Einstellungen --> Bild anstelle des Verzeichnis-Icons anzeigen=Ja

Image


Freundliche Grüße,
Benno
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 22
Joined: 06 Sep 2023, 20:32

Re: No category image when asking for one category link in article

Post by phunsoft »

Benno wrote: 05 Jul 2025, 15:17 1.) Zunächst einmal ist die Syntax Deines Plugin-Codes falsch. Ab Phoca Gallery für Joomla 4 werden nicht mehr Kategorien ausgewählt, sondern Kategorien, die nicht angezeigt werden sollen, abgewählt. Installiere Dir das Phoca Gallery Button Plugin, damit erzeugst Du validen Code, z.B:

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=1|hidecategories=1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}

Die Syntax habe ich von der Phoca Galley Doku Seite. Wenn ich jedoch Katergorien ausschliessen muss, bedeutet das, dass ich beim Hinzufügen einer neuen Kategorie jeden Artikel bearbeiten muss, der über den Plugin Code eine einzige, spezifischeGalerie anzeigen soll. Oder habe ich dich missverstanden?

Benno wrote: 05 Jul 2025, 15:17 2.) Hast Du denn für die Kategorie in der Phoca Gallery Komponente ein Bild festgelegt...
Ja, habe ich:

Image


Ich habe auch einen Menu Eintrag vom Type "PhocaGallery - List of Categories (Categories View" und dort erscheinen die Bilder:

Image
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 22
Joined: 06 Sep 2023, 20:32

Re: No category image when asking for one category link in article

Post by phunsoft »

Benno wrote: 05 Jul 2025, 15:17 Installiere Dir das Phoca Gallery Button Plugin, damit erzeugst Du validen Code, z.B:
Die Site wird auf Basis von Joomla 5 neu aufgebaut und ich wollte das Joomla Plugin "Behavour - Backward Compatibility" nach Möglichkeit disabled lassen. Das Button Plugin funktioniert jedoch nur wenn das Plugin enabled ist. Im Moment ist dies die einzige Erweiterung, die das Compatibility-Plugin benötigen würde.
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 22
Joined: 06 Sep 2023, 20:32

Re: No category image when asking for one category link in article

Post by phunsoft »

Ich gabe den Code nun mit hidecategories= angepasst und dann erscheint ein Bild.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9780
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: No category image when asking for one category link in article

Post by Benno »

Hi,
Oder habe ich dich missverstanden?
Nein, hast Du nicht. :(
Das Button Plugin funktioniert jedoch nur wenn das Plugin enabled ist.
Korrekt, Jan der Entwickler aller Phoca Erweiterungen hat bisher halt noch keine Zeit gefunden, das Button Plugin zu überarbeiten.

Freundliche Grüße,
Benno

Edit:
Ich gabe den Code nun mit hidecategories= angepasst und dann erscheint ein Bild.
Na prima!
User avatar
phunsoft
Phoca Member
Phoca Member
Posts: 22
Joined: 06 Sep 2023, 20:32

Re: No category image when asking for one category link in article

Post by phunsoft »

Benno wrote: 05 Jul 2025, 17:00 Hi,
Oder habe ich dich missverstanden?
Nein, hast Du nicht. :(
Ich verstehe die Idee hinter dieser Anpassungn nicht?

Warum sollte ich alle Kategorien bis auf ganz wenige anzeigen lassen wollen. Nur in diesem Fall ergibt für mich eine Exclusionsliste Sinn. Wenn wenigstens Nummerbereiche erlaubt wären, dann könnte man mit z.B. 1-20,22-9999 ein für alle Mal nur eine Kategorie anzeigen lassen.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48850
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: No category image when asking for one category link in article

Post by Jan »

Hi,

in 15 years, the plugin was changed due to all possible reasons like modernization, Joomla core changes, etc. In version 4, there was distinctive change because of Joomla core changes and big modernization (e.g. due to performance and code cleanup, many settings that can be done via CSS, etc., have disappeared). Unfortunately, Joomla as a system is constantly changing and backwards compatibility is constantly being broken, which is why everything is constantly being rewritten (currently the cycle has been shortened to two years, meaning it is being rewritten from Joomla 5 to Joomla 6). Unfortunately, at this pace, problems arise in the form of:
- outdated documentation
- non-existence of some plugins (like the Button plugin)
- the possibility that some plugins produce incorrect code
- and so on.

Unfortunately, due to constant changes in Joomla, the priority is mainly the component, then the plugin, and finally helpers such as the button plugin.

"hidecategories" parameter - reason:

"Warum sollte ich alle Kategorien bis auf ganz wenige anzeigen lassen wollen."

This simply brings about a development where the community will have some debate about whether the more commonly used option for the plugin is to hide rather than name.

In this case, it's simple, the need is to display images from categories that exist, but which will also be added in future. The requirement was that when someone adds a new category in future (including imates), the administrator would not have to change the code again and again and add which categories to display. Therefore, they just set which categories are excluded and the new ones are displayed again.

So, if a user creates a new category with images, it will be displayed in the article and the administrator does not have to edit all articles and add new IDs there. This is the main feature of the opposite approach - of the parameter "hidecategories".

These are simply changes based on requests from the community.

BTW categoryid was changed to id - and in latest version it was added due to backward compatibility: the categoryid as alias for id.

So in Phoca Gallery Plugin version 5.x you can use either categoryid or id (both are the same) and you can define which category will be displayed.
If you find Phoca extensions useful, please support the project
Post Reply