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 2: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
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Geoff), 1,018 guests, and 215 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)