seiger/sgallery
Composer 安装命令:
composer require seiger/sgallery
包简介
Evocms package for work with Gallery for Resource in Evolution CMS and manipulate images with an expressive API
README 文档
README
sGallery emerges as a versatile and indispensable plugin tailor-made for Evolution CMS, revolutionizing the way you manage media assets within your website. Specifically designed for the Evolution CMS admin panel, this dynamic plugin introduces a host of powerful features to elevate your content presentation.
sGallery stands as a testament to Evolution CMS's commitment to robust and user-friendly content management. Whether you are a content creator or an administrator, this plugin empowers you to curate a visually stunning and engaging website with unparalleled ease. Elevate your media management experience with sGallery today.
Features
- Image and Video Attachment.
- Effortless Media Upload.
- YouTube Integration.
- Sortable Positions.
- Text Fields for File Management.
- Image Resize and AVIF or WEBP Conversion.
- Default image optimization with optional sharpening controls.
- Integration with Custom Modules.
- sLang Integration.
- More than one tab.
- Full Image slider in Admin panel.
Supported formats
The following image formats are tested and supported by the package. If your GD/Imagick installation supports a format that is not listed you are probably fine to use it but your mileage may vary.
| Format | GD | Imagick |
|---|---|---|
| jpeg | ✅ | ✅ |
| png | ✅ | ✅ |
| gif | ✅ | ✅ |
| webp | ✅ | ✅ |
| avif | ✅ | ✅ |
| heic | ❌ | ✅ |
| tiff | ❌ | ✅ |
Requirements
- Evolution CMS 3.3+
- PHP 8.3+
- Composer 2.2+
- One of: MySQL 8.0+ / MariaDB 10.5+ / PostgreSQL 10+ / SQLite 3.25+
Install by artisan package installer
Go to You /core/ folder:
cd core
Run php artisan command
php artisan package:installrequire seiger/sgallery "*"
Generate the config file in ../core/custom/config/seiger/settings with name sgallery.php the file should return a comma-separated list of templates.
php artisan vendor:publish --provider="Seiger\sGallery\sGalleryServiceProvider"
Run make DB structure with command:
php artisan migrate
Configure
Templates for displaying gallery tabs are configured in the
core/custom/config/seiger/settings/sGallery.php
file, where the array contains template IDs for connecting the gallery.
Usage in blade
Sow all files with Image filter:
@foreach(sGallery::collections()->get() as $item) @if(sGallery::hasImage($item->type)) <a class="swiper-slide" @if(trim($item->link))href="{{$item->link}}"@endif> <div class="container"> <img loading="lazy" class="intro__img" src="{{$item->src}}" alt="{{$item->alt}}" width="1440" height="456"> <div class="intro__inner"> <div class="h1__title">{{$item->title}}</div> <p class="intro__text">{{$item->description}}</p> @if(trim($item->link_text))<div class="btn background__mod">{{$item->link_text}}</div>@endif </div> </div> </a> @endif @endforeach
or YouTube filter
@foreach(sGallery::collections()->get() as $item) @if(sGallery::hasYoutube($item->type)) <div class="item"> <div class="video"> <iframe width="560" height="315" src="https://www.youtube.com/embed/{{$item->file}}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> <p>{{$item->title}}</p> </div> @endif @endforeach
or
@foreach(sGallery::collections()->documentId($product->id)->itemType('product')->get() as $item) <div class="swiper-slide"> <a class="js-trigger-fancybox" href="{{$item->src}}" data-fancybox="product-gallery"> <img loading="lazy" src="{{$item->src}}" width="440" height="440" /> </a> </div> @endforeach
Integration into the products module
Just paste this code in your View backend
{!!sGallery::initialiseView()->viewType('section')->itemType('product')->idType('i')!!}
seiger/sgallery 适用场景与选型建议
seiger/sgallery 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 337 次下载、GitHub Stars 达 10, 最近一次更新时间为 2022 年 05 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「gallery」 「evocms」 「evolution-cms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 seiger/sgallery 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 seiger/sgallery 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 seiger/sgallery 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
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.
Quick gallery content block for Silverstripe CMS
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
Simple gallery using FileCollections.
Implementation of carouFredSel as extension for Contao Open Source CMS
统计信息
- 总下载量: 337
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 25
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2022-05-14
