Quote:
Originally Posted by Nordinho
I have this weird permission issue...the article bots post are always published...I've made a new usergroup for the bot, with limited permissions and 'always moderate posts', but the articlebot just ignores those settings and keeps on posting...any other ideas on moderating it's posts???
|
I just hacked the code so that all posts made by the Article Bot get put into the moderation queue.
In articlebot.php, find:
Code:
$DB_site->query("
INSERT INTO ".TABLE_PREFIX."thread
(title, lastpost, forumid, open,
replycount, postusername, postuserid, lastposter, dateline, iconid,
visible, attach, similar, is_rss)
VALUES
('".addslashes($article['title'])."', ".TIMENOW.", $articlebot[forumid],
1, 0, '".addslashes($articlebot['username']) . "', $articlebot[userid],
'".addslashes($articlebot['username']) . "', ".TIMENOW.", $articlebot[iconid], 1, 0,
'".addslashes($similarthreads)."', 1)
");
... and replace with:
Code:
$DB_site->query("
INSERT INTO ".TABLE_PREFIX."thread
(title, lastpost, forumid, open,
replycount, postusername, postuserid, lastposter, dateline, iconid,
visible, attach, similar, is_rss)
VALUES
('".addslashes($article['title'])."', ".TIMENOW.", $articlebot[forumid],
1, 0, '".addslashes($articlebot['username']) . "', $articlebot[userid],
'".addslashes($articlebot['username']) . "', ".TIMENOW.", $articlebot[iconid], 0, 0,
'".addslashes($similarthreads)."', 1)
");
The above is a one character change -- look for the colored "0" in the second code segment...
Also, after:
Code:
/* +---------------------------------+
| Query: update thread |
+---------------------------------+ */
$DB_site->query("
UPDATE ".TABLE_PREFIX."thread
SET firstpostid = $post_id
WHERE threadid = $thread_id
");
... add:
Code:
$p = $DB_site->query_first("SELECT firstpostid from ".TABLE_PREFIX."thread
where threadid = $thread_id");
$DB_site->query("
INSERT INTO ".TABLE_PREFIX."moderation
(threadid, postid, type)
VALUES
($thread_id, $p[firstpostid], \"thread\")");
Once again, this will cause
all posts done by
all article bots to be put into the moderation queue.
Let's hope that VeloCD can now use this in the future so that we can specify which bots get moderated and which ones do not...