roundcubemail/plugins/archive/archive.php
function prefs_table($args)
    {
        global $CURR_SECTION;

        $this->add_texts('localization');

        $rcmail        = rcmail::get_instance();
        $dont_override = $rcmail->config->get('dont_override', array());

        if ($args['section'] == 'folders' && !in_array('archive_mbox', $dont_override)) {
            $mbox = $rcmail->config->get('archive_mbox');
            $type = $rcmail->config->get('archive_type');

            // load folders list when needed
            if ($CURR_SECTION) {
                $select = $rcmail->folder_selector(array(
                        'noselection'   => '---',
                        'realnames'     => true,
                        'maxlength'     => 30,
                        'folder_filter' => 'mail',
                        'folder_rights' => 'w',
                        'onchange'      => "if ($(this).val() == 'INBOX') $(this).val('')",
                ));
            }
            else {
                $select = new html_select();
            }

            $args['blocks']['main']['options']['archive_mbox'] = array(
                'title'   => $this->gettext('archivefolder'),
                'content' => $select->show($mbox, array('name' => "_archive_mbox"))
            );

            // add option for structuring the archive folder
            $archive_type = new html_select(array('name' => '_archive_type', 'id' => 'ff_archive_type'));
            $archive_type->add($this->gettext('none'), '');
            $archive_type->add($this->gettext('archivetypeyear'), 'year');
            $archive_type->add($this->gettext('archivetypemonth'), 'month');
            $archive_type->add($this->gettext('archivetypesender'), 'sender');
            $archive_type->add($this->gettext('archivetypefolder'), 'folder');

            $args['blocks']['archive'] = array(
                'name' => rcube::Q($this->gettext('settingstitle')),
                'options' => array('archive_type' => array(
                        'title'   => $this->gettext('archivetype'),
                        'content' => $archive_type->show($type)
                    )
                )
            );
        }
        else if ($args['section'] == 'server' && !in_array('read_on_archive', $dont_override)) {
            $chbox = new html_checkbox(array('name' => '_read_on_archive', 'id' => 'ff_read_on_archive', 'value' => 1));
            $args['blocks']['main']['options']['read_on_archive'] = array(
                'title'   => $this->gettext('readonarchive'),
                'content' => $chbox->show($rcmail->config->get('read_on_archive') ? 1 : 0)
            );
        }

        return $args;
    }
function prefs_table($args)
    {
        global $CURR_SECTION;

        $this->add_texts('localization');

        $rcmail        = rcmail::get_instance();
        $dont_override = $rcmail->config->get('dont_override', array());

        if ($args['section'] == 'folders' && !in_array('archive_mbox', $dont_override)) {
            $mbox = $rcmail->config->get('archive_mbox');
            $type = $rcmail->config->get('archive_type');

            // load folders list when needed
            if ($CURR_SECTION) {
                $select = $rcmail->folder_selector(array(
                        'noselection'   => '---',
                        'realnames'     => true,
                        'maxlength'     => 30,
                        'folder_filter' => 'mail',
                        'folder_rights' => 'w',
                        'onchange'      => "if ($(this).val() == 'INBOX') $(this).val('')",
                ));
            }
            else {
                $select = new html_select();
            }

            $args['blocks']['main']['options']['archive_mbox'] = array(
                'title'   => $this->gettext('archivefolder'),
                'content' => $select->show($mbox, array('name' => "_archive_mbox"))
            );

            // add option for structuring the archive folder
            $archive_type = new html_select(array('name' => '_archive_type', 'id' => 'ff_archive_type'));
            $archive_type->add($this->gettext('none'), '');
            $archive_type->add($this->gettext('archivetypeyear'), 'year');
            $archive_type->add($this->gettext('archivetypemonth'), 'month');
            $archive_type->add($this->gettext('archivetypesender'), 'sender');
            $archive_type->add($this->gettext('archivetypefolder'), 'folder');

            $args['blocks']['archive'] = array(
                'name' => rcube::Q($this->gettext('settingstitle')),
                'options' => array('archive_type' => array(
                        'title'   => $this->gettext('archivetype'),
                        'content' => $archive_type->show($type)
                    )
                )
            );
        }
        else if ($args['section'] == 'server' && !in_array('read_on_archive', $dont_override)) {
            $chbox = new html_checkbox(array('name' => '_read_on_archive', 'id' => 'ff_read_on_archive', 'value' => 1));
            $args['blocks']['main']['options']['read_on_archive'] = array(
                'title'   => $this->gettext('readonarchive'),
                'content' => $chbox->show($rcmail->config->get('read_on_archive') ? 1 : 0)
            );
        }

        return $args;
    }
function prefs_table ( $ args ) { global $ CURR_SECTION ; $ this -> add_texts ( 'localization' ) ; $ rcmail = rcmail :: get_instance ( ) ; $ dont_override = $ rcmail -> config -> get ( 'dont_override' , array ( ) ) ; if ( $ args [ 'section' ] == 'folders' && ! in_array ( 'archive_mbox' , $ dont_override ) ) { $ mbox = $ rcmail -> config -> get ( 'archive_mbox' ) ; $ type = $ rcmail -> config -> get ( 'archive_type' ) ; // load folders list when needed if ( $ CURR_SECTION ) { $ select = $ rcmail -> folder_selector ( array ( 'noselection' => '---' , 'realnames' => true , 'maxlength' => 30 , 'folder_filter' => 'mail' , 'folder_rights' => 'w' , 'onchange' => "if ($(this).val() == 'INBOX') $(this).val('')" , ) ) ; } else { $ select = new html_select ( ) ; } $ args [ 'blocks' ] [ 'main' ] [ 'options' ] [ 'archive_mbox' ] = array ( 'title' => $ this -> gettext ( 'archivefolder' ) , 'content' => $ select -> show ( $ mbox , array ( 'name' => "_archive_mbox" ) ) ) ; // add option for structuring the archive folder $ archive_type = new html_select ( array ( 'name' => '_archive_type' , 'id' => 'ff_archive_type' ) ) ; $ archive_type -> add ( $ this -> gettext ( 'none' ) , '' ) ; $ archive_type -> add ( $ this -> gettext ( 'archivetypeyear' ) , 'year' ) ; $ archive_type -> add ( $ this -> gettext ( 'archivetypemonth' ) , 'month' ) ; $ archive_type -> add ( $ this -> gettext ( 'archivetypesender' ) , 'sender' ) ; $ archive_type -> add ( $ this -> gettext ( 'archivetypefolder' ) , 'folder' ) ; $ args [ 'blocks' ] [ 'archive' ] = array ( 'name' => rcube :: Q ( $ this -> gettext ( 'settingstitle' ) ) , 'options' => array ( 'archive_type' => array ( 'title' => $ this -> gettext ( 'archivetype' ) , 'content' => $ archive_type -> show ( $ type ) ) ) ) ; } else if ( $ args [ 'section' ] == 'server' && ! in_array ( 'read_on_archive' , $ dont_override ) ) { $ chbox = new html_checkbox ( array ( 'name' => '_read_on_archive' , 'id' => 'ff_read_on_archive' , 'value' => 1 ) ) ; $ args [ 'blocks' ] [ 'main' ] [ 'options' ] [ 'read_on_archive' ] = array ( 'title' => $ this -> gettext ( 'readonarchive' ) , 'content' => $ chbox -> show ( $ rcmail -> config -> get ( 'read_on_archive' ) ? 1 : 0 ) ) ; } return $ args ; }
Hook to inject plugin-specific user settings
Hook to inject plugin - specific user settings