Results 1 to 7 of 7

Thread: phpiCalendar works! Evolution works! (but not the entire event displayed)

  1. #1
    czaveri's Avatar
    czaveri is offline Former Zimbran
    Join Date
    Feb 2006
    Location
    Pune, India
    Posts
    294
    Rep Power
    9

    Default phpiCalendar works! Evolution works! (but not the entire event displayed)

    I configured phpiCalendar and using a wget cron I am able to view the calendar.
    Similarly, I have succeeded in configuring Evolution.

    However, in both of these the entire event is not displayed! For example, I have added the following event in the Zimbra Web UI:

    Subject: Zimbra issues to be solved
    Description: Configure Zimbra's Address Books, Calendars and Documents (Wiki), such that they are all accessible on port 80 instead of 6080. Actually they are accessible on port 80 but the URL shown in the Zimbra Web UI should also be 80. In addition, the URLs should not contain hostname! Rather it should contain the name called by the referring URL. Same changes for the links in the Wiki.
    But, both, in Evolution and phpiCalendar, I see:

    Subject: Zimbra issues to be solved
    Description: Configure Zimbra's Address Books, Calendars and Documents (Wiki), such that they are all accessible on port 80 instead of 6080. Actually they are ...
    I don't quite understand why instead of displaying the entire message it is displaying three dots "..."

    Can someone help me understand, please?

    Thanks,
    Regards,

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

  2. #2
    DGS_David is offline Intermediate Member
    Join Date
    Aug 2006
    Location
    Somerset, UK
    Posts
    22
    Rep Power
    8

    Default

    I have not done any of what you are doing but I just picked up on the "..." bit, this is generally used as a way of truncating a long string of text and displaying it in a way that the reader knows there is more to come (OR in IM messaging where you want to continue a sentance on a following line).

    eg:

    This is a long string of text.

    could be displayed as:

    This is a long...

    So you know this is just a summary, most cases would provide a link to follow the white rabbit and see it all.

    I wonder if the parameters you supply default to showing a summary? Maybe a tweak to URL may provide the desired result.

    This is just a brain dump so could be way off...

    David

  3. #3
    czaveri's Avatar
    czaveri is offline Former Zimbran
    Join Date
    Feb 2006
    Location
    Pune, India
    Posts
    294
    Rep Power
    9

    Default

    You are right and I understand this convention. However, you pointed to me the possibility of having another URL or a modified URL. I will try to see if such a thing is possible.

    It displays exactly one line - so need to figure out how to display all lines. I will start by studying again the blog posts:
    http://www.zimbra.com/blog/archives/...st_update.html
    http://www.zimbra.com/blog/archives/..._via_re_1.html

    and the SVN page:
    http://svn.sourceforge.net/viewvc/zi...=1&view=markup

    Thank-you,
    Regards,

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

  4. #4
    czaveri's Avatar
    czaveri is offline Former Zimbran
    Join Date
    Feb 2006
    Location
    Pune, India
    Posts
    294
    Rep Power
    9

    Default

    Nope! Doesn't help.

    There would be a way, but I am unaware and can't find similar posts.

    Anyone has success with this?
    Regards,

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

  5. #5
    mattrice is offline Junior Member
    Join Date
    Sep 2006
    Posts
    5
    Rep Power
    8

    Default Method that works for retreiving calendars, using PHPiCalendar no truncated text

    When I sought out to use PHPiCalendar I didn't want to make my zimbra calendars public, I also wanted to compile several calendars (we use this for our room scheduling).CURL seemed to be the best answer way to authenticate and retrieve the calendars. I created a php script that pulls all of the calendars that I want into the calendars folder on PHPiCalendar, and I set a cron job to run that script every 5 minutes.

    Using this method I don't notice the issue that is presented in bug 11254 .

    The only problem with the way that I wrote this is that you have to make the .ics files in your PHPiCalendar folder publically writeable, a problem I intent to look into soon.

    I also edited the template.php file in PHPiCalendar so that it won't show cancelled events or declined events, I can't attach it, it is too large, but if anyone is interested contact me through this forums contact system.

    Here is the code that I put into my GetCals.php file(replace 'myserver' with your server and 'mycal' with your calendar names:

    <?php

    /* Remember to change is 'myServer', 'password', and 'myCal'
    * The files you intent to write to must exist and be publically writeable
    * I left various echo statements to help you during testing, comment those out as necessary */
    function get_content($url, $name)
    {
    $url = 'http://myServer/zimbra/home/'.$name.'/calendar.ics';
    $target = 'calendars/'.$name.'.ics';

    $ch = curl_init($url);
    /* the next setting allows curl to follow zimbra re-directs */
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    /* now you have to set your username and password, I used the admin account */
    curl_setopt($ch, CURLOPT_USERPWD, "admin:password");

    $result = curl_exec($ch);
    /*echo "Received data: <hr>$result<hr>\n"; */
    curl_close ($ch);

    /* Let's make sure the file exists and is writable first. */
    if (is_writable($target)) {

    /* Open the target file, this is set to 'w' so that it
    * will overwite the contents
    * Comment out the echo statments once testing is complete */
    if (!$handle = fopen($target, 'w')) {
    echo "Cannot open file ($target) \n";
    exit;
    }

    /* Write $result to our opened file. */
    if (fwrite($handle, $result) === FALSE) {
    echo "Cannot write to file ($target) \n";
    exit;
    }

    echo "Success, wrote to file ($target) \n";

    fclose($handle);

    } else {
    echo "The file $target is not writable \n";
    }

    }

    /* repeat the following step for all of the calendars you want to retrieve *
    * Remember the calendar must exist and be writeable */
    $name = 'myCal';
    get_content($url, $name);
    echo "<br />";
    /* The following is just a sample repeat*/
    $name = 'myCal';
    get_content($url, $name);

    ?>
    Last edited by mattrice; 11-18-2006 at 08:46 AM. Reason: no emoticons

  6. #6
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default PLEASE don't post the same message over and over

    Pick one appropriate thread and post in it. Don't post the same code snippet in multiple threads in multiple forums.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    mattrice is offline Junior Member
    Join Date
    Sep 2006
    Posts
    5
    Rep Power
    8

    Default Just trying to be helpfull to as many people as possible

    There were about 5 threads where this info would have been usefull. Just trying to be helpfull, but you are right.

    I should have posted it once and then posted references back to that post in the other applicable threads.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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