exportwikiinclude
This is an old revision of the document!
일반 웹페이지에서 자바스크립트로 위키페이지 인클루드하기 위한 코드
사용방법
start페이지를 인클루드 할때 다음과 같은 html코드를 작성한다. id=start라고 했는데, start는 페이지 이름으로 start를 원하는 페이지로 바꾸면 된다.
<div class="wikiinclude"> <script language="Javascript" src="/wiki/doku.php?id=start&do=export_wikiinclude"></script> Please edit the wiki to contribute any updates or corrections. </div>
wikiinclude
doku.php의 명령으로 export_wikiinclude를 추가하기.
inc/actions.php 206
if($act == 'export_wikiinclude') $act = 'export_wikiinclude';
inc/actions.php 591
case 'wikiinclude': $headers['Content-Type'] = 'text/javascript; charset=utf-8'; $output = p_wiki_xhtml($ID,$REV,false); $output = str_replace('"','\"',$output); $output = str_replace(DOKU_LF,'\n\\ ',$output); $pre .= 'var wikibody = "\n\\' . DOKU_LF; $post .= '";document.write(wikibody);' . DOKU_LF; $post .= 'document.write("<br/><hr/>This page was autogenerated from <a href=\"http://donghee8.com/wiki/doku.php?id='; $post .= $ID; $post .= '\">wiki</a>.");' . DOKU_LF; break;
exportwikiinclude.1313091665.txt.gz · Last modified: 2018/07/18 14:09 (external edit)