Topic: Integrating with external application

Hi,

I'd like to write an external client side app for PunBB, which will allow to down-sync
online articles and post new articles.

Why? Because I'd like to take articles with me, prepare posts offline and supply
a bit more support [e.g. text snippets].

The app will be released for OS X first, then Windows and (probably) Linux too.

Thus, I need an API to retrieve contents of a PunBB system. The general idea is this:

- Define a central xchange.php script, which allows to communicate
  with a PunBB in the web or intranet
- A first call to xchange.php would post credentials of the user.

I know, that I could use the 'pure' DB tables to read/post data. But I wonder,
if there is another/better interface, which I should use to prevent breaking the
app, one a new PunBB release is available.

Could someone point the right direction? Do we have an SDK for this?

Ah: I'll release the xchange.php back to PunBB, but the client side app might or
might not be open source.

Cheers,

Stefan

Re: Integrating with external application

No one?  Then I suppose PunBB doesn't have a layer to do this
project.

OK. I'll start working at the DB layer then.

3

Re: Integrating with external application

I'm moving this from programming to the integration forum. You might have more luck there.

4

Re: Integrating with external application

A.f.a.i.k. ther is no SDK, the only thing coming close to that is extern.php .
This does not do what you want but it might give you a good starting point to create one wink

The German PunBB Site:
PunBB-forum.de

Re: Integrating with external application

Ok, good hint. Thx!

I'll follow this route:

- Enhance extern.php with an optional parameter 'style':
 
  style=XML -> Export data as XML, not HTML

- Add a new exxml.php which extern.php will call, if
  style == XML.

- exxml.php will do the real XML processing of the result XML data

- Moreover, I'd be happy to have a PunBB global property which
  enables the XML interface if checked.
- Additionally, I'd like to enable/disable the XML interface on a per user basis.

Do we have 'reserved' fields for such additional access rights? Or should I
invent a new table (I don't like to have a new table, though) or send a
change request?

Never worked on an open source project, so I basically don't know, how to
do what...

6

Re: Integrating with external application

I would forget about the extern.php.
I thought of it more as a guideline on how to interact with the PunBB system.

I am just sitting on a PHP/SOAP interface to PunBB that will be able to do a lot more than extern.php, like fetching topics, forum lists and so on and even allowing to post.
That way PunBB could serve as a backend only and everybody could do what he (and she tongue ) wants on the frontend.
Of course it will always be a subset of the PunBB functionality but if you don't need more it will do the trick.
I am not sure how far I can take it, currently I am stuck with the cookies. There is no really good explanation on handling cookies with soap/php.

The German PunBB Site:
PunBB-forum.de

Re: Integrating with external application

OK, good to know. I'll forget about extern.php and loosly base a new code module
partly on extern.php.

SOAP would be great to use, but - due to certain technical restrictions - I'd prefer
a simple SOAP API, which doesn't use SOAP arrays.

Meanwhile, I'll play around a bit.

In case your SOAP ifc is ready, I'm happy to test it and/or integrate my app.

Ah: Are cookies really part of SOAP and not part of the HTTP protocol/header
itself? Don't know exactly.

8

Re: Integrating with external application

As I said I've been playing around with it a bit.
I could not find a native set cookie command for a soap server but you can add cookies in whatever language you are using and they arrive at the client.
The annoying part is that the soap client is not the web client so you have to pass two cookies back and forth....

Asfor the arrays: I don't know what you mean with arrays but you can always use a ComplexType with a series of values.
It is standard and it is at least handled by PHP.

The German PunBB Site:
PunBB-forum.de

9

Re: Integrating with external application

Just in case you're waiting:
I have the viewtopic, viewforum and login parts done but they're anything elase than stable or even clean.
Server side is php, client side is currently php as well but of course you could use anything. (I think that's the meaning behind SOAP.. smile )
The drawback is that the SOAP functions are new to PHP, so 5+ is a must.
I will not release this very soon because it is absolutely pre-alpha yet but if you're really after it or want to have a look if you can use something like that I can mail you what I have.

BTW: For lists there is really no way around arrays, however I tried not to use native ones.

The German PunBB Site:
PunBB-forum.de