承接 johndoh/globaladdressbook 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

johndoh/globaladdressbook

Composer 安装命令:

composer require johndoh/globaladdressbook

包简介

Adds global address books to Roundcube

README 文档

README

This plugin adds global SQL based address books to Roundcube. It can be global per installation, per IMAP host or per domain.

ATTENTION

This is just a snapshot from the GIT repository and is NOT A STABLE version of GlobalAddressbook. It is Intended for use with the GIT-master version of Roundcube and it may not be compatible with older versions. Stable versions of GlobalAddressbook are available from the Roundcube plugin repository (for 1.0 and above) or the releases section of the GitHub repository.

License

This plugin is released under the GNU General Public License Version 3+.

Even if skins might contain some programming work, they are not considered as a linked part of the plugin and therefore skins DO NOT fall under the provisions of the GPL license. See the README file located in the core skins folder for details on the skin license.

Install

  • Install via Composer by adding johndoh/globaladdressbook to your composer.json file or running composer require johndoh/globaladdressbook
    or
  • Place this plugin folder into plugins directory of Roundcube
  • Add globaladdressbook to $config['plugins'] in your Roundcube config

NB: When downloading the plugin from GitHub you will need to create a directory called globaladdressbook and place the files in there, ignoring the root directory in the downloaded archive.

Config

The default config file is plugins/globaladdressbook/config.inc.php.dist Rename this to plugins/globaladdressbook/config.inc.php

'name'

This is the name of the address book that is displayed to users inside Roundcube. The value can be a string or an array of localized names. If an array is used the keys should be Roundcube localization identifiers and there must be a key called 'en_us'. All array keys must be lower case. For example:

'name' => [
    'en_us' => 'Global Addresses',
    'ja_jp' => 'グローバル・アドレス',
    'pt_pt' => 'Endereços Globais',
  ],

'user'

This is the name of the dummy user which holds the global address book. The username does not have to belong to a valid email account. The username will be stored in the Roundcube database but will not be able to log into Roundcube unless it belongs to a valid email account on your server.

To create a single global address book for everyone who access Roundcube set this options to something like: '[global_addressbook_user]'

To create a global address book per email domain which Roundcube serves set this options to something like: 'global_addressbook@%d'

The username can contain the following macros that will be expanded as follows:

  • %d is replaced with the domain part of the logged in user's username
  • %h is replaced with the imap host (from the session info)
  • %i is replaced with the domain part of the logged in user's default identity

NB.: A host config option can also be used to override the default 'localhost' used by the plugin. This supports the same macros.

'perms'

Restrict the actions that can be performed by users in the global address book

  • 0 - global address book is read only
  • 1 - users can add, edit and delete contacts (full permissions)
  • 2 - users can add but not edit or delete contacts
  • 3 - users can add and edit but not delete contacts

NB.: With perms set to 0, 2, or 3 only admin users will be able to import contacts into the global address book.

Tip: For more advanced options see tip globaladdressbook_permissions hook.

'force_copy'

Always copy a contact from the global address book to another one, for example when using drag 'n drop. Default behaviour is to move the contact.

'groups'

Should contact groups be available in the global address book

'admin'

The admin is a user or users who will always have full read/write access even if the address book is set to read only. The following options are available:

  • To set a single user as admin then enter their username as a string like: 'admin' => 'admin@domain.com',
  • If you wish give admin rights to multiple users then enter the usernames in an array like: 'admin' => ['admin1@domain.com', 'admin2@domain.com'],

Tip: For more advanced options see tip globaladdressbook_permissions hook.

'autocomplete'

Show contacts from this book in the auto complete menu when composing an email

'check_safe'

Use addresses in the global address book to identify known senders before displaying remote inline images in HTML messages (in addition to other configured address books).

'visibility'

Used to define which users can see a specific address book. The following options are available:

  • If you wish to limit access to a specific list of uesrs then enter usernames in an array like: 'visibility' => ['user2@domain.com', 'user2@domain.com'],

Tip: For more advanced options see tip globaladdressbook_permissions hook.

'allowed_hosts'

Activate GlobalAddressbook for selected mail hosts only. If this is not set all mail hosts are allowed.

globaladdressbook_permissions hook

The globaladdressbook_permissions plugin hook allows dynamic setting of the permissions related config options. Arguments:

  • id: (string) the ID of the address book being loaded
  • perms: (int) the 'perms' config option
  • admin: (boolean) if the address book is in admin mode
  • visibility: (boolean) if the address book is visible

Return:

  • perms: (int) the 'perms' config option
  • admin: (boolean) if the address book is in admin mode
  • visibility: (boolean) if the address book is visible

Tip: You can attach a function to the plugin hook from inside your config file.

$api = rcube::get_instance()->plugins;
$api->register_hook('globaladdressbook_permissions', function($p) {
  if (/* is admin */) {
    $p['admin'] = true;
  }
  return $p;
});

johndoh/globaladdressbook 适用场景与选型建议

johndoh/globaladdressbook 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.17k 次下载、GitHub Stars 达 72, 最近一次更新时间为 2020 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「address」 「book」 「contacts」 「global」 「shared」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 johndoh/globaladdressbook 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 johndoh/globaladdressbook 我们能提供哪些服务?
定制开发 / 二次开发

基于 johndoh/globaladdressbook 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 76
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 72
  • Watchers: 12
  • Forks: 26
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2020-04-11