Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-02-10 10:15:29

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

Delete article from the write tab

Hi :)
Is there a way to delete an article from the write-tab please?

I saw that in the past there was the “ebl_articleDelete” plugin, but the download link is broken.

Offline

#2 2013-02-10 10:24:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: Delete article from the write tab

THE BLUE DRAGON wrote:

Is there a way to delete an article from the write-tab please?

Don’t know about the plugin you mention specifically, but I doubt it’s hard to write a similar one in 4.5.x.

The question is not exactly how to implement the delete itself (which is pretty simple — safe_delete('textpattern', 'ID=the_id_of_the_article_on_screen')), it’s what to do afterwards that’s the question. e.g. go back to Articles panel, show blank Write panel, load next (or previous) article, etc. Bear in mind that the search criteria that landed you at the Write panel (if you visited from the Articles panel) will have been lost so you won’t be able to intelligently pick “next/previous” article if you’d previously filtered by section/category or something, it’ll just (probably) be by next/prev ID.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2013-02-10 10:37:49

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

Re: Delete article from the write tab

Yea that’s a good question Stef, I will love to have one that after the delete just show blank Write panel please.

Offline

#4 2013-02-11 10:21:31

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: Delete article from the write tab

I’ve got a copy of ebl_articleDelete

Offline

#5 2013-02-11 10:48:03

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Delete article from the write tab

Actually that would be a nice addition to core. Why navigate to the Articles tab to delete an article?

Offline

#6 2013-02-11 12:12:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: Delete article from the write tab

The ebl plugin is fine but it probably needs a bit of hardening to mitigate injection attacks from deleting articles.

I had a go yesterday with making a tiny plugin using the partials to place it after the ‘View’ link alongside the article title, but could I get it to display there? No. Grrrrrrr. I think the plugin’s output was getting overridden by the core for some reason, but then it could have just been my crap code.

Last edited by Bloke (2013-02-11 12:13:28)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2013-02-11 12:40:09

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Delete article from the write tab

I guess that’s my point – should be a core responsibility to offer a delete link/button and use internal safe mechanisms to delete articles. Guessing that’s what the list tab uses?

Offline

#8 2013-02-11 23:45:09

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

Re: Delete article from the write tab

I’m building a delete article feature (amongst other things) into adi_matrix at the moment & it’s not as obvious as you’d think – apart from deleting the relevent article itself from textpattern there’s some txp_discuss table housekeeping to do as well.

Hopefully one day there’ll be a “safe” way for plugins to do these sort of operations.

Offline

#9 2015-08-25 01:53:48

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

Re: Delete article from the write tab

adi_article_tab provides a delete button.

Offline

Board footer

Powered by FluxBB