Mutt
01-11-2002, 05:30 PM
I miss the old active topics addon for ubb. I had worked on it and and added lots of features to it. My members really liked it.
anyway, changing to VB has left a void for those members. I know we have lots of ways to look up the latest post, but it's just not the same
I've been throwing one together and it's working out pretty nice
here it is on the corvette site
http://www.ccdv.com/forum/activetopics.php
I'll tell you the things I still need to do and maybe one of ya can point me in the right direction. I'm pretty damn good, but honestly, I don't really know php. some of it is easy and then I have stupid stuff like this.
the idea is to list the last 20 posts but only show a thread once so several of the latest posts don't all point to the same thread.
right now it lists every post in a thread. I only want the newest post listed. here's the code I'm using to grab the postids
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.visible=1 $datecut
ORDER BY post.dateline DESC
LIMIT ".($limitlower-1).",$perpage
");
//GROUP BY post.threadid
this will give me the last 20 posts made in any forum but I don't want the same thread showing up multiple times.
see the Group by line I have commented out. If I stick that in right before the order by line, it limits the output to just one post per thread alright, but it gives me the first post in each thread instead of the latest. it's almost like it groups them before it orders them. I need it to be ordered before grouping but if I move the group by line to after the order by line, it doesn't work at all.
next
I'd like to limit the text to x amount of chars and tag on a "... read more" but I don't want to screw up the vb code by cutting off the text in the middle of a tag. do you guys know of any other vb hack that already does this so I could take a look at it instead of reinventing the wheel? maybe one of the news scripts?
finally
I forget :) there was something else but oh well.
please shoot me any suggestions or ideas.
anyway, changing to VB has left a void for those members. I know we have lots of ways to look up the latest post, but it's just not the same
I've been throwing one together and it's working out pretty nice
here it is on the corvette site
http://www.ccdv.com/forum/activetopics.php
I'll tell you the things I still need to do and maybe one of ya can point me in the right direction. I'm pretty damn good, but honestly, I don't really know php. some of it is easy and then I have stupid stuff like this.
the idea is to list the last 20 posts but only show a thread once so several of the latest posts don't all point to the same thread.
right now it lists every post in a thread. I only want the newest post listed. here's the code I'm using to grab the postids
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.visible=1 $datecut
ORDER BY post.dateline DESC
LIMIT ".($limitlower-1).",$perpage
");
//GROUP BY post.threadid
this will give me the last 20 posts made in any forum but I don't want the same thread showing up multiple times.
see the Group by line I have commented out. If I stick that in right before the order by line, it limits the output to just one post per thread alright, but it gives me the first post in each thread instead of the latest. it's almost like it groups them before it orders them. I need it to be ordered before grouping but if I move the group by line to after the order by line, it doesn't work at all.
next
I'd like to limit the text to x amount of chars and tag on a "... read more" but I don't want to screw up the vb code by cutting off the text in the middle of a tag. do you guys know of any other vb hack that already does this so I could take a look at it instead of reinventing the wheel? maybe one of the news scripts?
finally
I forget :) there was something else but oh well.
please shoot me any suggestions or ideas.