Announcement

#1 2014-03-26 13:57:57

norbusan
Member
Nonoichi, Ishikawa, Japan
2011-06-11
60

getting list of recently added albums via JavaScript

Hi everyone,

I would like to obtain the list of recently added albums via javascript interface. I have used the google api to query blogs and maps, but haven't seen any javascript code that connects to piwigo.

Is this possible? And if yes, are there any examples to follow, or guides?

Thanks

Norbert

Offline

 

#2 2014-03-26 15:06:36

flop25
Piwigo Team
2006-07-06
6965

Re: getting list of recently added albums via JavaScript

Hello
it is called an API, and for Piwigo we've called it WebServices. Doc, Skeleton plugin, forum, tool/ws.html... many info around there


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-03-27 02:33:53

norbusan
Member
Nonoichi, Ishikawa, Japan
2011-06-11
60

Re: getting list of recently added albums via JavaScript

Hi Flop25,

thanks for your answer, but ...

flop25 wrote:

Doc, Skeleton plugin, forum, tool/ws.html

Docs I have checked, there is a minimal example in perl and hardly any documentation.

Forum I have searched for javascript, and javascript API, without any success.

tool/ws.html I do know, but that does not help for javascript coding.

So, although you say there are many information around here, I have to disagree slightly. Surely you can convince me by providing actual links.

Anyway, I will try myself to create some javascript code and will post it at some point.

Norbert

Offline

 

#4 2014-03-27 07:30:33

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13277

Re: getting list of recently added albums via JavaScript

Hi norbusan,

Take a look at admin/themes/default/template/user_list.tpl and you will find examples of javascript calls to API (search "ajax"), such as http://piwigo.org/dev/browser/branches/ … st.tpl#L56

Offline

 

#5 2014-03-27 08:56:53

flop25
Piwigo Team
2006-07-06
6965

Re: getting list of recently added albums via JavaScript

OK so the problem is not about piwigo but on how to make ajax call


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2014-03-27 13:01:41

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3271

Re: getting list of recently added albums via JavaScript

there is no Javascript API for Piwigo, only a HTTP API (actually what you call Google API is just a Javascript wrapper arround the Google HTTP API)

so you have to make requests manually

Offline

 

#7 2014-04-25 06:24:28

norbusan
Member
Nonoichi, Ishikawa, Japan
2011-06-11
60

Re: getting list of recently added albums via JavaScript

Hi

plg wrote:

Take a look at admin/themes/default/template/user_list.tpl ...

thanks for the hint to look into user_list.tlp. I finally found time to do this and managed what I wanted to do, namely display the thumbnails and titles of the latest three galleries on my front page. I have written a blog post concerning which includes the actual javascript source code if anyone is interested. Of course it is hand waving and amateur programming, but at least for me it works ;-)

Here is the link: http://www.preining.info/blog/2014/04/j … o-web-api/

Thanks a lot

Norbert

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact