Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 04:33 am EST

Geeklog Forums

Rating System Release Tomorrow!


Status: offline

GeeklogWorks

Forum User
Junior
Registered: 04/29/04
Posts: 24
I have the package ready and it will be released tomorrow. I have included the theme files that will need to replace your existing ones and instructions for any theme I do not include. I'm working on a simple installer I hope to include with the package but regardless there will be a sql file that when run will go create the tables if needed.
The only true Geeklog host with technical support! www.GeeklogWorks.com
 Quote

Status: offline

doopisdotnet

Forum User
Chatty
Registered: 01/31/03
Posts: 38
how can i change the ip='$REMOTE_ADDR' to user id so it will allow each logged in user to vote only 1 time instead of IP address. and can i take it one step further and block user #1 (annon)?

-Christian
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
try something along these lines:
Text Formatted Code

//returns the current user's uid.
$sql = "SELECT uid FROM {$_TABLES['sessions']}";
DB_query($sql);
list ($currentuid) = DB_fetchArray($sql);

//macth current user's uid against those who have voted...
$sql = "";//some sql to select who has already voted.
DB_query($sql);
list ($voteduid) = DB_fetchArray($sql);
if (($currentuid == $voteuid) || ($currentuid == 1)){
    //do not allow vote
} else {
    //allow vote
}

 
 Quote

Status: offline

doopisdotnet

Forum User
Chatty
Registered: 01/31/03
Posts: 38
thank you but its still too advanced for me - i tried a few different things with your code but get an error each time, Parse error: parse error, unexpected T_ELSEIF, the elseif is " }elseif($rfaction == "addnew"){"

AHHHH!

anyone know how to fix rating.php so at least it will work the way it was designed to (using IP addresses)???

-Christian
 Quote

All times are EST. The time is now 04:33 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content