ideative / stock-pictures
允许后端用户从各种在线服务中选择股票图片
12.0.2
2024-04-03 15:39 UTC
Requires
- typo3/cms-core: ^12.4
README
此扩展为将股票图片服务连接到TYPO3后端提供了一个基础。对于每个连接的服务,将在媒体文件中添加一个“从XXX添加媒体”按钮。
为了快速开始,您可以使用以下扩展之一
- https://github.com/ideativedigital/shutterstock-connector
- https://github.com/ideativedigital/unsplash-connector
安装
通过composer require ideative/stock-pictures
安装此扩展,或从TYPO3扩展存储库下载并激活您的TYPO3安装中的扩展管理器中的扩展。
注册新的股票图片服务
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['id_stock_pictures']['connectors']['myservice'] = \Acme\MyExtension\Connector\MyServiceConnector::class
您的连接器类必须实现Ideative\IdStockPictures\ConnectorInterface接口。查看类文档以了解每个接口方法的用途。
从EXT:id_shutterstock_connector
中的ShutterStockConnector开始。
禁用特定表/字段上的股票图片服务
可以通过TSConfig手动禁用特定表和字段上的每个特定服务。这将隐藏此特定字段中的“从XXX添加媒体”按钮。
TCEFORM {
tx_myextension_tablename {
my_fieldname {
tx_idstockpictures {
connectors {
shutterstock.enabled = 0
unsplash.enabled = 0
...
}
}
}
}