3 ProjectNews
David Anderson edited this page 2023-08-22 13:15:33 -07:00

Project news

Most projects have a "News" section on their front page.

This is typically implemented using BOINC's forum system. News items are stored as threads in a special forum, named 'News' by default (you can change this by defining a constant NEWS_FORUM_NAME in project.inc). This forum should have 'is_dev_blog' set to 1, so that only project admins will be able to create threads (non-admins will, however, be able to reply to threads). The forum-creation script ops/create_forums.php creates this forum.

To show news items on your front page, include

show_news(0, 5);

in your index.php (the "5" says to show the 5 most recent items).

Prior to 12/2009 (specifically r19949), news was stored in a flat file html/project/project_news.inc. To convert this to forum format, run the script html/ops/news_convert.php

Temporary news items

You may want to show "temporary" news items, e.g. saying that your project is offline. To do this, copy html/user/sample_motd.php to motd.php and edit it.

The resulting items will be shown at the top of your news if you put

include("motd.php");

just before show_news().

If your database server is down, only temporary news items will be shown.