www.webdeveloper.com
Results 1 to 8 of 8

Thread: Edit a calendar in PHP script!

  1. #1
    Join Date
    Jun 2010
    Posts
    44

    Edit a calendar in PHP script!

    Hello,

    I am using a calendar written in PHP i found o nthe net. Im now trying to make some editing to the dates/days in the code. The thing is there is no html code available, (except when someone is looking up the source through a browser that is) and the code is used with php as "echo".

    So i have an idnex file, wich has a "require_once" file - a php-file with all the classes of the calendar.

    I am going to post both the php code for the php file page, and the php with the classes. It is pretty much, and i hope someone can help me .

    php code in a page php file for the site:
    Code:
    <?php
        
        ## +---------------------------------------------------------------------------+
        ## | 1. Creating & Calling:                                                    | 
        ## +---------------------------------------------------------------------------+
        // invlude calendar class
        require_once("calendar.class.php");
        
        // create calendar object
        $objCalendar = new Calendar();
        
        ## +---------------------------------------------------------------------------+
        ## | 2. General Settings:                                                      | 
        ## +---------------------------------------------------------------------------+
    
        ## *** set calendar width and height
        $objCalendar->SetCalendarDimensions("400px", "200px");
        ## *** set week day name length - "short" or "long"
        $objCalendar->SetWeekDayNameLength("long");
        ## *** set start day of week: from 1 (Sanday) to 7 (Saturday)
        $objCalendar->SetWeekStartedDay("1");
        ## *** set calendar caption
        //$objCalendar->SetCaption("ApPHP Calendar v".Calendar::Version());
    
        ## +---------------------------------------------------------------------------+
        ## | 3. Draw Calendar:                                                         | 
        ## +---------------------------------------------------------------------------+
        
        $objCalendar->Show();
        
    ?>
    I write the next code in a new thread...

  2. #2
    Join Date
    Jun 2010
    Posts
    44
    The text is obviosly to long for it to post here, so i will find a way later since i got to go from this computer now....

    But in interest for anyone who knows and want t ocheck it up, the calendar is downloaded from http://www.apphp.com/. And it is the basic calendar.

  3. #3
    Join Date
    May 2012
    Posts
    37
    I'm guessing the objCalendar's show() method has the HTML markup or at least points to another object or method that does. The HTML is in there somewhere...
    "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
    -- Douglas Adams

    http://www.chaoscontrol.org
    Have you minified your CSS/JS lately?

  4. #4
    Join Date
    May 2012
    Posts
    42
    What kind of edits do you want to do on the date/days?

  5. #5
    Join Date
    Jun 2010
    Posts
    44
    Quote Originally Posted by g0dzuki99 View Post
    I'm guessing the objCalendar's show() method has the HTML markup or at least points to another object or method that does. The HTML is in there somewhere...
    Yes but this file is SO BIG, and i have not that good skills in PHP. I mean for example i cannot be sure for example if i want to edit a date, on where to put the html/javascript code for it in this file. If i want to edit ex. 27 may, i dont know where to find this in the code.

    The thing i have not check it up from top to end, but it is so big. Anyway here is the file. I uploaded it to a site, it is too big to fit in the post here , it would take up many many post for the whole file. So download it from here to check:
    http://www.sendspace.com/file/izdyl1

  6. #6
    Join Date
    Jun 2010
    Posts
    44
    Quote Originally Posted by kbduvall View Post
    What kind of edits do you want to do on the date/days?
    I want to put some javascript code, for being able to add(with sql that is) and see events on dates. say i want to put up an event for tomorrow 28 May, but i am not sure WHERE to put in this code. Cause as you would understand it does not say "May" anywere, but it is classes and variables.

    Anyway here is the code uploaded, if you would like to help:
    http://www.sendspace.com/file/izdyl1

  7. #7
    Join Date
    Jun 2010
    Posts
    44
    The PHP code with the classes and all that is uploaded here:
    http://www.sendspace.com/file/izdyl1

    Please do take a look, and help me .

  8. #8
    Join Date
    Jun 2010
    Posts
    44
    Noone huh...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles