Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Member Banning ExpressionEngine snippet

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.

I never thought much of it, but yesterday it co-incidentally came up when I showed another EE dev my site’s control panel for something totally unrelated. Since I implement the “one click delete” in a snippet, I thought I’d share it here:

{if can_moderate_comment}
     [ 
<a href="{cp_url}?S=0&D=cp&C=addons_modules&M=show_module_cp&module=comment&method=index&entry_id={entry_id}">delete &ampban</a]
{
/if} 

And then in my template

{exp:comment:entries}

    
<p>{url_as_author} wrote{ban_member_snippet}</p>

    
{comment}

{
/exp:comment:entries} 

I’ve used this sucker for so long I forgot all about it. If you have any “go to” snippets, code or tricks, please post them in the comments here!

* Technically its probably 2 or 3 clicks :)



This post first appeared on CodeIgniter, ExpressionEngine And The Worlds Of We, please read the originial post: here

Share the post

Member Banning ExpressionEngine snippet

×

Subscribe to Codeigniter, Expressionengine And The Worlds Of We

Get updates delivered right to your inbox!

Thank you for your subscription

×