schere软件/cake-wiki

CakePHP应用的简单Wiki

安装: 1,302

依赖项: 0

建议者: 0

安全: 0

星标: 3

关注者: 5

分支: 1

开放问题: 0

类型:cakephp-plugin

v1.0.5 2016-11-17 14:05 UTC

This package is auto-updated.

Last update: 2024-09-21 19:14:48 UTC


README

CakePHP 3 Websocket  Plugin

Build Status License

这是一个为cakephp提供的简单插件,允许创建分层Wiki页面。

需求

安装

####1. 使用composer要求插件

$ composer require scherersoftware/cake-wiki

2. 使用composer包含插件

在项目文件夹中打开终端并运行以下命令

$ composer update
$ composer install

3. 在你的 config/bootstrap.php 中加载插件

Plugin::load('Scherersoftware/Wiki', ['bootstrap' => true, 'routes' => true]);

4. 在你的数据库中创建表 'wiki-pages'

此插件需要在你的项目数据库中创建额外的表。运行以下SQL查询以创建表。

CREATE TABLE `wiki_pages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) unsigned DEFAULT NULL,
  `lft` int(10) DEFAULT NULL,
  `rght` int(10) DEFAULT NULL,
  `sort` int(3) unsigned DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `content` mediumtext,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

或者运行迁移:

bin/cake migrations migrate -p Scherersoftware/Wiki

有关更多信息,请参阅 'vendor/scherersoftware/cake-wiki/config/schma.php''config/wiki_pages.sql'

5. 使用FrontendBridge加载额外的JS文件

有其他方式包含所有需要的js文件,但我们强烈建议使用我们的FrontendBridge插件,因为如果你使用它,你只需要在你的'assets.ctp'文件中添加以下行:

echo $this->FrontendBridge->getAppDataJs();

这会加载javascript文件,启用Ace Editor,这是用于编辑Wiki内容的UI的关键部分。

使用方法

根据您的需求配置访问权限,并让您的用户创建分层Wiki页面!