Forum OpenACS Q&A: Chunks and getting news and forum stuff on the front page.

That's really helpful to put the news and forum stuff is on the front page of this site. Did someone post the procedure for that? I looked in the docs and found some mention of a module called "chunks" but I think that's for 3.x version.
I'm not sure exactly where it is, but I think you can browse the code to see what the website is doing. There is a CVS browser or something.
There are two other threads on this subject---an indication of how well the search works <g>.  I looked into this a little while ago and basically the way the OpenACS.org site does it is with some hand-crafted .adp/.tcl pairs that get included in the main page.

As has already been suggested, browse through the cvs tree at dev.openacs.org and look at the code for the openacs.org site.

BTW the templates used on the openacs site are (at least the news one, haven't actually worked on the others yet) hardcoded to pull up all the news.  I have some mods that allow you to use the template from a subsite and only get the subsite's news.  I'm still tinkering with it, but it works fairly well.

Matt

It seems that the neatest, whiz bang, possibly crazy way to do this would be with RSS, an idea that I believe originated between Jeff Davis and Dave Bauer on IRC. The workflow could be:

Create item -> Create RSS feed -> Aggregate content in portal -> Publish content

Of course, the content could be greated simply by defining a portlet, which would also be a snap.

I brought up the idea on the Collaboraid Developer's blog. I referenced a couple of docs that Lars and Peter have published, namely their plans for a Tcl API for service contracts and a spec for a uniform metadata standard.

From what I understand, the CR provides functionality for "syndicating" content within an OpenACS installation. What I I am wondering, I suppose, is whether there would be anything to gain by implementing industry standard metadata and syndication tools internally to the OACS as well?

Here are a couple of use cases:

!) Polly starts a blog in her user space at Somerville High, which is saved in the CR and with the metadata standard. With some quick tcl code, she connects to the RSS tool which syndicates her content. Her, Mr. Jones, teacher subscribes to her blog from his dotlrn page and from his news aggregator.

2) KFJC uploads Andy Cadaver's "Lit, Late and Live" tribute to Sex Mob to their OACS installation. The news is syndicated via RSS that is generated from the upload's metadata to a central central repository of public radio shows is updated to include this event. Jeffrey searches the repository, finds the show and selects it for download. Via an XML-RPC call, the central repository makes the request.

3) Alliance for New York Arts wants to build a community application for NYC art organizations. The site will be a event listing for all the organizations. Each organization will upload an event which will all be aggregated on a single page. The aggregation is done by the new OACS RSS aggregator which receives the content that is published on each organization's subsite, or from the org's own website.

These are three rather uninformed use cases that may be built more on whiz bang hype than actual ease of use. Do they make any sense?

talli

Talli -- those are great thoughts that do make sence and I can't wait to learn more about RSS tool -- do you have a pointer to some information?

And thanks everyone for all the quick thoughts. I searched for answers on the this acs site
and on google before I posted, however, I only found one thread about it.

That thread was a lot like this one -- someone ask a question and the
various answers didn't help me -- but that's not you're fault that I'm a n00bie knucklehead at this. Anyway, the whole time I'm
learning which is my main goal, moreso then getting my news on my front
pages.

I will post some more information that I found after following the advice
in this thread because maybe it will help someone in the future (ie, it
hasn't really helped me yet and so let me know the ways I'm missing something
big...), and when/if I do find an ez answer I will write a ez solution for
the FAQ. Here's what I got so far.

News on front page: I found files at:

From:
http://dev.openacs.org:8000/cvs/openacs.org-dev/www/templates/

One called homepage-index.adp had the following

<multiple name=news_items>
<!--maxrows doesn't take a variable value, so have to do this-->
<if @news_items.rownum@ le @n_news_items@>
  <b>@news_items.pretty_publish_date@</b>:<br>
  <a
href="/news/item?item_id=@news_items.item_id@">@news_items.publish_title@</a
<blockquote><br>
</blockquote>
  <img src="/templates/images/spacer.gif" alt="" height="8" width="174">
  <br clear="left">
</if>
</multiple>
<if @news_items:rowcount@ gt @n_news_items@>
<br>
<a href="/news">more news...</a><br>
</if>

I also found the file homepage-index.adp and it had the following -- I
edited out the forum parts.

# /www/templates/homepage-news.tcl
ad_page_contract {
    @author Pat Colgan (mailto:pat@museatech.net)
    @creation-date 2001-09-01
    This page is for the OpenACS homepage.  In addition to
    the Edit This Page functions, it has code for pulling
    out featured articles and profiles, news, and bboard
    posts.
} {
} -properties {
    pa:onerow
    news_items:multirow
    n_news_items:onevalue
}

set n_news_items 5
set max_post_age_days 14
set news_limit [expr $n_news_items + 1]
etp::get_page_attributes
set view_clause [db_map view_clause_live]

db_multirow news_items news_items_select "
select item_id,
      publish_title,
      pretty_publish_date
from  news_items_approved
where  package_id = 43787
      and publish_date < current_timestamp
      and (archive_date is null or archive_date > current_timestamp)
order  by publish_date desc, item_id desc
"
                -limit $news_limit \
                      -package_id ???? -result_name news_items \
                      release_date archive_date
#etp::get_content_items -package_id 4053 -limit $feature_limit \
                      -result_name feature_items
etp::get_content_items -package_id 16464 -limit $feature_limit \
                      -result_name feature_items
http://wolfram.org/