mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
ë 몬í ì ëì¨ì ê¸ê³¼ ëê¸ì ì´ë¤ urlìì ë¶ë ¤ì§ëë¼ë ê³ ì urlì ì´ì©íëí ì ìëë¡ ê¸°ë¥ ì¶ê°
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3466 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3fdfd184e3
commit
2598cb96af
1 changed files with 20 additions and 4 deletions
|
|
@ -12,10 +12,26 @@
|
|||
* before_display_content 에서만 요청이 됩니다.
|
||||
**/
|
||||
|
||||
if(Context::get('module')=='admin' || $called_position != 'before_module_init') return;
|
||||
if(Context::getResponseMethod()=="XMLRPC") return;
|
||||
|
||||
$sid = $addon_info->sid;
|
||||
// 모듈의 실행 이후에 script를 추가함
|
||||
if(Context::get('module')!='admin' && $called_position == 'after_module_proc' ) {
|
||||
if($this->getLayoutFile() != 'popup_layout.html') {
|
||||
$sid = $addon_info->sid;
|
||||
if($sid) {
|
||||
Context::addHtmlFooter(sprintf('<script src="http://script.lemonpen.com/site/lemonpen.js?sid=%s" type="text/javascript" charset="UTF-8"></script>', $sid));
|
||||
$GLOBALS['__lemonpen_is_called__'] = true;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Context::addJsFile()을 이용하면 끝
|
||||
if($sid) Context::addHtmlFooter(sprintf('<script src="http://script.lemonpen.com/site/lemonpen.js?sid=%s" type="text/javascript" charset="UTF-8"></script>', $sid));
|
||||
// 제로보드XE의 문서와 permant link를 레몬펜의 규약에 맞춰서 출력
|
||||
if($GLOBALS['__lemonpen_is_called__'] && $called_position == 'before_display_content') {
|
||||
// 글 본문을 링크
|
||||
$output = preg_replace('/<div class="document_([0-9]+)_([0-9]+) xe_content">/is','<div class="document_$1_$2 xe_content hentry"><a href="'.getUrl('','document_srl',"$1").'" rel="bookmark" style="display:none;">'.getUrl('','document_srl',"$1").'</a>', $output);
|
||||
|
||||
// 댓글 본문을 링크
|
||||
$output = preg_replace('/<div class="comment_([0-9]+)_([0-9]+) xe_content">/is','<div class="comment_$1_$2 xe_content hentry"><a href="'.getUrl('','document_srl',"$1").'" rel="bookmark" style="display:none;">'.getUrl('','document_srl',"$1").'</a>', $output);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue