| 1 | Most projects have a "News" section on their front page. |
| 2 | |
| 3 | This is typically implemented using BOINC's forum system. |
| 4 | News items are stored as threads in a special forum, |
| 5 | named 'News' by default |
| 6 | (you can change this by defining a constant NEW_FORUM_NAME in project.inc). |
| 7 | This forum should have 'is_dev_blog' set to 1, |
| 8 | so that only project admins will be able to create threads |
| 9 | (non-admins will, however, be able to reply to threads). |
| 10 | The forum-creation script ops/create_forums.php creates this forum. |
| 11 | |
| 12 | To show news items on your front page, include |
| 13 | {{{ |
| 14 | show_news(0, 5); |
| 15 | }}} |
| 16 | in your index.php (the "5" says to show the 5 most recent items). |
| 17 | |
| 18 | Prior to 12/2009, news was stored in a flat file html/project/project_news.inc. |
| 19 | To convert this to forum format, run the script html/ops/news_convert.php |
| 20 | |
| 21 | == Temporary news items == |
| 22 | |
| 23 | You may want to show "temporary" news items, |
| 24 | e.g. saying that your project is offline. |
| 25 | To do this, copy html/user/sample_motd.php to motd.php |
| 26 | and edit it. |
| 27 | |
| 28 | The resulting items will be shown at the top of your news if you put |
| 29 | |
| 30 | {{{ |
| 31 | include("motd.php"); |
| 32 | }}} |
| 33 | just before show_news(). |
| 34 | |
| 35 | If your database server is down, |
| 36 | only temporary news items will be shown. |