|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Modification Name: Anti-Spam I (No Replies Unless Someone Else Has Replied) Author(s): AllenAyres Description: This mod keeps someone from replying to their own post unless someone else has replied first - works great for those ADHD users who repeat nonsense all day long. Demo: none Requirements: 6.7.2 Download Link: none Credits: Original Version by Graeme Open ubb_new_reply.cgi and find: # grab last post @rev_this_topic = reverse(@this_topic); @last_post = split (/||/, $rev_this_topic[0]); $last_post_num = $last_post[1]; $last_post_num++; add after: # Stop Spam Replies if ($username eq $last_post[2]) { &StandardHTML("You cannot reply to this thread again until someone else does."); } Update, thanks to LK If you still want admins and moderators to be able to reply to their own posts, change the above code to this: ### Stop Spam Replies @user_profile = &OpenProfile($user_number); my $is_admin_mod = &boolean_is_admin_or_mod($in{f}, @user_profile); if ($username eq $last_post[2] && !$is_admin_mod) { &StandardHTML("You cannot reply to this thread again until someone else does."); } ###
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Code updated to include the ability for admins and moderators to still be able to reply to their own posts. Thanks LK Future updates will include a time limit before being able to reply.
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Hi, it sounds really usefull, AllenAyres does it work in 6.6.0?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
I think it should, try it and let us know
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
I've tested it on my 6.6.0 and it works, but the message "You cannot reply to this thread again until someone else does" appears right after the user hits "add reply" in the message text box, just imagine this: a user writes a very long message without knowing this and the message appears, it would be better if the message "You cannot reply to this thread again until someone else does" appears right after someone hits the post reply icon instead of being able to see the text box and enter text on it. It's really usefull, but it would be better that way, could it be done?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You're right.. Try the following (untested) in ubb_new_reply.cgi: Find the first instance of: # grab topic @this_topic = &OpenTopic($in{t}, $in{f}); if(!@this_topic) { &StandardHTML($vars_wordlets_err{topic_doesnt_exist}) } Add below: # grab last post @rev_this_topic = reverse(@this_topic); @last_post = split (/||/, $rev_this_topic[0]); # Stop Spam Replies if ($username eq $last_post[2]) { &StandardHTML("You cannot reply to this thread again until someone else does."); } Another thing you can do is add "$in{message}" into StandardHTML, then the users will be able to see their post when they get the error.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|