Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2006
Posts: 37
G
newbie
newbie
G Offline
Joined: Oct 2006
Posts: 37
I know this probably isn't exactly a bug (and I've submitted it as a suggestion), but my members have complained about this as a loss of function from UBB.classic.

I've added it by these changes starting around line 2549 of libs/ubbthreads.inc.php:
PHP Code
// Topics or Posts?
if ($feed_type == "topics") {
   $order = "TOPIC_CREATED_TIME desc";
   $t1clause .= " and t1.USER_ID = t3.USER_ID";
} else {
   $order = "TOPIC_LAST_REPLY_TIME desc";
   $t1clause .= " and t2.USER_ID = t3.USER_ID";
} // end if

if (!$feed_include_body) {
   $query = "
	  select t1.TOPIC_ID,t1.TOPIC_SUBJECT,t1.TOPIC_CREATED_TIME,t1.TOPIC_LAST_REPLY_TIME,t1.TOPIC_LAST_POST_ID,t1.TOPIC_LAST_POSTER_ID,t1.TOPIC_LAST_POSTER_NAME,t3.USER_DISPLAY_NAME
	  from {$config['TABLE_PREFIX']}TOPICS as t1,
	  {$config['TABLE_PREFIX']}POSTS as t2,
	  {$config['TABLE_PREFIX']}USERS as t3
	  where TOPIC_IS_APPROVED = '1'
	  $t1clause
	  ORDER BY t1.$order
	  limit $feed_items
   ";
} else {
   $query = "
	  select t1.TOPIC_ID,t1.TOPIC_SUBJECT,t1.TOPIC_CREATED_TIME,t1.TOPIC_LAST_REPLY_TIME,t1.TOPIC_LAST_POST_ID,t1.TOPIC_LAST_POSTER_ID,t1.TOPIC_LAST_POSTER_NAME,t2.POST_DEFAULT_BODY,t3.USER_DISPLAY_NAME
	  from {$config['TABLE_PREFIX']}TOPICS as t1,
	  {$config['TABLE_PREFIX']}POSTS as t2,
	  {$config['TABLE_PREFIX']}USERS as t3
	  where t1.TOPIC_LAST_POST_ID = t2.POST_ID
	  $t1clause
	  and t2.POST_IS_APPROVED = '1'
	  ORDER BY t1.$order
	  limit $feed_items
   ";
} 
and starting around line 15 of templates/default/rss_xml.tpl:
Code
<description>
<![CDATA[<b>Posted by</b> {$items[item].TOPIC_LAST_POSTER_NAME}:

{$items[item].POST_DEFAULT_BODY}]]>
</description>

I realize this is a big change (and possible performance hit) but I didn't see another way to get the actual author of the post in question (rather than just the author of the last post). And probably the two queries could just be made one, if this was going to be done.

Last edited by Rick; 11/13/2006 1:55 PM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
We'll end up getting this in for 7.1. What you've come up with is pretty close to how we'll implement it.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Mirrored databases
by Baldeagle - 12/05/2025 3:27 PM
Cant get past check files during upgrade
by sniperbbb - 11/27/2025 1:55 AM
UBB.threads 8.0.1 Patch Released: Fixes
by isaac - 11/26/2025 1:39 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 12:34 PM
Who's Online Now
0 members (), 3,017 guests, and 212 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
test
test
by Gizmo, August 20
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20251126)