Skip to content

Commit

Permalink
refs #1543
Browse files Browse the repository at this point in the history
  * 카테고리 링크 / 태그 링크 추가.
  * [[ct:Word]], [[tg:Word]] 식.
  • Loading branch information
inureyes committed Jan 9, 2011
1 parent 631378d commit 1e45e43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions plugins/WikiCube/index.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/* WikiCube
----------------------------------
Version 0.1
Version 0.12
Starts at : Apr. 5, 2006
Last modified at : Jan. 3, 2011
Last modified at : Jan. 9, 2011
jeongkyu Shin.
E-mail : [email protected]
Expand All @@ -19,6 +19,9 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
12. category link added.
11. tag link added.
10. error page post added.
*/

function WikiCube_FormatContent($target, $mother) {
Expand All @@ -28,7 +31,9 @@ function WikiCube_FormatContent($target, $mother) {

$context = Model_Context::getInstance();
$pattern = array(
'/\[\[(.*?)\]\]/' => '<a href="'.$context->getProperty('uri.blog').'/'.$config['mode'].'/$1'.'">$1</a>'
'/\[\[(.*?)\]\]/' => '<a href="'.$context->getProperty('uri.blog').'/'.$config['mode'].'/$1'.'">$1</a>',
'/\[\[tg:(.*?)\]\]/' => '<a href="'.$context->getProperty('uri.blog').'/tag/$1'.'">$1</a>',
'/\[\[ct:(.*?)\]\]/' => '<a href="'.$context->getProperty('uri.blog').'/category/$1'.'">$1</a>'
);
foreach ($pattern as $original => $replaced)
$target = preg_replace($original, $replaced, $target);
Expand Down
2 changes: 1 addition & 1 deletion plugins/WikiCube/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin version="2.0">
<title xml:lang="en">WikiCube</title>
<title xml:lang="ko">WikiCube</title>
<version>0.1</version>
<version>0.12</version>
<description xml:lang="en">Add Wiki-like environment to Textcube.</description>
<description xml:lang="ko"><![CDATA[위키식의 사용 기능을 텍스트큐브에 추가합니다.]]></description>
<license>GPL</license>
Expand Down

0 comments on commit 1e45e43

Please sign in to comment.