pasinter / admanager-bundle
广告管理器插件
dev-master
2014-05-28 10:44 UTC
Requires
- php: >=5.3.2
- sonata-project/admin-bundle: 2.3.*@dev
- sonata-project/media-bundle: 2.3.*@dev
- symfony/framework-bundle: ~2.3
This package is not auto-updated.
Last update: 2024-09-14 14:36:49 UTC
README
简介
此Symfony2插件提供了一种简单的方法来管理网站广告。
先决条件
此版本的插件需要Symfony 2.3。
##安装
步骤 1: 使用composer下载AdManagerBundle
此库在 Packagist 上可用。
在您的 composer.json
中添加以下内容
"require": { ... "pasinter/admanager-bundle": "dev-master", ... }
然后运行
$ php composer.phar install
Composer将插件安装到您的项目的 vendor/pasinter
目录。
步骤 2: 启用插件
将插件添加到 app/AppKernel.php
public function registerBundles() { return array( ... new Pasinter\AdManagerBundle\PasinterAdManagerBundle(), ... ); }
步骤 3: 配置依赖关系
安装 & 配置 SonataAdminBundle (https://github.com/sonata-project/SonataAdminBundle) 和 SonataMediaBundle (https://github.com/sonata-project/SonataMediaBundle)
步骤 4: 更新您的数据库模式
$ php app/console doctrine:schema:update --force
+### 步骤 5: 更新您的 app/config/config.yml
sonata_media: contexts: admanager: providers: - sonata.media.provider.image formats: small: { width: 150 , quality: 95 } # use your desired format big: { width: 500 , quality: 90 } # use your desired format carousel: { width: 710, quality: 90} # use your desired format
用法
广告管理
登录到 http://app.com/app_dev.php/admin
。在“广告管理器”下可以管理广告和活动
广告
广告有链接、标题和图片字段。
活动
活动有唯一代码,可以在前端显示它们。