<?php
/*

IMPORTANT:
---------
This file is only an example of how to load plugins with plugin_manager. plugin_manager is designed for Administrators and people with at least basic PHP knowledge.
If you are not sure how to use it or if you require assistance configuring and running our bundle in your server, please feel free to contact us at:

support@myroundcube.com

Our rates to set it up for you are quite reasonable!

If you rather prefer to do it yourself, here are some tips that may help you while at it.

- Backup your current installation and make sure your plugins and configurations are saved elsewhere before you proceed with your work.
- Remove or comment out all plugins' configurations that are not present in your Roundcube plugins folder.
- Make sure that all and each one of the plugins registered by this config file are ready to work. E.g: Plugins may require database adjustments, other configurations, etc.)

Please Note: We are dealing with PHP here. Do not except plug'n play!

*/

/* Admin Account */
$rcmail_config['plugin_manager_admins'] = array('myallias@mydomain.cz','myallias@mydomain.cz'); // lowercase !!!

/* Show update page after login */
$rcmail_config['plugin_manager_show_updates'] = false;
 
$rcmail_config['plugin_manager_third_party_plugins'] = array(
  'drag_upload' => 'https://github.com/thomasysliu/Roundcube-Plugin-Drag-and-Upload',
  'fileapi_attachments' => 'http://www.schwarz.de/remository/Providing--E-Business/Roundcube-Plugins/FileApi-Attachments-Plugin-f%C3%BCr-Roundcube/',
  'compose_addressbook' => 'http://code.google.com/p/roundcube-plugins/downloads/list',
  'keyboard_shortcuts' => 'http://code.google.com/p/roundcube-plugins/downloads/list',
  'message_highlight' => 'http://code.google.com/p/roundcube-plugins/downloads/list',
  'listcommands' => 'http://code.google.com/p/roundcube-plugins/downloads/list',
  'contextmenu' => 'http://www.tehinterweb.co.uk/roundcube/#picontextmenu',
  'copymessage' => 'https://github.com/JohnDoh/Roundcube-Plugin-Copy-Message/',
  'importmessages' => 'http://www.tehinterweb.co.uk/roundcube/plugins/old/importmessages.zip',
  'zipdownload' => 'http://www.tehinterweb.co.uk/roundcube/plugins/old/zipdownload.zip',
  'markasjunk2' => 'http://www.tehinterweb.co.uk/roundcube/#pimarkasjunk2',
  'forwardattachment' => 'https://github.com/JohnDoh/Roundcube-Plugin-Forward-Attachment/',
  'globaladdressbook' => 'https://github.com/JohnDoh/Roundcube-Plugin-Global-Address-Book/',
  'chbox' => 'https://github.com/umount/rcplugin_chbox',
  'persistent_login' => 'http://sourceforge.net/projects/rcmailifpl/files/',
  'markbuttons' => 'https://github.com/xrxca/markbuttons/downloads',
  'automatic_addressbook' => 'http://code.crapouillou.net/projects/roundcube-plugins',
  'newmail_notifier' => 'http://trac.roundcube.net/browser/branches/release-0.8/plugins/newmail_notifier',
  'new_user_dialog' => 'http://trac.roundcube.net/browser/branches/release-0.8/plugins/new_user_dialog',
  'vcard_attachments' => 'http://trac.roundcube.net/browser/branches/release-0.8/plugins/vcard_attachments',
  'jqueryui' => 'http://trac.roundcube.net/browser/branches/release-0.8/plugins/jqueryui',
  'hide_blockquote' => 'http://trac.roundcube.net/browser/branches/release-0.8/plugins/hide_blockquote',
  'google_contacts' => 'http://sourceforge.net/projects/roundcubegoogle/files/',
  'google_analytics' => 'http://github.com/igloonet/roundcube_google_analytics',
  'rcguard' => 'https://github.com/dennylin93/rcguard',
);

/* Here go you plugins which should be active in not authenticated state
   even if they are disabled in $rcmail_config['plugin_manager_defaults'] */
$rcmail_config['plugin_manager_unauth'] = array(
  'vkeyboard' => true,
  'pwtools' => true,
  'nabble' => true,
  'detach_attachments' => true,
  'webmail_notifier' => true,
);

$rcmail_config['plugin_manager_defaults'] = array(
  'uisettings' => array( /* any existent label f.e. myplugin.mylabel */
    'markbuttons' => array( /* the plugin name */
      'label_name' => 'markbuttons.pluginname', /* label for the plugin */
      'label_description' => 'markbuttons.plugindescription', // label for the plugin description
      'label_inject' => false, // see idle_timeout for a valid expample; possible sources: eval, string, config or session
      'unset' => array(), /* an array of configs which have to be wiped out of preferences,
                              if plugin is set to inactive by the user */
      'localization' => 'localization', /* localization folder relative to plugin root folder */
      'buttons' => false, /* false or an array with valid jquery selector -> inactive: $('validselector').show */
      'domains' => false, /* array with email domains, true or false */
      'hosts' => false, /* an array with hosts, true or false */
      'protected' => false, /* an array of domains where users are not allowed to overwrite or
                                true | false or
                                an associated config key */
      'config' => false, /* See archivefolder plugin for a valid example */
      'section' => false, /* See archivefolder plugin for a valid example */
      'reload' => false, /* Reload after saving */
      'browser' => false, /* See webmail_notifier config (below) for a valid example */
      'eval' => false, /* see summary config (below) for a valid example */
      'uninstall' => false, /* give the user the choice to remove prefs from server permanently
                                false or missing: keep prefs
                                true: autodetect prefs if supported by plugin or
                                unindexed array with pref keys */
      'uninstall_request' => false, /* hmail_autoresponder for a valid example */
      'uninstall_force' => false, /* force the uninstall request */
      'skins' => false, /* false or an array with skins where teh plugin should be active array('default', 'litecube-f') */ 
      'active' => false /* default */
    ),
    'google_ads' => array( 
      'label_name' => 'google_ads.pluginname',
      'label_description' => 'google_ads.plugindescription',
      //'protected' => false
      'reload' => true,
      'active' => true
    ),
    'vkeyboard' => array( 
      'label_name' => 'vkeyboard.pluginname',
      'label_description' => 'vkeyboard.plugindescription',
      'active' => false
    ),
    'summary' => array(
      'label_name' => 'summary.pluginname',
      'label_description' => 'summary.plugindescription',
      'unset' => 'nosummary',
      'eval' => array('$this->register_action("plugin.summary", array($this, "plugin_manager_dummy"));'),
      'uninstall' => true,
      'active' => true
    ),
    'chbox' => array( 
      'label_name' => 'chbox.pluginname',
      'label_description' => 'chbox.plugindescription',
      'unset' => array('list_cols' => 'chbox'),
      'active' => false
    ),
    'keyboard_shortcuts' => array( 
      'label_name' => 'keyboard_shortcuts.keyboard_shortcuts',
      'label_description' => 'keyboard_shortcuts.plugindescription',
      'active' => false
    ),
    'fixTHEAD' => array( 
      'label_name' => 'fixTHEAD.pluginname',
      'label_description' => 'fixTHEAD.plugindescription',
      'active' => false
    ),
    'folderbuttons' => array( 
      'label_name' => 'folderbuttons.pluginname',
      'label_description' => 'folderbuttons.plugindescription',
      'active' => false
    ),
    'listcontrols' => array( 
      'label_name' => 'listcontrols.pluginname',
      'label_description' => 'listcontrols.plugindescription',
      'active' => false
    ),
    'template_objects' => array( 
      'label_name' => 'template_objects.pluginname',
      'label_description' => 'template_objects.plugindescription',
      'active' => false
    ),
  ),
  'messagescomposition' => array(
    'compose_addressbook' => array( 
      'label_name' => 'compose_addressbook.pluginname',
      'label_description' => 'compose_addressbook.plugindescription',
      'active' => false
    ),
    'compose_in_taskbar' => array( 
      'label_name' => 'compose_in_taskbar.pluginname',
      'label_description' => 'compose_in_taskbar.plugindescription',
      'reload' => true,
      'active' => false
    ),
   'compose_newwindow' => array( 
      'label_name' => 'compose_newwindow.pluginname',
      'label_description' => 'compose_newwindow.plugindescription',
      'unset' => array('cnw_enabled', 'cnw_hidebar'),
      'uninstall' => true,
      'config' => './?_task=settings&_action=edit-prefs&_section=compose&_framed=1',
      'section' => 'compose',
      'reload' => true,
      'active' => false
    ),
   'fileapi_attachments' => array( 
      'label_name' => 'fileapi_attachments.pluginname',
      'label_description' => 'fileapi_attachments.plugindescription',
      'browser' => '$test = $browser->mz;',
      'active' => false
    ),
   'detach_attachments' => array( 
      'label_name' => 'detach_attachments.pluginname',
      'label_description' => 'detach_attachments.plugindescription',
      'active' => false
    ),
   'listcommands' => array( 
      'label_name' => 'listcommands.pluginname',
      'label_description' => 'listcommands.plugindescription',
      'active' => false
    ),
   'scheduled_sending' => array( 
      'label_name' => 'scheduled_sending.pluginname',
      'label_description' => 'scheduled_sending.plugindescription',
      'uninstall_request' => array( //Note: this will give the user the choice to remove all scheduled messages from sending queue.
        'action' => 'plugin.scheduled_sending_uninstall',
        'method' => 'post'
      ),
      'active' => false
    ),
   'tinymce' => array( 
      'label_name' => 'tinymce.pluginname',
      'label_description' => 'tinymce.plugindescription',
      'active' => false
    ),
   'vcard_attach' => array( 
      'label_name' => 'vcard_attach.pluginname',
      'label_description' => 'vcard_attach.plugindescription',
      'unset' => 'attach_vcard',
      'active' => false
    ),
  ),
   'messagesdisplaying' => array(
     'message_highlight' => array( 
      'label_name' => 'message_highlight.mh_title',
      'label_description' => 'message_highlight.plugindescription',
      'config' => './?_task=settings&_action=edit-prefs&_section=mh_preferences&_framed=1',
      'section' => 'mh_preferences',
      'uninstall' => array('message_highlight'),
      'reload' => true,
      'active' => false
    ),
   'hide_blockquote' => array( 
      'label_name' => 'hide_blockquote.pluginname',
      'label_description' => 'hide_blockquote.plugindescription',
      'config' => './?_task=settings&_action=edit-prefs&_section=mailview&_framed=1',
      'section' => 'mailview',
      'uninstall' => array('hide_blockquote_limit'),
      'active' => false
    ),
     'vcard_attachments' => array( 
      'label_name' => 'vcard_attachments.pluginname',
      'label_description' => 'vcard_attachments.plugindescription',
      'active' => false
    ),
  ),
  'messagesmanagement' => array(
    'hmail_autoresponder' => array( 
      'label_name' => 'hmail_autoresponder.pluginname',
      'label_description' => 'hmail_autoresponder.plugindescription',
      'protected' => false,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'config' => './?_task=settings&_action=plugin.hmail_autoresponder&_framed=1',
      'section' => 'accountlink',
      'uninstall_force' => true,
      'uninstall_request' => array(
        'action' => 'plugin.hmail_autoresponder-uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'hmail_forwarding' => array( 
      'label_name' => 'hmail_forwarding.pluginname',
      'label_description' => 'hmail_forwarding.plugindescription',
      'protected' => false,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'config' => './?_task=settings&_action=plugin.hmail_forwarding&_framed=1',
      'section' => 'accountlink',
      'uninstall_force' => true,
      'uninstall_request' => array(
        'action' => 'plugin.hmail_forwarding-uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'hmail_signature' => array( 
      'label_name' => 'hmail_signature.signature',
      'label_description' => 'hmail_signature.plugindescription',
      'protected' => false,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'config' => './?_task=settings&_action=plugin.hmail_signature&_framed=1',
      'section' => 'accountlink',
      'uninstall_force' => true,
      'uninstall_request' => array(
        'action' => 'plugin.hmail_signature-uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'accounts' => array( 
      'label_name' => 'accounts.remoteaccounts',
      'label_description' => 'accounts.plugindescription',
      'config' => './?_task=settings&_action=plugin.accounts&_framed=1',
      'section' => 'accountlink',
      'uninstall' => true,
      'uninstall_request' => array(
        'action' => 'plugin.accounts_uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'archivefolder' => array( 
      'label_name' => 'archivefolder.pluginname',
      'label_description' => 'archivefolder.plugindescription',
      'config' => './?_task=settings&_action=edit-prefs&_section=folders&_framed=1',
      'section' => 'folders',
      'uninstall' => true,
      'active' => false
    ),
    'markasjunk2' => array( 
      'label_name' => 'markasjunk2.pluginname',
      'label_description' => 'markasjunk2.plugindescription',
      'active' => false
    ),
    'contextmenu' => array( 
      'label_name' => 'contextmenu.pluginname',
      'label_description' => 'contextmenu.plugindescription',
      'active' => false
    ),
    'copymessage' => array( 
      'label_name' => 'copymessage.pluginname',
      'label_description' => 'copymessage.plugindescription',
      'active' => false
    ),
    'forwardattachment' => array( 
      'label_name' => 'forwardattachment.pluginname',
      'label_description' => 'forwardattachment.plugindescription',
      'active' => false
    ),
    'importmessages' => array( 
      'label_name' => 'importmessages.pluginname',
      'label_description' => 'importmessages.plugindescription',
      'active' => false
    ),
    'zipdownload' => array( 
      'label_name' => 'zipdownload.pluginname',
      'label_description' => 'zipdownload.plugindescription',
      'active' => false
    ),
    'newmail_notifier' => array( 
      'label_name' => 'newmail_notifier.pluginname',
      'label_description' => 'newmail_notifier.plugindescription',
      'active' => false
    ),
    'webmail_notifier' => array( 
      'label_name' => 'webmail_notifier.pluginname',
      'label_description' => 'webmail_notifier.plugindescription',
      'browser' => '$test = $browser->mz && !$browser->chrome;',
      'uninstall' => true,
      'active' => false
    ),
  ),
  'addressbook' => array(
    'google_contacts' => array( 
      'label_name' => 'google_contacts.googlecontacts',
      'label_description' => 'google_contacts.plugindescription',
      'unset' => 'use_google_abook',
      'config' => './?_task=settings&_action=edit-prefs&_section=addressbook&_framed=1',
      'section' => 'addressbook',
      'uninstall' => array('use_google_abook', 'googleuser', 'googlepass'),
      'uninstall_request' => array(
        'action' => 'plugin.google_contacts_uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'plaxo_contacts' => array( 
      'label_name' => 'plaxo_contacts.plaxocontacts',
      'label_description' => 'plaxo_contacts.plugindescription',
      'unset' => 'use_plaxo_abook',
      'config' => './?_task=settings&_action=edit-prefs&_section=addressbook&_framed=1',
      'section' => 'addressbook',
      'uninstall' => true,
      'uninstall_request' => array(
        'action' => 'plugin.plaxo_contacts_uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'automatic_addressbook' => array( 
      'label_name' => 'automatic_addressbook.pluginname',
      'label_description' => 'automatic_addressbook.plugindescription',
      'unset' => 'use_auto_abook',
      'config' => './?_task=settings&_action=edit-prefs&_section=addressbook&_framed=1',
      'section' => 'addressbook',
      'uninstall' => array('use_auto_abook'),
      'uninstall_request' => array(
        'action' => 'plugin.automatic_addressbook_uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'globaladdressbook' => array( 
      'label_name' => 'globaladdressbook.globaladdressbook',
      'label_description' => 'globaladdressbook.plugindescription',
      'protected' => true,
      'active' => true
    ),
  ),
  'settings' => array(
    'moreuserinfo' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
  ),
  'calendaring' => array(
    'planner' => array( 
      'label_name' => 'planner.planner',
      'label_description' => 'planner.plugindescription',
      'buttons' => array('#planner_button'),
      'uninstall' => true,
      'uninstall_request' => array(
        'action' => 'plugin.planner_uninstall',
        'method' => 'post',
      ),
      'reload' => true,
      'active' => true
    ),
    'sticky_notes' => array( 
      'label_name' => 'sticky_notes.pluginname',
      'label_description' => 'sticky_notes.plugindescription',
      'buttons' => array('#sticky_notes_button'),
      'reload' => true,
      'uninstall_request' => array(
        'action' => 'plugin.sticky_notes_unregister',
        'method' => 'post',
      ),
      'active' => true
    ),
    'calendar' => array( 
      'label_name' => 'calendar.pluginname',
      'label_description' => 'calendar.plugindescription',
      'buttons' => array('#calendar_button', '#rcmrowcalendarlink', '#rcmrowcalendarcategories', '#rcmrowcalendarfeeds'),
      'reload' => true,
      'config' => './?_task=settings&_action=edit-prefs&_section=calendarlink&_framed=1',
      'section' => 'calendarlink',
      'uninstall' => true,
      'uninstall_request' => array(
        'action' => 'plugin.calendar_uninstall',
        'method' => 'post',
      ),
      'active' => true
    ),
  ),
  'backend' => array(
  ),
  'misc' => array(
    'hmail_password' => array( 
      'label_name' => 'hmail_password.changepasswd',
      'label_description' => 'hmail_password.plugindescription',
      'protected' => false,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'hmail_spamfilter' => array(
      'label_name' => 'hmail_spamfilter.spamfilter',
      'label_description' => 'hmail_spamfilter.plugindescription',
      'protected' => false,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'config' => './?_task=settings&_action=plugin.hmail_spamfilter&_framed=1',
      'section' => 'accountlink',
      'uninstall' => true,
      'uninstall_force' => true,
      'uninstall_request' => array(
        'action' => 'plugin.hmail_spamfilter-uninstall',
        'method' => 'post',
      ),
      'active' => false
    ),
    'pwtools' => array( 
      'label_name' => 'pwtools.passwordrecovery',
      'label_description' => 'pwtools.plugindescription',
      'unset' => array('pwtoolsaddress', 'pwtoolsquestion', 'pwtoolsanswer', 'pwtoolsenabled'),
      'config' => '.?_task=settings&_action=plugin.pwtools&_framed=1',
      'section' => 'accountlink',
      'uninstall' => true,
      'active' => false
    ),
    'idle_timeout' => array( 
      'label_name' => 'idle_timeout.pluginname',
      'label_description' => 'idle_timeout.plugindescription',
      'label_inject' => array('eval', '$s = $this->rcmail->config->get("idle_timeout_warning", 18) + $this->rcmail->config->get("idle_timeout_logout", 2);'),
      'reload' => true,
      'active' => true
    ),
    'nabble' => array( 
      'label_name' => 'nabble.nabbleapps',
      'label_description' => 'nabble.plugindescription',
      'buttons' => array('#rcmrownabblelink'),
      'unset' => 'use_nabble',
      'reload' => true,
      'config' => './?_task=settings&_action=edit-prefs&_section=nabblelink&_framed=1',
      'section' => 'nabblelink',
      'uninstall' => true,
      'active' => false,
    ),
    'rss_feeds' => array( 
      'label_name' => 'rss_feeds.rss_plugin_name',
      'label_description' => 'rss_feeds.plugindescription',
      'active' => false
    ),
    'google_analytics' => array( 
      'label_name' => 'google_analytics.pluginname',
      'label_description' => 'google_analytics.plugindescription',
      'protected' => array('mail4us.net'),
      'active' => true
    ),
    'wrapper' => array(
      'label_name' => 'wrapper.pluginname',
      'label_description' => 'wrapper.plugindescription',
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'reload' => true,
      //'config' => './?_task=settings&_action=edit-prefs&_section=general&_framed=1',
      //'section' => 'general',
      'uninstall' => true,
      'active' => false
    ),
  ),
  'globalplugins' => array(
    'sabredav' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'demologin' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'terms' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'register' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'lang_sel' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'rcguard' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'captcha' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'newuser' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'new_user_dialog' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'dnsbl' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'persistent_login' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'taskbar' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'impressum' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'contactus' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'crawler' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'checked_identities' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'impersonate' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'hmail_login' => array(
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'hmail_autoban' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'blockspamsending' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'remember_skin' => array(
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'remember_splitter' => array(
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'global_alias' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
    'dblog' => array( 
      'protected' => true,
      'hosts' => array('mail4us.net', 'svn.mail4us.net'),
      'active' => true
    ),
  ),
);

?>