-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 카테고리 링크 / 태그 링크 추가. * [[ct:Word]], [[tg:Word]] 식.
- Loading branch information
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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) { | ||
|
@@ -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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters