Index: openacs.org-dev/www/templates/homepage-index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/www/templates/homepage-index.adp,v diff -u -r1.8 -r1.9 --- openacs.org-dev/www/templates/homepage-index.adp 2 Aug 2002 16:59:43 -0000 1.8 +++ openacs.org-dev/www/templates/homepage-index.adp 3 Aug 2002 08:44:14 -0000 1.9 @@ -122,17 +122,22 @@ + +
- @forum_posts.title@ + @forum_posts.forum_name@:
+
+ + @forum_posts.title@
+

-more forum posts...
+more posts...
-

Index: openacs.org-dev/www/templates/homepage-index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/www/templates/homepage-index.tcl,v diff -u -r1.13 -r1.14 --- openacs.org-dev/www/templates/homepage-index.tcl 2 Aug 2002 16:59:43 -0000 1.13 +++ openacs.org-dev/www/templates/homepage-index.tcl 3 Aug 2002 08:44:14 -0000 1.14 @@ -24,7 +24,7 @@ ## config for the three call-out boxes set n_news_items 5 set n_feature_items 3 -set n_forum_posts 5 +set n_forum_posts 20 set max_post_age_days 14 @@ -83,35 +83,26 @@ #" # This is the "forums" version (olah) -# I must ask Don how this can be cached... db_multirow forum_posts messages_select " - select fm.message_id, - fm.subject as title, --- fm.user_id, - fm.forum_id, --- person__name(fm.user_id) as user_name, --- fm.posting_date, - forums_forum__name(fm.forum_id) as forum_name --- to_char(posting_date,'MM/DD/YY') as sent_date_no_time, --- to_char(posting_date,'HH24:MM') as sent_time, --- to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified +select fm.message_id, + fm.forum_id, + forums_forum__name(fm.forum_id) as forum_name, + fm.subject as title --- (select count(*) --- from forums_messages_approved fm1 --- where fm1.forum_id = fm.forum_id --- and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages +from (select message_id, + forum_id, + subject, + parent_id + from forums_messages_approved + order by posting_date desc + limit $forum_limit) fm, forums_forums ff - from forums_messages_approved fm - , forums_forums ff --- , acs_objects - where fm.forum_id = ff.forum_id - and fm.parent_id is null - and ff.package_id = 3061 --- and fm.message_id = acs_objects.object_id - and posting_date > now() - $max_post_age_days - order by fm.posting_date desc - limit $forum_limit +where fm.forum_id = ff.forum_id +and fm.parent_id is null +and ff.package_id = 3061 + +order by forum_name " #Warning! lazy hardcode of package id!