|
Build a Wiki System With Drupal8 ?9 b: z" z% m2 `" @# w2 N
作者: Raincity Studios---- zamir2 ], R8 h' ^8 k, L" L8 |* ]; o
Wiki是什么? Wiki概念发明人沃德·坎宁安(Ward Cunningham)为Wiki下了定义:一群相互连接并可自由扩展的网页、一套用来储存与修改信息的超文字系统,所有的网页储存在一套数据库中,任何人透过具有表单功能的浏览器用户程序,皆可轻易加以编辑。
( V5 Q% W, r) M$ D* g aWiki的特点
, i" w( x" L/ `# h1.使用方便,维护快捷:快速创建、存取、更改超文本页面(这也是为什幺叫作“wiki wiki”的原因)。格式简单:用简单的格式标记来取代 HTML 的复杂格式标记。(类似所见即所得的风格)链接方便:通过简单标记,直接以关键字名来建立链接(页面、外部连接、图像等)。命名平易:关键字名就是页面名称,并且被置于一个单层、平直的名空间中。( a' {4 l5 Q- }5 V3 A) }
2.有组织
; j( P8 q& F9 I! N0 Z! Z自组织的:同页面的内容一样,整个超文本的组织结构也是可以修改、演化的。可汇聚的:系统内多个内容重复的页面可以被汇聚于其中的某个,相应的链接结构也随之改变。3 n! I, N/ W @3 A# e
3.可增长 e9 W6 p- i8 F" f' U
可增长:页面的链接目标可以尚未存在,通过点击链接,我们可以创建这些页面,从而使系统得到增长。修订历史:记录页面的修订历史,页面的各个版本都可以被获取。% X- }7 I, c1 V% Y! a) ]* z4 I X
4.开放性6 p& K \& [' u8 s- Q# E
开放的:社群的成员可以任意创建、修改、删除页面。可观察:系统内页面的变动可以被访问者观察到。 . X" c! w4 f" G) ?3 O% q. `
需要的模块
! X, ]" X) ^; S1.Freelinking (http://drupal.org/project/freelinking) Provides the ability to easilylink between pages6 _& u$ q1 @0 T( f' |
2.Markdown filter (http://drupal.org/project/markdown) Provides an easy, human-readable way to enter HTML formatting
A! ]. a/ K( m8 x3.Diff (http://drupal.org/project/diff)Shows color-coded list of changes between two revisions of content) g' C/ I; g6 t
4.Pathauto (http://drupal.org/project/pathauto)Automatically creates clean, search-engine-friendly URLs: H0 A) O; g( M) C9 }
5.Token (http://drupal.org/project/token)A utility module to provide variables that are later replaced with dynamic bits,such as [user-name]# P9 J* l0 h" P/ k" A
6.CCK (http://drupal.org/project/cck)
7 W3 S1 @. E- Y# b' E# Y( W第一步:启用以下模块4 Y5 \9 S0 s+ q* x: B
6 {0 e: G: z& N2 y* ldiff
' e' I% W B0 M2 Rmarkdown5 O \: k- s& b" J: J0 z
pathauto3 _3 T6 J* g! s7 A8 `
freelinking1 v. i \$ }6 c9 s6 s& {7 V
token8 d6 P" ~2 A5 w, x) ~
content
5 _( d0 E& i: Y# R- Scontent permissions" j* l. v, |! t2 G7 [, q
) Z8 Y( r/ C0 {7 f. h! I2 P5 o
第二步:添加一个新的内容类型
Name: "Wiki page"
3 S) c- Q! g5 @7 w; I3 zType: wiki
8 q, M, O+ L' S( aDescription: "A page that any authenticated user may editand view changes."
7 C' O$ {+ [9 [9 P1 o0 JWorkflow settings: in "Default options": uncheck "Promoted to front page", check "Create new revision" 9 v, _% D) T1 C% q$ l& [4 R
第三步:去掉作者信息的显示 Go to admin/build/themes/settings _* h- Z) `+ Y5 {
第四步:权限设置
9 Z, i/ T) o7 ]2 W8 gSet the permissions "create wiki content" and "edit anywiki content" for "authenticated user"
0 S& k2 P) K" h9 j1 p9 P rSet the permissions "revert revisions" and "view revisions"for "authenticated user"
; n$ G: Q' M$ z* x$ d2 l& S第五步:添加wiki输入格式0 D! n0 A' q) r1 l: |( ]
Name: "Wiki"% c" ~& A; i9 w5 Z
Filter: check "Markdown" and "freelinking filter", uncheck
! A* ~/ o h C' Qothers
5 o. c/ \' ?* `8 _1 y
1 B: C* ^+ ]+ `! ^第六步:输入格式设置4 Y& ?! a: G B, O0 K7 J
Go to admin/settings/filters, set the "Wiki" filter to the Default format.
. j9 a' n9 Y! Y1 G: g# g5 M
第七步:freelinking设置4 {% ? r$ G9 h3 ^- |
Go to admin/settings/freelinking, change the "Default for new content" to "Wiki page". 2 N% ?1 W6 I3 q; O# r- h
第八步:pathauto设置$ d9 \$ H& v4 h: m9 L
go to admin/build/path/pathauto, expand the "Node pathsettings" fieldset and in the "Pattern for all Wiki page paths", enter "community/animepedia/[title-raw]". + J5 z& ?- m2 J' ^
型动视觉www.doooor.com转自Drupal 建站网 / M5 U; \# a4 c1 N" C# }
9 Z1 {7 q" Q' y3 n W" V9 n+ D7 E
|