Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

boards.ie API? Documentation of non-standard features?

Options
  • 04-10-2008 2:08pm
    #1
    Subscribers Posts: 4,075 ✭✭✭


    Is there an API for interacting with boards.ie programmatically?

    Failing that, is there any list of features of boards.ie which aren't in the core vBulletin software?

    I ask because I was thinking that it would be cool to have an iPhone app for reading/posting to boards.ie and I'm trying to figure out how much effort it would be. My current feeling for it is that if there is a good API to work against it should be a bit of fun to try to make one but I don't think it would be worth the effort if it was really fragile.

    Perhaps there are two projects here. First, make an API, then make the app.

    Any pointers or pitfalls that anyone knows of?


Comments

  • Closed Accounts Posts: 10,817 ✭✭✭✭Dord


    IRLConor wrote: »
    I ask because I was thinking that it would be cool to have an iPhone app for reading/posting to boards.ie and I'm trying to figure out how much effort it would be.

    Just point your browser to http://m.boards.ie :)


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    Dord wrote: »
    Just point your browser to http://m.boards.ie :)

    :)

    Yeah, I've been using that quite a bit.

    It's about 80% there on the iPhone, but could be way more usable. PMing in particular could be improved and in general, anything which involves entering text is irritating since the text field is wider than the screen and doesn't always scroll properly. A full-on iPhone-specific theme would fix a lot of this, but would have all the maintenance overhead that an extra theme involves for CuLT.

    I figure that a boards.ie-aware app could be faster too. If it cached stuff like forum lists and subbed forums and didn't have to download images you could have an experience much closer to real boards.ie without the network overhead.


  • Subscribers Posts: 9,716 ✭✭✭CuLT


    Nothing but the rudimentary http://developer.boards.ie/api


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    CuLT wrote: »
    Nothing but the rudimentary http://developer.boards.ie/api

    Interested in expanding that?

    I would do the heavy lifting and make it as easy as possible for you to integrate it.


  • Subscribers Posts: 9,716 ✭✭✭CuLT


    IRLConor wrote: »
    Interested in expanding that?

    I would do the heavy lifting and make it as easy as possible for you to integrate it.
    That'd be great, kinda hard for me to get time for these sorts of things, I'm the swiss-army knife of boards, it's hard to justify time on an API when there are actual money generating things that I have to work on.

    For all my good intentions I'm split too many ways to devote enough attention to any one thing. Hopefully we'll get more devs on board and then we can start having fun :)

    That said, I'll do what I can for this if you're willing!


  • Advertisement
  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    Sweet. I'll have a think about this over the next while and try and come up with a reasonable plan of attack.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    That's a great idea, IRLConor - pm sent.


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    Two questions (first one just for CuLT/another Admin, anyone else feel free to pitch in on the second):
    1. What PHP modules are available? Boards.ie is running on PHP5 right? (Feel free to PM me if you'd prefer to not leave the exact details open to the world and his grannyGoogle)
    2. How separate would you like the API code to be? At one extreme, I could have it post'n'scrape to/from the forms that vBulletin exposes. At the other end of the spectrum, the API code could call the vBulletin functions directly. The latter requires more cooperation from CuLT but the former would probably be prone to breakage when stylistic changes or small bugfixes are made to the HTML which is spat out by vBulletin.


  • Subscribers Posts: 9,716 ✭✭✭CuLT


    1. developer.boards.ie is operating on PHP5 and Apache 2.2, and I've no problem installing extra modules, PEAR stuff etc if it'll help.
    2. Ideally, it would call the vBulletin functions directly. This would allow, if it's safe to do so, for us to release the API as a free modification for other vBulletin site owners if that's what the devs (ie you and anyone else involved) wants to do.

    If it'll work for others Boards.ie itself certainly would be eager to give an effort like that back to the community.

    Sorry for being so late getting back to you, forgot about this thread!


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    CuLT wrote: »
    1. developer.boards.ie is operating on PHP5 and Apache 2.2, and I've no problem installing extra modules, PEAR stuff etc if it'll help.

    Excellent, thanks.
    CuLT wrote: »
    2. Ideally, it would call the vBulletin functions directly. This would allow, if it's safe to do so, for us to release the API as a free modification for other vBulletin site owners if that's what the devs (ie you and anyone else involved) wants to do.

    If it'll work for others Boards.ie itself certainly would be eager to give an effort like that back to the community.

    I would definitely be in favour of open-sourcing it. BSD license probably, makes the licensing more simple w.r.t. the fact we'd be calling proprietary code directly from it. If it would make things easier, I'd also be willing to assign copyright to Boards Ltd.
    CuLT wrote: »
    Sorry for being so late getting back to you, forgot about this thread!

    No bother, I've been really busy in real life anyway so I haven't had much of a chance to work on it. I'm cleaning up the first hack I made. As soon as it's legible I'll post it somewhere so that people can throw rocks at it and find the holes in my thinking.


  • Advertisement
  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    OK, here's a first cut at the problem:

    Code: http://vbulletinapi.mcdermottroe.com/api.zip
    Code Docs: http://vbulletinapi.mcdermottroe.com/doc/
    "User" Docs: http://vbulletinapi.mcdermottroe.com/api/

    This version only allows XML-RPC as the encoding of the calls but other encodings are easy enough to add (extend the Encoder class and drop it in the same directory as XMLRPC.php). I intend to add JSON-RPC in the near future.

    There is one method that can be called: "viewPost". It currently returns dummy data but should be easy enough to make return real data once it gets hooked up to the correct vBulletin functions. To add further methods, extend Action and drop the resulting class in the same place as ViewPostAction.php.

    My #1 priority task for the next while is to stub out a whole bunch of Action classes to try and figure out what should and should not be exposed in the API.

    If anyone has comments or criticisms please shout. If anything is not clear, please let me know.


  • Subscribers Posts: 9,716 ✭✭✭CuLT


    Your code is superb; this is the reason I don't like anyone seeing my code, it is horribly rushed and simply doesn't compare :) Especially modutils.

    Will have a closer look at it in the next couple of days. Poking around your site I notice you maintain the port for o2sms. It strikes me that we've had this "Boards Beep" field in user profiles for a while. If that were extended to allow people to add their o2/vodafone/meteor password, I imagine it would be trivial to allow people to set themselves up with SMS notifcations for PMs at no cost to boards.ie or the user...

    Maybe someone's thought of that before though :)


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    CuLT wrote: »
    Your code is superb;

    Thanks. :o
    CuLT wrote: »
    this is the reason I don't like anyone seeing my code, it is horribly rushed and simply doesn't compare :) Especially modutils.

    Well, I have an unfair advantage, I don't have to code to a timetable. :) The stuff I do to deadlines is a hell of a lot uglier. The fact that my first language was Perl doesn't help either. :D
    CuLT wrote: »
    Will have a closer look at it in the next couple of days. Poking around your site I notice you maintain the port for o2sms. It strikes me that we've had this "Boards Beep" field in user profiles for a while. If that were extended to allow people to add their o2/vodafone/meteor password, I imagine it would be trivial to allow people to set themselves up with SMS notifcations for PMs at no cost to boards.ie or the user...

    Maybe someone's thought of that before though :)

    Sure, that should be easy enough.

    Now you've reminded me, I have to go and update those ports!


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    IRLConor wrote: »
    I intend to add JSON-RPC in the near future.

    Done.
    IRLConor wrote: »
    My #1 priority task for the next while is to stub out a whole bunch of Action classes to try and figure out what should and should not be exposed in the API.

    Working on this now.


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    Updated again.

    Changes as follows:
    • Renamed ViewPostAction to GetPostAction
    • Created an initial version of GetThreadAction
    • Created an inital version of a Thread data object
    • Fix a bug where argument defaults weren't documented due to a typo
    • getAllEncoders now returns the Encoders in order, sorted by name

    I need to figure out how to design the API "blind" with no visibility into the vBulletin code. For the moment I'm looking at http://members.vbulletin.com/api/ for hints but it's quite vague. For example, fetch_postinfo and fetch_threadinfo both return arrays but neither say what data is available.

    Maybe I'll just wait for sterling to slide a bit further and then I'll buy a copy. :D


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    A few more changes.

    I've added the code as a project on Google Code Hosting. PM me if you would like commit access. Feel free to use the code review function there too or file bugs in the issue tracker.

    Code changes are as follows:
    • Provided a mechanism for encoders to implement encoding-specific actions.
    • Implemented XML-RPC introspection methods.
    • Implemented Action::getName().
    • Action::returnSpec() and Action::getDescription() are now public.
    • Fixed a bug where the value in a <param> was not wrapped in a <value> element.

    I've also created the beginnings of a test suite. Very rudimentary at the moment but it should detect major breakages.

    http://vbulletinapi.mcdermottroe.com/api/api.php is still available as an endpoint to play with and should roughly track tip-of-tree in Subversion. Docs for the revision at that endpoint will still be available at http://vbulletinapi.mcdermottroe.com/api/ and http://vbulletinapi.mcdermottroe.com/doc/.


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    If anyone wants to try out the code, it now actually works.

    Make the obvious change in config.php* and both getPost and getThread work.

    All bug reports will be gratefully received.

    * That is, point it at the directory where your vBulletin instance lives.


  • Closed Accounts Posts: 2 nessur


    IRLConor wrote: »
    If anyone wants to try out the code, it now actually works.

    Make the obvious change in config.php* and both getPost and getThread work.

    All bug reports will be gratefully received.

    * That is, point it at the directory where your vBulletin instance lives.

    This looks great! I can't find a working link for a .zip for the whole package, though. Are you keeping it on a SVN or other source control URL?


  • Closed Accounts Posts: 2 nessur


    nessur wrote: »
    This looks great! I can't find a working link for a .zip for the whole package, though. Are you keeping it on a SVN or other source control URL?

    nevermind... I just found the SVN URL on the 'Source' tab in the Google Code project. Cheers!


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    Very sorry for the lack of activity recently. There are 2 reasons for this:
    1. I've been working on the authentication and permissions parts of the project and that's tricky and I don't want to check in broken code.
    2. I've been really busy in work and haven't had the time/energy to work on it.


  • Advertisement
  • Registered Users Posts: 721 ✭✭✭TheTubes


    Great work!

    Is there a version of this running on boards.ie at the moment?
    Or is a case of testing it by downloading the code and running it against a vBulletin instance on ones own domain (I don't have 1 :o ) ?


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    TheTubes wrote: »
    Great work!

    Thanks!
    TheTubes wrote: »
    Is there a version of this running on boards.ie at the moment?

    Not at all, the software isn't really ready for that.
    TheTubes wrote: »
    Or is a case of testing it by downloading the code and running it against a vBulletin instance on ones own domain (I don't have 1 :o ) ?

    I would not recommend running it with a real vBulletin instance visible to the outside world. While I've tried to be careful with input, I haven't explicitly gone through the code with the intention of checking it for security flaws. I plan on doing that (and hopefully roping some others into cross-checking me) after I get logins and permissions implemented.

    The current roadmap-in-my-head is:
    1. Login/logout [in progress (slowly)]
    2. Permissions [partially stubbed out]
    3. Review (both security and general "clean-up")
    4. Read/write stuff
    5. ???
    6. Profit!


  • Closed Accounts Posts: 1 TeCNoYoTTa


    Hi IRLConor ... i want to know when you will finish the API ... and if you needed any help :D


  • Subscribers Posts: 4,075 ✭✭✭IRLConor


    TeCNoYoTTa wrote: »
    Hi IRLConor ... i want to know when you will finish the API ... and if you needed any help :D

    I'm tipping away at it in my spare time. Progress is slow, but I am making some. I definitely need help, this is a big project.

    If you have a copy of vBulletin you can check out the code from Google Code Hosting. If there's any particular feature you're interested in implementing, then have a go at implementing it and send me a patch.

    If you don't have a vBulletin license it will be a bit trickier since you won't be able to test anything.


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.

Advertisement