PEAK XOOPS - Re: how to prevent repeated rating in the same photo..... in englishin japanese

Re: how to prevent repeated rating in the same photo.....

List posts in the topic

question Re: how to prevent repeated rating in the same photo.....

msg# 1.1
depth:
1
Previous post - Next post | Parent - No child | Posted on 2006/8/23 4:50
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Quote:
some members will repeated rating in the same photo ., the module limited rating by account(id) but not ip , so...
No.
first ID, second IP.

If you controll it only by IP, edit ratephoto.php
	if( $ratinguser != 0 ) {

		// Check if Photo POSTER is voting
		$rs = $xoopsDB->query( "SELECT COUNT(*) FROM $table_photos WHERE lid=$lid AND submitter=$ratinguser" ) ;
		list( $is_my_photo ) = $xoopsDB->fetchRow( $rs ) ;
		if( $is_my_photo ) {
			redirect_header( "index.php" , 4 , _ALBM_CANTVOTEOWN ) ;
			exit ;
		}

		// Check if REG user is trying to vote twice.
		$rs = $xoopsDB->query( "SELECT COUNT(*) FROM $table_votedata WHERE lid=$lid AND ratinguser=$ratinguser" ) ;
		list( $has_already_rated ) = $xoopsDB->fetchRow( $rs ) ;
		if( $has_already_rated ) {
			redirect_header( "index.php" , 4 , _ALBM_VOTEONCE2 ) ;
			exit ;
		}

	} else {

Edit also line 21 of the file if you need.
	$anonwaitdays = 1 ;

Votes:1 Average:0.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!