ddofborg Posted December 15, 2005 Report Posted December 15, 2005 Some time ago I created a feature request website for BitComet. It's located here: http://slipstream.student.utwente.nl/bitcomet/Now I discovered uT and it's THE BEST so far. Maybe you would also like a BC-like feature request web site? I can startup one for uT!
ddofborg Posted December 15, 2005 Author Report Posted December 15, 2005 One feature request for the feature request DB:Is it possible to gray out already voted items?
NiteShdw Posted December 15, 2005 Report Posted December 15, 2005 I haven't implemented whether or not you have already voted (until you click on a vote link). Any ideas on creating an SQL query to do this (without having to do a query on each item)? I'll see if I can do something about that.
chaosblade Posted December 17, 2005 Report Posted December 17, 2005 an SQL query shouldn't be hard, really. table would look like thisCREATE TB_VOTES( ID int UNIQUE NOT NULL, IP varchar(20), VOTE bit).. assuming you keep track of votes by the voter's IP.SELECT * FROM TB_VOTES where @IP_JUST_ENTERED_THE_SITE LIKE IPor something along those lines.
Animorc Posted December 17, 2005 Report Posted December 17, 2005 I would rather add a field in the database called "entries_voted". Separate the request id's with a , so that the field in the database will look like this: ",1,2,3,4,5," etc. then add:if(strpos($entries_voted,",".$request_id.",")) $voted=1or something to the page.That way, you would have one string for every IP (or user) and only one query every time a user enters the site.
1c3d0g Posted December 17, 2005 Report Posted December 17, 2005 Just throwing an idea out there...wouldn't it be better to let people vote through their Registered forum name? :|
chaosblade Posted December 17, 2005 Report Posted December 17, 2005 It's a bitch to connect cookies from various sites, really.Animorc: The simple SQL way will just give you the IDs and Vote state for every vote you made, which can be used to quickly paint the rows in matching colors.
Animorc Posted December 17, 2005 Report Posted December 17, 2005 chaosblade: What is faster? Retrieving a table, or retrieving a field?I take it that in your way, there will be one new row for every vote from that IP. In my way, there will be only one row containing all votes for an IP.I might have misunderstood your syntax though.Edit: You can easily have an alternate colored list by calling a function like this for every match in the while loop:function fbg(){ static $bg; if($bg=="color1")$bg="color2"; else $bg = "color1"; return($bg);}...while(...)$bg=fbg();
Recommended Posts
Archived
This topic is now archived and is closed to further replies.