rhymix/addons/tccommentnotify/tccommentnotify.addon.php
haneul 22368001d8 #484
* 댓글알리미 애드온 추가


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4327 201d5d3c-b55e-5fd7-737f-ddc643e51545
2008-06-25 23:13:45 +00:00

36 lines
920 B
PHP

<?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);
}
}
?>