Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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
Re: Delete article from the write tab
I’ve got a copy of ebl_articleDelete
Offline
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
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
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
Pages: 1