#title 수정한 테마 소스 [[TableOfContents]] 스타일은 좀 바뀌었다. 폰트하고 데코레이션 정도다.. 기본적으로는 아래의 소스다. ==== plugin/sidebar.php ==== {{{#!php // All rights reserved. Distributable under GPL see COPYING // a print action plugin for the MoniWiki // // $Id: print.php,v 1.4 2004/10/02 02:44:36 wkpark Exp $ function macro_sidebar() { global $DBInfo; $filename="./data/text/SideBar"; $fp=@fopen($filename,"r"); if (!$fp) { if (file_exists($filename)) { $out="You have no permission to see this page.\n\n"; $out.="See MoniWiki/AccessControl\n"; return $out; } $out=_("File does not exists"); return $out; } $fsize=filesize($filename); if ($fsize > 0) $body=fread($fp,$fsize); fclose($fp); return $body; } // vim:et:sts=2: ?> }}} ==== thema/ddt/header.php ==== {{{#!php trail /*|*/ /**/ include_once("plugin/sidebar.php"); $sidebar=macro_sidebar(); ?>
Home| page->name)."?action=print target=blank>Print"; ?>| Q/A| Guest| NewsLetter| RSS
Display context of search results Case-sensitive searching
trail?>
}}} ==== thema/ddt/footer.php ==== {{{#!php
}}} ==== Comment.php ==== {{{#!php // All rights reserved. Distributable under GPL see COPYING // a Wiki comment plugin for the MoniWiki // // Usage: [[Comment]], ?action=comment // // // $Id: Comment.php,v 1.24 2006/07/15 01:16:00 wkpark Exp $ function macro_Comment($formatter,$value,$options=array()) { global $DBInfo; if (!$options['page']) $options['page']=$formatter->page->name; if ($value) { $args=explode(',',$value); if (in_array('usemeta',$args)) $use_meta=1; } if ($options['usemeta'] or $use_meta) { $hidden="\n"; } if ($options['nocomment']) return ''; #if (!$DBInfo->_isWritable($options['page'])) return ''; if (!$DBInfo->security->writable($options)) return ''; $COLS_MSIE = 80; $COLS_OTHER = 85; $cols = preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']) ? $COLS_MSIE : $COLS_OTHER; $rows=$options['rows'] > 5 ? $options['rows']: 5; $cols=$options['cols'] > 60 ? $options['cols']: $cols; if ($options['datestamp']) $datestamp= $options['datestamp']; else $datestamp= $formatter->page->mtime(); $savetext=$options['savetext']; $savetext= str_replace(array("&","<"),array("&","<"),$savetext); if (!$options['id']) { $user=new User(); # get from COOKIE VARS $options['id']=$user->id; } $url=$formatter->link_url($formatter->page->urlname); if ($value) $hidden.=''; $form = "
\n댓글 남기기.."; $form.= <<$savetext
FORM; /* if ($options['id'] == 'Anonymous') $sig=_("Username").": "; else if (!$use_meta) $sig=""._("Don't add a signature"); */ $sig=_("이름: ").": "; $comment=_("Comment"); $preview=_("Preview"); $ttt = time(); $captcha_img = "오른쪽의 새로고침을 클릭해 주세요."; $form.= << 새로고침 FORM2; return '
'.$form.'
'; } function do_comment($formatter,$options=array()) { global $DBInfo; include '/home1/yasicom/public_html/zmSpamFree/zmSpamFree.php'; if ( !zsfCheck( $_POST['zsfCode'] ) ) { echo ""; echo "

ㅡㅡ;;

"; echo ""; return; } else { if (!$DBInfo->security->writable($options)) { $formatter->preview=1; $options['title']=_("Page is not writable"); do_invalid($formatter,$options); return; } else if (!$DBInfo->hasPage($options['page'])) { $options['err']=_("You are not allowed to add a comment."); $options['title']=_("Page does not exists"); do_invalid($formatter,$options); return; } if ($options['usemeta']) $use_meta=1; $COLS_MSIE = 80; $COLS_OTHER = 85; $cols = preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT']) ? $COLS_MSIE : $COLS_OTHER; $rows=$options['rows'] > 5 ? $options['rows']: 8; $cols=$options['cols'] > 60 ? $options['cols']: $cols; $url=$formatter->link_url($formatter->page->urlname); $button_preview=$options['button_preview']; if ($options['savetext']) { $savetext=_stripslashes($options['savetext']); $savetext=str_replace("\r","",$savetext); $savetext=rtrim($savetext); #$savetext=str_replace("<","<",$savetext); } if ($savetext and !$button_preview and $DBInfo->spam_filter) { $text=$savetext; $fts=preg_split('/(\||,)/',$DBInfo->spam_filter); foreach ($fts as $ft) { $text=$formatter->filter_repl($ft,$text,$options); } if ($text != $savetext) { $button_preview=1; $options['msg'] = _("Sorry, can not save page because some messages are blocked in this wiki."); } } if ($button_preview && $options['savetext']) { $formatter->send_header("",$options); $formatter->send_title(_("Preview comment"),"",$options); $formatter->send_page($savetext."\n----"); $options['savetext']=$savetext; print macro_Comment($formatter,'',$options); print $formatter->macro_repl('EditHints'); $formatter->send_footer("",$options); return; } else if (!$savetext) { $formatter->send_header("",$options); $formatter->send_title(_("Add comment"),"",$options); print macro_Comment($formatter,'',$options); print $formatter->macro_repl('EditHints'); $formatter->send_footer("",$options); return; } $datestamp= $options['datestamp']; if ($formatter->page->mtime() > $datestamp) { $options['msg']=''; $formatter->send_header('',$options); $formatter->send_title(_("Error: Don't make a clone!"),'',$options); $formatter->send_footer('',$options); return; } $body=$formatter->page->get_raw_body(); $options['id']='Anonymous'; if ($options['id']=='Anonymous') $id=$options['name'] ? _stripslashes($options['name']):$_SERVER['REMOTE_ADDR']; else $id=$options['id']; $date=date('Y-m-d H:i:s'); if ($use_meta) { $date=gmdate('Y-m-d H:i:s').' GMT'; $idx=1; if (preg_match_all('/-{4,}\nComment-Id:\s*(\d+)\n/m',$body,$m)) { $idx=$m[1][sizeof($m[1])-1]+1; } if ($options['id']!='Anonymous') $id='[admin]'; $meta=<<page->write($body); $DBInfo->savePage($formatter->page,"Comment added",$options); $options['msg']=sprintf(_("%s is commented successfully"),$formatter->link_tag($formatter->page->urlname,"?action=show",$options['page'])); $title=_("Comment added successfully"); $myrefresh=''; if ($DBInfo->use_save_refresh) { $sec=$DBInfo->use_save_refresh - 1; $lnk=$formatter->link_url($formatter->page->urlname,"?action=show"); $myrefresh='Refresh: '.$sec.'; url='.qualifiedURL($lnk); } $formatter->send_header($myrefresh,$options); $formatter->send_title($title,'',$options); $opt['pagelinks']=1; # re-generates pagelinks $formatter->send_page('',$opt); $formatter->send_footer('',$options); return; } } // vim:et:sts=2:sw=2 ?> }}}