return array(
'ExternalAuth',
'LoginSuccess',
+ 'FormExtra',
+ 'PostAddComment',
);
}
function event_ExternalAuth(&$data)
{
if ($this->flgLoggedin) return;
+ $authPlugins = array('OpenId');
+ if (!in_array($data['externalauth']['source'], $authPlugins)) return;
global $manager;
$pluginName = 'NP_' . $data['externalauth']['source'];
if ($manager->pluginInstalled($pluginName)) {
$this->authModule = $data['member'];
}
+ function event_PostAddComment($data) {
+ global $manager;
+ $comment = $data['comment'];
+ if (intval(getNucleusVersion()) >= 330) {
+ $email = $comment['email'];
+ } else {
+ $email = $comment['userid'];
+ }
+ if (postVar('EzComment2_Secret')) {
+ $secCheck = 1;
+ } else {
+ $secCheck = 0;
+ }
+ $sql = 'INSERT INTO ' . sql_table('plug_ezcomment2') . '(`comid`, `secflg`) VALUES (%d, %d)';
+ sql_query(sprintf($sql, $comment['commentid'], $secCheck));
+ }
+
function install()
{
if (!TEMPLATE::exists('EzCommentTemplateDefault')) {
}
}
+ function event_FormExtra(&$data) {
+ $this->numcalled++;
+ echo '<br /><input type="checkbox" value="1" name="EzComment2_Secret" id="EzComment2_Secret_' . $this->numcalled . '" />';
+ echo '<label for="EzComment2_Secret_' . $this->numcalled . '">'.$this->getOption('secLabel').'</label><br />';
+ }
+
function uninstall()
{
if ($this->getOption('tabledel') == 'yes')
} else {
include_once($this->getDirectory() . 'language/english.php');
}
+ $this->numcalled = 0;
}
function updateTable()