iqual/iq_content_publishing
Composer 安装命令:
composer require iqual/iq_content_publishing
包简介
Platform-agnostic framework for publishing Drupal content to external platforms (social networks, newsletters, etc.) using AI-powered content transformation.
README 文档
README
A platform-agnostic framework for publishing Drupal content to external platforms (social networks, newsletters, etc.) using AI-powered content transformation.
Overview
Content Publishing lets editors send published nodes to any number of external platforms with a single workflow. An AI model transforms the node body into platform-specific structured output (post text, headline, images, links, etc.) that the editor can review and edit before the module dispatches it through the platform's API.
The module ships a plugin system so that each target platform (e.g. X /
Twitter, LinkedIn, Mailchimp) can be provided by its own sub-module. A bundled
example sub-module (iq_content_publishing_example) demonstrates how to build a
platform plugin.
Key features
- AI content transformation – uses the Drupal AI module to convert node content into structured, platform-ready output.
- Plugin-based platform architecture – add new platforms by creating a small plugin class with a PHP attribute; no core changes needed.
- Two-step editorial workflow – select target platforms, then review and edit AI-generated content before publishing.
- Per-platform configuration – credentials, content-type restrictions, and custom AI prompt instructions per platform.
- Queue support – optionally dispatch publishing jobs through Drupal's queue system for asynchronous processing.
- Publishing log – every publish operation is recorded as a content entity with status, API response, and AI output for auditing and debugging.
Requirements
| Dependency | Version |
|---|---|
| Drupal core | ^11 |
| Node module | (core) |
| Content Moderation | (core) |
| AI module | ^1 |
An AI provider (e.g. OpenAI, Anthropic) must be configured in the AI module before content transformation will work.
Installation
Install as you would normally install a contributed Drupal module. See Installing Drupal Modules for further information.
composer require drupal/iq_content_publishing drush en iq_content_publishing
Configuration
- Navigate to Administration » Configuration » Web services » Content
Publishing Platforms (
/admin/config/services/content-publishing). - Click Add Publishing Platform to create a new platform configuration.
- Select the platform plugin.
- Enter API credentials.
- Choose which content types the platform should be available for.
- Optionally customize the AI prompt instructions.
- Visit the Settings tab
(
/admin/config/services/content-publishing/settings) to enable or disable the module globally.
Permissions
| Permission | Description |
|---|---|
| Administer content publishing | Manage platform configurations and global settings |
| Publish to external platforms | Trigger the publish workflow from node forms |
| View publishing log | View the publishing history |
Usage
- Edit (or view) a published node.
- Click Publish externally in the node form actions area.
- Select one or more target platforms and click Next.
- Review the AI-generated content for each platform, make any edits, and click Publish.
- Publishing results are shown on-screen and recorded in the publishing log.
The per-node publishing history is available under the Publishing Log tab on each node.
Creating a platform plugin
To add support for a new external platform, create a module with a plugin class:
namespace Drupal\my_platform\Plugin\ContentPublishingPlatform; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\iq_content_publishing\Attribute\ContentPublishingPlatform; use Drupal\iq_content_publishing\Plugin\ContentPublishingPlatformBase; use Drupal\iq_content_publishing\Plugin\PublishingResult; use Drupal\node\NodeInterface; #[ContentPublishingPlatform( id: 'my_platform', label: new TranslatableMarkup('My Platform'), description: new TranslatableMarkup('Publish content to My Platform.'), )] class MyPlatform extends ContentPublishingPlatformBase { public function getOutputSchema(): array { return [ 'text' => [ 'type' => 'textarea', 'label' => 'Post text', 'required' => TRUE, 'max_length' => 280, 'ai_generated' => TRUE, ], ]; } public function getDefaultAiInstructions(): string { return 'Write a short social media post for My Platform.'; } public function buildCredentialsForm(array $form, array $credentials): array { $form['api_key'] = [ '#type' => 'textfield', '#title' => $this->t('API Key'), '#default_value' => $credentials['api_key'] ?? '', '#required' => TRUE, ]; return $form; } public function publish(NodeInterface $node, array $fields, array $credentials, array $settings): PublishingResult { // Call the platform's API and return a PublishingResult. } }
See the bundled iq_content_publishing_example sub-module for a fully working
reference implementation.
Maintainers
iqual/iq_content_publishing 适用场景与选型建议
iqual/iq_content_publishing 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 67 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「drupal」 「social media」 「publishing」 「ai」 「content transformation」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 iqual/iq_content_publishing 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iqual/iq_content_publishing 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 iqual/iq_content_publishing 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Simple Sharing generates social media share links within CP entry pages, allowing you to quickly & easily share entries.
Provides an add-on purchasable entity.
Drupal integration module for the Kalastatic prototyping and styleguide tool
Provides a base set of configuration and module dependencies for starting new Drupal projects.
LinkedIn integration for Social
This module extends Drupal Migrate framework.
统计信息
- 总下载量: 67
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-02-27