yii-ycm

YCM - Yii Content Management module

  • 所有者: janisto/yii-ycm
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

yii-ycm

YCM - Yii Content Management module

See examples for all the options.

Requirements

  • Yii 1.1.10 or above (Requires jQuery 1.7.1)

Installation

  • Download yii-ycm or clone the files to protected/modules/ycm
  • Edit Yii main configuration file protected/config/main.php. Enable module, set username, password and models you want to manage.
	'modules'=>array(
		...
		'ycm'=>array(
			'username'=>'YOUR USERNAME',
			'password'=>'YOUR PASSWORD',
			'registerModels'=>array(
				//'application.models.Blog', // one model
				'application.models.*', // all models in folder
			),
			'uploadCreate'=>true, // create upload folder automatically
			'redactorUpload'=>true, // enable Redactor image upload
		),
		...
	),

You can also use composer.

  • Require the package.
{
	"name": "app-name",
	"description": "App description",
	"type": "project",
	"prefer-stable": true,
	"require": {
		"php": ">=5.3.0",
		"yiisoft/yii": "1.1.14",
		"janisto/yii-ycm": "1.1.0",
	}
}
  • Add vendor path to your configuration file, enable module, set username, password and models you want to manage.
	'aliases'=>array(
		'vendor'=>realpath(__DIR__ . '/../../vendor'),
	),
	'modules'=>array(
		...
		'ycm'=>array(
			'class' =>'vendor.janisto.yii-ycm.YcmModule',
			'username'=>'YOUR USERNAME',
			'password'=>'YOUR PASSWORD',
			'registerModels'=>array(
				//'application.models.Blog', // one model
				'application.models.*', // all models in folder
			),
			'uploadCreate'=>true, // create upload folder automatically
			'redactorUpload'=>true, // enable Redactor image upload
		),
		...
	),
  • Add FileBehavior to your models if you are using file or image features. Add uploadPath and uploadUrl if you are not using the default uploads folder.
	...
	function behaviors() {
	    return array(
			'file' => array(
				'class'=>'application.modules.ycm.behaviors.FileBehavior',
				//'uploadPath'=>'/optional/path/to/uploads',
				//'uploadUrl'=>'http://optional.cdn.domain.com/uploads/path',
			),
	    );
	}
	...
  • FileBehavior methods:
$model = new Model;
echo $model->getFilePath('attribute');
echo $model->getFileUrl('attribute');
echo $model->getAbsoluteFileUrl('attribute');

Update

  • Clear assets folder.

Changelog

v1.1.4

  • Add Russian translation.

v1.1.3

  • Options to disable create, update and/or delete actions for a model.
  • Update libraries.
  • Fix: analytics setup forms with csrf validation.

v1.1.2

  • Improve FileBehavior
  • Update libraries.

v1.1.1

  • Fix time format.

v1.1.0

  • Add German translation.
  • Fix: behaviour class path.

v1.0.0

  • Fix: override options in all form widgets.
  • Add support for taggable behavior.
  • Add Chinese translation.
  • Update Finnish translation.
  • Improve Google Analytics statistics page.
  • Update libraries.
  • Update Composer support.

v0.5.0

  • Google Analytics statistics page.
  • Update yii-chosen to version v1.4.0
  • Update Redactor to 8.2.6
  • Composer support.
  • Fix: Better url & path handling.
  • Code cleanup.
  • Update Finnish translation.

v0.4.0

  • Update yii-chosen to version v1.1.0
  • Add first and last to pager.
  • Fix: allow auto login.

v0.3.0

  • Bootstrap typehead support.
  • Localization support and Finnish translation.
  • Fix: loadModel doesn't require PHP 5.3+ anymore.

v0.2.0

  • Initial version.

License

yii-ycm is free and unencumbered public domain software.

主要指標

概覽
名稱與所有者janisto/yii-ycm
主編程語言JavaScript
編程語言CSS (語言數: 4)
平台
許可證
所有者活动
創建於2012-10-26 13:31:00
推送於2014-12-05 12:57:07
最后一次提交2014-12-05 14:56:32
發布數10
最新版本名稱1.1.4 (發布於 )
第一版名稱0.2.0 (發布於 2012-11-01 15:49:32)
用户参与
星數38
關注者數13
派生數11
提交數113
已啟用問題?
問題數8
打開的問題數2
拉請求數3
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?