{"id":21448085,"url":"https://github.com/romdim/yii2-cms","last_synced_at":"2025-07-14T20:31:09.457Z","repository":{"id":57047463,"uuid":"42195133","full_name":"romdim/yii2-cms","owner":"romdim","description":"CMS based on Yii 2 framework","archived":false,"fork":false,"pushed_at":"2015-09-21T19:44:53.000Z","size":224,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-20T16:24:03.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romdim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGE.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-09T17:57:44.000Z","updated_at":"2018-12-18T11:49:54.000Z","dependencies_parsed_at":"2022-08-23T17:50:22.424Z","dependency_job_id":null,"html_url":"https://github.com/romdim/yii2-cms","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romdim%2Fyii2-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romdim%2Fyii2-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romdim%2Fyii2-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romdim%2Fyii2-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romdim","download_url":"https://codeload.github.com/romdim/yii2-cms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225994762,"owners_count":17556830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T03:13:58.619Z","updated_at":"2024-11-23T03:13:59.388Z","avatar_url":"https://github.com/romdim.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-cms\nCMS based on Yii 2 framework\n\nYii 2 CMS Based upon Practical-B Application Template\n======================================\n\nYii2 CMS is being developed as an alternative to all the heavy CMS out there that provide more than ever wanted,\nwithout giving the flexibility required by a web developer to build a site with simple forms for an admin or a\nmoderator to add content and nothing more. Based on the [Yii Framework](http://www.yiiframework.com/) and the\n[Yii 2 Practical-B Application Template](https://github.com/kartik-v/yii2-app-practical-b/) by\n[Kartik Visweswaran](https://github.com/kartik-v).\n\n\nWhat does it provide?\n---------------------\nModels created with migrations for posts, photo upload, redactor plugin for editing. \n\n\nYii2-practical-b\n---------------------\n\nThe [Yii 2 Practical-B Application Template](https://github.com/kartik-v/yii2-app-practical-b/) is a skeleton Yii 2 application based on the \n[yii2-basic template](https://github.com/yiisoft/yii2-app-basic/) best for\nrapidly creating small projects. The template allows a **practical** method to directly \naccess the application from the app root.\n\nThe template contains the basic features including user login/logout and a contact page.\nIt includes all commonly used configurations that would allow you to focus on adding new\nfeatures to your application.\n\nSOME KEY ADDITIONS\n-------------------\n\n1. [User Module](https://github.com/dektrium/yii2-user)\n2. [RBAC Module](https://github.com/dektrium/yii2-rbac)\n3. [Redactor Plugin](https://github.com/yiidoc/yii2-redactor)\n\nDIRECTORY STRUCTURE\n-------------------\n\n```\n    /                   contains the entry script and web resources\n    assets/             contains the web runtime assets\n    assets_b/           contains application assets such as JavaScript and CSS\n    commands/           contains console commands (controllers)\n    config/             contains application configurations\n    controllers/        contains Web controller classes\n    mail/               contains view files for e-mails\n    models/             contains model classes\n    runtime/            contains files generated during runtime\n    tests/              contains various tests for the yii2-practical-b application\n    vendor/             contains dependent 3rd-party packages\n    views/              contains view files for the Web application\n```\n\nREQUIREMENTS\n------------\n\nThe minimum requirement by this application template is that your Web server supports PHP 5.4.0.\n\n\nINSTALLATION\n------------\n\n### Install from an Archive File\n\nWill support this after first release.\n\n\n### Install via Composer\n\nIf you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions\nat [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).\n\nYou can then install this application template using the following command:\n\n~~~\nphp composer.phar global require \"fxp/composer-asset-plugin:1.0.0\"\nphp composer.phar create-project --prefer-dist romdim/yii2-cms yii2-cms\n~~~\n\nNow you should be able to access the application through the following URL, assuming `yii2-cms` is the directory\ndirectly under the Web root.\n\n~~~\nhttp://localhost/yii2-cms\n~~~\n\n\nCONFIGURATION\n-------------\n\n### Cookie Validation Key\n\nEdit the file `config/web.php` with a cookie validation key, for example:\n`8qMRb7Z4pO9uQ6180jVq8L10KMprgbd2`\n\n**NOTE:** You can generate random keys [here](http://randomkeygen.com/)!\n\n### Database\n\nEdit the file `config/db.php` with real data, for example:\n\n```php\nreturn [\n\t'class' =\u003e 'yii\\db\\Connection',\n\t'dsn' =\u003e 'mysql:host=localhost;dbname=yii2cms',\n\t'username' =\u003e 'root',\n\t'password' =\u003e '1234',\n\t'charset' =\u003e 'utf8',\n];\n```\n\n**NOTE:** Yii won't create the database for you, this has to be done manually before you can access it.\n\nAlso check and edit the other files in the `config/` directory to customize your application.\n\n### Updating database schema\n\nAfter you downloaded and configured yii2-cms, the last thing you need to do is updating your database schema by applying\nthe migration:\n\n```bash\n$ php yii migrate/up\n```\n\n### Administering users\n\nBy applying the migrations above, an admin, an editor and the according roles are created.\nAdmin's role is hardcoded in the user module within the `web.php`. The editor role is applied to both the aforementioned new users.\n\nLogin with:\n~~~\nadmin\nadmin\n~~~\nor\n~~~\neditor\neditor\n~~~\n\nAs an admin you can manage the users at page:\n\n~~~\nhttp://localhost/yii2-cms/user/admin\n~~~\n\n\n### Setting Upload Folder\n\nif you want to change the upload directory.\nto path/to/uploadfolder\ndefault value `@webroot/uploads`\n\n```\n    'modules' =\u003e [\n        'redactor' =\u003e [\n            'class' =\u003e 'yii\\redactor\\RedactorModule',\n            'uploadDir' =\u003e '@webroot/path/to/uploadfolder',\n            'uploadUrl' =\u003e '@web/path/to/uploadfolder',\n            'imageAllowExtensions'=\u003e['jpg','png','gif']\n        ],\n    ],\n```\n\nnote: You need to create uploads folder and chmod and set security for folder upload\nreference: [Protect Your Uploads Folder with .htaccess](http://tomolivercv.wordpress.com/2011/07/24/protect-your-uploads-folder-with-htaccess/),\n[How to Setup Secure Media Uploads](http://digwp.com/2012/09/secure-media-uploads/)\n\n### Using Redactor in forms\n\nConfig view/form\n\n```\n\u003c?= $form-\u003efield($model, 'body')-\u003ewidget(\\yii\\redactor\\widgets\\Redactor::className()) ?\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromdim%2Fyii2-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromdim%2Fyii2-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromdim%2Fyii2-cms/lists"}