Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-02-01 02:41:41

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Article create/delete/update API

In the interest of data integrity and security, would the devs consider providing some functions/APIs for us amateurs to use in plugins for:

  • publishing new articles
  • updating articles
  • deleting articles

Despite our best efforts it would be much safer and reliable to have all these operations done by the core. So we chuck in the data, the core takes care of the scary stuff.

Offline

#2 2013-02-01 05:28:43

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Article create/delete/update API

boo! {argh!}

Offline

#3 2013-02-01 12:43:02

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,263
GitHub

Re: Article create/delete/update API

Relevant, Adi?

Offline

#4 2013-02-01 14:07:01

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Article create/delete/update API

That XML-RPC is something bit else; it’s more of something that would be consumed as a dependency by the thing Adi is after.

What Adi presumably is after is in terms of what dev branch (4.6) has been adding to the core; easy to use interface exposing public setters and getters. This is likely going to happen for articles too in the future, to some degree — articles are bit more specific and complicated. The 4.6 codebase in last few months has gotten some of that API stuff, most of which is totally just placeholder code (don’t use the API functions, they may not be staying).

What briefly have been in talks, is upping to PHP 5.3 and adopting a object-relational mapper. Data-type specific getters and setters would then be build on top of that ORM. But who knows.

Offline

#5 2013-02-01 21:33:42

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Article create/delete/update API

Hi Jukka, thanks for the reply.

Gocom wrote:

What Adi presumably is after is in terms of what dev branch (4.6) has been adding to the core; easy to use interface exposing public setters and getters.

Yep, that’s the sort of thing.

This is likely going to happen for articles too in the future, to some degree — articles are bit more specific and complicated.

Great news. Yes, there’s a lot more to articles than meets the eye. In the meantime I’ll try to tread (i.e. code) carefully.

Offline

Board footer

Powered by FluxBB