vtiger.com - Home of vtiger CRM
Home Products Downloads Support Buy Support Partners Company  Community Forums Blogs   Extensions  
Call Us : +1 408-733-3229
 
Log in

Register | Forgot password ?
<<August 2010>>
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

 Search this forum

SourceForge.net Logo


Calendar Module Changes (Part Deux, iCal Adventures)
Post new topic   Reply to topic  Forum Home -> 3rd-Party Extensions Previous topic :: Next topic
Goto page 1, 2  Next

Post  jonb   Post subject: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Jul 12, 2007 4:03 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
I figured I should start a new thread since this is a mod that relates to a different topic. iCal exporting. To see the calendar that I'm basing this from, see the following thread:

http://forums.vtiger.com/viewtopic.php?t=15075

Ok, that being out of the way, I have basic iCal exporting working in vTiger 5.0.3. The patch is attached below. Enjoy.



iCal-Export-5.0.3.patch.txt
 Description:
A patch to enable iCal export in the Calendar module. Based on the improved calendar (See original thread).

Download
 Filename:  iCal-Export-5.0.3.patch.txt
 Filesize:  93.37 KB
 Downloaded:  592 Time(s)


    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Jul 12, 2007 4:06 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
In addition, here's my current revision of the Calendar module. I tarballed it for convenience. However, you must still apply many of the patches to get the stuff here to work. There are many changes outside of the Calendar module that must be applied.


Calendar-Module-iCal+Colors-5.0.3.tar.gz
 Description:
A tarball of my calendar module. This will only work if the other patches are applied correctly.

Download
 Filename:  Calendar-Module-iCal+Colors-5.0.3.tar.gz
 Filesize:  187.31 KB
 Downloaded:  581 Time(s)


    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Jul 12, 2007 4:12 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
Oh, before anyone asks, I didn't make an interface for an end user to actually download the calendar (So there's no link within vtiger to get to the calendar). That will come later. If you want to use these patches as is, you can tell your users to Subscribe to the calendar at the following address in iCal or whatever.

http://your-vtiger-install/index.php?module=Calendar&action=iCal

If you really need a button to download a Calendar within vtiger, just modify the appropiate file in vtiger-install/Smarty/templates to create a link to the above.

_________________
http://www.codecrazy.net/

    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Jul 12, 2007 4:21 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
Here we go. This is a patch to the index file so the headers will be written out from the previous patch. It basically disables any output other than the text/calendar data.

Code:

Index: index.php
===================================================================
--- index.php   (revision 140)
+++ index.php   (working copy)
@@ -274,6 +274,7 @@
       ereg("^ActivityAjax",$action) ||
       ereg("^chat",$action) ||
       ereg("^vtchat",$action) ||
+      ereg("^iCal",$action) ||
       ereg("^updateCalendarSharing",$action) ||
       ereg("^disable_sharing",$action) ||
       ereg("^HeadLines",$action) ||
@@ -303,10 +304,11 @@
          ereg("^massdelete", $action) ||
          ereg("^mailmergedownloadfile",$action) ||    ereg("^get_img",$action) ||
          ereg("^download",$action) ||
+         ereg("^iCal",$action) ||
          ereg("^massdelete", $action ))
          $skipFooters=true;
       //skip footers for all these invocations as they are mostly popups
-      if(ereg("^downloadfile", $action) || ereg("^fieldtypes",$action) || ereg("^mailmergedownloadfile",$action)|| ereg("^get_img",$action))
+      if(ereg("^iCal",$action) || ereg("^downloadfile", $action) || ereg("^fieldtypes",$action) || ereg("^mailmergedownloadfile",$action)|| ereg("^get_img",$action))
       {
          $viewAttachment = true;
       }

    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Jul 12, 2007 4:38 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
This patch has been submitted to the trac.

https://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4080

_________________
http://www.codecrazy.net/

    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Fri Jul 13, 2007 4:50 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
Does anyone have any suggestions for doing authentication? Basically as-is, you need to login to be able to access the calendar. I'm thinking about setting it so it creates it's own connection to the database and turning it into an essentially stand alone script that queries the database and returns the public calendar. This way users can subscribe to the calendar in iCal or whatever and not have to log in before hand. Any thoughts on this?
_________________
http://www.codecrazy.net/

    View user's profile Send private message Visit poster's website AIM Address

Post  jonb   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Fri Jul 13, 2007 8:52 pm 
Posts: 42 
Location: Santa Fe, NM 
  Reply with quote
I ended up modifying my version of the ical exporter to provide the calendar without authentication. I figure if someone manages to get into our internal network, viewing our calendar is the least of our worries. If you want your setup like this, move the iCal.php in modules/Calendar to your vtiger root and modify the beginning of it to resemble the following:

Code:

<?php

define('_BENNU_VERSION', '0.1');

require_once('include/database/PearDatabase.php');
require_once('include/utils/CommonUtils.php');
require_once('include/utils/UserInfoUtil.php');
require_once('modules/Calendar/CalendarCommon.php');
require_once('modules/Calendar/iCalendar_rfc2445.php');
require_once('modules/Calendar/iCalendar_components.php');
require_once('modules/Calendar/iCalendar_properties.php');
require_once('modules/Calendar/iCalendar_parameters.php');

// Connect to the database anyway if we aren't logged in
if(!isset($_REQUEST['action']) || !isset($_REQUEST['module']) ) {
   global $adb;

   $adb = NewADOConnection($dbconfig['db_type']);
   $adb->Connect($dbconfig['db_server'], $dbconfig['db_username'], $dbconfig['db_password'], $dbconfig['db_name']);
}

$ical_query = "SELECT * FROM vtiger_activity
               WHERE (
                   ( STATUS != 'Completed' AND STATUS != 'Deferred' )
                   OR STATUS IS NULL
               ) AND (
                   ( eventstatus != 'Held' AND eventstatus != 'Not Held' )
                   OR eventstatus IS NULL
               )";

etc...


Enjoy.

_________________
http://www.codecrazy.net/

    View user's profile Send private message Visit poster's website AIM Address

Post  chimaster   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Thu Aug 16, 2007 9:46 am 
Posts: 79 
 
  Reply with quote
Hi Jonb,

I saw this post and followed on from the other thread. Looks like excellent work from the screen shots. Can you summary up best files / patches to be applied as I'm having some trouble getting the patches in.

(most likely a result of my newbism).

regards

Razz

    View user's profile Send private message

Post  seaq   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Mon Oct 08, 2007 3:03 pm 
Posts: 48 
 
  Reply with quote
Jonb, how are you?

i wonder if it's possible to add a vcard export functionality to the calendar via iCal. I don't really know a lot about this, that's why i'm asking.

What i had in mind is to attach the iCal file for the event in particular when i create it and select send notifications. so when i get the email i can add the iCal file to my calendar..

What do you think about this?

    View user's profile Send private message

Post  wolf88   Post subject: Re: Calendar Module Changes (Part Deux, iCal Adventures)
     
Mon Jan 14, 2008 4:15 pm 
Posts: 19 
 
  Reply with quote
I am highly interested in the iCal export and dont want to wait for the 5.1 version. But I do not manage to get it work. Actually I totaly lost (or never got) the overview of all patches needed. From the first patch I also get some rejections.

As I am no programmer: Could someone please provide a concentrated patch or the patched and zipped calendar-folder (do I still have to change the db?). I am running the actual 5.0.3 version. thanx.

    View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    vtiger Forum Index -> 3rd-Party Extensions All times are GMT
Leave a Testimonial
Goto page 1, 2  Next
Page 1 of 2

Jump to: