mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-02-01 17:49:58 +09:00
* 댓글알리미 애드온 추가 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
de2b57c2d2
commit
22368001d8
2 changed files with 46 additions and 0 deletions
10
addons/tccommentnotify/conf/info.xml
Normal file
10
addons/tccommentnotify/conf/info.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<addon version="0.2">
|
||||||
|
<title xml:lang="ko">댓글알리미 애드온</title>
|
||||||
|
<author email_address="haneul0318@seungyeop.kr" link="http://www.seungyeop.kr" date="2008. 6. 2">
|
||||||
|
<name xml:lang="ko">haneul</name>
|
||||||
|
<description xml:lang="ko">
|
||||||
|
댓글알리미를 지원하는 애드온입니다.
|
||||||
|
</description>
|
||||||
|
</author>
|
||||||
|
</addon>
|
||||||
36
addons/tccommentnotify/tccommentnotify.addon.php
Normal file
36
addons/tccommentnotify/tccommentnotify.addon.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
if(!defined("__ZBXE__")) exit();
|
||||||
|
|
||||||
|
if(Context::getRequestMethod() == "XMLRPC" || Context::getResponseMethod() == "XMLRPC")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Context::getRequestMethod() == "POST" && $called_position == 'before_module_proc') {
|
||||||
|
$mode = $_REQUEST['mode'];
|
||||||
|
if(!$mode || $mode != "fb")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$oController = &getController('tccommentnotify');
|
||||||
|
$oController->procNotifyReceived();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($called_position == "after_module_proc")
|
||||||
|
{
|
||||||
|
$oModel = &getModel('tccommentnotify');
|
||||||
|
if($oModel->checkShouldNotify())
|
||||||
|
{
|
||||||
|
$scriptCode = <<<EndOfScript
|
||||||
|
<script type="text/javascript">
|
||||||
|
// <![CDATA[
|
||||||
|
exec_xml("tccommentnotify", "procDoNotify");
|
||||||
|
// ]]>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
EndOfScript;
|
||||||
|
Context::addHtmlHeader($scriptCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue