Roundcube Community Forum

 

jQuery Fullcalendar plugin (forked by rosali)

Started by horfic, March 07, 2010, 07:39:25 PM

Previous topic - Next topic

rosali

I've put it to my ToDo's. I don't promise that this feature is coming soon.
Regards,
Rosali

@dmin

I noticed if you try browsing directly to the calendar when you are logged out ( http://localhost/?_task=dummy&_action=plugin.calendar ) it gives you an htaccess login popup instead of taking you to the roundcube login screen. Is there a way you can update it to take you to the roundcube login and then redirect to calendar once logged in?

rosali

No,

 Calendar RSS feeds and webmail_notifier plugin need this HTTP authentication request.
Regards,
Rosali

miniwark

Hi ! Thanks for this plugin.

I have a little issue with the calendar loading forever with :.
 * calendar = version 2.9 - 06.03.2011
 * jqueryui = version 1.8.2

Firebug say to me than at line 578 :
Quote$.datepicker is undefined
    (?)($=function())
    jquery.timepicker.js?s=1302164313()
  $.datepicker._base_selectDate = $.datepicker._selectDate;

This is probably related to this specific jqueryui version.
Upgrade to jqueryui 1.8.6 version solve the problem.

Anyway, maybe a jqueryui plugin version check alert would be convenient. Or just a version requirement in the readme file.

@dmin

Quote from: rosali;34148No,

 Calendar RSS feeds and webmail_notifier plugin need this HTTP authentication request.

But it can't redirect to the login page when not logged in? We have our user's who like to bookmark the calendar and being greeted with an htaccess popup is doesn't look very smooth compared to the roundcube login page.

rosali

calendar.php:

Look for:

function authenticate($args)
  {
    
$rcmail rcmail::get_instance();
    if(!
$rcmail->user->data['user_id'] && $rcmail->action == 'plugin.calendar'){
      
$this->http_auth();
      exit;
    }
    return 
$args;
  }


and modify it for your needs. I won't change it. F.e. Event Reminders contain links to the event. It is better to be prompted with http authentication popup and then access the event directly as to see the login screen and then the mailbox.
Regards,
Rosali

rosali


  
function authenticate($args)
  {
    
$rcmail rcmail::get_instance();
    if(!
$rcmail->user->data['user_id'] && $rcmail->action == 'plugin.calendar'){
      if(
count($_GET) == 2)
        
$rcmail->output->redirect();
      else
        
$this->http_auth();
      exit;
    }
    return 
$args;
  }


This would do the trick. But the result is, that users see the mailboxlist after login when trying to access the calendar link in not authenticated state.

So what is better?
Regards,
Rosali

@dmin

Thank you Rosali, that does work. For us, it's probably better to have it go to the login screen and get mail instead of the htaccess popup window. Why can't it redirect back to the calendar after logging in though? None of the other tasks have an issue.

For instance if you go to http://whatever/?_task=settings when you are not logged in, you get the login page and redirect back. Is it not possible ?_task=dummy&_action=plugin.calendar can do the same?

rosali

Ok, I didn't know that. Try yourself:


  
function authenticate($args
  { 
    
$rcmail rcmail::get_instance(); 
    if(!
$rcmail->user->data['user_id'] && $rcmail->action == 'plugin.calendar'){ 
      if(
count($_GET) == 2
        
$rcmail->output->redirect($_GET); 
      else 
        
$this->http_auth(); 
      exit; 
    } 
    return 
$args
  } 
Regards,
Rosali

@dmin

Quote from: rosali;34169Ok, I didn't know that. Try yourself:


  
function authenticate($args
  { 
    
$rcmail rcmail::get_instance(); 
    if(!
$rcmail->user->data['user_id'] && $rcmail->action == 'plugin.calendar'){ 
      if(
count($_GET) == 2
        
$rcmail->output->redirect($_GET); 
      else 
        
$this->http_auth(); 
      exit; 
    } 
    return 
$args
  } 

That causes a loop:

QuoteThis webpage has a redirect loop
The webpage at http://whatever/?_action=plugin.calendar&_task=dummy has resulted in too many redirects.

mvillar

Quote from: mvillar;34036I've told to my boss and he has explained me that what they want (him and the company) is to make a general calendar (for example made in Google Calendars) with the official events of the company for all the users and so, he doesn't want to have in events_cache one occurrence x each employee

for example,

20th may is the anniversary of the company and they write this event in Google calendar, in events_cache would appear more than 200 (we are more than 200 employees) occurrences... and they want one common occurrence for all the employees...

I public the question again because I still haven't fixed it...:(

rosali

There no simple fix. Currently the user is the top level object. There is no group functionality. I appreciate any patches. So go ahead and code the stuff.
Regards,
Rosali

mvillar

Hi Rosali!

I hope this photo will help you to understand my problem:

http://img18.imageshack.us/img18/7986/calendariow.jpg

As you see, there are 2 users' ID, both have added the same calendar, a google calendar with all Spanish events, this one:

Días Festivos de España

But when both are connected to roundcube, in table events_cache appear the events duplicated (and they are the same!), this is an example, but in our company we are nearly 300 employees and they don't want eventsx300...

Are there any way to fix it? :confused:

rosali

I understand your problem. But as said the user is the top level object. Therefore the entries have to be duplicated. I would not worry about that, because the cache is truncated on log out and additionally on login for the case if a user does not logout properly by just closing the window.
Regards,
Rosali

mvillar

Thank u Rosali!
Excuse me but I didn't know the first answer was for my problem :)
I'll tell my boss! Thank u so much!