Jump to content

PHP Calendar


CNT

Recommended Posts

I need to create a calendar for a website. Since I am using PHP pages for the website, so I guess best to use PHP calendar (no javascript). I am still new to PHP and haven't looked into SQL Server (I do know SQL language, that's it). I have heard about Google calendar, but wouldn't work well with the design. All it needs to be is "event calendar". Only admin will add/edit events, and then others can see events. At first, I thought of creating a full 12-months but thought it wouldn't be practical. The propose of event calendar is to see future events in few months ahead (which there isn't a whole lot, but something like 5 events in a year). I feel they will be using it more on other little and local events, so I want to keep that in mind. So, something like a week of vacation with daily activites thoughout the day. So far, the link below seems to be best design:http://www.phpjabbers.com/time-slots-booking-calendar/orhttp://www.phpjabbers.com/event-booking-calendar/orhttp://www.phpjabbers.com/php-event-calendar/I really can't "order" those calendar since the org doesn't have money for me to "try" things out. I need a startup version so I can work from there. I looked in many places and download codes, those aren't helping me.http://th2.php.net/manual/en/refs.calendar.phpI need a startup and then I could pick up from there. I live in Milwaukee, WI.Chuck

Link to comment
Share on other sites

http://0gb.us/forum/index.php?page=calendar&referrer=1I've got the beginnings of a calendar here, if you'd like to look at it. If you like it, I'll zip it up, and send you the code. You can add calendar evens, even as a guest right now, to see if it suits your needs. Of course, you could easily set it so only administrators could set and remove calendar events. You will, however, need PHP 5.3 or higher. If you're running an older version, I can build you something similar, but I'll need a day to do it.The CSS (colors & style) still needs work, but you might be able to get help in the CSS forum.Clicking on a day will display the day's events below the calendar, and the month can be changed using the drop down menus in the upper right corner.
Link to comment
Share on other sites

http://0gb.us/forum/index.php?page=calendar&referrer=1I've got the beginnings of a calendar here, if you'd like to look at it. If you like it, I'll zip it up, and send you the code. You can add calendar evens, even as a guest right now, to see if it suits your needs. Of course, you could easily set it so only administrators could set and remove calendar events. You will, however, need PHP 5.3 or higher. If you're running an older version, I can build you something similar, but I'll need a day to do it.The CSS (colors & style) still needs work, but you might be able to get help in the CSS forum.Clicking on a day will display the day's events below the calendar, and the month can be changed using the drop down menus in the upper right corner.
It does look real good. However, could you (or anyone) explain to me why each time clicking on a day, it adds a history links? Some of the other calendars I found during google are like that, but some others are not. I understand PHP is the server-side, which would sent a new "HTML" page, thus another history. Is there a way to avoid this? I read something like "PHP client-side" and it looks good.I could use your code and work from there. I will be busy for some time (have to do a bathroom, replace windows, etc). When I am ready, I will ask. In meantime, I would most likely read this forum (and respond to it too).I am hoping I am not being rude to mention history of day clickings. Would I need to be looking at "PHP client-side calendars"?Chuck
Link to comment
Share on other sites

Not a problem. But "PHP client-side" is redundant. It won't narrow down your search, as PHP is always a client-side language when used on the web. But "PHP client-side" is contradictory. It won't narrow down your search, as PHP is always a SERVER-side language when used on the web.My calendar, and I assume that the others that add history items do as well, makes use of query strings, at the end of the URI. I can easily adjust it to use the invisible $_POST array instead, but it'll cause a couple of other issues.For one, you can't bookmark or link to a desired calendar month or day. Any time you link to the calendar, it will always show the current month and day. You can switch months and days once you get there, though. Also, if you refresh the page after switching months, most browsers will alert you to the fact that you are resending the data to the server, which can be annoying to some people.I bet those problems can be fixed by JavaScript, but I don't have that kind of skill.Just let me know what you'd prefer, and I can make the changes in the script.

Link to comment
Share on other sites

PHP is always server-side :). The "client-side" in your term probably refers to JavaScript.

Link to comment
Share on other sites

Oops, that's what I meant. I was having an off day. Nice catch.I'm no good with client-side scripting languages yet. My calendar is completely in PHP, which, as Synook pointed out, is a server-side language.It does require CSS though, as the only clickable-link element is <a/> I had to use the display property to give the illusion of table cells.

Link to comment
Share on other sites

I haven't worked on the website for a while. House work and kids school... you know. Anyways, I am more interested in two things as of now: 1) How to startup a calendar promptly... so it remains "flexable" to work with as I manage with it. I mean once starting it with HTML and CSS, then later if I have to make some major changes, the basic calendar would be uneffected (so that I won't need to do any overhaul, since it's started "right" from start). 2) Clicking on the day(s) or month/year, I don't want to add history. Example, see links in first post (phpjabbers.com), go ahead and clicking on any day/month, no new history (only one same history as of accessing to the page itself). As far I understand, those have NO java/javascript. Chuck

Link to comment
Share on other sites

To solve problem one, if I understand it correctly, just leave PHP running with your web server, and it'll work correctly. You can add and remove calendar events, without overhauling anything. It's fully flexible, and only require a directory with PHP read/write permission, for storing the events in. Each month loads a different file from this directory, so months will be created as you need them, so you don't need to wipe the calendar each month. Any HTML you wanted to add to the page shouldn't be a problem either, as most of the actual calendar is in a separate class file, of in a pair of nested PHP foreach() statements. As for problem two, I can try my hand at JavaScript, and see what happens from there. I can't find much on Google, so I'll ask around. I tried using the $_POST array, as I said I would, but it won't work without replacing the <a/>s with some kind of <form/>, or using more JavaScript. EDIT: Ingolme,thescientist, and justsomeguy just helped me figure it out on one of the other boards. Everything seems to be in order now. Is there anything else you need before I upload it?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...