Memorial Day
Support will be closed on Monday, May 28th, 2012 to enjoy Memorial Day with our friends and families.
   
1 of 3
1
Delete entries and comments PLUGIN
Posted: 30 July 2010 06:13 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

As you know, deleting entries and comments is not possible outside of the Control Panel, by default.
Yet, sometimes there is a need to give some members (or member groups) this feature, without exposing the CP to them. For example, to enable a member to delete their own comments in context (as it’s the case with many social networking sites), or to give them full control over the content they’ve created on a “dashboard-like” page.

This plugin does just that. There are three tags you can use:
* link: to generate a link to a “delete comment” or “delete entry” template
* delete_entry: guess what..
* delete_comment: to delete a comment

User feedback messages are customisable via parameters, and so are behaviours like js alert.
Detailed documentation on the plugin usage function…

You can download the plugin for both EE1 and EE2 here:
http://devot-ee.com/add-ons/delete-entries-and-comments/

Enjoy! (If you do, let us know how you used the plugin here: http://www.milocreative.com/blog/view/expressionengine-free-goody/)

[Mod Edit:Attachment removed as per the Community News Guidelines]

Profile
 
 
Posted: 30 July 2010 01:11 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  28
Joined  04-02-2009

Sounds like a nice little plugin. I haven’t had the chance to try it out yet, but look forward to doing so. I’ll make a post on your site and let you know my thoughts.

Smart idea, could prove very useful in social networking application or sites with a large base of user generated or collaborative content.

Thanks for sharing.

 Signature 

Alexander Jones
Logiq Design
http://www.logiqdesign.com
award-ee
http://www.award-ee.com

Profile
 
 
Posted: 30 July 2010 01:48 PM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7268
Joined  05-07-2007

Moving this up to the community news forums.  Please take a look at the 3rd party addons policies blog post.  Thanks!  smile

 Signature 

gregaker.net | Follow me on Twitter

Profile
MSG
 
 
Posted: 30 July 2010 04:29 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  4
Joined  07-30-2010

gonna try that plugin soon, thanks very much smile

Profile
 
 
Posted: 06 August 2010 05:25 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  730
Joined  11-11-2006

Hi milo, will there be an EE2 version:)

Profile
 
 
Posted: 09 August 2010 06:12 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

An EE 2 version of the plugin is surely in our to-do list, but not top priority as of yet. I can’t anticipate how long this will take, so in the meanwhile feel free to use the current version as a springboard for an EE2 port.

Profile
 
 
Posted: 20 October 2010 07:48 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  730
Joined  11-11-2006

Thanks. An EE2 version is out: http://devot-ee.com/add-ons/delete-entries-and-comments/

Profile
 
 
Posted: 22 October 2010 02:42 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-13-2010

This is just what I needed, I was using a SAEF to change an entry status to hidden which was a bit messy.

This works a treat, another great plugin for EE.

Profile
 
 
Posted: 22 October 2010 02:49 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  730
Joined  11-11-2006

Watch out, it doesn’t update the comment total for the entry.

Profile
 
 
Posted: 22 October 2010 03:13 PM   [ Ignore ]   [ # 9 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-13-2010

Well spotted Lee. It’s not a problem for what I’m using it for right now but surely its an easy fix for Milo. Cheers.

Profile
 
 
Posted: 22 October 2010 03:14 PM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  730
Joined  11-11-2006

I swapped about 10 emails with him, but it became confusing and in the end he stopped replying.

Profile
 
 
Posted: 22 October 2010 03:29 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-13-2010

Oh well!

Maybe someone could improve the code… It doesn’t sound too difficult although I wouldn’t know how to myself.

Profile
 
 
Posted: 25 October 2010 06:39 AM   [ Ignore ]   [ # 12 ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

Hi there,

sorry I had problems posting to this forum thread. EE kept telling me that I have no permission to write a reply, how funny..

@leeaston, which email did you send your questions to? I haven’t personally received any. You could write to matteo [at] milocreative.com

Cheers,
Matteo

Profile
 
 
Posted: 25 October 2010 06:44 AM   [ Ignore ]   [ # 13 ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

Also, thanks for spotting the total comments bug. It’ll be a quick fix.

Profile
 
 
Posted: 30 October 2010 11:13 AM   [ Ignore ]   [ # 14 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-13-2010

Hi Milo, that’s great news… is this fixed now?

Profile
 
 
Posted: 01 November 2010 06:57 AM   [ Ignore ]   [ # 15 ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

Hi there, it is fixed actually. You can grab it from devot-ee: http://devot-ee.com/add-ons/delete-entries-and-comments/

Profile
 
 
Posted: 05 November 2010 02:48 AM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  352
Joined  07-19-2010

Any chance of an example how to use this or a link to some documentation?

Thanks

Paul

Profile
 
 
Posted: 05 November 2010 03:01 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  352
Joined  07-19-2010

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}

    
<p>You currently have no service listings.</p>

    
{/if}



    
<p><a href="{entry_id_path=add-service}">{title}</a><br /></p>

    
{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

Profile
 
 
Posted: 10 November 2010 07:13 AM   [ Ignore ]   [ # 18 ]  
Summer Student
Avatar
Total Posts:  25
Joined  03-06-2009

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

Profile
 
 
   
1 of 3
1