-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d729953
Showing
36 changed files
with
5,461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<div class="section notifyWbbThreadSettings"> | ||
<header class="sectionHeader"> | ||
<h2 class="sectionTitle">{lang}wcf.acp.uzbot.notify.thread.setting{/lang}</h2> | ||
</header> | ||
|
||
<dl{if $errorField == 'threadNotifyBoardID'} class="formError"{/if}> | ||
<dt><label for="threadNotifyBoardID">{lang}wcf.acp.uzbot.notify.thread.boardID{/lang}</label></dt> | ||
<dd> | ||
<select name="threadNotifyBoardID" id="threadNotifyBoardID"> | ||
<option value="0">{lang}wcf.global.noSelection{/lang}</option> | ||
{foreach from=$boardNodeList item=boardNode} | ||
{if !$boardNode->getBoard()->isExternalLink()} | ||
<option value="{@$boardNode->getBoard()->boardID}"{if $boardNode->getBoard()->boardID == $threadNotifyBoardID} selected="selected"{/if}>{if $boardNode->getDepth() > 1}{@" "|str_repeat:($boardNode->getDepth() - 1)}{/if}{$boardNode->getBoard()->title|language} </option> | ||
{/if} | ||
{/foreach} | ||
</select> | ||
|
||
{if $errorField == 'threadNotifyBoardID'} | ||
<small class="innerError"> | ||
{lang}wcf.acp.uzbot.notify.thread.error.{@$errorType}{/lang} | ||
</small> | ||
{/if} | ||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>{lang}wcf.acp.uzbot.notify.thread.status{/lang}</dt> | ||
<dd> | ||
<label><input name="threadNotifyIsSticky" type="checkbox" value="1"{if $threadNotifyIsSticky} checked{/if}> {lang}wcf.acp.uzbot.notify.thread.status.isSticky{/lang}</label> | ||
<label><input name="threadNotifyIsDisabled" type="checkbox" value="1"{if $threadNotifyIsDisabled} checked{/if}> {lang}wcf.acp.uzbot.notify.thread.status.isDisabled{/lang}</label> | ||
<label><input name="threadNotifyIsDone" type="checkbox" value="1"{if $threadNotifyIsDone} checked{/if}> {lang}wcf.acp.uzbot.notify.thread.status.isDone{/lang}</label> | ||
<label><input name="threadNotifyIsClosed" type="checkbox" value="1"{if $threadNotifyIsClosed} checked{/if}> {lang}wcf.acp.uzbot.notify.thread.status.isClosed{/lang}</label> | ||
<label><input name="threadIsOfficial" type="checkbox" value="1"{if $threadIsOfficial} checked{/if}> {lang}wcf.acp.uzbot.notify.thread.status.threadIsOfficial{/lang}</label> | ||
</dd> | ||
</dl> | ||
</div> | ||
|
||
<div class="section notifyWbbPostSettings"> | ||
<header class="sectionHeader"> | ||
<h2 class="sectionTitle">{lang}wcf.acp.uzbot.notify.post.setting{/lang}</h2> | ||
</header> | ||
|
||
<dl{if $errorField == 'postNotifyThreadID'} class="formError"{/if}> | ||
<dt><label for="postNotifyThreadID">{lang}wcf.acp.uzbot.notify.post.threadID{/lang}</label></dt> | ||
<dd> | ||
<input type="number" name="postNotifyThreadID" id="postNotifyThreadID" value={$postNotifyThreadID} class="small" min="0" /> | ||
<small>{lang}wcf.acp.uzbot.notify.post.threadID.description{/lang}</small> | ||
{if $errorField == 'postNotifyThreadID'} | ||
<small class="innerError"> | ||
{lang}wcf.acp.uzbot.notify.post.threadID.error.{@$errorType}{/lang} | ||
</small> | ||
{/if} | ||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>{lang}wcf.acp.uzbot.notify.post.status{/lang}</dt> | ||
<dd> | ||
<label><input name="postNotifyIsClosed" type="checkbox" value="1"{if $postNotifyIsClosed} checked{/if}> {lang}wcf.acp.uzbot.notify.post.status.isClosed{/lang}</label> | ||
<label><input name="postNotifyIsDisabled" type="checkbox" value="1"{if $postNotifyIsDisabled} checked{/if}> {lang}wcf.acp.uzbot.notify.post.status.isDisabled{/lang}</label> | ||
<label><input name="postIsOfficial" type="checkbox" value="1"{if $postIsOfficial} checked{/if}> {lang}wcf.acp.uzbot.notify.post.status.postIsOfficial{/lang}</label> | ||
</dd> | ||
</dl> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$('.notifyWbbPostSettings, .notifyWbbThreadSettings').hide(); | ||
|
||
if ($value == 10) { | ||
$('.notifyWbbThreadSettings, .notifySubject, .notifyTags').show(); | ||
$('#notifyLabelContainer').show(); | ||
} | ||
|
||
if ($value == 11) { | ||
$('.notifyWbbPostSettings').show(); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
$('.wbb_threadNew, .wbb_postCount, .wbb_postChange, .wbb_postModeration, .wbb_bestAnswer').hide(); | ||
$('.wbb_threadModification, .wbb_threadModeration, .wbb_topPoster, .wbb_statistics').hide(); | ||
$('.wbbUzbotBoardIDs, .wbbConditionSettings, .wbbBoardIDs').hide(); | ||
|
||
if (value == 30) { | ||
$('.wbb_postChange, .wbbUzbotBoardIDs, .uzbotUserConditions').show(); | ||
$('#receiverAffected').show(); | ||
} | ||
|
||
if (value == 31) { | ||
$('.wbb_postCount, .uzbotUserConditions, .user_count').show(); | ||
$('#receiverAffected').show(); | ||
} | ||
|
||
if (value == 32) { | ||
$('.wbb_postModeration, .wbbUzbotBoardIDs, .uzbotUserConditions, .affectedSetting').show(); | ||
$('#receiverAffected').show(); | ||
} | ||
|
||
if (value == 40) { | ||
$('.wbb_threadModeration, .wbbUzbotBoardIDs, .uzbotUserConditions, .affectedSetting').show(); | ||
$('#receiverAffected').show(); | ||
} | ||
|
||
if (value == 41) { | ||
$('.wbb_threadModification, .wbbConditionSettings').show(); | ||
$('#receiverAffected, #actionLabelContainer, #conditionLabelContainer').show(); | ||
} | ||
|
||
if (value == 42) { | ||
$('.wbb_threadNew, .uzbotUserConditions').show(); | ||
$('#receiverAffected').show(); | ||
} | ||
|
||
if (value == 43) { | ||
$('.wbb_topPoster, .wbbUzbotBoardIDs, .condenseSetting, .uzbotUserConditions').show(); | ||
$('#receiverAffected').show(); | ||
if ($('#condenseEnable').is(':checked')) { $('.notifyCondense').show(); } | ||
} | ||
|
||
if (value == 44) { | ||
$('.wbb_statistics').show(); | ||
} | ||
|
||
if (value == 45) { | ||
$('.wbb_bestAnswer, .wbbUzbotBoardIDs').show(); | ||
$('#receiverAffected').show(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/cronjob.xsd"> | ||
<import> | ||
<cronjob name="uzbotWbbModify"> | ||
<classname>wbb\system\cronjob\UzbotThreadModificationCronjob</classname> | ||
<description><![CDATA[Community Bot - Thread Modification]]></description> | ||
<description language="de"><![CDATA[Community Bot - Themen-Bearbeitung]]></description> | ||
<startminute>*/30</startminute> | ||
<starthour>*</starthour> | ||
<startdom>*</startdom> | ||
<startmonth>*</startmonth> | ||
<startdow>*</startdow> | ||
<active>1</active> | ||
<canbeedited>1</canbeedited> | ||
<canbedisabled>1</canbedisabled> | ||
</cronjob> | ||
|
||
<cronjob name="uzbotWbbTopPoster"> | ||
<classname>wbb\system\cronjob\UzbotPostTopPosterCronjob</classname> | ||
<description><![CDATA[Community Bot - Top Poster]]></description> | ||
<description language="de"><![CDATA[Community Bot - Top-Poster]]></description> | ||
<startminute>*/30</startminute> | ||
<starthour>*</starthour> | ||
<startdom>*</startdom> | ||
<startmonth>*</startmonth> | ||
<startdow>*</startdow> | ||
<active>1</active> | ||
<canbeedited>1</canbeedited> | ||
<canbedisabled>1</canbedisabled> | ||
</cronjob> | ||
|
||
<cronjob name="uzbotWbbStatistics"> | ||
<classname>wbb\system\cronjob\UzbotStatsWbbCronjob</classname> | ||
<description><![CDATA[Community Bot - Statistics Forum]]></description> | ||
<description language="de"><![CDATA[Community Bot - Statistik Forum]]></description> | ||
<startminute>0</startminute> | ||
<starthour>5</starthour> | ||
<startdom>*</startdom> | ||
<startmonth>*</startmonth> | ||
<startdow>*</startdow> | ||
<active>1</active> | ||
<canbeedited>1</canbeedited> | ||
<canbedisabled>1</canbedisabled> | ||
</cronjob> | ||
</import> | ||
</data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/eventListener.xsd"> | ||
<import> | ||
<eventlistener name="uzbotAddWbbInherited"> | ||
<eventclassname>wcf\acp\form\UzbotAddForm</eventclassname> | ||
<eventname>assignVariables,readFormParameters,save,validate,saved</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotAddFormWbbListener</listenerclassname> | ||
<inherit>1</inherit> | ||
<environment>admin</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotEditWbbReadData"> | ||
<eventclassname>wcf\acp\form\UzbotEditForm</eventclassname> | ||
<eventname>readData</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotAddFormWbbListener</listenerclassname> | ||
<environment>admin</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotWbbThreadAction"> | ||
<eventclassname>wbb\data\thread\ThreadAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotThreadActionListener</listenerclassname> | ||
<environment>user</environment> | ||
</eventlistener> | ||
<eventlistener name="uzbotWbbThreadActionAdmin"> | ||
<eventclassname>wbb\data\thread\ThreadAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotThreadActionListener</listenerclassname> | ||
<environment>admin</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotWbbPostAction"> | ||
<eventclassname>wbb\data\post\PostAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotPostActionListener</listenerclassname> | ||
<environment>user</environment> | ||
</eventlistener> | ||
<eventlistener name="uzbotWbbPostActionAdmin"> | ||
<eventclassname>wbb\data\post\PostAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotPostActionListener</listenerclassname> | ||
<environment>admin</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotWbbThreadModerationAction"> | ||
<eventclassname>wcf\data\modification\log\ModificationLogAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotThreadModerationListener</listenerclassname> | ||
<environment>user</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotWbbPostModerationAction"> | ||
<eventclassname>wcf\data\modification\log\ModificationLogAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotPostModerationListener</listenerclassname> | ||
<environment>user</environment> | ||
</eventlistener> | ||
|
||
<eventlistener name="uzbotWbbDeleteBotAction"> | ||
<eventclassname>wcf\data\uzbot\UzbotAction</eventclassname> | ||
<eventname>finalizeAction</eventname> | ||
<listenerclassname>wbb\system\event\listener\UzbotWbbDeleteBotListener</listenerclassname> | ||
<environment>admin</environment> | ||
</eventlistener> | ||
</import> | ||
</data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
use wcf\data\uzbot\top\UzbotTopAction; | ||
use wcf\system\WCF; | ||
|
||
/** | ||
* Initializes wbb top data for Bot | ||
* | ||
* @author 2014-2022 Zaydowicz | ||
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | ||
* @package com.uz.wcf.bot3.wbb | ||
*/ | ||
|
||
// posts | ||
$topPosterID = null; | ||
$sql = "SELECT userID, wbbPosts | ||
FROM wcf".WCF_N."_user | ||
ORDER BY wbbPosts DESC"; | ||
$statement = WCF::getDB()->prepareStatement($sql, 1); | ||
$statement->execute(); | ||
$row = $statement->fetchArray(); | ||
if (!empty($row)) $topPosterID = $row['userID']; | ||
|
||
$action = new UzbotTopAction([1], 'update', [ | ||
'data' => [ | ||
'post' => $topPosterID | ||
] | ||
]); | ||
$action->executeAction(); |
Oops, something went wrong.