Perl Calendar Script... tell me if this sounds good...

gopunk

Lifer
Jul 7, 2001
29,239
2
0
i need a calendar script and event script, and i think i'll try writing my own... they'll be my first perl scripts ever :)

tell me if this sounds like a good plan:

there is an admin page where you can submit entries
there is a data file for every month...
within the data file, each date with an entry has its own line. aside from the normal data fields, there will be special options, like to shade that day a different color.

admin page writes to specified month's data file, creates new one if there isn't already one. assigns id number to each submitted event.

calendar script gets month to display from query string... if there is no query string, or it is invalid, it'll display the current month. if the current month doesn't have a data file, print descriptive error message.

calendar script prints out calendar based on data file, with the name and time of each event, in it's proper date.

each event is a hyperlink to the event script with the id number as the query string.

when event script is called, uses query string to find information in data file, and print out more descriptive details about the specific event.



so, to those hardened perl programmers, does this sound good? are there any pitfalls i should look out for?
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Caught the link in your sig, let's take a looksee.


<< admin page writes to specified month's data file, creates new one if there isn't already one. assigns id number to each submitted event. >>

How are you planning on picking the ID number? I guess keeping a line count inside the Perl script would work fine here.


<< calendar script gets month to display from query string... if there is no query string, or it is invalid, it'll display the current month. if the current month doesn't have a data file, print descriptive error message. >>

That's exactly what I would do, keep that.


<< each event is a hyperlink to the event script with the id number as the query string. >>

Nice tie-together, when the event is originally written and the HTML page is produced this should be no problem to do.

You've got it figured pretty well, yell if you've got actual code questions next time. :)
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
How are you planning on picking the ID number? I guess keeping a line count inside the Perl script would work fine here.

could you explain that? i'm not sure i understand... i was thinking of having the number be based on the date, with a single unique character (i don't imagine we'll ever have more than 36 events in one day...