如何从Roundcube中的模板或插件获取未读消息的数量?

问题描述 投票:3回答:2

我已经创建了一个新皮肤,并且需要在标题中显示例如“您有3封新邮件”的文本。如何从模板或需要创建插件的插件中做到这一点?

谢谢。

templates plugins skin roundcube
2个回答
4
投票

嗯,我找到了解决方案,并希望在其他人需要的情况下分享。因此,我创建了一个插件,这是提取大量未读消息所需的一堆插件代码:

class test extends rcube_plugin{
    public $task='mail';

    function init(){     
       $this->register_handler('plugin.unreadmessage',array($this, 'unreadmessage_handler'));
    }
    function unreadmessage_handler(){
       $rcmail = rcmail::get_instance();        
       $count=$rcmail->imap->messagecount('INBOX', 'UNSEEN');
       return $count    
    }
}

免费使用!


0
投票

@@ Bakhtiyor先生,

我正在尝试为roundcube编写我的第一个插件。找不到任何详细的文档摘录github插件API。您能分享一些现成的王者来创建插件吗?作为学术项目的一部分,我需要在roundcube中跟踪电子邮件的功能,不知道可用的插件。任何形式的帮助都是可以理解的。

问候

Mitz

© www.soinside.com 2019 - 2024. All rights reserved.