mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +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
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