Page 1 of 1

Organizing a temporary site like this

Posted: Mon Jan 25, 2010 9:27 am
by AJOwens
Up here in Canada, we've got a protest movement going against something called prorogation. There were nationwide rallies on Saturday. Now we're looking for a way to keep the momentum going.

I've floated the idea of a protest song contest. What's involved in setting up a site like songfight? (I can do XML and XSL, and js and CGI when cornered.)

For more about the protest movement:
http://www.facebook.com/group.php?v=app ... 0348091419

Re: Organizing a temporary site like this

Posted: Mon Jan 25, 2010 10:09 am
by Spud
Not sure exactly what part you need help with, but here are the basic steps

Obtain a domain (i.e. prorogationmusic.com) from someone like godaddy, networksolutions, or another domain registrar.
Obtain hosting space from someone like godaddy, dreamhost, webhostingbuzz, or other. You will need this space not only for your website, but for hosting the songs.
Hook the two up, so that you've got a domain pointing to some webspace. You will need to know the name or address of the nameservers at your hosting location, to plug into your domain account.
Make your page (you say you can write XML) inviting people to participate. Include a way to submit the songs. If this is short-term venture, email will work. If you're going long term, like us, you really should have a web form for uploading.
Send a link to everyone you know. Post it here. etc.
Post them. You can simply put them in a folder and post links to each one like we do, or you can get more sophisticated and embed them in a player. Here are some: http://www.webdesignbooth.com/10-easy-t ... r-website/

If you are already aware of all of the above, please restate your question.

Re: Organizing a temporary site like this

Posted: Mon Jan 25, 2010 10:22 am
by AJOwens
That helps, thanks. How complicated is it to set up voting? You'd need a form with check boxes, but then a way to record and tally them. I' could just write a script to update a number in some corresponding text files, I guess. What's a better way?

Re: Organizing a temporary site like this

Posted: Mon Jan 25, 2010 10:38 am
by Spud
My attitude is 'whatever works', but I am sure that there are those who feel that some ways are 'better' than others.

We keep two text files, one with the IP addresses of the voters (to prevent re-voting) and the other with the actual votes, band name by band name. Not numbers, per se, but an actual list of the votes, like this:

Ross Durand
Octothorpe
Paco del Stinko
Octothorpe
Octothorpe
Ken's Super Duper Band 'n Stuff
Octothorpe

Of, course, as you can tell, this is a fictitious example. Paco always gets more votes than us.
By keeping the IP list and the voting list in the same order, a certain amount of analysis can be done on voting patterns and trends. (How many bands is the average voter voting for, How many single-vote voters is a certain band attracting, etc.)

Re: Organizing a temporary site like this

Posted: Mon Jan 25, 2010 10:47 am
by AJOwens
Simple and effective, and no ODBC involved. Thanks!

I'm still assessing interest from the angry mob, but this should be enough for us to put it together if it's a go.

Re: Organizing a temporary site like this

Posted: Mon Jan 25, 2010 11:34 am
by irwin
Quick and dirty, you could have a "votes" directory and in there have one file per vote, named with the IP address. The contents of the files can be the song voted for (or list of songs). This solves the problem of having to deal with file locking on the vote list files, and you no longer need to worry about keeping the vote file in sync with the IP file.

The test for multiple votes from the same IP is now either "test -f $IP" or just eliminated, since multiple votes from the same IP now simply overwrite one another.

To count votes, "grep -wl $bandname | wc -l".