좋아, 그래서 나는 대답을 찾을 수 있었다.
guide to build plugins for Roundcube을 사용하여 [roundcubeRoot]/plugin/no_forward_for_groupes
폴더에 "no_forward_for_groupes"플러그인을 설정했습니다. 나는 다른 플러그인으로
$config['plugins'] = array('no_forward_for_groupes');
을 wrtiting하여 [roundcubeRoot]/config/config.inc.php
파일에 활성화.
[roundcubeRoot]/program/js/app.js
파일 (Roundcube의 핵심 JS)에서 약간의 독서와 연구를 한 후, 나는 행동해야 할 대상과 듣는 이벤트를 발견했습니다. 마지막 코드는 바로 뒤에 있습니다. 보시다시피, 나는 드래그 앤 드롭뿐 아니라 많은 다른 명령을 비활성화했습니다. 따라서 기본적으로 읽기 전용 폴더가 있습니다.이 폴더는 메일을 가져올 수 없습니다. 나는 그것이 특정한 유스 케이스의 일종이라는 것을 알고있다. 그러나 언젠가 거기 사람들을 도와 줄 수 있기를 바란다.
no_forward_for_groupes.php
<?php
/**
* No Forward For Groups
*
* This plugin disables the Send/Forward menus from the Mails_Groupes folder
*
* @version 0.1
* @author Remy Sanfeliu
*/
class no_forward_for_groupes extends rcube_plugin
{
public $task = 'mail';
function init(){
$this->include_script('no_forward_for_groupes.js');
}
}
no_forward_for_groupes.js
/**
* No Forward For Groups
*
* This plugin disables the Send/Forward menus from the Mails_Groupes folder
*
* @version 0.1
* @author Remy Sanfeliu
*/
window.rcmail.addEventListener('listupdate', function(folder, old) {
if (folder.folder=="SENT.Mails_Groupes"){
window.rcmail.message_list.addEventListener('select', select_msglist);
window.rcmail.message_list.addEventListener('dragstart', do_nothing);
window.rcmail.message_list.addEventListener('dragmove', do_nothing);
window.rcmail.message_list.addEventListener('dragend', do_nothing);
}else{
window.rcmail.message_list.removeEventListener('select', select_msglist);
window.rcmail.message_list.removeEventListener('dragstart', do_nothing);
window.rcmail.message_list.removeEventListener('dragmove', do_nothing);
window.rcmail.message_list.removeEventListener('dragend', do_nothing);
}
});
function select_msglist(list){
window.rcmail.enable_command( 'reply',
'reply-all',
'reply-list',
'move',
'copy',
'delete',
'mark',
'edit',
'forward',
'forward-attachment',
'forward-inline',
false);
}
function do_nothing(){
// DO NOTHING
}