Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Calendar...

  1. #1
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default Calendar...

    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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    i was looking at that earlier.... its not free is it?

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Here is a free JavaScript Calendar from Yahoo!

    http://developer.yahoo.com/yui/calendar/

  6. #6
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    the yahoo ones look nice, but i dont think you can add events within them... can you?

  7. #7
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    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

  8. #8
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    PHP Code:
    <?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($month1$year)) {
    $now getdate();
    $year $now["year"];
    $month $now["mon"];
    $today $now["mday"];
    }

    $ts mktime(000$month1$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?>&amp;month=<?=$prevmonth?>"><span class="prev">&lt;&lt;</span></a>
    <span class="header"><?=$date["year"]?> <?=$months[$date["mon"] - 1]?></span>
    <a href="calendar.php?year=<?=$nextyear?>&amp;month=<?=$nextmonth?>"><span class="next">&gt;&gt;</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 != || $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

  9. #9
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    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

  10. #10
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    If you want ugly and slow code, then use the Yahoo one.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •