View Full Version : Upgraded from 1 to 2 and some custom modules now broken
Spinball
12-02-2005, 06:00 AM
Hi Brian,
If you remember with my installation I created several custom modules based on the news module which sit in the left and right hand columns. They show the top n threads from specific forums, dictated by modifications to the SQL retrieve. None of these work any more.
Is it a case of copying the new news module and tweaking that?
Brian
12-02-2005, 04:17 PM
I'm sorry, but I don't remember the custom modules. Can you elaborate a little on what they were and how they were different from the regular news module?
Spinball
12-03-2005, 09:17 AM
They were copies of the 'Latest Forum Topics' module but with a change to the main SQL statement :
$threads = $DB_site->query("
SELECT
" . iif($vba_options['portal_threads_showrating'], 'IF(votenum >= ' . $vboptions['showvotes'] . ', votenum, 0) AS votenum, IF(votenum >= ' . $vboptions['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
$query[iconfields]
$query[forumfields]
$query[previewfields]
$query[subfields]
FROM " . TABLE_PREFIX . "thread as thread
$query[iconjoin]
$query[forumjoin]
$query[previewjoin]
$deljoin
$query[subjoin]
WHERE open <> '10' AND thread.visible = 1 AND thread.forumid =51 $notdeleted
ORDER BY thread.dateline DESC
LIMIT 25
");
Brian
12-03-2005, 04:23 PM
You should be able to do the same thing by copying the latest topics module. The changes done to the SQL statement should also be able to be set within the options for the latest topics module instead of having to make copies of the files and such.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.