turtle Posted November 1, 2008 Share Posted November 1, 2008 BASICALLY me and a mate thought itd be a kl idea to make a website, www.videoaday.co.uk - as you can see everything is functioning well except this scriptwe literally wanted to make it display just a video a day and nothing else displayed, at the start of every day 12 o'clock it moves to the next in line (I guess we will have a list of video urls prepared beforehandd)i need a genius to save me, i made it this far setting the website up but I don't know where to go next. i tried the tutorials but i'm no good with that so please don't send me that way :) Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 1, 2008 Share Posted November 1, 2008 What's it doing wrong? Loading forever, I guess?Also, because it's a server-side script, you'll need to post all the relevant source. Link to comment Share on other sites More sharing options...
turtle Posted November 1, 2008 Author Share Posted November 1, 2008 urm well i havent tried doing it so nothing is wrongif you'd be willing to do it i'll give you admin access Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 1, 2008 Share Posted November 1, 2008 The essential thing to make it work would be a cron job. This thread contains related details (from JSG) and research (from me).You'll need to: Set up a database of videos. There's no need to store timestamps with them - just a primary index, a URL, and anything else. Write a PHP form & script which adds a record to the database. Only grant access (preferably via a user database) to site staff. Write a PHP script to retrieve the current record plus anything else. require_once this script on your video page. Here's some sample SQL which you might need to modify for your table (and the newlines are unnecessary):SELECT * FROM videosORDER BY idLIMIT 1 Write another PHP script which simply removes the current record, making the next one current.SELECT id FROM videosORDER BY idLIMIT 1 Then, according to the result (the id field), delete the corresponding row. Schedule a job for each day at midnight (but in which timezone?) to run the last PHP script. Link to comment Share on other sites More sharing options...
turtle Posted November 1, 2008 Author Share Posted November 1, 2008 The essential thing to make it work would be a cron job. This thread contains related details (from JSG) and research (from me).You'll need to:Set up a database of videos. There's no need to store timestamps with them - just a primary index, a URL, and anything else. Write a PHP form & script which adds a record to the database. Only grant access (preferably via a user database) to site staff. Write a PHP script to retrieve the current record plus anything else. require_once this script on your video page. Here's some sample SQL which you might need to modify for your table (and the newlines are unnecessary):SELECT * FROM videosORDER BY idLIMIT 1 Write another PHP script which simply removes the current record, making the next one current.SELECT id FROM videosORDER BY idLIMIT 1 Then, according to the result (the id field), delete the corresponding row. Schedule a job for each day at midnight (but in which timezone?) to run the last PHP script. dude that looks amazing and all but i'm honestly not good at putting that into context. i don't even know the basics despite attempts.maybe you could help install it on the website? i'll defo create the database of videos with my friend. GMT timezone i guess we will be using (we're british) but maybe when/if it gets off the road we could have it work out what time zone you're in from your ip or something :) Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 1, 2008 Share Posted November 1, 2008 maybe you could help install it on the website?Sorry, that's beyond my purpose for being here; it would essentially be free contract labor. I'm here to fix this:i'm honestly not good at putting that into context. i don't even know the basics despite attempts.Do you have any questions to get me started? For example, what problems do you encounter while going through the local PHP tutorial (or any other, if you link to it)? Link to comment Share on other sites More sharing options...
turtle Posted November 1, 2008 Author Share Posted November 1, 2008 Sorry, that's beyond my purpose for being here; it would essentially be free contract labor.what happened to being a good sportit would only take you 10 minutes looking at how experienced you seem to be Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 1, 2008 Share Posted November 1, 2008 You're very mistaken about how long such a project can take. Plus you missed my point: I'm primarily here to help build programmers, not programs. Link to comment Share on other sites More sharing options...
turtle Posted November 1, 2008 Author Share Posted November 1, 2008 it's not a programits a script to put onto my websiteand would it really take so long ? Link to comment Share on other sites More sharing options...
jlhaslip Posted November 2, 2008 Share Posted November 2, 2008 it's not a programits a script to put onto my websiteyes it isand would it really take so long ?yes it will, well, after writing the script, setting up a test d/b, connection scripts, test data input, etc, etc...and as noted above, the purpose of the Forum here is to assist you to learn to do this for yourself. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.