Please login or register.

Login with username, password and session length
Advanced search  


You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [patch] Comments - posting identical content  (Read 9205 times)


  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[patch] Comments - posting identical content
« on: April 10, 2008, 09:05:12 am »

From report

function comment($freeze_status) locate $doublecheck and replace with
Code: [Select]
$doublecheck = $_SESSION['poster']==="$name:|:$comment:|:$post_article_id"&&(time()-$_SESSION['time'])<45?0:1;//requires 45 seconds before accepting exact post a second time.alter the next line to
Code: [Select]
if ($ip == $_SERVER['REMOTE_ADDR'] && $comment && $name && $post_article_id && is_numeric($_POST['calc']) && mathCaptcha($_POST['calc'], $_POST['sum']) && $doublecheck==1) {
finally, after mysql_query($query); place this line.
Code: [Select]
$_SESSION['poster']="$name:|:$comment:|:$post_article_id";$_SESSION['time']= time();####this is to set session for checking multiple postings.
Of all the things I have lost, it is my mind that I miss the most.