 |
 |
php image voting script (like amihotornot)
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
i'm in the middle of doing a new site and i'm in need of another php-enabled brain on the job.
this site has pictures of people on it (no, it's not a pr0n site), which i want to add a voting script to, as mentioned in the topic's title. now, i've found 2 free scripts that do this kind of thing, but they work on a random basis and i don't want that. i want to be able to add the script like on stile's camwhores.com site (yeah, i had to research stuff *cough*).
if anybody can lend their brain to this task, i'd be grateful. if you live in england (derbs, etc), there's beers in it too
thanks in advance 
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2000
Location: Toronto, ON
Status:
Offline
|
|
Sounds like you want to read/write a text file that holds an array with the picture number and the vote when the Submit button is clicked. I'm off to the pub momentarily (yeah Friday!) but I can help out on the weekend if you still need it.
In essence, here's what you want, right? :
1) display picture
2) person clicks on rating, hits submit
3) vote value and picture number recorded
Sounds pretty straightforward.
|
|
The Lord said 'Peter, I can see your house from here.'
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
shall we sort this after the weekend? i'm wankered now
anyone else is welcome to help though! *glares at derbs*
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2000
Location: Toronto, ON
Status:
Offline
|
|
Me too, old pal in for a weekend. 
|
|
The Lord said 'Peter, I can see your house from here.'
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Status:
Offline
|
|
It should be pretty easy to do. I did something similar - well, a poll question that rotates monthly and with a database. Instead of a poll question, I'm sure I can pop up an image and stuff. It's all the same. I did it with ASP and SQL Server 2000 but it's the same with PHP and MySQL. If you want to do it with a text file, just make sure you account for the fact that more than 1 person on your website can be voting at the exact same time or your textfile WILL get corrupted (i.e. lock the application or block access to the textfile for that nanosecond that the write's happening).
localshell.com if you wanna see the poll questions
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
yeah dude, i already have a poll going on there (which i'm leading, raaar!). i was just wondering if anyone else has done this and can help me out, or if i'm going to have to get down to some serious work and sort it myself. i'd rather the former, than the latter. i just can't afford the headaches right now, i'm too stressed with other stuff
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
Hey Phil, sorry been struck down with the plague since last Wednesday
I've never actually done this before, i'm just in the process of thinking.......
do you need a 1-10 vote scale?
I think a SQL database with 2 tables would fit the bill. One table would have:
codenumber | filename | personsname | anything else...
and the other table would have
codenumber | votenumber
Obviously there would be just one entry per person in the 1st table, then there would be multiple entries in the second table corresponding to how many votes each person gets, along with the vote of 1-10. A simple inner join on the two tables would link them.
You could then work out average score, number of votes etc...
Is this what you're after? If so, leave it with me, i'm sure it would come in useful for a few of my projects as well.
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by derbs:
<STRONG>Is this what you're after? If so, leave it with me, i'm sure it would come in useful for a few of my projects as well.</STRONG>
you can get shut of that plague, if i'm to be buying you beer!
i can show you the site, but i'm not posting it on here. it's not ready enough for a mass nerd invasion yet. i'll pm you a url or two, okay?
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|