View Full Version : Select the thread you want displayed on the main CPMS page?
Steve_OS
10-08-2006, 02:48 AM
Is there a way to select which posts you would like displayed on the main CPMS page? I mean, is there a way I could somehow select certain threads in my Forum, no matter where that thread is located, to be displayed on my main CPMS page?
As of right now, I have 2 forums that show on the main page. But I'd actually like to select threads from other forums to be displayed on my main page, hope this makes sense. :confused:
Thanks.
Brian
10-09-2006, 03:36 PM
The news and latest threads modules both give you options to select specific threads to display.
Steve_OS
10-09-2006, 10:08 PM
I've looked everywhere for it, I must be blind. Could you point me in the right direction? I'm so happy it's there, but I'm just not seeing it.
Thanks for the help!
Steve
Steve_OS
10-09-2006, 10:20 PM
Hmmm...
Actually, I think I found it. Is it this?
Here you may select specific threads to be displayed with this module. Please note that this setting will override the setting below for a forum to pull these threads from.
If so, the threads are in a random sort, is there a way to arrange them from newest to oldest?
Thanks.
Brian
10-10-2006, 04:21 PM
Yes, that is the correct option. The threads are sorted by oldest first though, not randomly.
Steve_OS
10-10-2006, 06:09 PM
Yes, that is the correct option. The threads are sorted by oldest first though, not randomly.
OK, well...if I click last thread, it is definitely not the newest in that particular Forum. Any ideas? It's very random.
Thanks again for the help.
Steve
Brian
10-11-2006, 03:50 PM
Well then, I stand corrected. Apparently they are not ordered by anything, but the forums I checked here happened to be close enough that it looked like they were. If you'll look in your admincp/vba_cmps_admin.php file for this code:
$getthreadids = $db->query_read("SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE forumid = $forumid LIMIT " . ($pagedata['minlimit'] - 1) . ", $pagedata[perpage]");
while ($threadid = $db->fetch_array($getthreadids))
{
$tids[] = $threadid['threadid'];
}
if (!empty($tids))
{
// Get selected ids
if (!empty($threadids))
{
foreach ($threadids AS $threadid => $firstpostid)
{
$selectedthreads[] = $threadid;
}
}
$getthreads = $db->query_read("SELECT threadid, title, postusername, firstpostid, pollid FROM " . TABLE_PREFIX . "thread WHERE threadid IN(" . implode(',', $tids) . ")");
Replace with this:
$getthreadids = $db->query_read("SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE forumid = $forumid ORDER BY lastpost DESC LIMIT " . ($pagedata['minlimit'] - 1) . ", $pagedata[perpage]");
while ($threadid = $db->fetch_array($getthreadids))
{
$tids[] = $threadid['threadid'];
}
if (!empty($tids))
{
// Get selected ids
if (!empty($threadids))
{
foreach ($threadids AS $threadid => $firstpostid)
{
$selectedthreads[] = $threadid;
}
}
$getthreads = $db->query_read("SELECT threadid, title, postusername, firstpostid, pollid FROM " . TABLE_PREFIX . "thread WHERE threadid IN(" . implode(',', $tids) . ") ORDER BY lastpost DESC");
And that should order them by the last post and match up with the threads in the normal forum.
Steve_OS
10-11-2006, 10:56 PM
Thanks Brian! :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.