Hi all,
I am new in using Piwigo (2.5.2) but very excited that I can create my own plugins. I worked intensively through the tutorials and the existing plugins and after a while I managed to write a plugin for a special voting system I need for my intended use.
But now I came to a point where I would appreciate some help. I need to get the category ID of an image (image.php) to calculate the average voting of one category and later on to create a ranking of categories. But I don't know how I get this variable? I guess it's something like the image ID ($page['image_id']) but I may be wrong.
Could anyone please tell me how I get the category ID of a current image?
Thanks in advance for your help.
Regards
Harry
Last edited by HarryF (2013-09-25 20:22:04)
Offline
Hi :-)
Have you test $page['category']['id']
Offline
Hello,
thanks for that fast reply. No I did not check until now - and it worked. You made my day ;-) .
Thanks a lot.
Is there also a way to get the ID of the parent category (I thought I got this, too, but was wrong)?
Harry
Last edited by HarryF (2013-09-25 21:18:36)
Offline