Go Back   Pligg CMS Forum > Pligg Development > Pligg Modules

Reply
 
LinkBack Thread Tools
Submit Antispam Addon v 0.1 Details »»
Submit Antispam Addon v 0.1
Version: , by AnAlienHolakres3 (Pligg Developer) AnAlienHolakres3 is offline
Developer Last Online: Jul 2008 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-06-2008 Last Update: Never Installs: 0
 
No support by the author.

Hello everyone, this is Submit Antispam Addon module.

This is a FREE module which can be also downloaded from Pligg download page.

Most of you are bored of never ending spam. This module can solve your spam problems at 99%. Forever.

This module allows create user authorizations to submit certain number of new stories/comments based on quality of recent user submissions.

It means there is a restriction policy for submitting new stories:
  • Level 0 Authorization = (default) user authorization, user can submit 1 story per day
  • Level 1 Authorization = user authorization, user can submit x stories per day
  • Level 2 Authorization = user authorization, user can submit y stories per day
  • Level 3 Authorization = user authorization, user can submit z stories per day

How many links can be submitted, average user link votes count required to get certain level of autorization,enabling comment restriction policy and modifying comment multipler - all of these can be done after installing in Admin page in Pligg Configuration section, specificly Submit AntiSpam Addon category.

How it works:
It is pretty simple - when user reach submission limit then they will not be able to submit next story/comment in following 24 hours. See attached pictures.

Installation:
Download submit_antispam.zip archive, unpack and copy to your Pligg Modules folder.

1) open submit_step_3.tpl (located in templates/template folder) and at the end after "</fieldset>" tag add:
Code:
{checkActionsTpl location="tpl_submit_step_3_end"}
2) if you want to use comment restriction as well (default value is true) open story.php in root folder and into function insert_comment() before require_once(mnminclude.'comment.php') add:
Code:
	check_actions('story_insert_comment',$vars);
Now you can install this module in Modules option in admin panel.
Compatibility note: This module was developed on 9.7 version but it was successfully tested on 9.9 version of Pligg.

Module language can be changed in lang.conf file, styles in css file. Javascript file is not supposed to be changed until you are pretty sure what you do.

Module configuration:
This is Alfa and Omega of this module. There is no general option how configure this module to work on all sites. Only you know what are your users and how strict restrictions should be. Letīs see individual settings which can be customized in Submit Antispam Addon:
  • links history count
  • level 1-3 user authorization
  • level 1-3 allowed links count
  • enable comment restriction
  • comment submission multiplier

Links history Count
How many latest user links are evaluated when average user links votes value is calculated - in the other words this is "retrospective settings". It can be set for links and comments the same value only.
[Tip - if you want to distinct value for comments, open submit_antispam_main.php and change:]
Code:
$average_u_c_v=$db->get_var("SELECT avg(comment_votes) FROM ". table_comments . 
" WHERE comment_user_id=$current_user->user_id LIMIT $links_history_count");

Level 1-3 user authorization
Define average user links votes value required to become Level 1..2...3 user. Higher value = higher restriction. Each of levels can be set to desired value.

Level 1-3 Allowed links count
Define how many links are allowed to submit for user with Level 1-3 authorization in 24hrs.
[Tip - If you want to customize Level 0 value open submit_antispam_main.php and change]
Code:
    switch ($authorization_submit_level) {
             case 0:
             $submit_limit = 1; 

Enable comment restriction
Define if comment submission restriction policy is enabled or not.There is really nothing special about this settings, just set true for enabling or false for disabling it.

Comment submission multiplier
Define how many comments are allowed at current authorization level x multiplier. To more understand that, you have to understand how comment votes limit value is calculated:

comments_limit = submit link limit * submit_multiplier * average user comments value;
submit link limit - depends on current user authorization level
submit_multiplier - multiply the whole equation
average user comments value - multiply the whole equation (it is calculated and cannot be edited)
You can also watch attached comment image.

What else to know: Countdown timer is done by javascript, it is not static value.

Demo:
You can see preview on Pligg Beta 9 / Published News. Just register and add a few comments or links...

Download Now

File Type: zip submit_antispam.zip (12.0 KB, 43 views)

Screenshots

submit-antispam-addon-v-0-1-info.png  submit-antispam-addon-v-0-1-link_limit.png  submit-antispam-addon-v-0-1-comment_limit.png  

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12 (permalink)  
Old 07-08-2008, 02:50 PM
AnAlienHolakres3's Avatar
Pligg Developer
 
Join Date: Jul 2007
Location: Prague
Posts: 117
Thanks: 7
Thanked 112 Times in 40 Posts
Send a message via ICQ to AnAlienHolakres3
Quote:
Originally Posted by gen3ric View Post
As a god user, it's telling me I'm only allowed to submit 1 story per day...
I have discovered the problem:

in submit_antispam_main.php
Code:
  if ($canIHaveAccess) {
Fix is really easy, just replace H with h:
Code:
 if ($canIhaveAccess) {
Now it should work smoothly
__________________
=Everything that has a beginnig has an end=
=Nevere stop fighting=

Site: http://www.vselink.org

Last edited by AnAlienHolakres3; 07-08-2008 at 03:08 PM. Reason: founded solution
Reply With Quote
The Following User Says Thank You to AnAlienHolakres3 For This Useful Post:
  #13 (permalink)  
Old 07-09-2008, 06:15 AM
Casual Pligger
 
Join Date: May 2007
Posts: 74
Thanks: 6
Thanked 3 Times in 2 Posts
Great!
Thanks for the fix.
__________________
Submit Your Pligg Site to Pligg Directory
Reply With Quote
  #14 (permalink)  
Old 07-09-2008, 04:13 PM
gen3ric's Avatar
Constant Pligger
Pligg Version: 9.X
Pligg Template: Custom
 
Join Date: Jul 2007
Location: Atlanta, GA
Posts: 113
Thanks: 22
Thanked 9 Times in 6 Posts
Awesome thanks for the fix AnAlien!
__________________
Design Float - Digg For Designers
Reply With Quote
  #15 (permalink)  
Old 07-09-2008, 05:53 PM
gen3ric's Avatar
Constant Pligger
Pligg Version: 9.X
Pligg Template: Custom
 
Join Date: Jul 2007
Location: Atlanta, GA
Posts: 113
Thanks: 22
Thanked 9 Times in 6 Posts
This works beautifully! I expect to see a huge improvement over the amount of SPAM submitted!
__________________
Design Float - Digg For Designers
Reply With Quote
  #16 (permalink)  
Old 07-27-2008, 03:59 AM
longcountdown's Avatar
Pligg Donor
Pligg Version: 9.8.2
Pligg Template: moderno-orange
 
Join Date: Nov 2007
Location: Japan
Posts: 75
Thanks: 25
Thanked 17 Times in 11 Posts
Help with customizing the settings

First, thanks for developing such an essential module. I'm suffering a wave of comment spam and this is exactly what I need. However...

I'm completely lost when it comes to customizing it. For example, $submit_limit = $level_1_submit_links, which in turn equals something pulled from the database...

EDIT: I've just realized you can customize the settings in the Admin panel. My bad for not reading things properly.

Quote:
all of these can be done after installing in Admin page in Pligg Configuration section

Last edited by longcountdown; 07-27-2008 at 07:07 PM. Reason: Found you can edit settings in Admin
Reply With Quote
  #17 (permalink)  
Old 07-30-2008, 08:27 PM
grimusm's Avatar
Casual Pligger
Pligg Version: 9.7
Pligg Template: custom
 
Join Date: Aug 2007
Posts: 50
Thanks: 7
Thanked 2 Times in 2 Posts
Great mod, thanks!
Reply With Quote
  #18 (permalink)  
Old 07-31-2008, 01:36 AM
New Pligger
Pligg Version: 9.9
Pligg Template: starnews
 
Join Date: Dec 2007
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
thanks for such a nice mod

but how to change 1 story per day to 1 story per hour

also is there any way by which user with high level get 4-5 vote when they submit story by default

thanks again looking forwerd for more improvement
Reply With Quote
  #19 (permalink)  
Old 08-02-2008, 01:32 AM
New Pligger
Pligg Version: 9.9
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Absolutely brilliant! Thanks!
Reply With Quote
  #20 (permalink)  
Old 09-03-2008, 11:16 PM
New Pligger
 
Join Date: May 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Great! This Ends the Spam gap... One thing though, I have a wonderful suggestion, I dont know how the script counts the "how many link votes needed" but the most idealistic method would be that the user have to vote other stories and post comment(gain somewhat karma/correct me if this module already uses this method) and the user Gain Authorization level just like that. This would be great for everyone because It inproves traffic and content...we should really keep this in mind..

Edit: what exactly I need to change to get the default level to one story in hour, and what part I need to mod to change the level_1 etc. submit link limits? Guys, help me on this one.. Iwe played arround with the main php file still not getting it... thanks

Last edited by Chulo; 09-04-2008 at 12:24 AM.
Reply With Quote
  #21 (permalink)  
Old 09-24-2008, 09:02 AM
New Pligger
Pligg Version: 9.5
Pligg Template: default
 
Join Date: Dec 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Error in submit_antispam_main

When a new user posts a new story it gets this error :

Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home/zabox/public_html/modules/submit_antispam/submit_antispam_main.php on line 96

What can I do ?
Reply With Quote
Reply

Thread Tools
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Link Clicks-Count Addon AnAlienHolakres3 Pligg Tutorials 52 08-31-2008 02:14 AM
minimum characters on submit page davebowker Installation and Upgrade Help 3 07-20-2008 07:30 PM
Pligg Team Addon Installation GUIDE & MANUAL AnAlienHolakres3 Pligg Tutorials 17 04-07-2008 02:41 PM
submit problem revolver General Help 2 11-19-2006 10:11 PM
URL submit - is this a PHP or mySQL issue? nick78 General Help 1 05-05-2006 10:24 PM


Search Engine Friendly URLs by vBSEO 3.2.0