承接 luyadev/luya-module-gallery 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

luyadev/luya-module-gallery

最新稳定版本:1.0.2

Composer 安装命令:

composer require luyadev/luya-module-gallery

包简介

The gallery module allows you create folders and collection and upload images to the collections. Its an easy way to create a gallery very quick and create your own view files.

README 文档

README

LUYA Logo

Gallery Module

LUYA Latest Stable Version Total Downloads Slack Support

The gallery module allows you create folders and collection and upload images to the collections. Its an easy way to create a gallery very quick and create your own view files.

Installation

For the installation of modules Composer is required.

composer require luyadev/luya-module-gallery

Configuration

After installation via Composer include the module to your configuration file within the modules section.

'modules' => [
    // ...
    'gallery' => [
        'class' => 'luya\gallery\frontend\Module',
        'useAppViewPath' => false, // When enabled the views will be looked up in the @app/views folder, otherwise the views shipped with the module will be used.
    ],
    'galleryadmin' => 'luya\gallery\admin\Module',
]

Initialization

After successfully installation and configuration run the migrate, import and setup command to initialize the module in your project.

1.) Migrate your database.

./vendor/bin/luya migrate

2.) Import the module and migrations into your LUYA project.

./vendor/bin/luya import

View files

As the modules are not shipped with default view files you can use the following examples:

cat/index.php

<?php foreach($catData as $item): ?>
    <div class="well">
        <h1><?= $item->title; ?></h1>
        <a href="<?= $item->detailLink; ?>">Alben anzeigen</a>
    </div>
<?php endforeach; ?>

alben/index.php

<table border="1">
<?php foreach($albenData as $item): ?>
<tr>
    <td><img src="<?= Yii::$app->storage->getImage($item->cover_image_id)->applyFilter('medium-thumbnail')->source; ?>" border="0" /></td>
    <td>
        <h2><?= $item->title; ?></h2>
        <p><?= $item->description; ?></p>
        <p><?= $item->detailLink; ?></p>
    </td>
</tr>
<?php endforeach; ?>
</table>

album/index.php

<table border="1">
<tr>
    <td>
        <h2><?= $model->title; ?></h2>
        <p><?= $model->description; ?></p>
        <p><a href="<?= $model->detailLink; ?>"><?= $model->detailLink; ?></a>
        
        <h3>Bilder</h3>
        <div class="row">
            <?php foreach($model->albumImages as $image): ?>
                <div class="col-md-3">
                    <img class="img-responsive" src="<?= $image->getImage()->source; ?>" border="0" />
                </div>
            <?php endforeach; ?>
        </div>
    </td>
</tr>
</table>

统计信息

  • 总下载量: 3.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-08