vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v2.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2005, 06:06 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Latest threads/latest posts

I'm trying to get my copied recent threads module to show only the latest threads in the left column while the original center module functions as the 'latest forum posts'...

I tried it a bit myself and come up with the following in latesttopics.php...

PHP Code:
if ($mods['modcol'] == 1)
{
ORDER BY lastpost DESC;
}
else
{
ORDER BY thread.dateline DESC;

but this doesn't work...getting a parse error...any ideas how it could be done right??
Reply With Quote
  #2  
Old 09-01-2005, 03:44 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Latest threads/latest posts

bump
Reply With Quote
  #3  
Old 09-02-2005, 01:13 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Latest threads/latest posts

Code:
if ($mods['modcol'] == 1) 
{
$torder = 'lastpost'; 
} 
else 
{ 
$torder = 'thread.dateline'; 
}
Then replace 'ORDER BY lastpost DESC' with 'ORDER BY $torder DESC'.
Reply With Quote
  #4  
Old 09-02-2005, 01:45 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Latest threads/latest posts

thanks for your help, but I'm still getting an parse error...this is the part

PHP Code:
    WHERE open != 10 AND thread.visible 
                $mods
[threadids]
                
$mods[inforums]
                
$mods[exforums]
                
$notdeleted
                
if ($mods['modcol'] == 1
                {
                
$torder 'lastpost'
                } 
                else 
                { 
                
$torder 'thread.dateline'
                }
                
ORDER BY $torder DESC
                LIMIT $mod_options
[portal_threads_maxthreads]
        
"); 
Reply With Quote
  #5  
Old 09-02-2005, 02:22 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Latest threads/latest posts

That code needs to be added somewhere above the query.
Reply With Quote
  #6  
Old 09-02-2005, 04:04 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Latest threads/latest posts

that was too easy thanks a lot!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest threads Snakey Troubleshooting & Problems 1 06-29-2005 04:32 PM
Latest threads on CMPS - takes to post #1 not latest post Viks Troubleshooting / "How do I..." Questions 11 02-16-2005 01:47 PM


All times are GMT -4. The time now is 06:29 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.