dft/silverstripe-gallery
Composer 安装命令:
composer require dft/silverstripe-gallery
包简介
A Silverstripe image gallery allowing multi image upload and automatic generation of thumbnail gallery with popups
README 文档
README
Adds image galleries to your SilverStripe website.
Author
This module was created by Dean Forest Tech.
Installation
The prefered method is via composer:
composer require dft/silverstripe-gallery
Alternativley download and add to:
[silverstripe-root]/gallery
Then run a dev/build (eithe from the browser of the command line).
Usage
Once installed, you can add either a Gallery Hub or a Gallery Page to your site.
Gallery Hub
Hub pages generate a thumbnail for each child GalleryPage with a link to view that gallery.
The thumbnail is generated based on the first image in the list
Gallery Page
A gallery page allows you to upload images and then generates them as a thumbnail gallery. Clicking on the thumbnail opens a modal/lightbox.
You can add a gallery to your site by creating a GalleryPage from within the CMS.
Under the Gallery tab, you can then upload as many images as needed.
Changing the width and height of images
If you wish to change the width and height of the gallery images (or thumbnails) loaded,
you can do this under the Settings tab on your GalleryPage.
You can set the following options:
- Image Width (default: 950): Width in PX of images loaded in the modal
- Image Height (default: 500): Height in PX of images loaded in the modal
- Image Resize Type (default: ratio): Type of resize to use on images
- Background (default: ffffff): If we use a padded image, set the background colour
- Thumbnail Width (default: 150): Width in PX of thumbnail images
- Thumbnail Height (default: 150): Height in PX of thumbnail images
- Thumbnail Resize Type (default: pad): Type of resize to use on thumbnails
Resize options are as follows:
- crop: Crop image to exact size
- pad: Pad image to size and add whitespace
- ratio: Perform a ratio resize of images
Forcing the widths and heights
If you want all galleries to be restriced to set sizes, you can set some config variables. Setting these configs will remove the relevent fields from the CMS.
DFT\SilverStripe\Gallery\Model\GalleryHub:
force_thumbnail_width: 350
force_thumbnail_height: 350
force_thumbnail_resize_type: crop
DFT\SilverStripe\Gallery\Model\GalleryPage:
force_image_width: 1200
force_image_height: 600
force_image_resize_type: ratio
dft/silverstripe-gallery 适用场景与选型建议
dft/silverstripe-gallery 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 330 次下载、GitHub Stars 达 4, 最近一次更新时间为 2024 年 11 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「modal」 「silverstripe」 「gallery」 「lightbox」 「Thumbnails」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dft/silverstripe-gallery 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dft/silverstripe-gallery 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dft/silverstripe-gallery 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Fork from ghosh/Micromodal. Tiny, dependency-free javascript library for creating accessible modal dialogs.
A module for the SilverStripe CMS which allows you to organize images in a gallery format.
Creates a basic photo gallery pagetype with albums and photos. Photos within albums are opened with a lightbox.
Make Filament modals draggable.
Quick gallery content block for Silverstripe CMS
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
统计信息
- 总下载量: 330
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 23
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-11-21