Happy New Year
[squirrelmail.git] / plugins / calendar / setup.php
index 0b2f041c7cfee2bc58916628344648a823e25e09..7754501a8246f26a10d725c7b6f39be7a48b686a 100644 (file)
@@ -1,13 +1,9 @@
 <?php
 
 /**
- * setup.php
+ * Calendar plugin activation script
  *
- * Originally contrubuted by Michal Szczotka <michal@tuxy.org>
- *
- * Init plugin into SquirrelMail
- *
- * @copyright &copy; 2002-2005 The SquirrelMail Project Team
+ * @copyright 2002-2020 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  */
 
 /**
- * Initialize the plugin
- * @return void
- */
+  * Register this plugin with SquirrelMail
+  * 
+  * @return void
+  *
+  */
 function squirrelmail_plugin_init_calendar() {
+
     global $squirrelmail_plugin_hooks;
-    $squirrelmail_plugin_hooks['menuline']['calendar'] = 'calendar';
+
+    $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['calendar'] 
+        = 'calendar';
+
 }
 
+
+/**
+  * Add link to menu at top of content pane
+  *
+  * @return void
+  *
+  */
 function calendar() {
-    /* Add Calendar link to upper menu */
-    displayInternalLink('plugins/calendar/calendar.php',_("Calendar"),'right');
-    echo "&nbsp;&nbsp;\n";
+
+    include_once(SM_PATH . 'plugins/calendar/functions.php');
+    return calendar_do();
+
 }
 
-?>
\ No newline at end of file
+