texxasrulez/rounddav_files

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

Installs: 0

Dependents: 0

Suggesters: 1

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:roundcube-plugin

pkg:composer/texxasrulez/rounddav_files

0.0.1 2025-12-15 21:59 UTC

This package is auto-updated.

Last update: 2025-12-15 22:09:12 UTC


README

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.

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

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 for attachment operations if you implement them as a RoundDAV API
$config['rounddav_attach_url'] = 'https://your.server/rounddav/public/api.php?r=attach';

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)

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.