Dragonfly CMS v9 ⇒ CPG-BB (forum) ⇒ Much More Complex Than "Display The latest Topics" ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks CPG-BB (forum)

Much More Complex Than "Display The latest Topics" Reply to topic


Hi, I am a Amateur at programming new scripts for SQL and PHP.
Many people want to Display The latest Topics in a block or latest topics inside a category.

I have been Attempting and Failing at it. Going from instead of a list of topic links appearing to the topic Content of the topic links instead. I looked at the SQL and I supposed the PHP and SQL Makeup would look like this:

SQL CHECKS bbtopics
Looks for rows that contain Forum_id "40"(ignore the variables)
Locates The latest Topic
Locates topic_first_post_id "57" in the latest topic
SQL Checks bbposts for Post_id "57"

Echo "the Post_Subject"
and Echo's "the post_text"

I wish I knew how the code would look for that.
Can anyone give me a good starting point from this:

$result = $db->sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, t.topic_views, t.topic_replies, u.username, u.user_id, a.username AS authorname, a.user_id AS authorid, p.poster_id, p.post_time as post_time FROM ($prefix".(($fp==1) ? $dfp.'_topics' : '_bbtopics')." t, $prefix".(($fp==1) ? $dfp.'_forums' : '_bbforums')." f) LEFT JOIN $prefix".(($fp==1) ? $dfp.'_posts' : '_bbposts')." p ON (p.post_id = t.topic_last_post_id) LEFT JOIN ".$user_prefix."_users u ON (u.user_id = p.poster_id) LEFT JOIN ".$user_prefix."_users a ON (a.user_id = t.topic_poster) WHERE t.forum_id=f.forum_id and t.forum_id=1 $view ORDER BY t.topic_last_post_id DESC LIMIT ".$nforum);

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows


You mean like the block "Forums Scroll Last Post" ? It comes default with Dragonfly. Hope this helps.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


Instead of a list of topic links appearing
I Want the topic Content of the topic links.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows

All times are UTC


Jump to: