infoweb-internet-solutions/yii2-image-gallery

Yii2 图片库

1.0.8 2015-02-19 12:45 UTC

This package is not auto-updated.

Last update: 2024-09-28 15:29:02 UTC


README

本扩展提供了一种管理您网站图片库的方法。

安装

安装此扩展的首选方式是通过 composer

运行以下命令

php composer.phar require --prefer-dist infoweb-internet-solutions/yii2-image-gallery "*"

或将其添加到您的 composer.json 文件的 require 部分中。

"infoweb-internet-solutions/yii2-image-gallery": "*"

使用方法

安装扩展后,运行此迁移

yii migrate/up --migrationPath=@infoweb/gallery/migrations

并按以下方式修改 backend/config/main.php

return [
    ...
    'modules' => [
        'gallery' => [
            'class' => 'infoweb\gallery\Module',
        ],
    ],
    ...
];

导入翻译并使用类别 infoweb/gallery

yii i18n/import @infoweb/gallery/messages

配置

以下列出了所有可用的配置选项及其默认值。

allowContentDuplication (类型:布尔值,默认:true)

如果此选项设置为 true,则将在所有可翻译属性上激活 duplicateable jQuery 插件。

enableDescription (类型:布尔值,默认:true)

如果此选项设置为 true,则可以添加描述。

enableDate (类型:布尔值,默认:true)

如果此选项设置为 true,则可以添加日期。

defaultThumbnailWidth (类型:整数,默认:250)

这将设置缩略图的默认宽度。

defaultThumbnailHeight (类型:整数,默认:150)

这将设置缩略图的默认高度。