Author Topic: Prevent vote ur own picture  (Read 4587 times)

0 Members and 1 Guest are viewing this topic.

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Prevent vote ur own picture
« on: April 05, 2006, 06:54:34 AM »
Is there any way to prevet the user to vote thier own pictures?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Prevent vote ur own picture
« Reply #1 on: April 05, 2006, 07:54:49 AM »
the simpliest way is just not to show rate form for the owner:
in includes/functions.php find
Code: [Select]
  if (check_permission("auth_vote", $image_row['cat_id'])) {
replace with:
Code: [Select]
  if (check_permission("auth_vote", $image_row['cat_id']) && ($user_info['user_level'] == ADMIN || $user_info['user_level'] == GUEST || ($image_row['user_id'] != GUEST && $image_row['user_id'] != $user_info['user_id']))) {
« Last Edit: April 07, 2006, 11:58:27 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: Prevent vote ur own picture
« Reply #2 on: April 05, 2006, 04:17:59 PM »
thanks =)

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: Prevent vote ur own picture
« Reply #3 on: April 07, 2006, 11:03:09 PM »
ok theres is something that i don't like about this modification
the reason is that is not letting the guests to vote the layouts
if a layout has been submited by another guest
:(