Hi there, it is fixed actually. You can grab it from devot-ee: http://devot-ee.com/add-ons/delete-entries-and-comments/
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 30, 2010 7:13am
Subscribe [17]#16 / Nov 01, 2010 7:57am
Hi there, it is fixed actually. You can grab it from devot-ee: http://devot-ee.com/add-ons/delete-entries-and-comments/
#17 / Nov 05, 2010 3:48am
Any chance of an example how to use this or a link to some documentation?
Thanks
Paul
#18 / Nov 05, 2010 4:01am
I am not sure what the value for “template” should be. I am trying to use the example you provided. Also why have you put the string “image” into the “type” parameter. Is this not the message that appears in the alert box?
It says in the documentation:
- template (required): name of the template containing the {exp:delete:delete_entry}
The template that I have put the code below in is called “MyServices” i.e http://.www.mysite.com./index.php/myServices
{exp:delete:link
id="{entry_id}"
type="image"
template="images/delete"
alert="false"
}
Delete
{/exp:delete:link}
Here is your example embedded into my code
{exp:channel:entries channel="services" search:member_id_ref="=<?php echo $memberReferenceId; ?>" }
{if no_results}
You currently have no service listings.
{/if}
<a href="http://{entry_id_path=add-service}">{title}</a>
{exp:delete:link
id="{entry_id}"
type="image"
template="images/delete"
alert="true"
}
Delete
{/exp:delete:link}
{/exp:channel:entries}
Thanks for a great plugin!
Paul
#19 / Nov 10, 2010 7:13am
Hi Paul,
sorry for the late reply.
The template parameter is used in the {exp:delete:link} tag to reference the template where you place the {exp:delete:delete_entry} or {exp:delete:delete_comment} tags. It is used to generate the actual link to that template.
So, you’ll have two templates:
1. one that lists some entries and generates a link to delete each individual entry
2. one that takes in an entry_id parameter, and deletes that entry
Let’s assume you have a blog template group, which contains several templates..
The list template will look like this:
{exp:channel:entries
channel="blog"
limit="5"
}
{exp:delete:link
id="{entry_id}"
type="blog post"
template="blog/delete"
alert="true"
}
Delete "{title}"?
{/exp:delete:link}
{/exp:channel:entries}
The above will generate links like this:
<a href="http://example.com/blog/delete/213">Delete "Example title"</a>
..where 213 is the entry_id value.
When clicking that links, if the alert value is set to true, then users will be shown an alert, reading “Do your really want to delete this blog post?” That’s where the type parameters comes handy, you see?
The delete template (blog/delete), will look like this:
{exp:delete:delete_entry
entry_id="{segment_3}"
error_no_permissions="You're not allowed to delete this blog post"
error_invalid_content="It seems that this blog post has been already deleted"
message_success="Blog post deleted!"
}
Hope this helps.
Matteo
#20 / Nov 10, 2010 7:15am
Thanks Matteo
I did manage to work it out and it works really well.
Thank you!!
Paul
#21 / Nov 23, 2010 4:45pm
Hi Milo. I’m interested in using this plugin to have my clients delete their entries. However, is there a way I could use this plugin to delete more than 1 entry at a time? It would be nice to mimic the way EE CP allows entries to be deleted. Check the box for each one and choose delete and it will delete each entry selected. This would save my clients a lot of time if they need to delete multiple entries or even all entries for a particular category.
Maybe you could point me in the right direction to accomplish this?
Thank you,
Chad Boswell
#22 / Nov 24, 2010 6:33am
Hi Chad,
you could do it with a bit of PHP and a couple of templates:
* on the first template you create a list of entries with checkboxes, which will pass an array of entry_id values to the next template (via POST)
* on the second template (where PHP parsing will be enabled, on input) you loop through the entry ids, including each of them in a {exp:delete:delete_entry} tag, which will delete the entries..
I haven’t tested the method above myself but I’m confident it’ll work..
Let me know how it goes!
Matteo
#23 / Nov 24, 2010 11:39am
Matteo,
I appreciate your suggestion. Unfortunately I don’t know much PHP so I’m not sure how to go about setting up these templates you suggested. Any chance you could give me an example I could use?
I think for the checkboxes I could probably put it in a weblog entries tag and make the value of the checkbox the entry_id and so I’d have that much. Does that sound like the correct way for the checkboxes part of your suggestion?
Thanks,
Chad Boswell
#24 / Dec 10, 2010 10:52pm
Milo,
I’ve got this set up, but every time I click the delete comment link I get the message “It seems that this comment has been already deleted” I’m not sure what I’m doing wrong as I’ve read and re-read and re-read the docs and triple checked everything.
my template code where the comments reside
{exp:delete:link
id="{comment_id}"
type="image"
template="blog/delete_comments"
alert="false"
}
Delete Comment
{/exp:delete:link}
and the blog/delete_comments code
{exp:delete:delete_comment
comment_id="{comment_id}"
error_no_permissions="You're not allowed to delete this comment"
error_invalid_content="It seems that this comment has been already deleted"
message_success="Comment deleted!" }
#25 / Dec 11, 2010 9:04am
Hey ya’ll—support for third party add-ons needs to be done elsewhere. You can leave a thread on http://devot-ee.com/add-ons/delete-entries-and-comments/.
#26 / Jan 12, 2011 7:45pm
Hi guys,
Where can I find the documentation for this very useful sounding plugin?
Thanks
#27 / Jan 13, 2011 6:46am
@jamestowers: in the plugin itself, there is a “usage” function which illustrates how to use it.
#28 / Oct 04, 2011 7:14am
I’ve been finding this plugin really useful but have just realised something: after deleting an entry, the cache for templates that were displaying that entry aren’t cleared, so it still appears in them. This is a bit of a deal-breaker for me, as performance is a big issue on the site I’m building.
So I’m wondering if there’s a way to automatically clear the caches of the relevant templates after this plugin is used? Or is there another way of handling this? I guess I could, instead of deleting entries, set their status to Closed. But then my client would need to manually delete the Closed entries every so often, which isn’t ideal.
Any ideas very welcome!
#29 / Oct 05, 2011 8:21am
I’ve just uploaded a new version (2.1) of this plugin, which uses the EE2.x API to delete entries.
Grab it from http://devot-ee.com/add-ons/delete-entries-and-comments
@Frank, one of the benefits of this upgrade is that the API call clears all caches after an entry has been deleted 😊
#30 / Oct 05, 2011 8:22am
Wow - that’s great news! Thanks so much