|
Jedakiah
|
 |
« on: April 12, 2007, 02:31:26 PM » |
|
Okay, I'm attempting to tackle something that is way out of my league. I want to build a PHP calendar.
There are a few functions in the calendar that I don't know where to begin with.
The first is the calendar's read function. It needs to read from two different tables in the database. Please correct me where I'm wrong. What I need to do is merge the tables into one array, right? How do I do this?
The second is the calendar's display function. This one is more like a nest of problems. First I will need PHP to build the calendar out. It needs it to be able to display any month/year combination between 12 months ago and 10 years in the future. It needs to display like a calendar (7 rows for each day, the 1st on the correct day & 4-6 rows depending on the month). Some days will have events on them that the calendar will need to display, but many days will not.
Also some event types will need to display on multiple days. But it would seem to me that it is a waste of database space and a pain to have the record function record multiple events. Instead the read function should display the one event in multiple places. Right?
If you want I can break this up into a list of smaller questions. I don't need you to provide me with the code. I just need something, a place to start if you will. If you can point me at an article, tell me you to use "this" function, or if you write out the code, it will be of great help.
As you can see I'm a major noob at PHP. I finally found and bought a good book and I plan to read it once I get it. But until then I really need your help. Anything you can give me would be great!
|
|
|
|
|
Logged
|
|
|
|
|
mikehale
Guest
|
 |
« Reply #1 on: April 12, 2007, 02:44:40 PM » |
|
step 1 - use a sql union statement. if you need help on this let me know.
step 2 - when i get off work, i'll write some pseudo code and then you can translate into php, or maybe i'll take the dive and learn some php.
|
|
|
|
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #2 on: April 12, 2007, 02:52:02 PM » |
|
Crackie, I missed you.
|
|
|
|
|
Logged
|
|
|
|
|
mikehale
Guest
|
 |
« Reply #3 on: April 12, 2007, 02:55:47 PM » |
|
lol, i missed you too. in a completely web design kind of way.
|
|
|
|
|
Logged
|
|
|
|
|
Latro
Guest
|
 |
« Reply #4 on: April 12, 2007, 02:58:09 PM » |
|
you'll pick up php real quick. its like perl on the web
|
|
|
|
« Last Edit: April 12, 2007, 04:19:11 PM by Latro »
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #5 on: April 12, 2007, 03:08:47 PM » |
|
I on the other hand have not picked up PHP real quick. It's like advanced physics calculations for Jed. Plus I get confused easily. That's why I was always tk'ing back in the day.
|
|
|
|
|
Logged
|
|
|
|
|
Kjuib
|
 |
« Reply #6 on: April 12, 2007, 04:10:50 PM » |
|
format and reinstall...
|
|
|
|
|
Logged
|
pre?venge (pri-venj') - v. - To inflict punishment in return for (injury or insult) before the (injury or insult) happens
|
|
|
Gidgidonihah
Seriously, what does it mean?
Moderator
Hero Member
    
Posts: 2163
|
 |
« Reply #7 on: April 12, 2007, 06:38:58 PM » |
|
OKay, first of all, what are you doing this for? Is it a project or for practice or something? Cause that would make sense. Otherwise, there are so many php cals out there, it's ridiculous. Why reinvent the wheel?
|
|
|
|
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #8 on: April 12, 2007, 08:50:38 PM » |
|
A project/practice. I have found some nice PHP cals but nothing that do what I need.
|
|
|
|
|
Logged
|
|
|
|
|
mikehale
Guest
|
 |
« Reply #9 on: April 12, 2007, 09:17:13 PM » |
|
Why reinvent the wheel?
so then you can try and patent it and be rich!
|
|
|
|
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #10 on: April 12, 2007, 09:58:31 PM » |
|
so then you can try and patent it and be rich!
Haha. That reminds me of the guys that patented the wheel to make a point about how Austria's new patent system sucks.
|
|
|
|
|
Logged
|
|
|
|
|
mikehale
Guest
|
 |
« Reply #11 on: April 13, 2007, 12:31:43 AM » |
|
i'll have to get back to you on this. i just got home from work. not a bad.... oh.... 15 hour day...
|
|
|
|
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #12 on: April 13, 2007, 09:45:10 AM » |
|
No problem sir. I would like to work on it over the weekend anyways. For now I'm at work.
|
|
|
|
|
Logged
|
|
|
|
|
Jedakiah
|
 |
« Reply #13 on: April 13, 2007, 01:35:45 PM » |
|
Okay, I hadn't taken an in-depth look at the SMF calendar. But it seems to basically do everything I need (hah!). And SMF is supposedly easy to edit so I'm going to start with it and see how far I get before I get mad and smash my monitor with a hammer.
|
|
|
|
|
Logged
|
|
|
|
Gidgidonihah
Seriously, what does it mean?
Moderator
Hero Member
    
Posts: 2163
|
 |
« Reply #14 on: April 13, 2007, 01:58:08 PM » |
|
Buy a cheap/crappy monitor for doing that please.
|
|
|
|
|
Logged
|
|
|
|
|