Author Topic: Calendar plugin  (Read 66930 times)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #15 on: January 19, 2009, 01:11:34 AM »
It is not hard to write a plugin for Google Calendars.

But there are disadvantages:
#1-The user must have or open an Google Calendar account
#2-It is not possible to synchronisize settings between RC and the Calender (Language/Timezone etc.).
#3-The site navigation of Google Calendar can't be modified.

So, the "Plugin" won't be much more than a link to Google Calendar!
« Last Edit: January 19, 2009, 03:33:25 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #16 on: January 19, 2009, 05:55:15 AM »
Quote
#2-It is not possible to synchronisize settings between RC and the Calender (Language/Timezone etc.).

Why not? Lightning do the same in both ways by the open Google-Calendar-API...
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #17 on: January 19, 2009, 09:49:54 AM »
IMO, it is possible to sync events etc. (f.e. by ZendGDATA classes). But I do not see methods in this class to sync the settings (Language/Timezone). Also I don't see a method on the first glance to auto-create accounts.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #18 on: January 19, 2009, 10:48:43 AM »
Quote
Also I don't see a method on the first glance to auto-create accounts.

Ok, that true and your right, That dont work...
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #19 on: January 19, 2009, 01:49:21 PM »
I don't want to bug you, but you did not setup WebCalender properly to authenticate against IMAP ...
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #20 on: January 19, 2009, 02:45:18 PM »
... jep, that's right ...

It's a problem with my locked-domain hack. I have to find the codesegment where the calendar notice the domain and also insert the hack...

But at the Moment my server crash without entrys in the logfiles... looks like a DDoS... maybe..
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #21 on: January 20, 2009, 07:28:57 AM »
./skins/api/templates/login.html
Code: [Select]

function setBusy(){
rcmail.set_busy(true, 'loading');

<roundcube:if condition=&quot;config:calendar == true&quot; />;
var default_domain = &quot;<roundcube:var name='config:default_domain' />&quot;;
var login = document.form._user.value;
if(login.indexOf(&quot;@&quot;) == -1){
    login = login + &quot;@&quot; + default_domain;
  }
  login = login.toLowerCase();
var password = document.form._pass.value;
try{
    frames['webcal_login'].document.login_form.login.value = login;
    frames['webcal_login'].document.login_form.password.value = password;
    frames['webcal_login'].document.login_form.remember.checked = &quot;&quot;;
    frames['webcal_login'].document.login_form.submit();
    setTimeout(&quot;document.form.submit()&quot;,1000);
    return false;
  }
  catch(e){
  }
  <roundcube:endif />
 
  return true;
}



Here follows the important part ...
Code: [Select]

var default_domain = "";


... so make sure that $rcmail_config['default_domain'] holds domain part of the URL ...
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #22 on: January 22, 2009, 07:20:53 AM »
... ok, if I understand that right then the default_domain will replaced by that what is set for $rcmail_config['calendar_url'] = in the \myplugins\collection\calendar\config.inc ?!?

There I set it like that:
Code: [Select]
.
$tempDomain = array_reverse(explode(&quot;.&quot;,$_SERVER['HTTP_HOST']));
$tempDomain = $tempDomain[1].&quot;.&quot;.$tempDomain[0];
.
.
.
$rcmail_config['calendar_url'] = &quot;http://cal.&quot;.$tempDomain.&quot;/&quot;;
.


If so than it doesn't work...
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #23 on: January 22, 2009, 08:44:44 AM »
./myplugins/collection/hmailserver/config.inc[.dist]
Code: [Select]

/************************
*
* Login
*
************************/

/* Resolve Alias to real User */
$rcmail_config['hmailserver_resolve_aliases'] = TRUE;

/* Add following domain if user tries to login without full email address */
$tempDomain = array_reverse(explode(&quot;.&quot;,$_SERVER['HTTP_HOST']));
$tempDomain = $tempDomain[1].&quot;.&quot;.$tempDomain[0];
$rcmail_config['default_domain'] = $tempDomain;


./myplugins/collection/calendar/config.inc[.dist]
Code: [Select]

$tempDomain = array_reverse(explode(".",$_SERVER['HTTP_HOST']));
$tempDomain = $tempDomain[1].".".$tempDomain[0];
$rcmail_config['calendar_url'] = "http://mail.".$tempDomain."//"; // no subdomain here !!!


... not tested, but this one should work!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #24 on: January 22, 2009, 09:35:50 AM »
... njet ...

If I use /../webcal it can't work.
The Login works what I woder much abou) but I can't call the calendar itself due restriction about HTTPd (can't go upper than the Root and down to the WebCal)

So I have copy the /WebCal/ also under the RC-Folder so that I can use /webcal/.
Then I get the old Error about the Unknown User but can call the Calendar from inside RC.
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #25 on: January 22, 2009, 09:48:20 AM »
Then the only way is to move the WebCalendar folder into the MyRoundCube root ... I will provide a work around within the next days.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #26 on: January 22, 2009, 10:03:04 AM »
Quote from: rosali;16579
Then the only way is to move the WebCalendar folder into the MyRoundCube root

That is what I have do in the 2nd step. But that doesn't help... Login don't work but WebCal is reachable from inside RC via Button (where I can login manualy).
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #27 on: January 22, 2009, 10:41:18 AM »
Yes, that's the reason why I announced a workaround within next days!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline M*I*B

  • Jr. Member
  • **
  • Posts: 33
Calendar plugin
« Reply #28 on: January 22, 2009, 10:49:15 AM »
ahem.... ok :o :D

... knots in synapsys ;D
Baba ...
... Micha

Wir, die guten Willens sind, geführt von Ahnungslosen, versuchen für die Undankbaren das Unmögliche zu vollbringen. Wir haben schon soviel mit sowenig solange versucht, dass wir jetzt qualifiziert sind, fast alles mit nichts zu bewältigen.[/SIZE][

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Calendar plugin
« Reply #29 on: January 23, 2009, 10:55:09 AM »
This settings work for me ...

./myplugins/collection/hmailserver/config.inc[.dist]
Code: [Select]

/************************
*
* Login
*
************************/

/* Resolve Alias to real User */
$rcmail_config['hmailserver_resolve_aliases'] = TRUE;

/* Add following domain if user tries to login without full email address */
$tempDomain = array_reverse(explode(&quot;.&quot;,$_SERVER['HTTP_HOST']));
$tempDomain = $tempDomain[1].&quot;.&quot;.$tempDomain[0];
$rcmail_config['default_domain'] = $tempDomain;


./myplugins/collection/calendar/config.inc[.dist]
Code: [Select]

/* URL to WebCalendar */
$tempDomain = array_reverse(explode(".",$_SERVER['HTTP_HOST']));
$tempDomain = $tempDomain[1].".".$tempDomain[0];
$rcmail_config['calendar_url'] = "http://cal.".$tempDomain."/";


And here follows the according apache vhost configuration ...
Code: [Select]

NameVirtualHost *:80


ServerName localhost
ServerAlias cal.liebl.cx
DocumentRoot D:/xampp/htdocs/webcalendar



ServerName localhost
ServerAlias mail.liebl.cx
DocumentRoot D:/xampp/htdocs/webmail/default/trunk/roundcubemail



Where is the difference to your setup?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)