View Full Version : Calendar...
Jon101
11-19-2007, 11:18 PM
I tried searching but had no luck... sorry if i missed something.
I'm looking for a decent calender script that can have events added within it.
Maybe like a day with an event will be red, and on a mouse over you can see the event.
Something like that
Any ideas?
Jon
thetestingsite
11-19-2007, 11:51 PM
http://www.easyphpcalendar.com/
Hope this helps.
Jon101
11-19-2007, 11:56 PM
i was looking at that earlier.... its not free is it?
thetestingsite
11-20-2007, 12:05 AM
I believe it is actually. http://www.easyphpcalendar.com/freeDownload.php
codeexploiter
11-20-2007, 03:06 AM
Here is a free JavaScript Calendar from Yahoo!
http://developer.yahoo.com/yui/calendar/
Jon101
11-20-2007, 05:40 PM
the yahoo ones look nice, but i dont think you can add events within them... can you?
Jon101
11-20-2007, 08:04 PM
I spent the whole day looking and came up short handed.... I tried that first one, easy php.. but the files that came with it were corrupt and no one seems to answer questions on their forums - heh...
Any one have any other ideas???
Thanks much!
Jon
mamoth
11-20-2007, 09:46 PM
<?php
///////////////////////////////////////////////////////////////////
////// //////
////// Calendar Mod by bokli //////
////// Insprated by and based on the book //////
////// "Teach Yourself PHP4 in 24 Hours" //////
////// //////
///////////////////////////////////////////////////////////////////
// maybe you need to do at your site somewhere
//(for example to the end of your stdhead() function)
//an iframe like this:
// <iframe src='calendar.php' frameborder='0' scrolling='no'></iframe>
//and you need to design this with your .css files
//(i dont add any tips how to do, it's all up to you)
require("include/bittorrent.php");
dbconn(false);
if ($CURUSER) {
$ss_a = @mysql_fetch_array(@mysql_query("SELECT uri FROM stylesheets WHERE id=" . $CURUSER["stylesheet"]));
if ($ss_a)
$rss_uri= $ss_a["uri"];
}
if (!$ss_uri) {
$r = mysql_query("SELECT uri FROM stylesheets WHERE id=1") or sqlerr();
$a = mysql_fetch_array($r);
$ss_uri = $a["uri"];
}
$_GET["year"] = $year;
$_GET["month"] = $month;
if (!@checkdate($month, 1, $year)) {
$now = getdate();
$year = $now["year"];
$month = $now["mon"];
$today = $now["mday"];
}
$ts = mktime(0, 0, 0, $month, 1, $year);
$date = getdate($ts);
// change the first day of the week
// comment out the next four lines if you want sunday to first
if ($date["wday"] == 0)
$date["wday"] = 6;
else
$date["wday"]--;
$prevyear = $year;
$prevmonth = $month - 1;
if ($prevmonth == 0) {
$prevyear = $year - 1;
$prevmonth = 12;
}
$nextyear = $year;
$nextmonth = $month + 1;
if ($nextmonth == 13) {
$nextyear = $year + 1;
$nextmonth = 1;
}
//change the name of the months and days
//maybe you need to change these
$months = array("január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember","október", "november", "december");
//uncomment the next line (and some later) if you want to display the name of the days in the first row
$days = array("hétfĹ‘", "kedd", "szerda", "csütörtök", "péntek", "szombat", "vasárnap");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html><head>
<title>calendar</title>
<link rel="stylesheet" href="<?=$ss_uri?>" type="text/css">
</head>
<body class="calendar">
<div>
<p>
<a href="calendar.php?year=<?=$prevyear?>&month=<?=$prevmonth?>"><span class="prev"><<</span></a>
<span class="header"><?=$date["year"]?> <?=$months[$date["mon"] - 1]?></span>
<a href="calendar.php?year=<?=$nextyear?>&month=<?=$nextmonth?>"><span class="next">>></span></a>
</p>
<table>
<?
print("<tr>");
foreach ($days as $day)
print("<td class='wdays'><span>$day</span></td>");
for ($i = 0; $i < 42; $i++) {
$day_array = getdate($ts);
if (($i % 7) == 0) {
if ($day_array["mon"] != $month)
break;
if ($i != 0 || $days)
print ("</tr>\n");
print("<tr>\n");
}
if ($i < $date["wday"] || $day_array["mon"] != $month) {
print "<td></td>\n";
}
else {
if ($today && $day_array["mday"] == $today)
print "<td><strong>" . $day_array["mday"] . "</strong></td>\n";
else
print "<td>" . $day_array["mday"] . "</td>\n";
$ts += (60 * 60 * 24);
}
}
?>
</table>
</div>
</body>
</html>
would this help you if you get it to work let me know :)
codeexploiter
11-21-2007, 05:25 AM
Yahoo UI Calendar supports events. You can check the following page as well as its documentation for more details.
http://developer.yahoo.com/yui/calendar/#events
tech_support
11-21-2007, 05:32 AM
If you want ugly and slow code, then use the Yahoo one.
codeexploiter
11-21-2007, 08:15 AM
If you want ugly and slow code, then use the Yahoo one.
I personally don't think so. If you check the increasing popularity of Yahoo UI framework, it is clear.
tech_support
11-21-2007, 08:43 AM
IE's very popular, that doesn't mean it's good. :p
codeexploiter
11-21-2007, 10:53 AM
I don't think any site visitor is interested in JavaScript coding or the server-side technology used in the site apart from the information in which they are interested. You can't compare a normal site visitor who uses some browser to access the information with a person who selects a client-side framework. In case of first the user is not mainly interested (most of the normal users)in the things that runs in the background. In the latter case it is just opposite the developer has to make sure that the selected client-side libraries works well in their site in an efficient manner. If a framework is popular I think it just because of its efficiency as these things are checked and cross checked by experienced developers before using them in their own site. I don't think nobody start using a client-side framework unless they are convinced about it.
There is no point in telling that IE is useless. As a web developer I have to write code that works in most of the browsers. This state will go until Microsoft changes its existing strategy. I personally don't like IE much but as a developer I have to write code that runs correctly in IE also.
Check the following links for more details about the framework.
http://ajaxian.com/wp-content/images/AjaxianReaderSurveyResults_2007.pdf
I don't think popularity is a sin but as far as programming tools are concerned only the good one will survive unlike any other applications.
Jon101
11-23-2007, 04:34 PM
Thanks for the help guys... ill check it out!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.