Documentation'; static private $version = '1.0.38'; static private $date = '12-02-2014'; static private $licence = 'GPL'; static private $requirements = array( 'Roundcube' => '1.0', 'PHP' => '5.3', 'required_plugins' => array( 'jqueryui' => 'require_plugin', ), ); static private $f; function init(){ self::$f = $this; $this->add_texts('localization/'); $this->require_plugin('jqueryui'); $this->include_stylesheet('qtip/qtip.css'); $this->include_stylesheet($this->local_skin_path() . '/calendar.css'); $this->include_script('timepicker2/jquery.timepicker.js'); $this->include_stylesheet($this->local_skin_path() . '/timepicker2.css'); $this->include_script('dialogextend/jquery.dialogextend.js'); $this->include_script('libcalendaring/libcalendaring.js'); $this->include_script('jquery_migrate/jquery.migrate.js'); $this->include_script('qtip/qtip.js'); $this->add_hook('render_page', array($this, 'render_page')); $this->add_hook('send_page', array($this, 'send_page')); $this->add_hook('preferences_list', array($this, 'preferences_list')); if(!class_exists('MyRCHttp')){ require_once('http_request/class.http.php'); } if(!$this->labels_merged){ $this->labels_merged = true; $this->_merge_labels( array( 'tasks' => 'calendar', 'calendar_kolab' => 'calendar', 'calendar_database' => 'calendar', 'calendar_caldav' => 'calendar', 'calendar_ical' => 'calendar', 'calendar_google_xml' => 'calendar', 'errorimportingtask' => 'calendar', 'treat_as_allday' => 'calendar', 'hours' => 'calendar', 'movetotasks' => 'calendar', 'movetocalendar' => 'calendar', 'emailevent' => 'calendar', 'movetonotes' => 'calendar', 'quit' => 'calendar', 'eventaction' => 'calendar', 'gooledisabled' => 'calendar', 'googledisabled_redirect' => 'calendar', 'allowfreebusy' => 'calendar', 'freebusy' => 'calendar', 'sync_interval' => 'calendar', 'minute_s' => 'calendar', 'unabletoadddefaultcalendars' => 'calendar', 'list' => 'tasklist', 'editlist' => 'tasklist', 'tags' => 'tasklist', 'subscribe' => 'tasklist', 'is_subtask' => 'tasklist', 'due' => 'tasklist', 'taskaction' => 'tasklist', 'emailtask' => 'tasklist', 'subscribed' => 'carddav', ) ); } } static public function include_js($js){ self::$f->include_script($js); } static public function include_php($php){ require_once INSTALL_PATH . $php; } static public function about($keys = false){ $requirements = self::$requirements; foreach(array('required_', 'recommended_') as $prefix){ if(is_array($requirements[$prefix.'plugins'])){ foreach($requirements[$prefix.'plugins'] as $plugin => $method){ if(class_exists($plugin) && method_exists($plugin, 'about')){ /* PHP 5.2.x workaround for $plugin::about() */ $class = new $plugin(false); $requirements[$prefix.'plugins'][$plugin] = array( 'method' => $method, 'plugin' => $class->about($keys), ); } else{ $requirements[$prefix.'plugins'][$plugin] = array( 'method' => $method, 'plugin' => $plugin, ); } } } } return array( 'plugin' => self::$plugin, 'version' => self::$version, 'date' => self::$date, 'author' => self::$author, 'comments' => self::$authors_comments, 'licence' => self::$licence, 'requirements' => $requirements, ); } public function render_page($p){ if($this->rc->user->data['username']){ $this->rc->output->set_env('username', $this->rc->user->data['username']); } if($p['template'] == 'calendar.calendar' || $p['template'] == 'calendar.print' || $p['template'] == 'tasklist.mainview'){ $this->include_script('querystring/querystring.js'); $this->include_script('date/date.js'); $this->include_stylesheet($this->local_skin_path() . '/jquery.contextMenu.css'); $this->include_script('contextmenu/jquery.contextMenu.js'); $this->include_script('contextmenu/jquery.ui.position.js'); } else if($p['template'] == 'sticky_notes.sticky_notes'){ $this->include_stylesheet('fancybox/jquery.fancybox-1.3.4.css'); $this->include_script("fancybox/jquery.fancybox-1.3.4.pack.js"); $this->include_script('date/date.js'); $this->include_stylesheet($this->local_skin_path() . '/jquery.contextMenu.css'); $this->include_script('contextmenu/jquery.contextMenu.js'); $this->include_script('contextmenu/jquery.ui.position.js'); } if(class_exists('password_plus')){ $this->include_script('password/password.js'); } return $p; } public function send_page($args) { $args['content'] = preg_replace('/