==README for addon_1stpagenews.php==
Release date: November 11, 2004.
Latest update: February 4, 2026.
miniBB version: 3.4+
Author: Paul Puzyrev (minibb.com)

This add-on for miniBB allows to display so called "News feed" on your website's first page (you can create a special forum and use it as a news section), on the miniBB official website it is used to display the latest from "Tidings" forum. Also it could display recent discussions from a few to all forums on your own pages. You can include this script in the external PHP script, or via JavaScript.

==INSTALLATION==

Copy addon_1stpagenews.php to your forums directory, and addon_1stpagenews.html, addon_1stpagenews_cell.html to your templates directory.

==CONFIGURATION==

Open addon_1stpagenews.php in some ASCII editor and edit these parameters defined as /* Some options */. You will find their descriptions inside the file.

==USAGE==

* You can include addon_1stpagenews.php in your PHP script, f.e.: 

include ('./forums/addon_1stpagenews.php');

where 'forums' stands for the folder name of your forums relatively to the root folder of your website; and that way you could include from the root PHP file of your website.

Make sure to provide the valid $path. It should be in `/var/www/html/` style and doesn't mean the URL which begins from `http://`. Use getcwd() function of PHP to determine the full path.

Tip: try to create a clean test PHP file first like test.php, where only the line provided above is included. If it would work, bring it to your live page. Else try to determine the reason of failure until it fully works. That way you could run your live website without interuptions.

* You can call addon_1stpagenews.php via JavaScript. Example:

<script type="text/javaScript" src="http://www.somedomain.com/forums/addon_1stpagenews.php"></script>

In the add-on's settings, you have to set up the full path to the script (check How-To inside the script).

Displaying of news feed varies depending on your settings:

* If you want only new TOPICS appearing on the page, with the first message posted, set $sort='topic_id DESC'; and $post_sort=0;
* If you want your newsfeed changes each time when someone posts new message, change $sort='topic_last_post_id DESC'; and $post_sort=1;

==NOTES==

You can change language data, as well as the outlook of news feed in both templates included.

==FINALLY==

Hope, you'll enjoy. Please, post bugs and suggestions on our forums:
http://www.minibb.com/forums/11_4186_0.html
