The place where everyone hangs out, chats, gossips, and argues
User avatar
By TJD
#19494
last night i had an idea for a website. The website would be about radio djs in the uk. There would be sections for national and local djs, and ratings e.t.c.
A message board would be set up so people could submit their local djs, and recommend them to each other.
So, this morinin' i made a rough version and shoved it onto 0catch.com.

as it is only rough, the links don't work, and it is half empty:

this is the home page. I am not sure if the tables will have the desired colours on all browsers so tell me if it looks uncoordinated.
this is thenational page,
and this is the radio 1 page. this will be more comprehensive, and in time order. timetables for the nationals will also be put up.
so, good or naff idea.
By Everlast
#19496
Good idea, i like it.
User avatar
By TJD
#19500
one problem is finding a f*****g host, having no credit card, and tight parents, i cant buyy one. at the moment [url]ocssolutions.com[/url] is looking good as the only advertising is a text link, and you get to choose where on the page it goes.
another problem is the message board. i want a phpbb one because they're easiest to use. BUT I CANT DO IT. i have tried for ages to set one up but i dont know how. i'm sure i will work it out one day.
User avatar
By Funky Drummer
#19502
I'd say it's a good idea TJD, especialy with things like having figures and stuff on as well. Go for it.
User avatar
By Tall Pall
#19503
Yes very good idea, good luck with that. Also hosting is also very difficult without a card. I just paid for mine, $5 a month or somthing.
User avatar
By TJD
#19604
the radio1 page is done, andthis is what it looks like. the only thing missing is ratings out of 20, that's where i get stuck.
help?
User avatar
By Funky Drummer
#19608
ah, by ratings I thought that you meant the rajar figues or something. I think that's something you should stick on (if you can be arsed, of course).
User avatar
By Morals
#19609
What's the problem?
User avatar
By Funky Drummer
#19612
All in all, I'd say pretty good TJD. Obviously it's a bit patchy at the moment but then it's only been up two days! Keep it going and I reckon it'll be pretty good.

Rich~
User avatar
By TJD
#19617
the ratings are set out like this:
||||||||||||||||||||
the higher up they go, with a maximum of 20, the higher the rating.
User avatar
By Morals
#19619
Am I being really thick here but how exactly are you getting stuck? Look slike you've got things sorted to me...
User avatar
By TJD
#19621
its ok. sorted.
i'm still looking for a decent host though.
User avatar
By TJD
#19665
fao: chris

what is the script that you have on the main page, that says when he's on air and when he isnt?
User avatar
By Morals
#19678
TJD - it'd be fairly easy to write something along those lines using Javascript, ASP or PHP.

You need to look at the value of the current date and time, and extract the relevant information from that string, then run a different procedure depending on the values to display the correct information.

I'd write something for you but I really can't be bothered at the moment, sorry.
User avatar
By TJD
#19679
i'll get onto that. although i havent the foggiest how php works.
User avatar
By Morals
#19680
To be honest until you sort out a decent host it's probably best to do it in javascript.

You should also be aware that depending on what host you go with may determine which server side scripting language you can use - some will only let you ASP and others will only let you use PHP.

It's easier to find information about programming in ASP than PHP, although the following resources will help:

http://www.w3schools.com
http://www.phpbuilder.com
http://groups.google.co.uk

Google groups is useful if you need to search for how to do something as the chances are someone's done it before and posted how to do it.
User avatar
By TJD
#19681
cheers.
php is looking good. i'm a fast learner.
User avatar
By Morals
#19683
You can download PHPTriad and turn your machine into a web server for local testing - only problem is you can't test anything that uses the mail function but otherwise it's pretty useful
User avatar
By TJD
#19685
i probably wont (as i dont know what that means).
i still cant work out a script to do the 'on air' thing. I want it so that on the individual page for the station it says 'on air' next to whoever is on air at the time in that big table thing.
User avatar
By Morals
#19690
It just means that you have a directory on your machine where you can store your php pages and access them through your browser as if they were on a remote web server.

As for your script, here's the basics - you'll need to use the correct syntax for the language your using but the basic logic should work.

You'll need to store the times that the DJ's are on air somewhere - I'd create a database and use ASP to work with that.

basically you then find out what the day and time are:

txtTime = time()
txtDay = (WeekdayName(weekday(date)))

You then need to compare it to the days of the week your dj is on and times of your dj's show - you would store the start times and end times of their shows - so:


if txtTime > txtMoylesStart AND txtTime < txtMoylesEnd
if txtDay <> "Saturday" AND txtDay <> "Sunday"
Write ON AIR to screen
end if
end if

Obviously you would use elseif to create checks for the other DJ's

The date is used to find out what day it is

txtDay = (WeekdayName(weekday(date)))



I think something like that would work - there's probably an easier way to do it though
By MentalJargon
#19719
it's a good idea dude, good luck in maintaining it and keeping it updated.
User avatar
By Morals
#19739
Scrap my last post, especially the bit about using a database - I was talking a load of old pony. I've decided now that it's easier to define a load of variables which store the start and end times of the dj's shows, and use the values from these variables instead.

The following code should be fairly close to the sort of thing you want (I think). It may need some tweaking / debugging, and it will certainly need expanding, this is only an example.

It's an Active Server Page written in VBScript so it needs to be saved with the extension .asp

Code: Select all<% option explicit %>

<%

' Declare variables used in script

Dim txtWhileyStart
Dim txtWhileyEnd
Dim txtMoylesStart
Dim txtMoylesEnd
Dim txtTime
Dim txtDay

' Assign values to variables

txtWhileyStart = "10:00"
txtWhileyEnd = "13:00"
txtMoylesStart = "15:00"
txtMoylesEnd = "17:45"
txtDay = (WeekdayName(weekday(date)))
txtTime = (FormatDateTime(now(),vbshorttime))

' Check times to see who is on air

if (Left(txtTime,2)) > (Left(txtWhileyStart,2)) AND (Left(txtTime,2)) < (Left(txtWhileyEnd,2))
  if (Right(txtTime,2)) < (Right(txtWhileyEnd,2))
    if txtDay <> "Saturday" AND txtDay <> "Sunday"
      response.write ("Whiley is on air")
    end if
  end if

elseif (Left(txtTime,2)) > (Left(txtMoylesStart,2)) AND (Left(txtTime,2)) < (Left(txtMoylesEnd,2))
  if (Right(txtTime,2)) < (Right(txtMoylesEnd,2))
    if txtDay <> "Saturday" AND txtDay <> "Sunday"
      response.write ("Moyles is on air")
    end if
  end if

%>


I'm not 100% sure if I've got the logic right (the bit that checks the minutes is the bit I'm not too sure about), but unfortunately I can't check this code as my web server only allows me to test PHP so if someone can test this that would help.

Just to explain a few bits - the (Left(txtMoylesEnd,2)) bit pulls out the hour from the txtMoylesEnd string, and the (Right(txtMoylesEnd,2)) bit pulls out the minutes. (Obviously this applies for the other strings it's used on as well).

Anyway, hopefully this will get you headed in the right direction.
User avatar
By TJD
#19782
*NEWS JUST IN*
My parents are considering a new computer. In the next couple of days we'll be upgrading this compter to Windows Me, and then, a few days later we may be trading in for a better PC. YAY. schaamon. so, i cannot do much more on the site for a few days as i will be mainly computer shopping and have deleted my web edito application (Nnamo WebEditor 3, very good).
Ther is also a bad side, i have had to delete over 100Mb of mp3s. gnah!
User avatar
By Eddie
#19788
You should have burned them to CDRW then copied them to the new computer (If you have a CD rewriter that is!