1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, new accounts will need to make at least one (valid) post.
    Otherwise, we will periodically purge all users without posts or that haven't confirmed their account.

Formatting calendar layout similar to event setup

Discussion in 'General Support' started by ChuckR, Jan 17, 2006.

Thread Status:
Not open for further replies.
  1. ChuckR

    ChuckR New Member

    Greetings all....

    I am rather new to PHP & HTML, and for the most part find myself over my head when working with the calendar codes. But I am getting by.

    I have modified the demo.php script and placed it on a site that I administer.

    The page that is wrapped around the calender is at this link:

    http://madwest1958.org/misc_info/calendar2.php

    The file that the web page points to is at this link:

    http://madwest1958.org/calendar/calendar2.php

    My question is: I would like to have the calendar page mirror the calendar layout that is displayed in your Event Manager utility. Specifically, I would like to include a Month/Year drop down menu, and the category Legend.

    I have been unsuccesful in finding any recent tips on this forum on this subject. Does anyone have and suggestion or tips.

    Thanks in advance for your help

    ChuckR
     
  2. Brian

    Brian EPC Developer Staff Member

  3. ChuckR

    ChuckR New Member

    More advise please.....

    Thanks for your quick reply Brian.

    Below I have pasted the code for my calendar page. I am not sure where to insert the codes that you provided. This is the area where I get into trouble.

    ChuckR
    __________________________________

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Easy PHP Calendar</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <?php $CSS=1; require("calendar.php"); ?>
    <style type="text/css">
    <!--
    .style1 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    }
    -->
    </style>
    </head>
    <body>
    <?php $OL=1; require("calendar.php"); ?>
    <table width="100%" align="center">
    <tr><td align="center">
    <?php

    // $TOC=1; // UNCOMMENT THIS LINE TO SHOW TEXT ON CALENDAR
    // THIS IS AN EXAMPLE OF THE MULTI-CALENDAR GENERATOR

    $MULTI=1;
    $epcMultiWidth = "600px";
    $epcMultiPad = 10;
    $epcMultiNav = "580px";
    $epcMultiCol = 3;
    $epcMultiRow = 1;
    require("calendar.php");

    ?>
    <br />
    <br />

    <?php
    // SHOW LISTINGS MODULE
    // $epcListMouseover=1; // WILL USE THE MOUSE-OVER POPUPS FOR LIST MODE
    $LIST=1;
    $listMonths=3;
    $DF = "M jS, Y (D)";
    $template="modern.php";
    require("calendar.php");
    :)
     
  4. Brian

    Brian EPC Developer Staff Member

    You would add the code on the page where you want the information to appear.

    For the date drop-down, probably just after the <body> tag.

    For the legend, just anywhere would be fine and you can move it in the code to put it above and below other items.
     
  5. ChuckR

    ChuckR New Member

    I'm a slow learner .. still can't get it... HELP

    I have spent a couple of hours doing some "trial and error" but can't get Brian's suggestion to work.

    When I pasted the code at the point that Brian suggested, and tried to load the page using Safari, I got this error message:

    Parse error: parse error, unexpected '\"' in /home/.dempsey/madwest1/madwest1958.org/calendar/calendar4.php on line 27


    Does anyone have any ideas what I am doing wrong?

    Thanks again in advance for your comments!


    Here is the link to the page that generated this error:

    http://madwest1958.org/calendar/calendar4.php

    Below is the code for the page (including the added code insterted after the <body> tag:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Easy PHP Calendar</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <?php $CSS=1; require("calendar.php"); ?>
    <style type="text/css">
    <!--
    .style1 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    }
    -->
    </style>
    </head>
    <body>
    <?php
    $mo=$_REQUEST[mo];
    $yr=$_REQUEST[yr];
    if (!isset($mo) || $mo<1 || $mo>12 || !is_numeric($mo)) $mo = date("m",time() - date('Z') + ($gmt * 3600));
    if (!isset($yr) || $yr<1970 || $yr>2036 || !is_numeric($yr)) $yr = date("Y",time() - date('Z') + ($gmt * 3600));
    ****?>
    *****<form name="form3" method="post" action="<?php echo $PHP_SELF ?>">
    ********<select name="mo" id="mo">
    *********<?php
    for ($N=1; $N<=12; $N++) {
    ****echo "<option value='$N'";
    ****if ($N==$mo) echo " SELECTED";
    ****echo ">$mth[$N]</option>";
    ****}
    ****?>
    ********</select>
    ********<select name="yr" id="yr">
    *********<?php
    for ($N=2000; $N<=2036; $N++) {
    ****echo "<option";
    ****if ($N==$yr) echo " SELECTED";
    ****echo ">$N</option>";
    ****}
    ****?>
    ********</select>
    ********<input type="submit" name="Submit" value="Go">
    *****</form>

    <?php $OL=1; require("calendar.php"); ?>
    <table width="100%" align="center">
    <tr><td align="center">
    <?php

    // $TOC=1; // UNCOMMENT THIS LINE TO SHOW TEXT ON CALENDAR
    // THIS IS AN EXAMPLE OF THE MULTI-CALENDAR GENERATOR

    $MULTI=1;
    $epcMultiWidth = "600px";
    $epcMultiPad = 10;
    $epcMultiNav = "580px";
    $epcMultiCol = 3;
    $epcMultiRow = 1;
    require("calendar.php");

    ?>
    <br />
    <br />

    <?php
    // SHOW LISTINGS MODULE
    // $epcListMouseover=1; // WILL USE THE MOUSE-OVER POPUPS FOR LIST MODE
    $LIST=1;
    $listMonths=3;
    $DF = "M jS, Y (D)";
    $template="modern.php";
    require("calendar.php");
     
  6. Brian

    Brian EPC Developer Staff Member

    Please zip up and attach calendar.php to this post and I'll take a look.
     
  7. ChuckR

    ChuckR New Member

    Calendar file

    Hi Brian.....

    Attached is a copy of the file I am using.

    Thanks again

    Chuck:teeth_smi
     

    Attached Files:

  8. Brian

    Brian EPC Developer Staff Member

    Where are the accented E's in your code?

    They shouldn't be there.
     
  9. ChuckR

    ChuckR New Member

    2nd attempt

    Brian..... I failed to use my DropZip utility to compress the file.

    A new version is attached.

    Sorry!

    Chuck
     

    Attached Files:

  10. Brian

    Brian EPC Developer Staff Member

    Your code has a lot of ÊÊÊÊ in it which is likely causing the error. They should all be removed from your code.
     
Thread Status:
Not open for further replies.

Share This Page