diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index 824f7a928..a4b852181 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -154,7 +154,7 @@ return htmlspecialchars($content); } - function getContent($add_comment_info = true) { + function getContent($add_popup_menu = true, $add_content_info = true) { if($this->isSecret() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $content = $this->get('content'); @@ -162,25 +162,22 @@ // url에 대해서 정규표현식으로 치환 $content = preg_replace('!([^>^"^\'^=])(http|https|ftp|mms):\/\/([^ ^<^"^\']*)!is','$1$2://$3',' '.$content); - // 추가 정보 출력을 하지 않는 경우 - if(!$add_comment_info) { + // 이 댓글을... 팝업메뉴를 출력할 경우 + if($add_popup_menu) { + $content = sprintf( + '%s
%s
', + $content, + $this->comment_srl, Context::getLang('cmd_comment_do') + ); + } + + // 컨텐츠에 대한 조작이 가능한 추가 정보를 설정하였을 경우 + if($add_content_info) { $content = sprintf( '
%s
', $this->comment_srl, $this->get('member_srl'), $this->comment_srl, $this->get('member_srl'), $content, - $this->comment_srl, $this->get('member_srl'), - $this->comment_srl, $this->get('member_srl') - ); - // 추가 정보 출력을 하지 않는 경우 "이 댓글을.." 메뉴 추가 - } else { - $content = sprintf( - '
%s
%s
', - $this->comment_srl, $this->get('member_srl'), - $this->comment_srl, $this->get('member_srl'), - $content, - $this->comment_srl, Context::getLang('cmd_comment_do'), - $this->comment_srl, $this->get('member_srl'), $this->comment_srl, $this->get('member_srl') ); } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 85645d6d0..f362fa5b2 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -209,7 +209,7 @@ return htmlspecialchars($content); } - function getContent($add_document_info = true) { + function getContent($add_popup_menu = true, $add_content_info = true) { if(!$this->document_srl) return; if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret'); @@ -221,8 +221,17 @@ // url에 대해서 정규표현식으로 치환 $content = preg_replace('!([^>^"^\'^=])(http|https|ftp|mms):\/\/([^ ^<^"^\']*)!is','$1$2://$3',' '.$content); - // 추가 정보 출력을 하지 않는 경우 - if(!$add_document_info) { + // 이 게시글을... 팝업메뉴를 출력할 경우 + if($add_popup_menu) { + $content = sprintf( + '%s
%s
', + $content, + $this->document_srl, Context::getLang('cmd_document_do') + ); + } + + // 컨텐츠에 대한 조작이 가능한 추가 정보를 설정하였을 경우 + if($add_content_info) { $content = sprintf( '
%s
', $this->document_srl, $this->get('member_srl'), @@ -231,18 +240,8 @@ $this->document_srl, $this->get('member_srl'), $this->document_srl, $this->get('member_srl') ); - // 추가 정보를 출력시 "이 게시물을..'이라는 메뉴 추가 - } else { - $content = sprintf( - '
%s
%s
', - $this->document_srl, $this->get('member_srl'), - $this->document_srl, $this->get('member_srl'), - $content, - $this->document_srl, Context::getLang('cmd_document_do'), - $this->document_srl, $this->get('member_srl'), - $this->document_srl, $this->get('member_srl') - ); } + return $content; } diff --git a/modules/document/tpl/css/document.css b/modules/document/tpl/css/document.css index fec819620..3397e16ee 100644 --- a/modules/document/tpl/css/document.css +++ b/modules/document/tpl/css/document.css @@ -3,3 +3,5 @@ .document_list input { float:left; margin-right:10px; } .document_list address { float:left; width:100px; margin-right:10px; overflow:hidden; white-space:nowrap;} .document_list .document_title { } + +div.printContent { padding:20px; } diff --git a/modules/document/tpl/print_page.html b/modules/document/tpl/print_page.html index 60a495e73..27b100108 100644 --- a/modules/document/tpl/print_page.html +++ b/modules/document/tpl/print_page.html @@ -1,15 +1,18 @@ -

{$oDocument->getTitleText()}

+
-
{$oDocument->get('nick_name')}
-
{$oDocument->getRegdate()}
+

{$oDocument->getTitleText()}

-
+
{$oDocument->get('nick_name')}
+
{$oDocument->getRegdate()}
-
{$oDocument->getContent(false)}
+
+
{$oDocument->getContent(false, false)}
+ +