mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
*. 글에 대한 댓글도 알림 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4328 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
22368001d8
commit
c5765c2853
4 changed files with 52 additions and 22 deletions
|
|
@ -13,6 +13,7 @@
|
|||
<column name="entrytitle" />
|
||||
<column name="comment" />
|
||||
<column name="notified_srl" />
|
||||
<column name="remoteid" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="tcnotified.siteid" var="tcnotifiedsites.id" />
|
||||
|
|
|
|||
|
|
@ -114,21 +114,18 @@
|
|||
{
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oComment = $oCommentModel->getComment($obj->comment_srl);
|
||||
if($oComment->get('parent_srl'))
|
||||
$output = $this->insertCommentNotifyQueue($obj->comment_srl);
|
||||
if($output->toBool())
|
||||
{
|
||||
$output = $this->insertCommentNotifyQueue($obj->comment_srl);
|
||||
if($output->toBool())
|
||||
if(!file_exists($this->cachedir.$this->cachefile))
|
||||
{
|
||||
if(!file_exists($this->cachedir.$this->cachefile))
|
||||
if(!file_exists($this->cachedir))
|
||||
{
|
||||
if(!file_exists($this->cachedir))
|
||||
{
|
||||
mkdir($this->cachedir);
|
||||
}
|
||||
$fp = fopen($this->cachedir.$this->cachefile, "w");
|
||||
fwrite($fp, "aa");
|
||||
fclose($fp);
|
||||
mkdir($this->cachedir);
|
||||
}
|
||||
$fp = fopen($this->cachedir.$this->cachefile, "w");
|
||||
fwrite($fp, "aa");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
return new Object();
|
||||
|
|
@ -148,21 +145,34 @@
|
|||
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oChild = $oCommentModel->getComment($comment_srl);
|
||||
|
||||
if(!$oChild->isExists())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$document_srl = $oChild->get('document_srl');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
$oParent = null;
|
||||
$parent_srl = $oChild->get('parent_srl');
|
||||
if(!$parent_srl)
|
||||
{
|
||||
return;
|
||||
$oParent = $oDocumentModel->getDocument($document_srl);
|
||||
}
|
||||
$oParent = $oCommentModel->getComment($parent_srl);
|
||||
else
|
||||
{
|
||||
$oParent = $oCommentModel->getComment($parent_srl);
|
||||
}
|
||||
|
||||
if(!$oParent->isExists())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$parentHomepage = $oParent->getHomepageUrl();
|
||||
$oMemberModel = &getModel('member');
|
||||
if(!$parentHomepage)
|
||||
|
|
@ -176,6 +186,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
$childHomepage = $oChild->getHomepageUrl();
|
||||
if(!$childHomepage)
|
||||
{
|
||||
|
|
@ -187,11 +198,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
$document_srl = $oChild->get('document_srl');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
||||
if($this->SendNotifyRequest($parentHomepage, &$module_info, &$oDocument, &$oParent, $parentHomepage, &$oChild, $childHomepage) != 200)
|
||||
|
|
@ -214,8 +220,17 @@
|
|||
$oReq->addPostData('s_name', $oDocument->getNickName());
|
||||
$oReq->addPostData('s_url', $oDocument->getPermanentUrl());
|
||||
$oReq->addPostData('s_no', $oDocument->document_srl);
|
||||
|
||||
$oReq->addPostData('r1_name', $oParent->getNickName());
|
||||
$oReq->addPostData('r1_no', $oParent->comment_srl);
|
||||
if($oChild->get('parent_srl'))
|
||||
{
|
||||
$oReq->addPostData('r1_no', $oParent->comment_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oReq->addPostData('r1_no', '-1');
|
||||
}
|
||||
|
||||
$oReq->addPostData('r1_pno', $oDocument->document_srl);
|
||||
$oReq->addPostData('r1_rno', '0');
|
||||
$oReq->addPostData('r1_homepage', $parentHomepage);
|
||||
|
|
@ -228,7 +243,16 @@
|
|||
$oReq->addPostData('r2_homepage', $childHomepage);
|
||||
$oReq->addPostData('r2_regdate', ztime($oChild->get('regdate')));
|
||||
$oReq->addPostData('r2_url', sprintf("%s#comment_%s", $oDocument->getPermanentUrl(), $oChild->comment_srl));
|
||||
$oReq->addPostData('r1_body', strip_tags($oParent->get('content')));
|
||||
|
||||
if($oChild->get('parent_srl'))
|
||||
{
|
||||
$oReq->addPostData('r1_body', strip_tags($oParent->get('content')));
|
||||
}
|
||||
else
|
||||
{
|
||||
$oReq->addPostData('r1_body', $oParent->getContentText(250));
|
||||
}
|
||||
|
||||
$oReq->addPostData('r2_body', strip_tags($oChild->get('content')));
|
||||
|
||||
$oReq->sendRequest(false);
|
||||
|
|
@ -271,6 +295,10 @@
|
|||
$siteid = $oModel->GetSite( $obj->url );
|
||||
$module_info = Context::get('current_module_info');
|
||||
$module_srl = $module_info->module_srl;
|
||||
if(!$obj->r1_no)
|
||||
{
|
||||
$obj->r1_no = -1;
|
||||
}
|
||||
|
||||
if( $siteid == -2 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<tbody>
|
||||
<!--@foreach($notify_list as $no => $val)-->
|
||||
{@ $parent = $val->parent; }
|
||||
<tr class="parent">
|
||||
<tr <!--@if($parent->remoteid == -1)--> class="parentDocument" <!--@else-->class="parent"<!--@end--> >
|
||||
<td><input type="checkbox" name="cart" value="{$parent->notified_srl}" /></td>
|
||||
<td class="date">{zdate($parent->written, "Y/m/d")}</td>
|
||||
<td><a href="{$parent->siteurl}">{$parent->title?$parent->title:"[No title]"}</a></td>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
.parent td { background-color : #fff9ff; }
|
||||
.parent td { background-color : #fff0ff; }
|
||||
.parentDocument td { background-color : #f0ffff; }
|
||||
.date { font-size : 0.9em; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue