定制 texxasrulez/rounddav_files 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

texxasrulez/rounddav_files

Composer 安装命令:

composer require texxasrulez/rounddav_files

包简介

Roundcube plugin to enable RoundDAV Attachments and provides a File page linked to your Files page.

README 文档

README

Downloads Packagist Downloads Packagist Version Github License GitHub Stars GitHub Issues GitHub Contributors GitHub Forks Donate Paypal

WebDAV Files integration for Roundcube, powered by RoundDAV.

This plugin adds a Files tab to Roundcube and lets users attach files directly from their RoundDAV storage into email messages.

This plugin requires:

RoundDAV Server to function.

This plugin requires:

RoundDAV Provision Roundcube Plugin

Recommended Additional Plugin:

RoundDAV Bookmarks Roundcube Plugin

Check out the Suite README to see what is entailed.

Features

  • Adds a Files entry to Roundcube's main menu
  • Embeds the RoundDAV Files UI inside an iframe
  • Uses SSO from rounddav_provision (no extra login)
  • Adds an Attach from RoundDAV button in the compose window
  • Works with Elastic and Larry-based skins (including variants)
  • Respects Roundcube's layout and styling conventions

Screenshot

Users Files:

Alt text

Administration Main Dashboard:

Alt text

Administration Shares Dashboard:

Alt text

Installation

  1. Copy plugin into Roundcube:
roundcube/plugins/rounddav_files/
  1. Enable it in Roundcube config:
$config['plugins'][] = 'rounddav_files';
  1. Configure URLs in config.inc.php or your main config:
// Where the iframe should point to for the Files UI.
// %u will be replaced with the URL-encoded Roundcube username.
$config['rounddav_files_url'] = 'https://your.server/rounddav/public/files/?user=%u';

// (Optional) Endpoint template for attachment fetch operations.
// Supports %u for username and optional %f for file query payload.
$config['rounddav_attach_files_url'] = 'https://your.server/rounddav/public/files/rc_attach.php?user=%u';

UI Integration

Files Tab

The plugin:

  • Registers a new task: rounddav_files
  • Adds a Files icon/entry in the Roundcube main menu
  • Loads a template that embeds the RoundDAV /public/files/ UI inside an iframe

Example Elastic template snippet:

<roundcube:include file="includes/layout.html" />
<roundcube:include file="includes/menu.html" />

<h1 class="voice"><roundcube:label name="rounddav_files.files" /></h1>

<div id="layout-content" class="selected" role="main">
    <div class="iframe-wrapper">
        <roundcube:object
            name="rounddav_files_frame"
            id="rounddav-files-frame"
            src="env:blankpage"
            title="arialabelrounddavfilescontent"
        />
    </div>
</div>

<roundcube:include file="includes/footer.html" />

Compose Window

The plugin injects a small Attach from RoundDAV button inside the attachments area of the compose screen. The header-level button is intentionally hidden to avoid clutter.

When clicked:

  1. Opens the Files UI (either embedded or as a modal / separate window depending on your setup).
  2. Lets the user pick files from their RoundDAV storage.
  3. Posts the selected files back to Roundcube using a plugin action to turn them into real message attachments.

SSO Behavior

rounddav_files integrates with rounddav_provision through $_SESSION:

  • After login, rounddav_provision stores a one-shot SSO URL in:

    $_SESSION['rounddav_sso_login_url']
  • When rendering the Files iframe, rounddav_files:

    1. Checks $_SESSION['rounddav_sso_login_url'].
    2. If present:
      • Uses that value as the iframe src.
      • Unsets it to avoid reuse.
    3. If not present:
      • Falls back to rounddav_files_url (with %u replaced by the username).

This means:

  • First visit after login → automatic SSO via /sso_login.php
  • Later visits → direct Files URL (as long as the RoundDAV session is still valid)

Embed Troubleshooting and Header Guidance

If the Files iframe does not load or is blocked by browser policy, check RoundDAV Admin:

/rounddav/public/admin/?action=config

In Security diagnostics and Security Headers:

  • Keep security.headers.enabled = true
  • Keep security.headers.x_content_type_options = true
  • Keep security.headers.referrer_policy = strict-origin-when-cross-origin
  • For cross-origin Roundcube embedding, keep security.headers.x_frame_options = '' (empty)
  • If CSP is enabled, include your Roundcube origin in frame-ancestors

Use Verify Current Headers to compare expected vs live headers on Admin and Files endpoints.

For backup/restore and retention operations (Create backup now, Restore, Download all as ZIP, retention pruning), see the RoundDAV admin docs:

Logging

The plugin logs to the roundcube log channel when it decides which URL to use for the iframe, e.g.:

  • rounddav_files: using SSO URL for iframe src: ...
  • rounddav_files: using fallback files URL template=... for user=...

These messages are helpful when debugging SSO behavior.

Philosophy

Webmail without file storage feels incomplete.

rounddav_files is the missing piece that lets Roundcube act like a modern client: email, calendars, contacts, and files, all with one login.

Versioning

  • rounddav_files now keeps its canonical version in rounddav_files::PLUGIN_VERSION inside rounddav_files.php.
  • rounddav_files::info() exposes the plugin metadata array used for self-identification.
  • Development builds should use a +dev suffix such as 1.0.0+dev.
  • Release builds should use a clean tagged version such as 1.0.0.

For a release bump:

  1. Update rounddav_files::PLUGIN_VERSION in rounddav_files.php or run sh scripts/bump-version.sh 1.0.0.
  2. Update CHANGELOG.md.
  3. Create the matching release tag after verification.

texxasrulez/rounddav_files 适用场景与选型建议

texxasrulez/rounddav_files 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2025-12-15