keplero, what problems are you experiencing exactly? Try to be a bit more specific so that others can better tailor their responses to your situation.
miniBB First Page News addon installation and usage - an UNOFFICIAL* guide
Step 1 Extract script files Put addon_1stPageNews2.php in your forums' directory. Put addon_1stpagenews2.html and addon_1stpagenews_cell2.html in your forums' templates directory.
Step 2 Setup configuration Open addon_1stPageNews2.php in an ASCII/plain text editor; e.g. Notepad. Locate the section marked /* Some options */ where you will find a list of parameters. Edit the parameters and save the changes.
--- Each parameter explained: $displayForums=array(1,2); Here you specify in the brackets the ID numbers of the forums to be displayed on the news page. The default is set to forums 1 and 2. When entering more than one ID, separate each ID with a comma, as shown in the default example. To find out a forum's ID number, move your mouse over the forum's title to see the forum's URL. In the URL you will see "...forum=x". The number x is the ID of that particular forum.
$limit=10; Here you specify the number of topics to be displayed on the news page.
$displayMethod=1; Here you have three display options. The default is set to 1 (usual echo). If you are not sure which to choose, just experiment with each one. Your options are: 1 for usual echo 2 for display via JavaScript 0 for keeping the content within $tplNews
$sort='topic_id DESC'; Here you specify how you want the topics on the news page to be sorted. See examples A and B below.
$post_sort=1; Here you choose whether you want the body of the first post of each topic to be displayed on the news page. Your options: 1 for no/don't display (the default setting.) 0 for yes/display (will slow down your miniBB) See examples A and B below.
Example A To display latest new TOPICS with the content of the first message under each topic, set $sort='topic_id DESC'; $post_sort=0;
Example B To display topics with new replies, set $sort='topic_last_post_id DESC'; $post_sort=1;
$maxTxtLength=200; Here you set the maximum text length (i.e. the total number of characters) for each displayed item. The default is set to 200. For faster script execution, set to 0 (which prevents the body of the posts from displaying.)
$path='./forums/'; Here you specify either the absolute or the relative path to your forums' (root) directory - be sure to include the trailing slash. If your forums directory resides within your web directory on the web server, the default path should work.
What do absolute paths look like? Here is an example: /user/yourname/yourdomainname/forums/
If you are calling script from a JavaScript source, you must specify an absolute path.
$l_months='January:February:March:April:May:June:July:August:September :October:November:December'; Here the months are set out in text (as opposed to numbers), each separated by a colon. The default is in English; modify to suit other languages.
$dateFormatNews='F j, Y'; Here you specify the date format.
The default explained: PHP date format is used here. F = month spelled in full j = day of month without leading zeros Y = year in 4 digits F j, Y -> e.g. October 9, 2006
$excludeIncludes=FALSE; Change to TRUE only if you are including addon_1stpagenews2.php from another file that is already using miniBB functions. ---
Step 3 Upload script files Copy all files to their corresponding folder on the web server; i.e. the PHP file goes into the forums' root directory (e.g. /forums/) and the HTML files into the forums' templates directory (e.g. /forums/templates/) Note: upload PHP and HTML files in ASCII (text) mode.
Step 4 Implementing the first page news script You can implement the script in several ways - pick one: a) PHP Include You can include the script in an existing PHP file by using the include() instruction. Example: <?php include('./forums/addon_1stpagenews2.php');?> <?> If necessary, replace "./forums/addon_1stpagenews2.php" with the correct path to your script.
b) SSI Include If your server supports SSI (Server Side Includes), you can include the script with following line: <!--#include virtual="/forums/addon_1stpagenews2.php" --> Replace "/forums/addon_1stpagenews2.php" with the correct path to your script.
c) JavaScript Example: <script type="text/javaScript" src="http://www.example.com/forums/addon_1stpagenews2.php"> </script>
All the best - mb
* = I am not a miniBB developer. You act on my advice at your own risk! |