Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

One-Click Delete and Ban Snippet

EllisLab alum and web developer Derek Allard shared a snippet he uses to have a “delete and ban” link next to comments on the front end of his site. When he gets a spam comment he can easily dispose of the problem and ban the user.

When spammers do sneak comments through my blog, I have a very simple one click* snippet to ban them similar to the way the EE forum’s “ban member” option works. Essentially, beside every comment, I have a “delete & ban” link. This saves me needing to fire up my control panel, and navigate to the proper place. It just saves a bit of clicking around.

The snippet is similar to other code you may have used before that code direct links to the Control Panel in your template and use the entry_id variable to point to the proper entry or comment.

Read Derek’s post for the code and details.

Posted on Dec 20, 2011 by Ryan Irelan

Filed Under: Development Tools