mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
c229839f2b 보완 스킨에서 처리하지 않고 commentItem 에서 처리 하고 기본 메세지 내용 추가
This commit is contained in:
parent
f334a3e6e1
commit
cc57e117c9
3 changed files with 30 additions and 6 deletions
|
|
@ -440,7 +440,7 @@ class CommentItem extends BaseObject
|
|||
return false;
|
||||
}
|
||||
|
||||
function getContentPlainText($strlen = 0)
|
||||
function getContentPlainText($strlen = 0, $default_content = '')
|
||||
{
|
||||
if($this->isDeletedByAdmin())
|
||||
{
|
||||
|
|
@ -465,7 +465,20 @@ class CommentItem extends BaseObject
|
|||
{
|
||||
$content = cut_str($content, $strlen, '...');
|
||||
}
|
||||
return escape($content);
|
||||
|
||||
$content = escape($content);
|
||||
|
||||
if ($content === '')
|
||||
{
|
||||
return $default_content;
|
||||
}
|
||||
|
||||
if ($content === '0')
|
||||
{
|
||||
return '0';
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -563,7 +576,7 @@ class CommentItem extends BaseObject
|
|||
* Return summary content
|
||||
* @return string
|
||||
*/
|
||||
function getSummary($str_size = 50, $tail = '...')
|
||||
function getSummary($str_size = 50, $tail = '...', $default_content = '')
|
||||
{
|
||||
// Remove tags
|
||||
$content = $this->getContent(false, false);
|
||||
|
|
@ -578,8 +591,19 @@ class CommentItem extends BaseObject
|
|||
|
||||
// Truncate string
|
||||
$content = cut_str($content, $str_size, $tail);
|
||||
$content = escape($content);
|
||||
|
||||
return escape($content);
|
||||
if ($content === '')
|
||||
{
|
||||
return $default_content;
|
||||
}
|
||||
|
||||
if ($content === '0')
|
||||
{
|
||||
return '0';
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
function getRegdate($format = 'Y.m.d H:i:s', $conversion = true)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<ul class="lt">
|
||||
<li loop="$comment_list => $no,$comment">
|
||||
<a href="{getUrl('','document_srl',$comment->document_srl)}#comment_{$comment->comment_srl}" target="_blank">
|
||||
{$comment->getSummary() === "0" ? "0" : ($comment->getSummary() ?: $lang->msg_no_text_comment)}
|
||||
{$comment->getSummary(50, '...', $lang->msg_no_text_comment)}
|
||||
<span class="memberInfo">{$comment->getRegdate("Y-m-d")}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<td>{$no}</td>
|
||||
<td>
|
||||
<a href="{getUrl('','document_srl',$comment->document_srl)}#comment_{$comment->comment_srl}" target="_blank">
|
||||
{$comment->getSummary() === "0" ? "0" : ($comment->getSummary() ?: $lang->msg_no_text_comment)}
|
||||
{$comment->getSummary(50, '...', $lang->msg_no_text_comment)}
|
||||
</a>
|
||||
</td>
|
||||
<td>{$comment->getRegdate("Y-m-d")}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue