Announcement

  •  » Extensions
  •  » [resolved] How do I get the category ID in image page?

#1 2013-09-25 20:17:22

HarryF
Member
2013-09-25
28

[resolved] How do I get the category ID in image page?

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

 

#2 2013-09-25 21:01:24

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: [resolved] How do I get the category ID in image page?

Hi :-)

Have you test $page['category']['id']


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2013-09-25 21:14:26

HarryF
Member
2013-09-25
28

Re: [resolved] How do I get the category ID in image page?

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

 
  •  » Extensions
  •  » [resolved] How do I get the category ID in image page?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact