Does anyone have a more refined version of
twitterposter_hot.php than what was provided in this mod?
More specifically, this right here isn't exactly the greatest way to pull hot threads from the database:
(only gripe I have about this great product)
Code:
$get_hot_threads = $vbulletin->db->query_read("SELECT
thread.threadid, thread.title, thread.forumid,
post.pagetext,
user.userid, user.usergroupid, user.membergroupids
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = thread.postuserid)
WHERE thread.open <> 10
AND thread.visible = 1
AND thread.tweeted = 0
AND thread.dateline >= " . $vbulletin->options['twitter_hot_timespan'] . "
" . (count($restricted_forums) > 0 ? "AND thread.forumid NOT IN (" . implode(',', $restricted_forums) . ")" : "") . "
AND deletionlog.primaryid IS NULL
AND (thread.views >= " . $vbulletin->options['hotnumberviews'] . " OR thread.replycount >= " . $vbulletin->options['hotnumberposts'] . ")
ORDER BY thread.dateline