MyBB Community Forums

Full Version: News
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to make an index page, where the admins can announce some news. So I made an special forum for them, which only they can see. Now I look for a way to display them (the newest first), on an other php page. To give u an idea, here is the link to the start page. Untill now I am doing it by modifie the source code, but it would be nice, if I could use the forum, so other admins of the page, can post news too Smile.

Homepage
This is the query I used:
SELECT t.tid, t.subject, t.uid, t.username, t.dateline, t.replies, t.visible, p.tid, p.replyto, p.fid, p.message FROM mybb_threads t LEFT JOIN mybb_posts p ON (t.tid = p.tid) WHERE t.fid = 8 AND p.replyto = 0 ORDER BY `t`.`dateline` DESC

Make sure to change 'WHERE t.fid = 8' to whatever ID your news forum is.
Should a php file be enough which looks like

<?php
require "forum/global.php";
SELECT t.tid, t.subject, t.uid, t.username, t.dateline, t.replies, t.visible, p.tid, p.replyto, p.fid, p.message FROM mybb_threads t LEFT JOIN mybb_posts p ON (t.tid = p.tid) WHERE t.fid = 14 AND p.replyto = 0 ORDER BY `t`.`dateline` DESC
?>

It gives me an pars error Sad.

Btw, I am of over new year Smile, so thanx for the help, I will be back in a week, and "happy new year" to everybody.

EDIT:

Did it, thanx for ur help Smile