maternal
Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

22744 Posts in 6702 Topics- by 17593 Members - Latest Member: permsk

21-09-2019 01:36:58
JOOM::GALLERY::FORUMArchiveJoomGallery 1.5 MVCFrontend[Solved] IP by voting
Pages: [1]
Print
Author Topic: [Solved] IP by voting  (Read 2482 times)
0 Members and 1 Guest are viewing this topic.
komir
Newbie
*
Offline Offline

Posts: 30


View Profile
« on: 08-12-2010 09:53:12 »

Is there any solution for "one IP one vote"?
I try http://www.forum.en.joomgallery.net/index.php?topic=1007.0
but it`s not working for me.
« Last Edit: 28-12-2010 16:13:59 by komir » Logged
komir
Newbie
*
Offline Offline

Posts: 30


View Profile
« Reply #1 on: 28-12-2010 16:12:45 »

Solved in
Code:
components/com_joomgallery/models/vote.php
add in line
Code:
138
Code:
// START IP CHECK - ADDED BY KOMIR
if (true /*$this->_config->get('jg_checkipvotes')*/) {
$this->_db->setQuery("SELECT
                              COUNT(*)
                            FROM
                              "._JOOM_TABLE_VOTES."
                            WHERE
                                  userip  = '".$_SERVER['REMOTE_ADDR']."'
                              AND picid   = ".$this->_id."
                          ");

      // Vote or enqueue notice
      if($this->_db->loadResult())
      {
        $error_msg = JText::_('JGS_DETAIL_RATINGS_MSG_YOUR_VOTE_NOT_COUNTED');
        if(!$ajax_req)
        {
          // Enqueue notice and get back to details page
          $this->_mainframe->redirect(JRoute::_('index.php?view=detail&id='.$this->_id, false), $error_msg, 'notice');
        }

        return false;
      }
}
// END IP CHECK
Logged
woody
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #2 on: 09-01-2011 09:30:08 »

hello,
i test it , its not work..
Logged
jedivader
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #3 on: 23-02-2011 18:14:46 »

This code DOES work! I'm using Version 1.5.6.3.
I put it after the check for registered users vote only. It ends on line 156, so put it there.

This should be implemented in the official version of JoomGallery. Yes, it is not a perfect solution, however there is NO perfect soluction for vote cheating at all. You can always delete your cookies, register as a new user, use proxy... However 90% of the users won't be able to bypass this, so it is quite useful in my oppinion.

Cheerse!
Logged
Pages: [1]
Print
Jump to:  

HOSTED BY SCHWARZKÜNSTLER ®

PROTECTED BY  ZB BLOCK  AND Project Honey Pot
Theme orange-lt created by panic

Bad Behavior has blocked 13152 access attempts in the last 7 days.

maternal