Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

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

philmoz

  • 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
http://snewscms.com/forum/index.php?topic=7239.0

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.
Logged
Of all the things I have lost, it is my mind that I miss the most.