Translate special folders doesn't mean translate any folder
[squirrelmail.git] / plugins / sent_subfolders / setup.php
1 <?php
2
3 /**
4 * setup.php -- Sent Subfolders Setup File
5 *
6 * This is a standard SquirrelMail 1.2 API for plugins.
7 *
8 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package plugins
12 * @subpackage sent_subfolders
13 */
14
15 /**
16 * Adds plugin to SquirrelMail's hooks
17 */
18 function squirrelmail_plugin_init_sent_subfolders() {
19 /* Standard initialization API. */
20 global $squirrelmail_plugin_hooks;
21
22 /* The hooks to make the sent subfolders display correctly. */
23 $squirrelmail_plugin_hooks['check_handleAsSent_result']['sent_subfolders']
24 = 'sent_subfolders_check_handleAsSent';
25
26 /* The hooks to automatically update sent subfolders. */
27 $squirrelmail_plugin_hooks['left_main_before']['sent_subfolders']
28 = 'sent_subfolders_update_sentfolder';
29 $squirrelmail_plugin_hooks['compose_send']['sent_subfolders']
30 = 'sent_subfolders_update_sentfolder';
31
32 /* The hooks to handle sent subfolders options. */
33 $squirrelmail_plugin_hooks['optpage_loadhook_folder']['sent_subfolders']
34 = 'sent_subfolders_optpage_loadhook_folders';
35
36 /* mark base sent folder as special mailbox */
37 $squirrelmail_plugin_hooks['special_mailbox']['sent_subfolders']
38 = 'sent_subfolders_special_mailbox';
39 }
40
41 function sent_subfolders_check_handleAsSent($mailbox) {
42 include_once(SM_PATH . 'plugins/sent_subfolders/functions.php');
43 sent_subfolders_check_handleAsSent_do($mailbox);
44 }
45
46 /**
47 * Adds sent_subfolders options in folder preferences
48 */
49 function sent_subfolders_optpage_loadhook_folders() {
50 include_once(SM_PATH . 'plugins/sent_subfolders/functions.php');
51 sent_subfolders_optpage_loadhook_folders_do();
52 }
53
54 /**
55 * Update sent_subfolders settings
56 *
57 * function updates default sent folder value and
58 * creates required imap folders
59 */
60 function sent_subfolders_update_sentfolder() {
61 include_once(SM_PATH . 'plugins/sent_subfolders/functions.php');
62 sent_subfolders_update_sentfolder_do();
63 }
64
65 /**
66 * detects if mailbox is part of sent_subfolders
67 *
68 * @param string $mb imap folder name
69 * @return boolean 1 - is part of sent_subfolders, 0 - is not part of sent_subfolders
70 */
71 function sent_subfolders_special_mailbox($mb) {
72 include_once(SM_PATH . 'plugins/sent_subfolders/functions.php');
73 return sent_subfolders_special_mailbox_do($mb);
74 }