UseBB Community

UseBB support, discussion and development

News System

Moderators: Gaia.

Post Reply

Page: 1

Author Post
Member
Registered: Jun 2006
Posts: 25
Location: Australia
Im trying to make a news system which calls the first post out of each topic in one forum. Only admins can start topics in this. Then this will be displayed on the home page. You know how it works!

Question:
- How would I pull these exact posts out of the database, including author, date, total comments, page numbers. And have them display in order?

Help would be most appreciated.
Member
Registered: May 2005
Posts: 386
Location: US WA. St.
Something like this http://www.usebb.net/community/topic-1087.html
_______________
My board started January 03, 2012 and is powered by UseBB.
- wimc message board
Member
Registered: Jun 2006
Posts: 25
Location: Australia
Yer but from a particular forum and first post from each topic.
Developer
Registered: Apr 2004
Posts: 2227
Location: Belgium
Quote
SELECT t.id, t.topic_title, t.count_replies, t.count_views, t.status_locked, p.content, p.post_time, p.poster_id, u.displayed_name FROM usebb_topics t, usebb_posts p, usebb_members u WHERE t.forum_id = <forumid> AND t.status_sticky = 0 AND p.id = t.first_post_id AND u.id = p.poster_id ORDER BY p.post_time DESC LIMIT <numposts>


That's what I use on the front page. Basicly this is just standard SQL...

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software