Source for file setup.php

Documentation is available at setup.php

  1. <?php
  2.  
  3. /**
  4.  * newmail.php
  5.  *
  6.  * Copyright (c) 2000 by Michael Huttinger
  7.  *
  8.  * Quite a hack -- but my first attempt at a plugin.  We were
  9.  * looking for a way to play a sound when there was unseen
  10.  * messages to look at.  Nice for users who keep the squirrel
  11.  * mail window up for long periods of time and want to know
  12.  * when mail arrives.
  13.  *
  14.  * Basically, I hacked much of left_main.php into a plugin that
  15.  * goes through each mail folder and increments a flag if
  16.  * there are unseen messages.  If the final count of unseen
  17.  * folders is > 0, then we play a sound (using the HTML at the
  18.  * far end of this script).
  19.  *
  20.  * This was tested with IE5.0 - but I hear Netscape works well,
  21.  * too (with a plugin).
  22.  *
  23.  * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  24.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  25.  * @version $Id: setup.php,v 1.39 2006/07/15 12:01:18 tokul Exp $
  26.  * @package plugins
  27.  * @subpackage newmail
  28.  */
  29.  
  30.  
  31. /**
  32.  * Init newmail plugin
  33.  */
  34.     global $squirrelmail_plugin_hooks;
  35.     $totalNewArr=array();
  36.     global $totalNewArr;
  37.  
  38.     $squirrelmail_plugin_hooks['folder_status']['newmail''newmail_folder_status';
  39.     $squirrelmail_plugin_hooks['left_main_after']['newmail''newmail_plugin';
  40.     $squirrelmail_plugin_hooks['optpage_register_block']['newmail''newmail_optpage_register_block';
  41.     $squirrelmail_plugin_hooks['options_save']['newmail''newmail_sav';
  42.     $squirrelmail_plugin_hooks['loading_prefs']['newmail''newmail_pref';
  43.     $squirrelmail_plugin_hooks['optpage_set_loadinfo']['newmail''newmail_set_loadinfo';
  44. }
  45.  
  46. /**
  47.  * Register newmail option block
  48.  */
  49.     include_once(SM_PATH 'plugins/newmail/functions.php');
  50. }
  51.  
  52. /**
  53.  * Save newmail plugin settings
  54.  */
  55. function newmail_sav({
  56.     include_once(SM_PATH 'plugins/newmail/functions.php');
  57. }
  58.  
  59. /**
  60.  * Load newmail plugin settings
  61.  */
  62. function newmail_pref({
  63.     include_once(SM_PATH 'plugins/newmail/functions.php');
  64. }
  65.  
  66. /**
  67.  * Set loadinfo data
  68.  *
  69.  * Used by option page when saving settings.
  70.  */
  71. function newmail_set_loadinfo({
  72.     include_once(SM_PATH 'plugins/newmail/functions.php');
  73. }
  74.  
  75. /**
  76.  * Insert needed data in left_main
  77.  */
  78. function newmail_plugin({
  79.     include_once(SM_PATH 'plugins/newmail/functions.php');
  80. }

Documentation generated on Sat, 07 Oct 2006 16:13:32 +0300 by phpDocumentor 1.3.0RC6