Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: rosali on December 29, 2008, 10:43:58 AM

Title: Calendar plugin
Post by: rosali on December 29, 2008, 10:43:58 AM
I'm thinking about a calender plugin. I've put it on my ToDo's for Q1/2009.

My preferred backend at the moment is:

k5n.us: WebCalendar Home Page (http://www.k5n.us/webcalendar.php)

This app allows to verify users against an IMAP server and that's ideal, IMO.

Opinions?
Title: Calendar plugin
Post by: Julius Caesar on December 29, 2008, 10:48:26 AM
It looks good.

Will it be available just for MyRoundCube or for the 'regular' RoundCube as well ?
Title: Calendar plugin
Post by: rosali on December 29, 2008, 10:55:42 AM
MyRoundCube is the regular RoundCube if you disable those plugins you don't like!
Title: Calendar plugin
Post by: Wazooka on January 03, 2009, 01:41:25 PM
Looks like a rich addition. Attached is a smooth icon. From Everaldo: Crystal (http://www.everaldo.com/crystal/?action=preview). Licensed under LGPL.
Title: Calendar plugin
Post by: rosali on January 03, 2009, 01:56:05 PM
YEP! But first I want to test it a little bit before I start to code the complete implemenation ... The major work is to do the database sync of WebCalendar and RoundCube (Language, Preferred view, Timezone and Profile) ...
Title: Calendar plugin
Post by: rosali on January 04, 2009, 05:24:18 AM
If you have a test account, please test! Database sync between RoundCube and WebCalendar is implemented now ... first approach!

@Wazooka: Icon applied!
Title: Calendar plugin
Post by: Lukes on January 04, 2009, 04:05:46 PM
Looking good and appears to work well.

The only annoying part was registering a user for the first time as a user will need to register and fill in profile details, shame this is automatic.

Once a user is registered with webcalandar then everything runs seamlessly

If anyone is going to implement webcalendar once installed, you will need to rename user.php to user.php.old and then rename user-imap.php to user.php then update the IMAP server details to your user name.  This will then allow users to login using their IMAP details and auto login through roundcube

Is it worth rolling web calendar into the source dist?
Title: Calendar plugin
Post by: rosali on January 05, 2009, 12:51:39 AM
No, you need not to rename files ...

#1-Run /install and set it to use imap authentication.
#2-Edit /includes/user-imap.php to allow autocreation of authenticated IMAP users and specifiy IMAP host details.
Code: [Select]

// Allow auto-creation of WebCalendar Accounts for fully authenticated users
$allow_auto_create = true;

//
// 'auth_imap' configuration settings "borrowed" from the Meeting Room Booking System
//  https://sourceforge.net/projects/mrbs
//  GNU General Public License (GPL)
//
// This file contains all the functions for getting information
// about users via IMAP
//
$imap_host = 'localhost'; // Where is the IMAP server
$imap_port = '143';          // The IMAP server port

#3-Open /includes/menu/menu_config.php and disable "Login" and maybe "Help".
#4-Finally secure WebCalender by removing or securing install folder and other things.

If you follow these steps, all users which are allowed to connect to your IMAP server will be created automatically on next MyRoundCube login. No need to do it manually as admin.
Title: Calendar plugin
Post by: Julius Caesar on January 07, 2009, 05:05:07 AM
I've tested the calender addition to MyRC and it looks great. Please continue to iron out the pending issues.

Quote
MyRoundCube is the regular RoundCube if you disable those plugins you don't like!

On this I do not agree with you, although MyRoundCube has a lot of additions to the regular one, other features or not available, like selecting a different skin.

So my wish still stands: Make the calendar plug-in a seperate one which can be used directly with the regular RoundCube.
Title: Calendar plugin
Post by: rosali on January 07, 2009, 07:43:22 AM
Quote from: Julius Caesar;16090
On this I do not agree with you, although MyRoundCube has a lot of additions to the regular one, other features or not available, like selecting a different skin.


You are a template coder, so I understand your wish. But you are only paritally right.

At the moment I have disabled skin selection (./myplugins/config/config_plugins.php[.dist]):
Code: [Select]

/* api template */
$rcmail_config['skin'] = 'api';

/* Do not allow override template on a per user level */
$rcmail_config['dont_override'][] = 'skin';


But theoretically it works with all skins if the skin contains appropriate MyRoundCube XML.

F.e. to insert calendar task icon it is something like (I dont't have the real function name in mind right now):
Code: [Select]





So it is easy to adapt the calendar plugin to another skin.

I just don't catch the time to write a documentation for my Plugin API ...
Title: Calendar plugin
Post by: Julius Caesar on January 07, 2009, 08:26:39 AM
Thanks for the info

When I have more time to spare, I'll dig into adjusting the GroupVice theme for MyRoundcube. But at the moment I'm busy running from one New Years Reception to another.
Title: Calendar plugin
Post by: M*I*B on January 13, 2009, 02:59:06 PM
... grrrrr ...

May can anybody help to install the WebCalendar?

I have configure the config.inc to match the URL a.s.o. and then I create a SubDomain where WebCal sleep in.
1st time I call the URL the Setup comes up. All runns fine and I follow exactly the HowTo here and in the AdminGuide from the WebCal... But If I'm on the last page at the setup (where also sak about AuthType) and I sabe and click the Button GoToWebCal (or call the URL directly) I ever and ever landing in the last setup - page...
Title: Calendar plugin
Post by: rosali on January 14, 2009, 01:30:35 AM
#1-Try to install Webcalendar in a subfolder of a domain and not into the root of a subdomain (f.e.: root/webcalendar).

#2- Did you choose the option to authenticate users against IMAP and did you adjust ./includes/user-imap.php?

Code: [Select]

// Allow auto-creation of WebCalendar Accounts for fully authenticated users
$allow_auto_create = true;

//
// 'auth_imap' configuration settings "borrowed" from the Meeting Room Booking System
//  https://sourceforge.net/projects/mrbs
//  GNU General Public License (GPL)
//
// This file contains all the functions for getting information
// about users via IMAP
//
$imap_host = 'localhost'; // Where is the IMAP server
$imap_port = '143';          // The IMAP server port

Title: Calendar plugin
Post by: M*I*B on January 14, 2009, 02:23:55 AM
Quote
    #1-Try to install Webcalendar in a subfolder of a domain and not into the root of a subdomain (f.e.: root/webcalendar).
...hmmm... that would be worth an attempt ... I will check it in the evening

EDIT: No, that dont help; same problem as before...


Quote
#2- Did you choose the option to authenticate users against IMAP and did you adjust ./includes/user-imap.php?
... shure ;) Also with my special "check, which domain" hack...
Title: Calendar plugin
Post by: M*I*B on January 18, 2009, 12:52:42 PM
... so ...
Now I have installed the WebCalendar and it works on the 1st view... But I belive that is'nt the right one for my target... to much overload (and ugly design also... don't match the geat RC- Design).

... is'nt it possible to "PlugIn" the GoogleCalendar (s)? That's realy that what I need... for Thunderbird/Lightning there is a Plugin that works very good in 2way, Outlook can handle it also (readonly, but I belive somebody will create a 2way-plugin in the future) and I also can handle the GC by my Mobile and/or PDA via InternetAccess or by using ActiveSync at home...

... and last but not least: My blonde wife can handle the GC to 0:)
Title: Calendar plugin
Post by: rosali 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!
Title: Calendar plugin
Post by: M*I*B 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...
Title: Calendar plugin
Post by: rosali 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.
Title: Calendar plugin
Post by: M*I*B 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...
Title: Calendar plugin
Post by: rosali 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 ...
Title: Calendar plugin
Post by: M*I*B 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..
Title: Calendar plugin
Post by: rosali 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 ...
Title: Calendar plugin
Post by: M*I*B 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...
Title: Calendar plugin
Post by: rosali 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!
Title: Calendar plugin
Post by: M*I*B 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.
Title: Calendar plugin
Post by: rosali 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.
Title: Calendar plugin
Post by: M*I*B 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).
Title: Calendar plugin
Post by: rosali on January 22, 2009, 10:41:18 AM
Yes, that's the reason why I announced a workaround within next days!
Title: Calendar plugin
Post by: M*I*B on January 22, 2009, 10:49:15 AM
ahem.... ok :o :D

... knots in synapsys ;D
Title: Calendar plugin
Post by: rosali 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?
Title: Calendar plugin
Post by: M*I*B on January 23, 2009, 12:46:38 PM
... ok, here is what I have:

./myplugins/collection/hmailserver/config.inc
... is exactly the same You have ...

./myplugins/collection/calendar/config.inc
Code: [Select]
$tempDomain = array_reverse(explode(&quot;.&quot;,$_SERVER['HTTP_HOST']));
// $rcmail_config['calendar_url'] = &quot;http://cal.&quot;.$tempDomain[1].&quot;.&quot;.$tempDomain[0].&quot;/&quot;;
// $rcmail_config['calendar_url'] = &quot;http://cal.&quot;.$tempDomain[1].&quot;.&quot;.$tempDomain[0].&quot;/webcal/&quot;;
$rcmail_config['calendar_url'] = &quot;http://mail.&quot;.$tempDomain[1].&quot;.&quot;.$tempDomain[0].&quot;/webcal/&quot;;

1. //: running by SubDomain. AutoLogin dont work, Calendar out of RC do
2. //: running by SubFolder. AutoLogin dont work, Calendar out of RC do
actual: running by SubFolder. AutoLogin do, Calendar out of RC not (Error 404)

vsubs.conf
Code: [Select]

ServerAdmin "webmaster@alvima.de"
DocumentRoot "C:/~www.extranet/webmail"
ServerName "mail.alvima.de"
ServerAlias "mail.kalletown.de"
ServerAlias "mail.cbxforum.de"
ServerAlias "mail.analogmaster.de"
ErrorLog "C:/~www.extranet/~logz~/error_webmail.log"
CustomLog "C:/~www.extranet/~logz~/access_webmail.log" combined



ServerAdmin "webmaster@kalletown.de"
DocumentRoot "C:/~www.extranet/webmail/webcal"
ServerName "cal.alvima.de"
ServerAlias "cal.analogmaster.de"
ServerAlias "cal.kalletown.de"
ServerAlias "cal.cbxforum.de"
ErrorLog "C:/~www.extranet/~logz~/error_webcal.log"
CustomLog "C:/~www.extranet/~logz~/access_webcal.log" combined

rem: DocumentRoot now point to the SubFolder under RC where I have copy the whole WebCal.
Before (using SubDomain) DocumentRoot point to "C:/~www.extranet/webcal" (ExtraNet BaseRoot)
Title: Calendar plugin
Post by: rosali on January 23, 2009, 01:06:32 PM
You are sure WebCalendar authenticates against IMAP? Could you give me remote access to your server ... don't worry coder's code of honor!
Title: Calendar plugin
Post by: M*I*B on January 23, 2009, 01:21:41 PM
Ok. Let me know where I can transfer the data secure to you...
Title: Calendar plugin
Post by: rosali on January 23, 2009, 11:38:42 PM
WebCalender was not configured to authenticate against your IMAP server. Problem has been fixed remotely.
Title: Calendar plugin
Post by: M*I*B on January 24, 2009, 04:27:52 AM
hu? Bahnhof Kofferklau'n?

I'm extremly shure that I have configure ./webcal/includes/user-imap.php the right way and also implement my DomainLock-MOD there...

Or do we talking about different stuff?

HE:
At the Moment I use this one:
Host Europe GmbH - Server & Virtual Server - Virtual Server Windows - Virtual Server Windows XXL 3.0 (http://www.hosteurope.de/produkt/Virtual-Server-Windows-XXL)

To middle of last year I use the MAX version but must cancel that due no job and money.
The Linux-VPS'es are great also but I'm not a *nix user...
Title: Calendar plugin
Post by: M*I*B on January 24, 2009, 04:53:26 AM
... that don't work ...

If I Login to RC all looks fine; no errormessage.
If I click on the calendarbutton I have to login there also and at the 1st time today I get a "querry error" (there is gone now...)
Title: Calendar plugin
Post by: rosali on January 24, 2009, 05:03:21 AM
Works for me @ rosali@kallexxxx.de !!!
Title: Calendar plugin
Post by: alainpp on February 11, 2009, 08:30:19 AM
Quote from: M*I*B;16652
... that don't work ...

If I Login to RC all looks fine; no errormessage.
If I click on the calendarbutton I have to login there also and at the 1st time today I get a "querry error" (there is gone now...)


Are you using IE7??

I was having the same problem with IE (when i click on the calendar icon it ask me for my password) and i did try with Firefox and everything works fine.

I don't know why IE does this, the problem is the way IE enables the cookies when you use iframes.

FF, Chrome and Safari works fine. I don't know if IE6 or IE8 will work. Try that.
Title: Calendar plugin
Post by: rosali on February 11, 2009, 11:28:49 AM
It works for me with IE7 ... Open a test account @ Mail4us.net :: Welcome to Mail4us.net (http://mail4us.net) and check yourself.
Title: Calendar plugin
Post by: alainpp on February 11, 2009, 11:57:28 AM
Quote from: rosali;16979
It works for me with IE7 ... Open a test account @ Mail4us.net :: Welcome to Mail4us.net (http://mail4us.net) and check yourself.


It doesn't work for me. I did create a test account in your server and when i do click on the calendar icon the system goes to the login page, and even if a try to login with my user it keeps asling me for the password.

If i use FF on your server it works. So, my post above is acurate, IE7 for some reason restrict cookies when you use iframes.

Image attached.
Title: Calendar plugin
Post by: rosali on February 11, 2009, 12:07:19 PM
If you create a new account by self registration it won't work on the first time login.

Reason: There is a hidden login to webcalendar in the login page. So it works only if you login from there for the first time. Self registration has an automated login when hmailserver user is created successfully, so the login page is bypassed.

Logout and login again and it should work. If not I have a bug there ...

Please test again ...
Title: Calendar plugin
Post by: alainpp on February 11, 2009, 12:18:19 PM
I test it again, same thing.

Remember, i'm using IE7, maybe IE6 or IE8 does not do this.

Are you using IE7 or an emulation?
Title: Calendar plugin
Post by: rosali on February 11, 2009, 12:29:58 PM
That's strange. I use IE7 from my windows workstation. Mail4us.net is hosted in a server hotel. So I do not access it locally. It must have to do with IE security settings. Would be great if you could figure it out. BTW, you know MyRoundCube. So you know also that initial account credentials of a self-registrated accounts are sent to the admin. I have logged into "alain (at) xxx dot net" from here and it worked for me. My conclusion therefore is that it must be an IE configuration issue.
Title: Calendar plugin
Post by: alainpp on February 11, 2009, 12:43:06 PM
EDIT:

Here's one solution (not recommended, but it works):

IE7 users set Internet Options >> Privacy >> Advanced >> Check “Override Automatic Cookie Handling” and “Always allow session cookies”


Solution 2:

You can do this in your code:

Use a P3P header. IE7 will allow the cookies as long as your site appears to have a privacy policy (using the W3C standard). Send this header just after session_start(); in PHP:


session_start();   // start the session
header('P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"');


I took this information from:


http://www.sjhannah.com/blog/?p=132


I did try the first solutions and the calendar works now with IE7.  Can you include this header and check.


-------------------

I have IE with the default configuration, and i think 90% of the people that use IE will have the same configuration.

This is definitely a security setting from IE, but it's the default, so i think i have to figure out which settings i need to change. I will post results later if i can fix it.
Title: Calendar plugin
Post by: rosali on February 11, 2009, 01:51:05 PM
#2 is a great hint - the problem is, that I don't want to loose the plugin structure and header sending is done by roundcube CORE. So, I would have to hack the default code ... bad ... let me think about it. Perhaps I can convice the dev crew to implement the hack.

Thnx!
Title: Calendar plugin
Post by: alainpp on February 12, 2009, 10:52:54 AM
I found a security issue in the calendar.

If you go to the calendar menu "View" -> "Another user's calendar" i can see the calendar of any user in the server. This happens also in your server (mail4us).

I think that your calendar is a private thing and if you want share your calendar this shouldn't be active by default.

I know this is NOT a problem of myroundcube at all, but is good to know. I need to check how to disable this option. If anyone knows, please let us know.
Title: Calendar plugin
Post by: rosali on February 12, 2009, 12:15:30 PM
Yes, settings on mail4us were incomplete. Thanks to remember me ...

#1 Login using default Webcalender Login Page as a user with admin privileges.
#2 If you don't have an admin user yet, then modify webcalender database table 'webcal_user' and set field 'cal_is_admin' to 'Y'.
#3 Configure Webcalendar by menu Settings -> System Settings
#4 Open ./includes/menu/menu_config.php and disable menus related to group work
Title: Calendar plugin
Post by: alainpp on February 12, 2009, 02:25:38 PM
Perfect, that works.

Thanks.
Title: Calendar plugin
Post by: alainpp on February 13, 2009, 09:07:50 AM
I found a new problem with the calendar:

The username is limited to 25 characters, because myroundcube use the email as username, some emails have more than 25 characters. I have a lot of emails with more than 25 characters.

I went to the database and increase the username (webcal_user) characters to 50, i also increase the maxlength in login.php, but now i have this error when a username is more than 25 characters (even if the user name is saved complete in the database):

Error

Error executing query.
Title: Calendar plugin
Post by: rosali on February 15, 2009, 04:57:37 AM
Why the heck they have decided to limit user names to 25 strings?

I have reviewed the code. To get rid of the 25s limitation it would be necessary to hack CORE of webcalendar. Bad approach for future updates ... So, give me a week to re-write "user-imap.php".
Title: Calendar plugin
Post by: rosali on February 17, 2009, 03:16:37 PM
@alainpp ... check your PM's
Title: WebCalendar Download
Post by: tfyisupportteam on February 18, 2009, 04:43:45 PM
What do i need to do in order to integrate this with roundcube, is there a download for roundcube, i know where to get web calendar but im not sure what to do to integrate this calendar.

Thx
Title: Calendar plugin
Post by: alainpp on February 18, 2009, 05:50:31 PM
1. You need first install the webcalendar somewhere, it doesn't matter. For example: http://www.yourdomain.com/webcalendar

2. Make sure your webcalendar installation works creating a test user.

3. Update to the latest version of myroundcube.

4. In your myroundcube folder, go to: c:\myroundcubefolder\myplugins\collection\calendar\

5. Open "config.inc.dist" and put the correct values to:

- calendar = TRUE

- calendar_url = http://www.yourdomain.com/webcalendar

- db_dsnw_calendar = connection to your webcalendar database, must be something like this: "mysql://_username_:_password_@_yourserver_/_database_name_"

6. Go to: C:\myroundcubefolder\myplugins\config and open "config_plugins.php", if you don't have this file, use "config_plugins.php.dist" and change the value of "$rcmail_config['plugins']['calendar']" to TRUE.

Then login to your webmail and an icon of a calendar should appear in the upper menu.


Alain.
Title: Calendar plugin
Post by: rosali on February 26, 2009, 12:58:09 PM
http://www.roundcubeforum.net/myroundcube/3884-myroundcube-release-notes-2.html
Title: Calendar plugin
Post by: alainpp on February 26, 2009, 03:15:11 PM
I'm confused now:

#1- Download and install Webcalendar k5n.us: WebCalendar Home Page out of MyRoundCube Root Folder !!!

Q/ i saw that you included the webcalendar in the app folder, if we have to install the webcalendar outside why do we need this folder with the webcalendar files?

#3- Delete ./myplugins/collection/calendar

Q/ do i have to delete this folder from my current myroundcube installation?

#5- Configure Calendar pluging config file

Q/ in the config file you are doing reference to the app folder inside the calendar folder, do we need to replace this line with our calendar installation? example: http://www.mydomain/webcalendar??


thanks,

Alain.
Title: Calendar plugin
Post by: rosali on February 26, 2009, 03:31:25 PM
Well, I'm in hurry due to vacations starting tomorrow ...

#-1 You need an install of Webcal outside of MyRoundCube Root just to set it up (database creation and so on ...)

#3-Yes, delete it from the plugin folder before unzip ... reason: file structure (see .htaccess in patch folders)

#5-Depends on your config ... on my local test environment the packaged cal works as plugin. Nethertheless, the config value which is confusing you, keeps the ability to nav out to a fully featured webcal ... OK?

EDIT: I have updated mail4us.net and it seems to work properly ...
Title: Calendar plugin
Post by: alainpp on February 26, 2009, 07:19:18 PM
Don't worry, enjoy your vacation. I'll figure it out.

One more question, the user in the webcalendar database should be the MD5 Code with 25 characters or the email?
Title: Calendar plugin
Post by: rosali on February 27, 2009, 12:33:56 AM
The user (cal_login) is hashed by ...


base_convert(md5("someone@mydom.com"), 16, 36 );
Title: Calendar plugin
Post by: alainpp on February 28, 2009, 07:47:13 AM
For some reason the user is not created in the webcalendar database when I do login in my webmail.

When i try to login and the calendar is active i get this error: "user not found", this is related to the problem described above. if I deactivate the calendar plugging i don't get this error.
Title: Calendar plugin
Post by: rosali on February 28, 2009, 10:20:37 AM
Did you route it to your existing WebCal installation? If so, copy patched files in ./myplugins/collenction/calender/app over WebCal install.
Title: Calendar plugin
Post by: alainpp on February 28, 2009, 11:01:17 AM
Yes, i did route to my existing calendar installation.

I did copy from the app folder, but that mess up my calendar installation (it starts asking me to reinstall the calendar and never go through), so i went back to the original files.
Title: Calendar plugin
Post by: rosali on February 28, 2009, 11:30:50 AM
And if you route it to the plugin folder?
Title: Calendar plugin
Post by: alainpp on February 28, 2009, 12:21:38 PM
Quote from: rosali;17388
And if you route it to the plugin folder?


If I do that I don't the the "user not found" message when I login, but the user is not created either in the webcalendar database, and when I try to see my calendar I get this error: "No Input file specified"
Title: Calendar plugin
Post by: rosali on March 01, 2009, 01:44:55 AM
Route it inside MyRoundCube and adjust ...

#1 ./myplugins/collection/calendar/app/includes/settings.php

/* updated via install/index.php on Fri, 20 Feb 2009 17:48:59 +0100
install_password: 7c7d2949bfce237294aa0040cb4ecdcf
db_type: mysql
db_host: localhost
db_database: webcalendar
db_login: root
db_password: none
db_persistent: false
readonly: false
user_inc: user-imap.php
use_http_auth: false
single_user: false
mode: prod
# end settings.php */
?>


!!! install_password is a md5 hash of WebCalendar Installation Password !!!

... and

#1 ./myplugins/collection/calendar/app/includes/user-imap.php


// Set some global config variables about your system.
$user_can_update_password = false;
$admin_can_add_user = false;
$admin_can_delete_user = true; // will not affect IMAP server info
$admin_can_disable_user = false;

// Allow auto-creation of WebCalendar Accounts for fully authenticated users
$allow_auto_create = true;

//
// 'auth_imap' configuration settings "borrowed" from the Meeting Room Booking System
//  https://sourceforge.net/projects/mrbs
//  GNU General Public License (GPL)
//
// This file contains all the functions for getting information
// about users via IMAP
//
$default_domain = 'liebl.ath.cx'; // Fall back Domain for Login
$imap_host = 'localhost'; // Where is the IMAP server
$imap_port = '143';          // The IMAP server port

Title: Calendar plugin
Post by: alainpp on March 01, 2009, 03:59:54 AM
I changed the settings and now i get the same error when i do login in my webmail "No such user", the user is never created in the webmail database.
Title: IE7 Problems
Post by: CarlosG on March 09, 2009, 05:11:02 PM
In FF everything correct, but since IE comes the login page and when I identify, I exit, continue "Redirecting to ... here" and if I eject me again :mad:

Help, please! ;)

Thanks
Title: Calendar plugin
Post by: rosali on March 11, 2009, 08:00:13 AM
Well, it looks like this plugin is buggy. But I can't reproduce the issues. Neither those reported by alainpp nor those reported by CarlosG ...

Is there anyone of you guys who is willing to give me remote access to your servers?
Title: Hello, Rosali.
Post by: CarlosG on March 11, 2009, 10:04:13 AM
Hello, Rosali. I apologize. :(

My fault, it is in IE7, the problem was that he had touched a file (config) and erasing a line of code without realizing. :-X 0:)

Sorry.

I must say it is a system that is fine, try a little publicity because it is ideal for our organization.

Thanks for everything.
Title: Calendar plugin
Post by: rosali on March 11, 2009, 10:21:31 AM
Thanks! There is no promotion for MyRoundCube, because it is a "One man show". I just share what I've coded for myself!

EDIT: In addition most things will be redundant as soon we have RC v0.3 with a proper plugin API!
Title: Calendar plugin
Post by: alainpp on March 12, 2009, 12:46:18 PM
Do you still want access to my server or do you want to wait until the next realease?
Title: Calendar plugin
Post by: rosali on March 15, 2009, 03:58:57 AM
Update SVN 2348. If it still does not work, please PM'me access data to your server.
Title: Calendar plugin
Post by: alainpp on March 17, 2009, 03:23:39 PM
I'll start saying thanks to Roland for helping me with the calendar pluggin.

1. First, install webcalendar from the original site.

After this, configure the calendar pluggin. This is what Roland recommends me and i also did:

2. In the file: ./myplugins/collection/calendar/config.inc you need to leave:

$rcmail_config['calendar_url'] = "./myplugins/collection/calendar/app/";

Even if you did install the webcalendar in another place. I also recommend install it in another place just in case you want to use the calendar without roundcube, but always doing reference to the same database (if you want).

3. Then in the file: ./myplugins/collection/calendar/app/includes/settings.php

You will need to put the information of your database connection, the same information when you did the default installation of your webcalendar. This file contains this structure:

/* updated via install/index.php on Fri, 20 Feb 2009 17:48:59 +0100
install_password: 7c7d2949bfce237294aa0040cb4ecdcf
db_type: mysql
db_host: youdomain.com or localhost
db_database: webcalendar_databasename
db_login: root (or your user name)
db_password: yourpassword
db_persistent: false
readonly: false
user_inc: user-imap.php
use_http_auth: false
single_user: false
mode: prod
# end settings.php */
Title: Calendar plugin
Post by: rosali on March 27, 2009, 03:54:01 PM
URGENT:

Current Calendar plugin may crash your apache on PHP 5.2.8 ... apache2.2 service stops after trying to create child processes!

Easy to fix: http://www.roundcubeforum.net/myroundcube/3797-myroundcube-known-bugs.html
Title: Calendar plugin
Post by: alainpp on April 22, 2009, 09:17:06 AM
Hi Roland,

i'm getting this error with the new release ( SVN_2398 ) when i try to go to the calendar:

"Request Failed"

and it redirect to the inbox page.
Title: Calendar plugin
Post by: rosali on April 22, 2009, 12:27:40 PM
Same procedure as every time? Zip your installation and PM'me the link.
Title: Calendar plugin
Post by: alainpp on April 22, 2009, 01:03:41 PM
Quote from: rosali;18618
Same procedure as every time? Zip your installation and PM'me the link.


Yes, same procedure. Check your Pm's.
Title: Calendar plugin
Post by: rosali on April 22, 2009, 03:48:47 PM
I'm not starting debugging for you until you adjusted ./myplugins/calendar/config.inc as shown in ./myplugins/calendar/config.inc[.dist].

I have announced that configuration adjustments are required ... Let me know.
Title: Calendar plugin
Post by: rosali on April 22, 2009, 03:53:03 PM
Sorry, I just cross-checked:

Code: [Select]

(*) Improved Calendar plugin ...

.... It should now run automatically into the Webcalendar installer if ./myplugins/collection/calendar/app/includes/settings.php is missing or empty. Iframed login has been removed. The authentication cookie is now created by a server side login request. This makes login faster and also first time login for new users does not show the calendar login page anymore.


So, I have not announced it, but please adjust the configuration of the plugin and post if it works.
Title: Calendar plugin
Post by: alainpp on April 22, 2009, 06:57:02 PM
Quote from: rosali;18624
Sorry, I just cross-checked:

Code: [Select]

(*) Improved Calendar plugin ...

.... It should now run automatically into the Webcalendar installer if ./myplugins/collection/calendar/app/includes/settings.php is missing or empty. Iframed login has been removed. The authentication cookie is now created by a server side login request. This makes login faster and also first time login for new users does not show the calendar login page anymore.


So, I have not announced it, but please adjust the configuration of the plugin and post if it works.


I had already config.inc configured so i didn't know i would need to re-configure this file. I did it now, but the calendar always ask for login again, and if i change this line to TRUE:

$rcmail_config['cal_single_user'] = true;

I get this error:

WebCalendar Error

You must define "single_user_login" in the "settings.php" file.


I also used now the new setting.php file under app calendar included in myroundcube.

I think the problem is when the user logins, now it does not create the user if it doesn't exist. I don;t know where's my problem now.
Title: Calendar plugin
Post by: rosali on April 23, 2009, 12:32:33 AM
Delete settings.php. Doesn't it run into the calendar setup then?

If still a problem zip again and post under the link you PM'ed me.
Title: Calendar plugin
Post by: alainpp on April 23, 2009, 07:56:56 AM
Quote from: rosali;18630
Delete settings.php. Doesn't it run into the calendar setup then?

If still a problem zip again and post under the link you PM'ed me.


I did delete settings.php and now i get this message:

Access denied !!! Login as WebCalendar Administrator !!!

I did re-zip my current installation, you can download the new one from the same link.
Title: Calendar plugin
Post by: rosali on April 23, 2009, 08:00:35 AM
The message states that the RoundCube user is not a calendar admin. Add the RoundCube user to cal_admins in the calendar configuration.
Title: Calendar plugin
Post by: alainpp on April 23, 2009, 09:07:25 AM
Quote from: rosali;18644
The message states that the RoundCube user is not a calendar admin. Add the RoundCube user to cal_admins in the calendar configuration.


I just add the calendar admin in this line on config.php:

$rcmail_config['cal_admins'] = array("theuser", "password");


is this correct? without the setting.php i'm still getting the same massage:

Access denied !!! Login as WebCalendar Administrator !!!
Title: Calendar plugin
Post by: rosali on April 23, 2009, 09:09:12 AM
$rcmail_config['cal_admins'] = array("alainpp@mydomain.com", "myfriend@mydomain.com");
Title: Calendar plugin
Post by: alainpp on April 23, 2009, 09:43:21 AM
Quote from: rosali;18651
$rcmail_config['cal_admins'] = array("alainpp@mydomain.com", "myfriend@mydomain.com");


I understand now this line. Sorry about that.

I noticed that the user in the calendar database is not created when you login in myroundcube. It ask for the password one more time when you click in the calendar icon and then it creates the user. But i get a "The address is not valid" error, but when you click again on the calendar icon it creates the user and logins.

This error point to this URL:

res://ieframe.dll/syntax.htm#https:///?_plugin=calendar,process&url=/edit_user.php?user="md5user"

"md5user" is the 25 user character converted.

I mean, is not big deal, because it works after that, but i think it should be corrected.

One more thing, i though the iframe were eliminated... i still see the calendar inside a frame.
Title: Calendar plugin
Post by: rosali on April 23, 2009, 10:05:13 AM
So, it generally works now for you? The iframe in the login page was eliminated, because login is now handled differently. Can you send me a test account. I do not understand the error. Do you run it under ssl?
Title: Calendar plugin
Post by: alainpp on April 23, 2009, 10:29:55 AM
Quote from: rosali;18656
So, it generally works now for you? The iframe in the login page was eliminated, because login is now handled differently. Can you send me a test account. I do not understand the error. Do you run it under ssl?


No, don't run ssl. Check your pm's
Title: Calendar plugin
Post by: rosali on April 28, 2009, 04:36:58 PM
Problem solved. You never should see WebCal Login Page.

Please do not use localhost for the following config, unless you are sure that the internal http request will reach your MyRC by localhost:


$rcmail_config['cal_http_host'] = "localhost"; //Depends on vhost routing if localhost will work ... normally: webmail.mydomain.com
Title: Calendar plugin
Post by: alainpp on April 30, 2009, 03:04:32 PM
Quote from: rosali;18793
Problem solved. You never should see WebCal Login Page.

Please do not use localhost for the following config, unless you are sure that the internal http request will reach your MyRC by localhost:


$rcmail_config['cal_http_host'] = "localhost"; //Depends on vhost routing if localhost will work ... normally: webmail.mydomain.com


Thanks, it works now.
Title: Calendar plugin
Post by: techdude on May 28, 2009, 09:52:58 PM
I have the WebCalendar setup and running perfectly fine...but I can not get the Sunbird sync to work at all. (I am running v1.1 with the MyRoundcube).  
 
If I use iCal I can subscribe to the calendar and view it perfectly fine...but I need to be able to add events with the desktop client so I can't use iCal.
 
I am running the Mac OS X version of Lighting in Thunderbird...and I have tried Sunbird but it is the same setup. I type in Calendar > new Calendar and type in the URL to the icalclient.php URL...and it then prompts me for my username and password so I type in my username (bryan) and my password. However I don't see ANYTHING in the calendar..its all blank. If I add a event...its not displayed in the WebCalendar PHP App.
When I open up MySQL I have 2 entries (The first was with WebCalendar and the second is with Sunbird):
 
1   
 
oe42s0w0ks8c84gg   20090525   130000   20090525   160416   120   20090525 130000   5   E   P   Corrine Party   
 
 
Party
2   
 
 
bryan   20090525   160000   20090525   174042   60   20090525   160000   5   E   P Gathering   Home   
 
I am guessing the problem might be related to how its adding the cal_created_by field to the database?
 
Any ideas how to fix this?
Title: Calendar plugin
Post by: rosali on May 29, 2009, 12:32:35 AM
I never used sync tools. I guess the problem is, that I had to modify webcalender to encode the user by the following function:

substr(base_convert( md5($email), 16, 36 ),0,25);

The reason is, that the webcalendar allows only usernames with a maxium length of 25 digitis. It is not possible just to modify the database for that purpose.

So, please look for the part in WebCalendar Core which is responsibly for adding events remotely and convert "bryan" by using the function above. Let me know your solution to avoid double work.
Title: Calendar plugin
Post by: rosali on May 29, 2009, 12:39:47 AM
UPDATE:

I assume the stuff is in icalclient.php ...


if ( empty ( $_SERVER['PHP_AUTH_USER'] ) && ! empty ( $_ENV['REMOTE_USER'] ) ) {
  list ( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) =
  explode ( ':', base64_decode ( substr ( $_ENV['REMOTE_USER'], 6 ) ) );

  $_SERVER['PHP_AUTH_USER'] = trim ( $_SERVER['PHP_AUTH_USER'] );
  $_SERVER['PHP_AUTH_PW'] = trim ( $_SERVER['PHP_AUTH_PW'] );
}

unset ( $_ENV['REMOTE_USER'] );
if ( empty ( $login ) ) {
  if ( isset ( $_SERVER['PHP_AUTH_USER'] ) &&
      user_valid_login ( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], true ) )
    $login = $_SERVER['PHP_AUTH_USER'];

  if ( empty ( $login ) || $login != $_SERVER['PHP_AUTH_USER'] ) {
    $_SERVER['PHP_AUTH_PW'] = $_SERVER['PHP_AUTH_USER'] = '';
    unset ( $_SERVER['PHP_AUTH_USER'] );
    unset ( $_SERVER['PHP_AUTH_PW'] );
    header ( 'WWW-Authenticate: Basic realm="' . $appStr . '"' );
    header ( 'HTTP/1.0 401 Unauthorized' );
    exit;
  }
}



... insert here ...


$login = substr(base_convert( md5($login), 16, 36 ),0,25);


Unfortunately I can't test myself, because I don't have Sunbird or similar.
Title: Calendar plugin
Post by: techdude on May 31, 2009, 11:49:30 PM
Well I finally got Sunbird syncing with WebCalendar with your help (THANKS!!!)..but there are a few problems...maybe you have an idea how to fix it...

I inserted an event in Thunderbird for 7pm.  The event appears in the WebCalendar at 7pm (C in picture), the event in Thunderbird displays as 11pm (A in picture) yet if you try to edit the event it shows that is starts at 7pm (B in picture): PICTURE 1 (Attached)

And there is a difference in the database as seen below.  The bottom two lines are events created in WebCalendar and the those events above the two bottom lines are created in Thunderbird...could this be part of the problem?
PICTURE 2 (Attached)
The lines are as follows: cal_mod_time   cal_duration   cal_due_date   cal_due_time   cal_priority   cal_type   cal_access
Title: Calendar plugin
Post by: rosali on June 01, 2009, 12:20:40 AM
#1- Sync was solved exactly as advised?

#2- Do you have same timezone on desktop and webcalendar?
Title: Calendar plugin
Post by: techdude on June 01, 2009, 06:12:14 PM
Well its been a hassle trying to get it to sync.  When I first put in the code that you recommended, everything worked PERFECTLY!  Then I noticed that the timezones were off, so I set all of the timezones on everything I could think (Linux Server, PHP, WebCalendar and Roundcube) everything lined up, but then I when I created an event in Sunbird it woulnd't show in WebCalendar.  Well then I turned off my computer for the night (server remained on) and the next day its working fine sometimes and others not working at all?  Its like it has a mind of its own...but as a SysAdmin, I know that its not possible....:confused:
Title: Calendar plugin
Post by: vwmoose on May 07, 2011, 08:30:05 AM
This plugin is ace! Thanks for all your hard work on it.

One question, can I get my iPhone to sync with the calendar plugin?  And if so how do I manage this?

Cheers

Phil
Title: Calendar plugin
Post by: rosali on May 08, 2011, 01:55:06 AM
I don't own a iPhone (yet). Basically it should be possible, if iPhone is able to connect to CalDAV backends. If so, configure the calendar plugin to use CalDAV instead of local database and sync the iPhone accordingly.

CalDAV is under heavy developement at the moment. It is roughly implemented in current calendar release (alpha). I'll upload a calendar beta later today.
Title: Calendar plugin
Post by: vwmoose on May 08, 2011, 06:55:49 AM
Rosali, I know your pretty busy but has anyone put together a manual for your plugin yet?  Instructions on how to change the calendar plugin over to CalDav would be great!
Title: Calendar plugin
Post by: rosali on May 08, 2011, 08:40:41 AM
Just create events_caldav database table and choose in calendar settings 'CalDAV'.

When saved insert access credentials and save again. That's all.
Title: Calendar plugin
Post by: vwmoose on May 09, 2011, 06:23:46 AM
Me again! I can't seem to find a CalDav setting in Calendar Settings through the GUI so I am assuming its somewhere in the config file?

Also is there a definition for the events_caldav table?

Sorry to be such a pain!
Title: Calendar plugin
Post by: rosali on May 09, 2011, 07:39:03 AM
Check @ Mail4us.net Webmail :: Welcome to Mail4us.net Webmail (http://mail4us.net)

->Settings->Calendar ... First selector on top of page.
Title: Calendar plugin
Post by: rosali on May 09, 2011, 07:39:18 AM
Check @ Mail4us.net Webmail :: Welcome to Mail4us.net Webmail (http://mail4us.net)

->Settings->Calendar ... First selector on top of page.
Title: Calendar plugin
Post by: vwmoose on May 09, 2011, 07:59:25 AM
I do not have this option listed.  The top item is "Default View"

I've downloaded the latest version of the plugins that I could find only a week ago so don't know exactly whats going on or whether I am running an old version of the calendar plugin?

Thanks for your help.
Title: Calendar plugin
Post by: rosali on May 09, 2011, 08:01:27 AM
You are using an old version.
Title: Calendar plugin
Post by: vwmoose on May 09, 2011, 08:06:58 AM
OK, so where do I find the latest version?  
Sorry to be such a pain!
Title: Calendar plugin
Post by: rosali on May 09, 2011, 08:18:58 AM
See my footer.

All my plugins are hosted @ myroundcube - RoundCube Plugins - Google Project Hosting (http://myroundcube.googlecode.com)
Title: Calendar plugin
Post by: vwmoose on May 09, 2011, 10:12:08 AM
A million apologies!  Don't know what I did there.  Your patience is welcomed thanks!

Phil
Title: Calendar plugin
Post by: vwmoose on May 09, 2011, 11:02:11 AM
OK, so now i'm up-to-date can I ask another question?    By enabling the CalDav option in Calendar settings I am presented with a few more fields e.g. username, passowrd, server url etc.

Now am I assuming that if I leave these blank and attempt to connect to my RoundCube Calendar via my iPhone I will be able to read the entries or have I failed to make my requirements clear and the CalDav option only allows me to connect to a CalDav server somewhere else and import the entries?

Cheers

Phil
Title: Calendar plugin
Post by: rosali on May 09, 2011, 11:50:12 AM
No, that's completely wrong.

CalDAV is a server application. Compare it with IMAP. So you need a provider - or you are you own provider - who has CalDAV running.

You can configure the Calendar to connect to the CalDAV service. If you configure your iPhone accordingly both devices should read/write from/into the same backend to be synced.

EDIT: It should be easy to Google's CalDAV service.
Title: Calendar plugin
Post by: athoomi on May 19, 2011, 01:31:28 AM
Hi,

new question :confused: :

I'd like to change an entry (e.g. Startdate changed 05.19 to 05.21). One possibility is to move the entry with drag and drop. But this doesn't work for May => July.

In "Edit Event" there is only a posibility to change the end-date (screenshot).


Any ideas?
Title: Calendar plugin
Post by: rosali on May 19, 2011, 03:19:27 AM
I prefer (approved) bug reports and enhancement requests at issue tracker (myroundcube - RoundCube Plugins - Google Project Hosting (http://myroundcube.googlecode.com)).

Support requests should be posted on this forum.

You are asking for an enhancement.
Title: Calendar plugin
Post by: rosali on May 20, 2011, 04:00:33 AM
Check 2.6 bundle.
Title: New Calendar plugin with Caldav support
Post by: billstif on May 25, 2011, 04:19:31 PM
Rosali,

I assume that if I update to the latest version I will have to rerun the MySQL script?  If I do so, what impact, if any, will that have on my existing calendars?

Thanks,
Bill S.
Title: Calendar plugin
Post by: rosali on May 25, 2011, 11:44:02 PM
You just have to create the `events_caldav` table and to add the 'caldav' field to `events` and `events_cache` tables.

Another approach is to export the existing events table and the to delete it. After that you run the whole script and finally re-import events table.
Title: Calendar feeds
Post by: billstif on May 26, 2011, 12:59:35 AM
Thanks, Rosali.  I was able to do all of that, and things work fine except that none of the calendar feeds I have added are showing.  These are feeds external to Roundcube.  Has anyone else had a similar problem?
Title: Calendar plugin
Post by: rosali on May 26, 2011, 03:18:48 AM
Try most recent version (not bundled yet).

http://mail4us.net/plugins/calendar.zip
Title: Working, sort of
Post by: billstif on May 26, 2011, 01:25:31 PM
I have to keep saving the categories and feeds until eventually the program reads them.  The problem may be related to this error message:

[26-May-2011 11:19:08] PHP Warning:  Invalid argument supplied for foreach() in /home4/billstif/public_html/meachamwriters/mail/plugins/calendar/calendar.php on line 699

which refer to these lines (699-700)

    foreach ($categories as $class => $color) {
      $select .= "\n";
Title: Calendar plugin
Post by: rosali on May 28, 2011, 05:30:01 AM
Try the following code to fix the error:

calendar.php:

  function generateHTML() {
    $rcmail = rcmail::get_instance();
    $categories = $rcmail->config->get('categories');
    if($_SESSION['user_id'] != $_SESSION['caluserid']){
      $user = $this->getUser($_SESSION['caluserid']);
      $prefs = unserialize($user['preferences']);
      $categories = $prefs['categories'];
    }
    $this->categories = $categories;
    $select = "";
    return $select;
  }
Title: Color correction
Post by: billstif on May 28, 2011, 02:37:14 PM
Thanks, Rosali.  I've made the change, and that appears to have corrected the error issue.
Title: Calendar plugin
Post by: athoomi on June 01, 2011, 04:08:56 AM
Hi!

I've installed the new version.

Now I have the following problem:

Calendar-Settings:
Timeslots per hour: 4

If I add an event, there is no possibility to choose eg. 7.10, only 7.00, 7.15, 7.30, 7.45 and 7.59

Any ideas?
Title: Time slots
Post by: billstif on June 01, 2011, 10:51:08 AM
Since you chose 4 as the value, you are allowing for four events, spaced at 15 min. intervals.  Try changing the value to 6.
Title: Calendar plugin
Post by: athoomi on June 01, 2011, 12:54:06 PM
if i change the value to 6 - i can choose 7.00, 7.10,...,7.50,7.59

in earlier version it was possible to choose any time!
Title: Calendar plugin
Post by: billstif on June 01, 2011, 04:11:48 PM
I never used that function, but changing the value to 6 will allow 10 minute intervals, changing it to 12 will allow 5 min. intervals.
Title: Calendar plugin
Post by: rosali on June 07, 2011, 05:05:31 AM
Right... I've changed the behavior recently. The GUI is now synced with the slots per hour settings.
Title: Calendar plugin
Post by: athoomi on June 07, 2011, 08:53:12 AM
Quote from: rosali;35183
Right... I've changed the behavior recently. The GUI is now synced with the slots per hour settings.

 
for what reason?
Title: Calendar plugin
Post by: rosali on June 08, 2011, 01:54:35 AM
calendar.gui.js

Comment out in starttime and endtime picker ...
Code: [Select]
stepMinute: 60 / response.settings['timeslots'], ... if you don't like the behavior. My intention was to have a behavior as defined in timeslots per hours. So if you want to have steps of five minutes just set Timeslots per hour to 12.
Title: Calendar plugin
Post by: athoomi on June 08, 2011, 02:23:22 AM
Thanks. I've commented out the lines.

If I set Timeslots per hour to 12, I can only see two or three hours without scrolling...
Title: Categorie Color
Post by: athoomi on June 08, 2011, 02:53:31 AM
Hi,

in config.inc.php we have some public calendar:

Code: [Select]
http://www.URL-TO-RC/calendar/ics/cal_1.ics' => 'cal_1',


The Category is defined:
Code: [Select]
// public calendar categories (can't be modified by user)
$rcmail_config['public_categories'] = array(
  'cal_1' => '5060d9',
);


In Settings => Calendar => Categories I can see the category "cal_1" with the correct color. But the entries in the calendar don't have this color. (correct category, but the color of the personal category...) :confused:

I also have defined the categories in categories.inc.php.
Title: Calendar plugin
Post by: rosali on June 08, 2011, 03:44:32 AM
This is a bug. Open a ticket @ myroundcube - RoundCube Plugins - Google Project Hosting (http://myroundcube.googlecode.com)