samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Formatted XML for Nextgen Galleries by Album ID #412

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The xml.php file returns formatted xml by Album ID.

For example:xml.php?aid=1

Note: The ngg_db.php was updated to allow gallery data to be returned by album 
ID.

Further Feature Request:

1. The ability to have the XML for galleries in an album arranged according to 
the draggable interface in the manage 

albums interface.

2. The ability to have the XML for images in a gallery arranged according to 
the draggable interface in the manage 

galleries interface.

This will make it possible to have clearly formatted gallery XML, relative to 
the album it belongs to and give the user 

complete control over how the galleries and gallery images are arranged and 
subsequently the order the data is returned 

in.

This is especially useful for developers using a Flash frontend that loads data 
from Nextgen galleries, but alos for any 

custom interface that uses Wordpress and Nextgen ad its CMS.

Original issue reported on code.google.com by vanasfer...@gmail.com on 28 Aug 2011 at 1:04

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your code,

it would be the best (and easiest if we extend the xml/json.php class as it 
already contain what we need, just the part for album xml output is missing.

Original comment by alex.cologne on 28 Aug 2011 at 6:27

GoogleCodeExporter commented 8 years ago
What is the process involved in getting a feature like this added? Would 
your schedule allow it? If you deem it useful enough as an addition to 
the Nextgen Gallery, that would be great.

Original comment by vanasfer...@gmail.com on 28 Aug 2011 at 7:46

GoogleCodeExporter commented 8 years ago
see r986 I've added the first part of your request.

You can call this via : 
http://domain/index.php?callback=json&api_key=true&format=xml&method=album&id=1

When I get some more time, I will complete it , so not a big deal

Original comment by alex.cologne on 28 Aug 2011 at 8:22

GoogleCodeExporter commented 8 years ago
Thanks for the swift response. I tried the following URL:

http://www.mydomain.com/wordpress/index.php?callback=json&api_key=true&format=xm
l&method=album&id=1

which returned this:

<nextgen-gallery>
<stat>fail</stat>
<code>98</code>
<message>Method not known.</message>
</nextgen-gallery>

Am I doing something wrong?

Original comment by vanasfer...@gmail.com on 29 Aug 2011 at 5:45

GoogleCodeExporter commented 8 years ago
You have updated the code ? Does the method = "gallery" work for you ?

Original comment by alex.cologne on 29 Aug 2011 at 5:22

GoogleCodeExporter commented 8 years ago
I copied the code from: 
http://code.google.com/p/nextgen-gallery/source/browse/trunk/xml/json.php?spec=s
vn986&r=986

then I created a php file from it (attached). If I use "gallery" it 
gives me this error:

"XML Parsing Error: not well-formed
Location: 
http://www.mydomain.com/wordpress/index.php?callback=json&api_key=true&format=xm
l&method=gallery&id=3
Line Number 35, Column 2:<0></0>
-^"

but when I "view source" in the browser I can see the gallery xml.

I'm using Version 1.8.2

Original comment by vanasfer...@gmail.com on 29 Aug 2011 at 5:47

GoogleCodeExporter commented 8 years ago
json.php

Original comment by vanasfer...@gmail.com on 29 Aug 2011 at 6:04

Attachments:

GoogleCodeExporter commented 8 years ago
The json.php you attached is no based on r986

Original comment by alex.cologne on 29 Aug 2011 at 6:56

GoogleCodeExporter commented 8 years ago
Sorry about that, I had too many versions saved. It's working now:

<nextgen-gallery>
<album>
<id>1</id>
<name>Portfolio</name>
<slug>portfolio</slug>
<previewpic>16</previewpic>
<albumdesc>Our Clients</albumdesc>
<sortorder>a:6:{i:0;s:1:"6";i:1;s:1:"1";i:2;s:1:"2";i:3;s:1:"3";i:4;s:1:"4";i:5;
s:1:"5";}</sortorder>
<pageid>4</pageid>
<galleries>
<id-0>6</id-0><id-1>1</id-1><id-2>2</id-2><id-3>3</id-3><id-4>4</id-4><id-5>5</i
d-5>
</galleries>
</album>
<stat>ok</stat>
</nextgen-gallery>

I see what you mean, it's going to be a great enhancement. What will the 
gallery data look like? Will I eventually hit the same script to return 
the gallery data as well?

http://www.mydomain.com/wordpress/index.php?callback=json&api_key=true&format=xm
l&method=album&id=1

Original comment by vanasfer...@gmail.com on 29 Aug 2011 at 7:43

GoogleCodeExporter commented 8 years ago
I need to check what is the best, currently you get the gallery id's, so in the 
same way you fetch the album you can get the gallery (just take a different 
method).

Your own approach return the album & galleries & images, which is just one 
callback, but a lot of database queries. 

I work now on a different task, but come back to this in a couple of weeks

Original comment by alex.cologne on 29 Aug 2011 at 8:20

GoogleCodeExporter commented 8 years ago
Hi Alex,

Thanks for the help, I appreciate the time you spent. I'm going to try 
and get a PHP developer to help me finish, because I need to use this 
feature for a current project. Can you give me an idea how much 
development time it might require? Would it be more than 10 hrs?

Original comment by vanasfer...@gmail.com on 30 Aug 2011 at 5:34

GoogleCodeExporter commented 8 years ago
Didn't understand your question, you have already a solution... What else do 
you need for now ?

Original comment by alex.cologne on 30 Aug 2011 at 6:08

GoogleCodeExporter commented 8 years ago
Sorry, what I mean is that I need all the gallery data for the selected album, 
not just their id's.

Original comment by vanasfer...@gmail.com on 31 Aug 2011 at 6:02

GoogleCodeExporter commented 8 years ago
Hello Alex,

I've revisited this project and was wondering if you've had time to add the 
feature to display the galleries data along with the ID's?

Thanks,
Ferdinand

Original comment by vanasfer...@gmail.com on 14 Apr 2012 at 9:32

GoogleCodeExporter commented 8 years ago
i'm using json for it. 
http://www.mydomain.com/wordpress/index.php?callback=json&api_key=true&format=js
on&method=autocomplete&type=gallery

It returns all the information of a gallery.

Hope it will solve your issue.

Original comment by saur...@digisarathi.com on 4 Sep 2014 at 2:55