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.2 -r1.3 --- openacs.org-dev/www/templates/homepage-index.adp 22 Jul 2002 09:26:27 -0000 1.2 +++ openacs.org-dev/www/templates/homepage-index.adp 22 Jul 2002 20:28:25 -0000 1.3 @@ -94,7 +94,7 @@ src="/templates/images/spacer.gif" alt="" height="1" width="8"> - + forums: recent posts + + + + +
+ @forum_posts.title@ + [From the @forum_posts.forum_name@ forum - @forum_posts.n_messages@ replies]
+ @forum_posts.content@ +
Posted by @forum_posts.user_name@ @forum_posts.sent_date_no_time@ +
+
+
+ + +
+more forum posts...
+
+

+

+ + + 100 then + substring(fm.content, 0, 100) || '...' + else + fm.content + end + as content + + 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 = 3928 +-- and fm.message_id = acs_objects.object_id + order by fm.posting_date desc + limit $forum_posts_limit +" + #Warning! lazy hardcode of package id! # this presents only non-expired news items #set where "sysdate() between to_date(attributes.release_date, 'YYYY-MM-DD') # and to_date(attributes.archive_date, 'YYYY-MM-DD')" -##set orderby "to_date(attributes.release_date, 'YYYY-MM-DD') desc" +#set orderby "to_date(attributes.release_date, 'YYYY-MM-DD') desc" # this limits the query to the desired number of items... # ... plus one, so that we can use maxrows and rowcount # in the adp to present a "more..." link if appropriate # (maxrows without limiting the query could be performance killer) -#set news_limit [expr $n_news_items + 1] +set news_limit [expr $n_news_items + 1] set feature_limit [expr $n_feature_items + 1] # speaking of performance, when this is live these @@ -88,9 +128,9 @@ #etp::get_content_items -where $where -orderby $orderby \ -# -limit $news_limit \ -# -package_id 2494 -result_name news_items \ -# release_date archive_date + -limit $news_limit \ + -package_id 2494 -result_name news_items \ + release_date archive_date etp::get_content_items -package_id 4053 -limit $feature_limit \