English | 中文
Official Drupal module for the DDYS API. It adds frontend pages, blocks, text-filter shortcodes, a local JSON proxy, caching, diagnostics, CKEditor 5 insertion support, and a server-side request form for Drupal 10/11 sites.
- GitHub repository: ddysiodev/ddys-drupal-module
- Module directory:
ddys_open - Machine name:
ddys_open - Target: Drupal 10 and Drupal 11
- License: GPL-2.0-or-later
- Full Drupal module metadata, routing, permissions, menu links, local tasks, services, config schema, and default config.
- Frontend routes for movies, latest, hot, search, suggest, calendar, movie detail, sources, related items, comments, collections, collection detail, shares, share detail, requests, activities, user, types, genres, and regions.
- Text filter plugin that parses all
[ddys_*]shortcodes in formatted text. - Block plugin for placing any official DDYS shortcode in Drupal Block Layout, including detail views that need slug, ID, or username fields.
- CKEditor 5 toolbar insertion helper for DDYS shortcodes.
- Admin settings form and diagnostics form with API Key clear, connection test, cache clear, config checks, and canonical shortcode/page/proxy generator.
- Local JSON proxy at
/ddys-api/{route}with route and parameter allow-lists. - Server-side request form with Drupal Form API, CSRF token, validation, rate limiting, and authenticated API submission.
- Drupal cache backend with TTL buckets and
ddys_opencache tags. - Twig page template, frontend/admin libraries, and uninstall cleanup for DDYS config/cache state.
- Display attributes for hiding poster, rating, or summary output when a compact embed is needed.
- Escaped output, resource protocol allow-list, media URL validation, bounded numeric inputs, and no API Key exposure in frontend JavaScript.
- Build the package with
tools/build-package.ps1. - Extract or upload
dist/ddys-drupal-module-v0.1.0.zipso the module lives atweb/modules/custom/ddys_open. - Enable
DDYS APIfrom Drupal Extend or rundrush en ddys_open. - Open
Configuration -> Web services -> DDYS API. - Configure API Base URL, Source Site URL, cache TTL, display settings, and optional API Key. Use
Clear saved API Keyif a saved key must be removed. - Open the diagnostics tab to test the connection and generate shortcodes, page links, or proxy URLs.
- Enable the
DDYS API shortcodestext filter on the desired text format. - Place the
DDYS API blockfrom Block Layout when a sidebar or region widget is needed.
[ddys_movies type="movie" per_page="24"]
[ddys_latest type="movie" limit="12"]
[ddys_hot limit="10"]
[ddys_search]
[ddys_suggest q="interstellar"]
[ddys_calendar year="2026" month="7"]
[ddys_movie slug="this-tempting-madness"]
[ddys_sources slug="this-tempting-madness"]
[ddys_related slug="this-tempting-madness"]
[ddys_comments slug="this-tempting-madness" per_page="20"]
[ddys_collections per_page="10"]
[ddys_collection slug="best-sci-fi"]
[ddys_shares per_page="10"]
[ddys_share id="1"]
[ddys_requests per_page="10"]
[ddys_activities per_page="10"]
[ddys_user username="demo"]
[ddys_types]
[ddys_genres]
[ddys_regions]
[ddys_request_form]
/ddys/latest
/ddys/hot
/ddys/movies
/ddys/search?q=interstellar
/ddys/suggest?q=interstellar
/ddys/calendar?year=2026&month=7
/ddys/movie/this-tempting-madness
/ddys/movie/this-tempting-madness/sources
/ddys/movie/this-tempting-madness/related
/ddys/movie/this-tempting-madness/comments
/ddys/collections
/ddys/collection/best-sci-fi
/ddys/shares
/ddys/share/1
/ddys/requests
/ddys/activities
/ddys/user/demo
/ddys/types
/ddys/genres
/ddys/regions
/ddys-api/latest?limit=12
/ddys-api/movie?slug=this-tempting-madness
/ddys-api/share?id=1
The module validates the route and query parameter allow-lists before requesting the DDYS API from the Drupal server.
node tools/check.mjsThe check covers Drupal module files, lifecycle hooks, services, routes, forms, block plugin, text filter, CKEditor 5 support, all 21 shortcodes, all 20 views, proxy/request/cache/security boundaries, icons, docs, package safety, and forbidden sensitive files.