An Amazing miniBB-based Forum

 | Start | Register | Search | Statistics |

miniBB®

Complete User and Administration Guide

Most Recently updated on May the 30th, 2023.

Important Notice

This Document contains almost everything you should initially know about miniBB, however it was composed in the earliest years of miniBB project, and during the next few years only minor changes were made. That's why we must warn you: this version of the Guide doesn't cover absolutely every function and possibility of miniBB, as there's required the big time to review them all. We apologize in advance for possible grammar defects you may discover during your reading, and we hope you'll be patient and understand, that preparing a comprehensive Manual is even a bigger task than coding the Program itself. If you are not sure if some feature exists, or how this and that works, do not hesitate to ask us on our forums. We are always willing to help the people in all questions, which affect miniBB software.

  1. Terminology
  2. Copyrights
  3. Introduction
  4. Requirements
  5. Installation
    1. File list
    2. Setting up the software: Step #1
    3. Creating forums
  6. Customization
    1. Configuring the software: Step #2
    2. Setting up the forums & database encoding
    3. Templates
    4. Language packs
    5. Skins: CSS file
  7. Administrative options
    1. Admin panel
    2. "Hidden" admin forums options
    3. Moderators
  8. Forums-wide user options
    1. Users hierarchy
    2. User's registration
    3. User's login
    4. User's language
    5. New topics and replies
    6. Locking topics
    7. Editing messages
    8. Editing preferences
    9. Changing user password
    10. Forgotten password
    11. Forums search panel
    12. Statistics
  9. Some notes for developers
    1. Language packs
    2. Database modules
    3. Including in your own PHP script
    4. Keywords-rich and user-friendly URLs using Apache's mod_rewrite engine
    5. PHP scripts
  10. Upgrading miniBB
  11. GNU Free Documentation License

Terminology used in this Manual

  • Forum software, also called "bulletin board", "message board", "Internet forum" etc., is a program for public exchanging messages. miniBB is exactly about it. With miniBB, you can build your own forum.
  • Message is a piece of information of forum, posted by a certain Member or a Guest (anonymous poster). Also may be called "Post" or "Reply".
  • Topic is a collection of messages following the same subject. Also may be called "Thread". Topic consists of messages listing.
  • Forum is a collection of Topics. "Forums" mean the message board in whole and consists of forums listing on the front page, while a single "Forum" is related to a certain subject of discussions. Forum consists of topics listing. Recent Topics from all Forums at once are displayed on the front page of miniBB.
  • Super-title in miniBB is a replacement of a forum group or category. It is usually displayed only on the front page or forum dropdown choice box above the forum's title.
  • Forums Member - a person on the forum, who has registered a virtual account, consisting of username, password and email address, which are automatically plugged-in when the member logs-in on forum amongst the other provided information. Also may be called "user" or "forums participant". Each Member has its own public profile referenced in a message.
  • Administrator, or may be simply called "Admin", is the only one person in miniBB who has access to the Admin Panel, consisting of forums and members lower level management.
  • Moderator is the assigned member for certain forum, which is specially privileged by the Administrator to manage, track and control forum messages and topics, also as member accounts.

Copyrights

miniBB is a GPL project (read more on Free Software Foundation about GPL License), programmed by Paul Puzyrev and Sergei Larionov. You are allowed to copy/distribute/modify all scripts under terms of GPL. You may edit every opened source file which is present in miniBB core package or its extension. Still, if you are using the software under the free GPL License terms, according to the sections 1 and 2c of this License, you are not allowed to remove miniBB copyright attribution link from the template "main_footer.html" (even you may edit it's look or location) and offer miniBB as "your" product or part of website, putting just your own copyright over all forum pages. For removing the link and/or any copyright information, you need to buy miniBB commercial license. If you have removed miniBB attribution link without allowance, it means you have stolen and pirated the software itself. Do you know any good examples of web projects which were successful using a pirated software?.. Before being a thief, think about what it brings you, or rather what it won't bring you.

If you want to integrate miniBB into your own software, there are two ways of doing that: a) distributing your software for free with the proper license, you should mention miniBB's authors copyright intact in every script, and you can do that without any persmission from us, since GPL license covers that; b) distributing your software commercially, you should either to keep all miniBB copyright notices as in the free software's case, but if you want to remove all references to us, we need to sign a special commercial agreement, which is discussed individually for each case.

Introduction

miniBB (an abbreviation of "minimalist bulletin board") is a flat-type (not threaded) bulletin board, discussion forums software, written in PHP and using mySQL or another PHP-compatible database as data backend. "Mini" doesn't mean "nothing". Specially developed for small and medium forum communities, which have less than 100 unique posts per day, miniBB also could be, and used in much larger projects. If you take a look at miniBB settings file, or this manual, you'll find a lot of options, both for users and administrator, which allow full and in-time control over the board.

This guide refers to almost all miniBB features and possibilities. It is created both for user and administrator, and is included in miniBB package as the "default" FAQ document. You can use this manual as basic user FAQ for your page under GNU Free Documentation License described below. If you are using this guide as FAQ in your forums, remove all administration and developers guides. Regular users should be informed only about related options.

Some options described in this manual require basic HTML and PHP knowledge. If you are on beginner-user level, study it very carefully before applying any modifications to the miniBB package. Remember: this software comes free, but with no warranties.

Requirements

There are no specific requirements of the server type, OS, PHP or mySQL version. Every system that supports PHP/mySQL combination, should also support miniBB. We've got reports that miniBB was successfully up & running on Unix, Linux, Windows, Novell, MacOSX servers, with Apache or IIS, or other typical web-server installed. As about PHP or database version, we recommend to use only final and stable versions of these products. It's the question of your own security at first. However, since PHP is growing fast, we may also recommend to study the most up-to-date requirements page at miniBB.com.

Before installing miniBB, make sure you have PHP installed on your server, and you have mySQL host, login and password information which you'll need to put into the configuration file.

Installation

Files list

The current miniBB version has the files & folders structure mentioned below:

  • [CSS]
    • default.css - CSS file which defines a primary forum skin (font colors and sizes, background colors, table widths, borders, hyperlink colors etc.). Additionally, this folder may contain other customized CSS files, and include local font definitions.
  • [IMG]
    • [forum_icons] - a folder where all forum icons reside
      • default.gif * - default forum icon coming with miniBB package
      • button_bold.gif - BB-code's Bold button icon
      • button_image.gif - BB-code's Referenced Image button icon
      • button_italic.gif - BB-code's Italic button icon
      • button_url.gif - BB-code's URL button icon
      • menubg.jpg - default heading's background table's image
      • minibb.png - the transparent icon/logo for miniBB
      • p.gif - 1x1 px transparent dot icon (used in the proper aligning of HTML tables)
      • page.gif - Forum Pagination's row icon
      • progress.gif - progress indicator for various add-ons having it enabled (like Captcha, Favorites etc.). Try a great tool under ajaxload.info to generate a version for your own website, which should be a sqaure of 16 px in width/height.
      • s.png - Forum Reply's icon
      • topic_active.gif - an indicator icon used in Watching/Subscriptions lists
      • topic_default.gif - default icon for Topic item in Topics listing
      • topic_empty.gif - icon indicating not-answered Topics in Topics listing
      • topic_hot.gif - icon indicating very active Topics in Topics listing, containing more than $viewmaxreplys messages
      • topic_locked.gif - icon indicating a Locked Topic in Topics listing
      • topic_reverse.gif - icon indicating a reversed (latest replies first) Topic in Topics listing
      • topic_sticky.gif - icon indicating a Sticky Topic in Topics listing
      • topic_stlock.gif - icon indicating a Sticky Topic in Topics listing, which is Locked
      • v.gif - icon indication Views amount (used mostly in the Mobile interface)
  • [LANG] - this folder contains all possible Language packs and translations for the forum
    • eng.php - default language pack for the forum, containing all possible translations;
  • [TEMPLATES] - this folder stores forum templates which may be all modified non-destructively. Below are described forum pages they are used on.
    • admin_addforum1.html - forum adding form in the Admin panel
    • admin_banusr1.html - user banning form in the Admin panel
    • admin_deleteban1.html - deletion of user's ban form in the Admin panel
    • admin_editforum1.html - forum editing form in the Admin panel (step 1: choosing the forum)
    • admin_editforum2.html - forum editing form in the Admin panel (step 2: modifying the forum)
    • admin_export_emails.html - exporting user emails form in the Admin panel
    • admin_login.html - Admin panel's login form
    • admin_panel.html - Admin panel's options list
    • admin_removeuser1.html - removing user form
    • admin_searchusers.html - searching users form in the Admin panel
    • admin_searchusersres.html - searching users results in the Admin panel
    • admin_sendmails1.html - "removing email from topic subscriptions" form in the Admin panel
    • common.js - JavaScript codes for various client-side procedures on the forum, which may be also used for the Mobile version
    • email_admin_userregister_eng.txt - email text when notifying member on registration; eng may be added or changed to your language's prefix
    • email_reply_notify_eng.txt - email notification text when notifying member on a new Message in Topic
    • email_user_confirm_eng.txt - email confirmation text when confirming member's registration
    • email_user_password_eng.txt - email confirmation text when sending forgotten password to a member
    • email_user_register_eng.txt - new registration's greetings
    • faq.html - the content located under the "Manual" link on the board (by default, includes reference to this Manual)
    • form.js - JavaScript codes for various client-side procedures on the forum
    • go.html - intermediate message displayed when $metaLocation option is set
    • main_access_denied.html - message displayed when the user has been banned by the IP address or user ID
    • main_footer.html - common footer for all forum pages
    • main_forumgroup.html - forum's super-title layout for the front forums page if $startPageModern=FALSE;
    • main_forums.html - forum listing's layout for the front forums page if $startPageModern=FALSE; (old-school look)
    • main_forums_cell.html - forum listing's raw's layout for the front forums page if $startPageModern=FALSE;
    • main_forums_list.html - forums dropdown box displayed beneath each topics listing
    • main_header.html - common header for all forum pages (containing meta-tags, keywords, dynamic titles, navigation menu, etc.)
    • main_last_discuss_cell.html - Recent Topics' raw's layout for the front forums page if $startPageModern=FALSE;
    • main_last_discussions.html - Recent Topics' general layout for the front forums page if $startPageModern=FALSE;
    • main_modern_fcell.html - forum listing's raw's layout for the front forums page if $startPageModern=TRUE;
    • main_modern_layout.html - forum layout for the "modern" version of the board if $startPageModern=TRUE;
    • main_modern_lcell.html - Recent Topics' raw's layout for the front forums page if $startPageModern=TRUE;
    • main_modern_stitle.html - forum's super-title layout for the front forums page if $startPageModern=TRUE;
    • main_post_area.html - common code for posting form's table and the submit button
    • main_post_closed.html - "Topic is closed" status
    • main_post_form.html - common posting form and related BB-code buttons
    • main_posts.html - topic's general layout
    • main_posts_cell.html - topic's cell layout
    • main_subscriptions.html - Watching/Subscriptions list displaying (layout)
    • main_subscriptions_cell.html - Watching/Subscriptions list displaying (cell)
    • main_topics.html - topics listing's general layout
    • main_topics_cell.html - topics listing's raw's general layout
    • main_user_info.html - public member's profile's general layout
    • main_user_info_cell.html - public member's profile's raw's layout
    • main_viewsubs.html - viewing subscriptions list for Admin and Moderators
    • main_warning.html - common template to display warnings, error messages, notices etc.
    • manual_eng.html - this Manual
    • protect_forums.html - form displayed when all forums are protected by a password
    • search.html - search forums form
    • search_box.html - template to hold the search box template
    • search_messages_cell.html - search template for displaying searched messages
    • search_topics_cell.html - search template for displaying searched topic titles
    • stats.html - forums statistics
    • stats_bar.html - forums statistics' raw's bar layout
    • tools_edit_post.html - editing message form
    • tools_edit_topic_title.html - editing topic's title form
    • tools_move_topic.html - moving topic form
    • tools_send_password.html - sending forgotten password form
    • tools_userips.html - list of all members posted from the certain IP address
    • user_dataform.html - member's profile form
    • user_logged_in.html - member's logged-in status
    • user_login_form.html - member's logged-out status
    • user_login_only_form.html - common table for member's login status
  • _install.php - software's auto-installation file. Should be removed after installation!
  • _install_mysql.sql - software's installation file (SQL commands). Should be removed after installation!
  • _install_mysql_utf8mb4.sql - software's installation file (SQL commands for 'utf8mb4' database). Should be removed after installation!
  • bb_admin.php - Admin Panel's core script; should be renamed to the other filename for security reasons.
  • bb_codes.php - core functions for BB codes; it could be non-destructively extended with new BB-codes.
  • bb_cookie.php - core functions for member's authorization
  • bb_func_checkusr.php - core functions for checking member's registration and profile updates
  • bb_func_confpwd.php - core functions for password confirmation via email
  • bb_func_delmsg.php - core functions for deleting a message
  • bb_func_deltopic.php - core functions for deleting a topic
  • bb_func_deluser.php - core functions for deleting/blocking a user
  • bb_func_editmsg.php - core functions for editing a message
  • bb_func_editprf.php - core functions for editing member's profile
  • bb_func_forums.php - core functions to display forums listing in a dropdown box
  • bb_func_inslng.php - core function to display all available languages to select in member's profile
  • bb_func_ldisc.php - core functions to display Recent Topics
  • bb_func_locktop.php - core functions for locking a topic
  • bb_func_login.php - core functions for handling login on the board
  • bb_func_man.php - core functions to parse Manual
  • bb_func_movetpc.php - core functions for moving a topic
  • bb_func_posthold.php - core functions to display so called "post-hold" form, when the message can't be posted for some reason
  • bb_func_pthread.php - core functions to post a new message
  • bb_func_ptopic.php - core functions to post a new topic
  • bb_func_regusr.php - core functions to register an account
  • bb_func_subscriptions.php - core functions to handle Watching/Subscription topics
  • bb_func_search.php - core functions to search forums
  • bb_func_sendpwd.php - core functions to send a forgotten password
  • bb_func_stats.php - core functions to display statistics of forums
  • bb_func_sticky.php - core functions to make a topic "sticky" (always appearing on top of a certain forum)
  • bb_func_supersticky.php - core functions to make and display a topic as "super-sticky" (always appearing on top of all forum listings)
  • bb_func_txt.php - core text-parsing functions
  • bb_func_unsub.php - core functions to unsubscribe from a topic
  • bb_func_usernfo.php - core functions to display member's profile
  • bb_func_usrdat.php - core functions to parse entered profile's values
  • bb_func_vforum.php - core functions to display forums listing
  • bb_func_viewip.php - core functions to display list of usernames which has been posted from the same IP address
  • bb_func_vthread.php - core functions to display messages listing (topic)
  • bb_func_vtopic.php - core functions to display topics listing (forum)
  • bb_functions.php - common software's functions and the version container
  • bb_plugins.php - script to extend with different add-ons at the common non-destructive level
  • bb_plugins2.php - script to extend with different add-ons at the common non-destructive level
  • bb_plugins_user.php - script to extend with different add-ons at the member's level
  • bb_specials.php - additional forum options, like defs for private, read-only and post-only forums, moderators assignments, members custom rankings etc.
  • COPYING - GPL License file
  • favicon.ico - default icon to display in the browser's bar and browser's bookmarks
  • index.php - root software's script; may be renamed to have a different filename
  • robots.txt - default 'robots' file for search engines
  • setup_mysql.php - MySQL requests and functions module; you may develop another SQL-module compatible with PHP based on these functions (MSSQL, Postgre, MySQLite etc.)
  • setup_options.php - common root settings file

You could not rename forum's root folders, else the software won't function properly.

Depending on the installed add-ons, optionally, there may be also various plug-in script files located under the abovementioned folders.

Setting up the software: Step #1

With no matter to miniBB version or the add-ons you're going to install, at first try the miniBB Compiler, taking care of your time and health. This tool allows to automate the process of manual installations, making miniBB setup possible in a minute. Whatever package you have on output, will be compatible with everything listed in this chapter below.

Before you are going to install miniBB, at first, you already should have a web-hosting space and the registered domain, under which your forums will reside. One copy of MiniBB could be executed on one domain only.

Hosting package should support PHP and mySQL. * Check miniBB requirements page to make sure your hosting has everything to run the forum.

There should be a mySQL database available, and you should know its name, login, password and host name where it resides. This data is required for the miniBB installation. If you don't know what is a mySQL database, try to search the web first. On many hosting plans, there are available administration tools like cPanel, where you could create a database on your own.

In most cases your database should be set in UTF-8 encoding. If you have mySQL version older than 5.5.3 (your mySQL version is displayed by the miniBB installation script at the first screen - you could safely execute it to check for the version, as the first screen doesn't initiate the installation process), then try to apply this command in the SQL command window:

alter database DB_NAME character set utf8 collate utf8_general_ci;

If you have mySQL version equal or greater than 5.5.3, it would mean your database should provide the full support of UTF-8. Then try to apply the following command:

alter database DB_NAME character set = utf8mb4 collate = utf8mb4_unicode_ci;

In both cases, DB_NAME stands for your Database Name. Read more about configuring the Unicode database properly below.

mySQL's user name, password, host and database should be known and well-working in advance. According to the mySQL's access privileges, it must be a "super-user", which is allowed to create tables. Many users don't know a lot about these values, and could get a "server overload issue" with the REFCODE provided (in miniBB starting from ver.3.5; in older releases, errors could be named like Database/configuration error. or Database/configuration error (DB is missing).). Any error displayed like described above, simply means the mySQL database is either not installed, either improperly configured in setup_options.php. miniBB doesn't use anything specific for connection to database - they are only regular PHP/mySQL functions. Establishing the proper connection to your database is the most important step in setting up the forum.

Unpack 'minibb.zip' package somewhere on your disk, where 'minibb.zip' stands for the basic free version, or for the compiled package. Be sure you are unpacked all files and folders match the original folders structure on your disk as it's provided in the package. Make sure you have [IMG], [LANG], [TEMPLATES] folders extracted, and they are contained with proper files.

You should transfer all miniBB package files and folders to the place under your hosting, where you would like to see your forum running. Use File Transfer Protocol (FTP) client for that; hereby you should have FTP access (login and password) to the server. If you don't know what is FTP and how to use it, try to search the web first. Use a qualified FTP client program for this purpose, because files should be not broken or binary-converted when transferring on the server. Our FTP client recommendation is Total Commander.

When all files are transferred, make sure you have uploaded them all, and the files/folders structure matches the original. Compare all uploaded and original files by size, one-by-one, to the original package. It is a very common mistake, when some file has been not uploaded in full (during the connection error, or FTP client reset error), and all that may give an additional error report when executing miniBB, so it will not execute partially or in full. For example, this is a reason for common error reports like "TEMPLATE NOT FOUND", "Fatal error.", "...failed to open stream: No such file or directory in...", "Failed opening ... for inclusion..." etc.

By default, in the basic mode, MiniBB doesn't require special file permissions.

On your disk, locate the file called setup_options.php which contains almost every common option of miniBB. Open it for editing in some plain text editor.

Here and further, modify all miniBB files with a qualified text editor! Our recommendation is Notepad2. This editing program, or similar are not storing additional newlines, spaces or breaks before <?php and/or after ?> tags, and it doesn't change the original structure of the file. Having something extra in the file may cause problems with your forum program. For example, you will be unable to log in, and kind of such error will appear: Cannot modify header information - headers already sent by (output started at....

Under the settings file, you will find a lot of settings, but it is not required to edit all of them in this 1st step. We will edit only some of them, and will explain the others later. Let's begin.

  • $DB = 'mysql'; Depending on your database module, could be 'mysql', 'postgresql' or 'mssql'. Keep 'mysql' for current version of miniBB.
  • $DBhost = 'localhost'; Specify host name for the forums database. On most hosting plans it is 'localhost', but may vary.
  • $DBname = 'miniBB'; Specify the name of the database.
  • $DBusr = 'USERNAME'; Specify the database's username.
  • $DBpwd = 'PASSWORD'; Specify the database's password.
  • $Tf = 'minibbtable_forums';
    $Tp = 'minibbtable_posts';
    $Tt = 'minibbtable_topics';
    $Tu = 'minibbtable_users';
    $Ts = 'minibbtable_send_mails';
    $Tb = 'minibbtable_banned';
    $Tl = 'minibbtable_failedlogin';

    Specify database's table names - for security reasons, default names are recommended to change with a different prefix.
  • $cookiedomain = ''; miniBB uses cookies for keeping the login. Here it's defined this Cookie's domain. Most likely you can leave this value as blank, however, if you have problems logging into the forum, set this to your domain name, without the http://. F.e., if your forum is at http://www.mysite.com/miniBB then set this value to "www.mysite.com". Setting it ".mysite.com" will allow to work it from all subdomains of this certain domain.
  • $cookiename = 'miniBBsite'; Cookie name. Use only latin letters, digits and underscore sign specifying it. No spaces, dots or special symbols are allowed, this will make the login impossible to proceed. Should begin with a latin letter.
  • $cookiepath = ''; Cookie setting. Usually you don't need to change this (it will be substituted by a browser automatically); however if it's being accessed for the whole root domain, set to '/'.
  • $cookiesecure = FALSE; Cookie setting. Set this to TRUE only if your forum URL starts with 'https://' (and so it works with a secure connection). TRUE on an insecured connection will lead to failed logins.
  • $cookie_expires = 3600; This is the number of seconds that a session lasts for, 3600 = 1 hour, 2592000 = 30 days. The session will exprire if the user doesn't view a page on the forum within this amount of time. If you are experiencing problems with international users, set this to 25 hours.
  • $cookie_renew = 1800; This is the time after which session is sent again; for example, user was logged once, then logs again (password is not asked), works and this amount of time is reached. Usually it is not necessary to change this.
  • $cookie_httponly=(version_compare(phpversion(), '5.2.0', '<')?FALSE:TRUE); Available since miniBB 3.5, this option defines the use of HTTPOnly flag. If you're sure your PHP version is higher than 5.2.0, you could set this straight to TRUE; FALSE otherwise.
  • $cookie_options=(version_compare(phpversion(), '7.3.0', '<')?FALSE:TRUE); Available since miniBB 3.5, this value defines the use of "options" signature, available in PHP since ver.7.3.0. If you're sure your PHP version is 7.3.0 or later, you could set it directly to TRUE. Otherwise, set to FALSE - in this case, miniBB will use the older implementation of setting a cookie.
  • $cookie_samesite='Strict'; Available since miniBB 3.5, this defines the use of the SameSite attribute. It could be only applied with the "options" signature as described above and works only in PHP starting from ver.7.3.0. The values could be 'None', 'Lax' or 'Strict'. 'Strict' is always recommended. If you have a lower PHP version, you may skip setting this value, as it won't be applied in setting a cookie.
  • $admin_usr = 'ADMIN_USR'; Specify Administrator's login, is inserted in database also as first engine username with the member's ID equal to 1. Do not use "|" character in the Admin's username (most likely, use only alphanumerical symbols and digits). You may change it anytime later; read on our forums how to change admin's password properly.
  • $admin_pwd = 'ADMIN_PWD'; Specify Admin's password.
  • $admin_email = 'admin@email'; Specify root admin's email. It is not displayed to public on forums.
  • $reply_to_email = $admin_email; an email address used in Reply-To, Errors-To and Return-Path fields of all forum automated messages. If it's allowed by the server, on this email address you will also get all emails returned by some reason. By default, all emails contain Reply-To email specified in $admin_email, but you could make it different. Read more on how to properly set up this email address to avoid undelivery of automated emails.
  • $main_url = 'http://yourdomain/forums'; Full URL (beginning with "http://" or "https://") to your forums (not to the main site!!!); with no ending slash); used in email notifications and other scripting stuff, like redirect from one page to the other. Must be set correctly in order to the board working fine. Pay a special attention: www.domain.com and domain.com are different things, specially when we talk about handling of authorization cookies. If the cookie has been set from www.domain.com, it will not work on domain.com (so you won't be logged in), and otherwise. This is a very common mistake, which makes troubles with logging in/out in forums.
    By default, this variable will try to generate its own value based on $_SERVER parameters, this could help to avoid confusion on local networks and intranet when trying out miniBB. When the forums go live, this value should be definitely set to a static value, containing your domain set properly with or without 'www' as mentioned above.
  • $bb_admin = 'bb_admin.php?'; Admin panel's script's filename - for security reasons, rename the physical file bb_admin.php (administrative file) having a different filename with '.php' extension, and then specify the filename here. The value must contain the ending question mark (?), like: 'your_renamed_admin_file.php?'.

Also, pay attention also to the option $pathToFiles, which is described below. It's not a subject of changing if your miniBB program is running smoothly. However on some operating systems like Windows, and under some server configurations, it will be strongly required, that you set full absolute path to your scripts, so they can be included via PHP's include function properly. Also, many third party libraries functions available in PHP, may require this option to be set as full path (GD or Aspell, for example).

After you've done editing of setup_options.php, save it and update on your server. Then proceed to the Installation itself.

Automatic Installation

Installation of miniBB is very simple and takes less than a minute. After you did the basic configuration described above (did you?..), locate http://yourdomain/forums/_install.php (this URL stands for your own URL) in your browser. If you have configured everything properly, it should open miniBB installation screen, where some of your server's configuration and software versions are automatically detected, and displayed by the informative purpose. Read everything carefully and continue installation, following instructions on that screen. Usually, it takes couple of seconds to create all database tables and admin account on forums.

MiniBB is also possible to install manually. This is recommended only for professionals having troubles or limitations with mySQL database. For manual installation, execute commands located under _install_mysql.sql file, and optionally under _install_mysql_utf8mb4.sql file (having mySQL equal or greated than ver.5.5.3). Afterall, reset admin's account in the admin panel, clicking the proper link, but this is not a mandatory action - if you just keep your admin access data in a plain setup_options.php file, with no replicating the admin password to a database, in some cases it could be more safe and bullet-proof.

After installation is completed, delete _install.php and _install_mysql.sql files from the forums folder directory for security reasons.

Creating forums

miniBB engine is using cookies for registered users and admin log in. PHP sessions could be used optionally, but we don't recommend it because of weak search engine mechanisms on sessions. Please refer to "logging" section for more info. So, turn on cookies in your browser for that stuff.

Do a login to your admin page. Usually is "bb_admin.php", but since your are renamed this file (did you?..), only you know what is admin panel URL. So, go to that panel, and probably you will be prompted for your admin login and password. Enter them, and you must go into admin panel. If the trouble appears and you're not able to login, double check your cookie path, domain and name, probably change them and, on IIS servers, try to uncomment "$metaLocation" option (see below).

There you will see a bunch of options for your miniBB forums. We will describe them later, but now we need to create some forums. So, click on "Add forum" link and... follow instructions on the screen! We guess, it will be very easy to create some forums. Refer to "Supertitles" secton - supertitles are actually replacement for subcategories.

Also, we don't recommend to give forums "large names". Be as laconic as possible. First, it is more rememberable, second, large names do not fit in topics or threads listing pages. Search cralwers like Google also don't like them.

When you enter miniBB as administrator, you are also logged in as simple user. You can make posts under your name, edit other posts, make deletions etc. We'll talk about it later. Only one: by default, you should also see "admin panel" link beneath every page. And you can automatically reach your panel following this link, each time you are signed in as admin.

Customization

Configuring the software: 2nd step

At this moment, your miniBB should be running already! Go to index.php and check this. But, there is a lot of other options that probably you want to change. Let's refer to setup_options.php again. Note for PHP newbies: //$a='b'; string actually means nothing, and this setting will not work in any case, because this statement is COMMENTED (two slashes before). Removing slashes means UNCOMMENT or ENABLE this setting. For changing setting, change its content between apostrophes (''). Numerical settings may also not contain apostrophes.

  • /* determining the mobile device */ This block is actually not about a single setting, but about the code which forms the rule checking if the client is browsing with the mobile device or not. By default, it's used for mobile-friendly checks by Google; in the advance version, this code is used for switching the Mobile Template mode. Possibly you don't have to modify this code if you're not the coder; however it's possible to build a very deep level of sophistication when new mobile devices come on the market and they would need special rules for identification.
  • $indexphp='index.php?'; The name of your index file; could be renamed to a different filename, for example when conflicting with an existing site's index name. Should have an ending question mark (?), like shown, disregarding the custom filename.
  • $pathToFiles='./'; Full file system path to your miniBB files (on Linux, as for example, could be /usr/home/public_html/forum/). Must have SLASH at the end. You may use one copy of general miniBB core, but having just different index and options file, create many communities based on this core. This option also could solve some file including problems on systems like Novell. You can set the full path to the scripts, or leave default if the board is working normally. This option also is necessary to set, if you include your own php header and footer (see below).
  • $fontsCSS = "<link href=\"[...]\" type=\"text/css\" rel=\"stylesheet\" />"; This setting defines the fonts stylesheet which could be used widely on your forum. Depending on your version of miniBB, there could be a different value instead of '[...]'. Prior to v3.5.1 it's been referenced to the Google's Roboto font API https://fonts.googleapis.com/css?family=Roboto; since v3.5.1 it refers to the local distribution of Roboto font {$main_url}/css/roboto.css. You could create references to another font(s) API from Google, or local font(s), or just set this to an empty value and define all fonts in the [css]/{$skin}.css style which is defined below. {$fontsCSS} is only included in templates/main_header.html, so you could also remove this setting from there if you won't use external fonts in your layout.
    For downloading free Google fonts and applying them to your forums, try the google-webfonts-helper project. It allows to choose a font, make the charset selection, then copy the automatically generated CSS and download all necessary files at once. Follow what's created under /css/ folder of miniBB, how it's referenced in roboto.css as for an example, put the additional font names and defs under /css/default.css which is used on the forum, and then update the value of $fontsCSS in setup_options.php, replacing your fonts set, or adding it as a different stylesheet in additional meta-tag.
  • $skin = 'default'; The name of the CSS-skin (in this case, it will be located under [css]/"default.css" file). In most cases, leave the default value and edit the skin file itself.
  • $sitename = 'Community build on miniBB'; Forum's title. Appears on all pages, as well as in notification email subjects and bodies. Try to avoid long titles. First of all, it will affect the overall look & feel of the board, because such titles are widely used in forums navigation links. Second, modern email spam filters may consider emails with more than 55 characters subject as "non-human" and block them. MiniBB team's recommendation is to put maximum of 4 most important keywords in such title, describing your forums, with no overlimiting of 35 characters.
  • //$emailname = 'miniBB Forums'; An optional name/title (hidden by default), which would appear in the FROM field of emails sent by miniBB, if they are enabled (as subscriptions, registration confirmations etc.). If it's not specified here, then the FROM name will be equal to the value of $sitename. If you have a large forum's title, re-specify the FROM name here to a shorter one.
  • //$sitename_subtitle = 'Support Forums'; non-mandatory option (hidden by default). You could specify an alternative forums title which will differ from what's displayed in the <title> tag. Then it could be used in the "main_header" template, or in the Mobile layout.
  • $startPageModern = TRUE; A mandatory option, specifying the type of the forums' front page layout mode. TRUE stands for the layout listing the most Recent Topics on the left, and the Forums listing on the left column. FALSE means the old-school forums layout, when Forums listing follows first, then the Recent Discussions (which also could be forced to be hidden in this case). FALSE also specifies the mode when it's interpreted as "mobile-friendly" by Google, despite if we consider using forums in such mode on mobile devices, it's lacks a proper mobile layout available in the miniBB Mobile package.
  • /* Mobile Friendly/Template code */ The code in this block specifies some specific options, if the forum is accessed from a mobile device. The free miniBB version contains the only code, which re-sets the default layout, making it compliant with the Google's "mobile-friendly" check (see above). However the miniBB Mobile package contains the rich version of the truly mobile layout and templates, which are all set in this block of code. By default, you don't have to touch anything in this block.
  • $lang = 'eng'; Language used in miniBB interface. Just check how your language file in directory "lang" is called (example: eng.php is 'eng', rus.php is 'rus'). By default, only english language file is included. For more language packs, refer to our site.
  • $emailadmin = 1; notify admin when a new profile is registered. 0 for "no", 1 for "yes".
  • $emailusers = 1; The value of "1" enables some emailings for participants, like Registration email and New post notifications (members could subscribe to new posts notifications in selected topics, even if they are not authors of these topics). Mailing is a heavy server process, so it's not recommended to set this up for big communities; however it's worth to try out on small and medium forums, or as soon your forum grows.

    It is also possible to define, if users could receive notifications on their profile language: set $emailusers=2;. In this case, you should create email templates (templates/email_*.txt) with the proper 3 letters language postfix, for example: email_reply_notify_ger.txt, email_user_register_ger.txt, email_user_password_ger.txt for German - in this case, the core pack ger.php should be available under the /lang/ folder and could be selected in the Profile. This is however not mandatory. If lang/ger.php exists, but there are no related email templates, default templates would be used as for the default language pack defined in the $lang setting (for English: email_reply_notify_eng.txt, email_user_register_eng.txt or email_user_password_eng.txt). Default language pack is also always used for Admin and other system notifications.

    Please note that for New post notifications by email, this setting could be overwritten by the values set in $purgeEmailSettings (check below). For example, you could set $emailusers=0; and that way disable Registration email AND New post notifications, but setting $purgeEmailSettings=2; you will enable New post notifications only. Also please note, that if you set $genEmailDisable=1; like described below, this would globally turn off all emailings on the server, i.e. the value of $genEmailDisable overrides all mentioned above.

    This setting doesn't affect forgotten password sendings, which are always enabled, except if $genEmailDisable=1; (check below).
  • $userRegName = '_A-Za-z0-9 '; Via registration, users can use only these symbols in their login name. You can add "international" letters (f.e., specific russian symbols under special encoding table). String is based on REGEXP match, so if you are not sure, don't touch it. DON'T ADD "|" sign please, and other specific symbols too (especially like <, >, apostrophe ' and quotes "), else it may lead to security problems with your forum!
  • $l_sepr='|'; is a symbol to separate some values like menu items. For example, set it to '·' and you'll get small middle dot.
  • $post_text_maxlength = '10240'; Max characters and spaces allowed in 1 message. Don't set to 0 - then your visitors will not be able to post anything.
  • $post_word_maxlength = 70; Max amount of chars, allowed in 1 word. Used for disabling "long URLs destroys your design" thing.
  • $topic_max_length = 70; Max amount of chars, allowed in topic title.
  • $viewmaxtopic = 30; How many topics to show on one page.
  • $viewlastdiscussions = 30; How many last discussions to show on 1st page, 0 disables last discussions (see below what means "last discussions").
  • $viewmaxreplys = 30; How many replies to show on one page.
  • $viewmaxsearch = 40; Max search results per page.
  • $viewpagelim = 50; Max pages you can view in either search, posts or topics list.
  • $viewTopicsIfOnlyOneForum = 0; If you have only one forum, topics inside can be automatically displayed on 1st page. 1 for yes, 0 for no.
  • $protectWholeForum = 0; Should we protect all forums by one password? If value is 1, two values below are defined as well. Else set to 0.
  • $protectWholeForumPwd = 'SOME_PWD'; Password for protecting the whole forum.
  • $postRange = 60; Antispam: time range in secs. User can not post a message less than after this time. Attention: zero (0) disables antispam!
  • $dateOnlyFormat = 'j F Y'; PHP date's definition containing year, month and day only. They could be replaced to "Today" and "Yesterday" on forums, if such variable is specified. Still, it's not a mandatory setting.
  • $timeOnlyFormat = 'H:i'; PHP time's definition containing hours, minutes, and seconds only.
  • $dateFormat = $dateOnlyFormat.' '.$timeOnlyFormat; or $dateFormat = 'j F Y H:i:s'; Date format for displaying in forums. The same syntax as defined in PHP. Textual English month names defined by 'F' are replaced to months definitions taken from the language file. If you would like to display "Today" and "Yesterday" instead of a date, put the concatenation of two above options mentioned. Else specify the regular date format and disable two options above.
  • $disallowNames = array('anonymous', 'ass', 'etc.'); This feature prevents users from registering forbidden names. In apostrophes, define unwelcomed user registration names. If you are using more than 1 language pack, define here all strings under name $l_anonymous in language pack, else visitor will be able to register under 'Anonymous' name, for example. Case doesn't matter when you define a word. You could also define a word fragment here, so users will not be able to register login name which contains this fragment.
  • $disallowNamesIndex = array('admin'); Combined together with $disallowNames, allows to set list of prohibited usernames which cannot be used via user's registration. The difference is that script checks for a word fragment defined in $disallowNames and exact match with words defined in $disallowNamesIndex. For example, having "admin" in $disallowNames you prohibit users register even the names like "badminton". So, put fragments in the first array and exact matches in the second.
  • $sortingTopics = 0; If 1, topics are sorted by new topics even for anonymous users; else they are sorted by new answers.
  • $topStats = 4; Must be either 1, 2, 3 or 4 - correspondly for statistics' Top5, Top10, Top20 and Top40.
  • $genEmailDisable=0; the value of "1" globally turns of all email sendings: forgotten password sending, registration email sending, new post notifications, possibly some others; also if you set up the value for $closeRegister setting. This could be useful for local servers and those having no sendmail, or another mailing program installed on the server.
  • $defDays = 365; Default term value which defines statistics for that days period (for example, if you want to show statistics within 1 month as a default value, set it to 30).
  • $userUnlock = 0; If it is set to 0, registered user can not unlock his topic again after it was locked (by admin or himself), and vice versa. If set to 2, users are not able to lock their topics in general (avail. from ver. 2.0 RC3).
  • $emailadmposts = 0; notify admin when a new message or topic is being posted; exclusion: if admin is not the message's author on himself. 1 for "yes", 0 for "no". If it is equal to 0, admin will not receive notification emails, but will be allowed to subscribe to certain topic(s) manually, turning on the notifications checkbox.
  • $useredit = 86400; Parameter defines number of seconds, after which user WILL NOT BE ABLE to edit his message. By default is 1 day (86400 sec.) If 0 or not set, user will be able to edit his post everytime.
  • //$metaLocation = 'go'; This option should solve login/logout problem which has been experienced by some users on IIS servers and other exotic servers. These servers can not send 2 headers (cookie and location) one after another. Having go.html file (or any other file, cause filename can be set here) in the templates forums directory with meta header in it, you first will visit that file, and then you'll be relocated from it to another place. You can edit go.html if your wish; for now, its structure is very simple and it redirects within 0 seconds, so probably you won't ever actually see it. This option is not turned on by default.
  • //$closeRegister = 1; setting this to 1, it is possible to avoid "open" registrations. By default when someone registers, s/he enters a desired login/password, and becomes the registered user straight. It is possible to avoid incorrect email address upon registration in that case. If you set this setting to 1 (default is still 0 or unset), on the registration form user will not see the password field, and will receive it via email sent after registration (password will be generated automatically). In the template user_dataform.html there should be <!--PASSWORD--><!--/PASSWORD--> tags; when registering, user won't see the inner content between these tags, but will see it only editing the profile (the tags are required, because the same template is used for the registration and modifying the profile). Having this option set, you SHOULD set $genEmailDisable parameter equal to 0. And of course you should have sendmail working ok. If you set this option to 1, don't forget to edit registration message $l_goToLogin in language pack, when you should inform the user that he will get his password on email. Alternatively, in your forums manual mention that registered users should enter their correct email address, because password will be sent here. If you have this option set, an email address must be confirmed similarly if it's changed in the Profile. You may refer to the related topic on our forum, where it's explained of how to implement configuration steps for this option.
  • //$timeDiff = 21600; Allows you to set time difference between you and server, so all dates are displayed in your time zone. This could be a rare thing and necessary only if you, for example, have server in US and are visiting it from Norway. You need to set up $timeDiff in seconds. Positive 21600 sets up +6 hours of time difference. Note that miniBB is still saving server time into SQL database. This option will only re-calculate the server times in your format. Setting this, of course, will slow down the execution of scripts.
  • //$stats_barWidthLim = '31'; this setting affects statistics bar length. In most cases, you do not change this.
  • $dbUserSheme = array(
    'username'=>array(1, 'username', 'login'),
    'user_password'=>array(3, 'user_password',' passwd'),
    'user_email'=>array(4, 'user_email', 'email'),
    'user_icq'=>array(5, 'user_icq', 'icq'),
    'user_website'=>array(6, 'user_website', 'website'),
    'user_occ'=>array(7, 'user_occ', 'occupation'),
    'user_from'=>array(8, 'user_from', 'from'),
    'user_interest'=>array(9, 'user_interest', 'interest'),
    'user_viewemail'=>array(10, 'user_viewemail', 'user_viewemail'),
    'user_sorttopics'=>array(11, 'user_sorttopics', 'user_sorttopics'),
    'language'=>array(14, 'language', 'language'),
    'num_topics'=>array(16, 'num_topics', ''),
    'num_posts'=>array(17, 'num_posts', ''),
    'user_custom1'=>array(18, 'user_custom1', 'user_custom1'),
    'user_custom2'=>array(19, 'user_custom2', 'user_custom2'),
    'user_custom3'=>array(20, 'user_custom3', 'user_custom3')
    );

    This database scheme array describes relations between field names in user_data_form.html (registration, profile) correspondingly to database, and database indexes used in userinfo viewing. So, you can use your own database table for usernames (for example, as another part of your site) and only define relations here. Relation format: [MINIBB DEF] => array([NUMERICAL_INDEX_KEY],[TABLE_FIELD_NAME],[FORM_FIELD_NAME]); Pay attention that the structure of fields, their types must be default as in miniBB database, for example, user_password must be saved in md5 format. Edit this option ONLY if you are NOT NEWBIE!

    How the registration/profile script works: it goes through every [MINIBB DEFINITION], and correspondly parses a $_POST[FORM_FIELD_NAME]. When viewing profile, [INDEX] is taken into consideration. Fields like "user_regdate" or "activity" are not defined by user, so, it is not necessary (and even forbidden) to define them here.

    Second password field must be named 'passwd2'.

    All values in a form must be named as their fields. Example: field "login" will be valued as "{$login}".

    For viewing new or custom fields on User Info page, you need to set corresponding $l_usrInfo variable. Keys of this array are the same as keys for table fields (for example, if key for user_icq is 5, then its language definition is $l_usrInfo[5]). user_custom1, user_custom2, user_custom3 database fields can be displayed on the user info page as well you will need to add corresponding values for these to the language pack though: $l_usrInfo[12], $l_usrInfo[13] and $l_usrInfo[14] ,- accordingly. You may also add additional custom fields, naming them so they contain 'user_custom' in the system key definition. In that case, set corresponding $l_usrInfo so it begins from 15. For example, if you have 'user_custom1', 'user_custom2', 'user_custom_name', 'user_custom_surname' listed in order one by one, $l_usrInfo keys are 12, 13, 14, 15.

    If you have enabled email notifications about new user registrations and/or send registration information to user's email, you MUST also fix variables defining user data, in the templates: email_admin_userregister.txt, email_user_register.txt. Variables must correspond to your registration form fields (for example, if you have form field named "email", variable will be {$email}). With default miniBB database structure, no need to change these templates.

  • $dbUserId='user_id'; $dbUserDate='user_regdate'; $dbUserDateKey=2; $dbUserAct='activity'; $dbUserNp='user_newpasswd'; $dbUserNk='user_newpwdkey'; Field names that are updated AUTOMATICALLY. DO NOT include them in db scheme list.
  • $enableNewRegistrations = TRUE; Set this to TRUE if you'd like to enable forum registrations; FALSE if you'd like to disable registrations, or if you have them in your own registration module. This case mostly supposes, that you have website membership bundled with miniBB (for example, like it's explained in the synchronizing guide) - so all members having profiles on your website, could also sign-in to miniBB forums and they are not required to register/sign up twice. If this is a case, you will also need to modify the value of $l_anonDisallowed from the language pack (lang/eng.php or whatever language pack you may have) and remove the registration link from there, OR - change it to your own link. Alternatively, in a case of all forums set up for registered members only, you may remove {$l_anonTxt} from templates/user_login_form.html for hiding the membership information on the replying and posting forms.
  • $enableProfileUpdate = TRUE; Set this to TRUE, if you'd like that members update their profiles; else to FALSE. Like explained above, in the case of bundled memberships profiles may be completely updated with some another 3rd party script, then the default miniBB approach could be disabled. However, if miniBB profile's options like default language, sorting, or possible avatars, signatures, forum profile photos are not included in your own script, you'd need to take care of them, enabling this option, properly modifying templates/user_dataform.html template, and allowing members to update at least their forum setting in their profile, so this should be set to TRUE then.
  • $usersEditTopicTitle = TRUE; If you want topic authors may edit their topic's title; else FALSE.
  • //$includeHeader = 'header.php'; Uncomment and set alternate header, if you don't want to use miniBB's default main_header.html (useful if you use some header.php from your own site, for better integration).
  • //$includeFooter = 'footer.php'; The same as above, for footer. Don't forget that our copyright link must migrate from our footer to yours in this case.
  • //$emptySubscribe = TRUE; Uncomment and set to TRUE if you want your users may subscribe to the topic without posting some text.
  • //$allForumsReg = TRUE; If you want to make all forums for registered only users by one touch; else FALSE. By default, it's disabled, and guests are allowed to post on the forum.
  • //$registerInactiveUsers = TRUE; If you want all registered users become inactive until you accept them. Used for manual user activity acceptions. If activity field's value in database is "1", user is able to make new topics, posts and another operations on forum. If "0", user is able only to login, but not use anything. It means his account is in database, but has been blocked for a while. With this, miniBB turns into a powerful anti-flood message board: you can make all your forums for registered users only with one option; you can use only "live" emails, sending registration passwords there, you can set an option to view all new registrations on your email, and even if flooder has been registered, entering his Profile, you as admin or moderator can disable his activity (if you are logged as admin, at the end of member's profile, you will see a cell "Member" and "Yes/No" in it. Clicking on Yes, you enable member status, and vice versa). In combination with sending all new user registration on admin's email, you always will know who was registered on your forums.

    If user is registered and not accepted, he will always see a message defined in language's $l_accessDenied. Correct this variable according to your needs OR just mention in your forum rules, that until the account is verified and accepted, members can't login.

  • $enableViews = TRUE; By default, miniBB counts topic views, but does it only by simple way, when user opens some topic from the first page. Actually, topic views is not really necessary column, but could be useful for small communities. When counting views, SQL-server makes an UPDATE request; on large databases, it could cause speed problems. So there is also possibility to comment or set this option to FALSE so this kind requests will not happen.
  • //$mod_rewrite = TRUE; Set only if you are using Apache server and would to use "virtual addresses" via it in miniBB. Read for more below. Not for newbies!
  • //$userInfoInPosts = array( $dbUserSheme['user_from'][1], $dbUserSheme['user_website'][1] ); Available from version 2.0 RC2b, this option defines list of user's table fields, which values may be displayed in every post user makes. You can put exact field values here (not based on $dbUserSheme), for example:

    $userInfoInPosts = array('user_from', 'user_website');

    but make sure these fields are appearing in user's table itself. After setting this, in main_posts_cell.html template you can set, for example, {$userInfo_user_from[$poster_id]} and {$userInfo_user_website[$poster_id]}, and you will get actual values instead of variables when template will be parsed. Operating with user's info table this way, you can get the value of any user field (like avatar, signature etc.) Combining this with plugins, we are achieving very smart level of customization.
  • //$userDeleteMsgs = 1; Available from version 2.0 RC3a, this option allows users to delete their own topics and/or messages (set 1 for allowing to delete only replies, 2 - for deleting both topics and replies). This option is tied up with $userEdit option (see above) - when topic or message is expired for editing, it can not be deleted anymore. When deleting a record, PHP script makes many updates in another fields (number of posts per forum, posts per topic, posts per user etc.) - so, use this function on your own risk. Creating/deleting their topics often, users may overload your database.
  • //$textLd = 1; Available from 2.0 RC4, setting $textLd=1; or $textLd=2; you will get {$lastPostText} variable available in latest discussions section on the first page (templates/main_last_discuss_cell.html). If set to 2, all HTML formatting is removed from the post text, and you can use it in <acronym> tag, for example. If set to 1, post text is left as it is.
  • $startIndex = 'index.php'; Available from 2.0 RC5, this mandatory option sets the basic filename of "index" file, which will be displayed in backlinks to the main forum on the intermediate forum pages. Prevents duplicated content of search engines indexing. Default is 'index.php'. Set 'index.html' for mod_rewrite (when only setting mod_rewrite "index.html" rule - read below).
  • $manualIndex = 'index.php?action=manual'; The same principle as for mandatory setting above; displays backlink to manual page. You may set 'manual.html' for mod_rewrite.
  • $description = 'How to make up a forum? Get miniBB - free and paid discussion custom forum software, bulletin board system script, written in php & mysql. Download now!'; - mandatory option specifying default description tag for the forums start page and other internal pages. Description in topics list is generated basing upon the forum description, and messages list description is based upon the first characters of the first message.
  • //$enableGroupMsgDelete = TRUE; Available from 2.0 RC5, enables or disables group messages deleting by admin or moderator - he is able to delete many messages at once, checkmarking them and clicking on necessary link. Specially useful on anonymous boards, when you are forced to fight the spam or flood. For enabling this option, just uncomment the variable and set it any value.
  • //$post_text_minlength = 10; Available from 2.0 RC5, this not mandatory option sets minimum amount of symbols needed for posting a message, preventing unmeaningful posts. Default is 10 symbols. Uncomment and set to 0 if you want to disable this.
  • //$loginsCase = TRUE; Available from 2.0 RC6, not mandatory option. If is not set, or set to FALSE, all logins are CASE SENSITIVE (by default). For example, if you have registered username "Paul", you must type "Paul" in your login field. Not "PAUL, and not "paul" - this will not work. If this option is enabled and set to TRUE, you can type anything - "paul", "PAUL", "Paul" etc. - anything will be compared in lowercase. Notice: nobody is able to register "PAUL" or "paul" usernames, if there is already one "Paul" in database - this doesn't depend on setting this option. This option also DOES NOT affect passwords; password must be entered the same manner as via registration.
  • $enablePhpMailer=array(
    'smtp_host' => 'specify SMTP server to connect',
    /* Specify SMTP host here */

    'smtp_auth' => TRUE,
    /* In the case of SMTP authorization, set to TRUE, else to FALSE */

    'smtp_username' => '',
    /* In the case of SMTP authorization, specify login/username */

    'smtp_pass' => ''
    /* In the case of SMTP authorization, specify password */

    'smtp_secure' => 'tls',
    /* In the case of secured SMTP authorization, specify its type - 'tls', or 'smtps'; check in PHPMailer docs for more options, or it depends on the port value below */

    'smtp_port' => 587,
    /* In the case of secured SMTP authorization, specify its port; mostly 587 for 'tls', 465 for 'smtps' */

    'required' => array($pathToFiles.'PHPMailer/src/Exception.php', $pathToFiles.'PHPMailer/src/PHPMailer.php', $pathToFiles.'PHPMailer/src/SMTP.php'),
    /* The list of included/required PHPMailer scripts - possible to include few of them specified in the array, depending on your connection type */
    );

    Available from v3.5.1, this optional/hidden set of options (not specified by default) allows to use external PHPmailer class, declared as probably the world's most popular code for sending email from PHP. Most recently tested version of PHPMailer is: 6.8.0 (Published Mar 6, 2023).
    For enabling PHPMailer, create the folder named PHPMailer under your forums root folder, then copy all files from the PHPMailer-master.zip package (resp., [forums_folder]/PHPMailer/src/*.* and [forums_folder]/PHPMailer/language/*.*) to it, and paste $enablePhpMailer array as described above, to the setup_options.php file, putting your own data.
    Using this class could make sense if you have no email sending program installed on your server, and/or would like to connect to an external SMTP instead. No need to use this class, if your server allows to send emails directly via default sendmail function of PHP, and if you would like to stay with default plain-text miniBB email templates without extenting them by HTML formatting.
  • $brtag='<br />'; since miniBB 3.5 this became a mandatory option. It defines the value of "break tag" for the forum postings, all newlines are converted to it. It's mostly useful for embedded forums and those using an HTML DTD other than miniBB's. It also could be useful for old forums having the break tag value as '<br>'.
  • $allowHyperlinks = 10; mandatory option; if greater than zero, it means hyperlinks will be allowed for members only who made not less than $allowHyperlinks postings. If set to zero, hyperlinks will be automated also for guests. By hyperlinks, we mean highlighted URLs in postings: when you post anything beginning from http:// , or www. or enclosed in [url][/url] BB codes, it is converted to a clickable hyperlink.
  • //$allowHyperlinksProfile = 10; optional; if it's not specified, then equals to `$allowHyperlinks`. Means the amount of significant messages any member should post on forums to have right to provide the Website field under his forums Profile. Until this amount is reached, it's not possible to fill in the Website field. If during deletion operation the script detects that user messages amount became lower than $allowHyperlinksProfile, Website will be nulled.
  • //$addMainTitle = 1; non-mandatory option which is hidden by default: if it is set, then on topics listing pages and on the thread listing pages, forum generic title is added after certain forum's or topic's title. For example, if you have 'My Forums' specified in $sitename, and you have a forum called 'Forum One', and the topic 'Test Topic' in this forum, then: if you set this option to 1, <title> tag of topics listing page will be 'Forum One - My Forums', <title> tag of topics listing page will be 'Test Topic - My Forums', else it will be just 'Forum One' and 'Test Topic' correspondingly.
  • //$emailCharset = 'UTF-8'; non-mandatory option which is hidden by default: if it is set to the certain value (like for example 'UTF-8'), and your forums email templates are stored in specific encoding (like UTF-8), it is recommended to set up this option, so emails are sent in the proper encoding and not garbled on the client side.
  • //$url_follow = TRUE; non-mandatory option (hidden by default). If set to TRUE, every posted URL will NOT contain rel="nofollow" attribute, like it happens by default with URLs which are not related to the primary forums domain. Please don't forget, that admins and moderators always have a right to set any kind of 3rd party URL without this attribute, using [urlc=...][/url] code instead of regular [url=...][/url]. This attribute manipulation on such pages as Statistics or User's Profile, is controlled by 'NOFOLLOW' variable which needs to be defined separately.
  • //$editMsgReloc = TRUE; non-mandatory option (hidden by default). If set to TRUE, after editing the message you will not see an intermediate warning screen, redirecting straight to the message. This setting may be enabled only if you are sure editing message doesn't affect other installed add-ons. For exampe, if you have File Upload add-on installed, this setting should be disabled, else when modifying message, the script will "miss" re-uploaded files and modified file descriptions. The same could affect many other regular and custom add-ons which include the code for bb_plugins2.php. Disabled by default.
  • //$allowedRefs = array('www.domain_one.com', 'www.domain_two.com'); non-mandatory option (hidden by default). Allows to specify list of allowed referrers which may come from external sites posting something to your forums. Format: PHP array. DO NOT SPECIFY that variable if you don't really understand what it means. It's only for professional sites which are plugged in with 3rd party software.
  • //$allowedDirectPostActions = array('action_1', 'action_2'); non-mandatory option (hidden by default). Allows to specify list of allowed actions passed under $action variable, which may be used by custom add-ons or scripts bundled with forums. Format: PHP array. DO NOT SPECIFY that variable if you don't really understand what it means. It's only for professional sites which are plugged in with 3rd party software.
  • //$uname_minlength = 3; non-mandatory option (hidden by default). Non-destructively specifies the minimum username length upon registration.
  • //$uname_maxlength = 15; non-mandatory option (hidden by default). Non-destructively specifies the maximum username length upon registration.
  • //$fIconWidth=16; non-mandatory option (hidden by default). Non-destructively specifies the width of forum icons.
  • //$fIconHeight=16; non-mandatory option (hidden by default). Non-destructively specifies the height of forum icons.
  • //$disableSuperSticky = 1; non-mandatory option (hidden by default). If it's set to any positive value, "super-sticky" option may be disabled completely. That way you could avoid unnecessary requests to the database. By default, the Super-Sticky feature is enabled.
  • //$eeol="\n"; by default, it's equal to "\r\n", and may not be set at all. But regarding PHP documentation, "some poor quality Unix mail transfer agents replace LF by CRLF automatically", in that case, the MTA (mail transfer agent) may send "\r\r\n" in headers, looking like double space lines in the email body, and/or including headers in the email body. You can fix it directly in miniBB options by this value. Most likely you should set it to "\n" to make your emails looking "valid".
  • //$viewUnameLngLim = 15; non-mandatory option (hidden by default). Specifies the maximum username length for Guest nicknames. Longer nicknames will be split in chunks of this length.
  • //$reldef='nofollow'; non-mandatory option (hidden by default). Specifies the value for the "rel" attribute, which is used in user-generated links in messages. If it's not set, default value is used, which is "ugc". You could re-setup it to "nofollow", pasting an avove example an removing two slashes in front. If the value is set and empty, the "rel" attribute will not be set for links at all.
  • //$splitExpression='//u'; non-mandatory option (hidden by default). Specifies the pattern, which is used to split the string by chars, and further use this array in the function wrapText of bb_func_txt.php. Depending on the specifics of your PHP version, this could be changed to '//' or whatever else value which would handle UTF8-strings and other encodings.
  • $enableDash='&mdash;'; despite it's a non-mandatory option, it's enabled by default and available since miniBB ver.3.5. Here you could specify how the combination of ' - ' (space-hyphen-space) would be auto-replaced in messages. As the experience shows, providing dash instead of hyphen makes posts more accurate from the publishing view, and easy to read.
  • $eliminateCheckBox=TRUE; mandatory option. Used for Watching/Subscription topics functionality. To avoid confusion, you could allow to remove the Watch/Subscription checkbox below the message form, and leave only the {$watchLinkSetup} available somewhere on the posts page; set to TRUE in this case. If you'd like to leave the Watch/Subscription checkbox, set to FALSE.
  • $subscriptionsLimit=$viewmaxtopic*5; mandatory option, defines the max.amount of Waching Topics/Subscriptions. If it equals to 0, there would be no limits in subscribing to topics. However we recommend to set this to a reasonable value, which any human could handle, so noone has a possibility to overload your database with waste. Usually $viewmaxtopic*5 is enough (5 pages of subscribed stuff, and it depends on how big the value of the $viewmaxtopic is).
  • $additionAlerts=FALSE; mandatory option. TRUE defines if after a topic has been added or removed from the Watching list, there's an JavaScript Alert displayed; FALSE disables the alert.
  • $purgeEmailSettings=1; mandatory option. 0 - option inactive; 1 (default) - only Watching functionality is available; 2 - both Watching and Email subscriptions are available. Positive value overrides default miniBB value of $emailusers (check above). You could set emailusers=1;, but this setting would be taken into attention at first, and you could allow to Watch topics even without email notifications. This also controls the look & feel of the Watch/Unsubscribe link at the top right of the topic title; it could be respectively "Watch" or "Watch/Subscribe".
  • $fla_attempts=3; mandatory option, sets a default amount of attempts given to enter a wrong password per account.
  • $fla_mode=2; mandatory option, sets how the locking mode works for different accounts entered from the same IP address. Values: 1 — strict mode — $fla_attempts for ANY accounts will be locked from a certain IP, in this case $fla_attempts is the total limit of attempts for any accounts. 2 — mint mode — $fla_attempts will be locked from a certain IP but for a certain account, so there would be possible to login with another account, and $fla_attempts is a limit per-account.
  • $fla_manyAttemptsLimit=2; mandatory option; works only if $fla_mode=2;. The script will check for the amount of different accounts which are currently auto-locked from the same IP. If their amount exceeds this value, then the IP will be auto-locked and put under the 'banned IPs' table and section with a proper note.
  • $fla_blockPeriod=3600; mandatory option; in seconds: for how long time to block/freeze the locked IP; 86400 defaults to 1 day; 3600 to 1 hr.
  • $fla_logFile=''; mandatory option; sets the filename for the log which keeps the failed login attempts. An empty value sets no logging. If you'd like to use the logs, at least change the filename, so noone knows how to access it from public. Please note that the log is not emptied automatically. From time to time, you have to enter the Admin panel and clean it up.
  • $fla_logLang=array(
    'delete' => 'Clean up expired locks',
    'update' => 'Updated lock',
    'new' => 'Added lock',
    'autoban' => 'Auto ban',
    );
    - mandatory option, but it's not mandatory to change. These values specify the name of the actions which would be logged to the $fla_logFile, if it's specified. In the name of comfort, you could assign your own language phrases, if you enabled this log; but leave them as they are otherwise.
  • $fla_autoBanned=TRUE; mandatory option; if $fla_mode=2; there is possible to add an IP address which failed on multiple accounts, to the BANNED table. So this IP is globally black-listed on the forum.
  • //$predefinedMovedTopics=array(); non-mandatory option (hidden by default). Defines the list of Topic IDs, which could be displayed in a dropdown on the Moving Post page. That way, it would be possible to quick-select the most often pre-defined Topics, skipping entering the Post ID manually.
  • //$replaceQuotes=array('&laquo;', '&raquo;'); non-mandatory option (hidden by default). An array of values specifying how the regular quotes should be transformed to curly quotes. An empty array disables the conversion. The first value in a non-empty array stands for the opening quote; the second value stands for the closing quote. For UTF-8 forums, they also could be straight symbols and not HTML-based (in this case, the encoding of setup_options.php should be UTF-8).
  • //$lowerCharset='windows-1251'; non-mandatory option (hidden by default). An alternative charset which could be used for the mb_strtolower function, default is UTF-8. Could be applied for non-UTF8 forums with specific charsets and encoding.

That's mostly all in making an advanced miniBB setup. After that, your forums should work in all aspects, you could create some test accounts and proceed to the verifying of database charsets and configuration described below.

Setting up your forums & database encoding properly

Initially miniBB has been planned to run in native 1-byte encodings only, which suppose ISO- or Windows-oriented. Even by now, if your forum runs only in one language, which has its own 1-byte encoding, like for example 'iso-8859-1' for purely English forums, and there's supposed that it would not contain messages and usernames on any other international languages having non-latin symbols (if we don't suppose spam of course), and if it's not supposed the other interface language but English, it's still better to have it running in this encoding.

Because: running forums in a native encoding means all records in the database are kept in 1-byte char mode, even if these chars are non-latin. Also, if whatever non-latin is posted on your board, it will be automatically converted to an HTML entity containing this char in the HTML table. So, besides taking double less space, 1-byte strings are faster in searching/finding in database; also earlier versions of PHP, which your hoster may have installed by now, may only support 1-byte string by default when executing string functions like 'substr_count', 'strlen', 'strtolower' which all are extremely important in how the forum script handles strings and texts.

However the IT world is growing each day, and your content expecting non-latin symbols even more often; also if your forums are setup to have different language interfaces, specially those languages having non-latin characters, UTF-8 is the only way to go on. In this case, you may switch to UTF-8 encoding, or simply called "Unicode", which is often called as "de-facto" in the web industry nowadays, and often considered as the only proper one by HTML code validation robots.

UTF-8 has it pros and cons. On one hand, it allows to handle mostly all encodings which exist in the world languages, making your forum opened, literally, to anyone. However every non-latin symbol present in the database, will take from 2 to 4 bytes instead of one; such records are more heavier in search, specially if we talk about case-insensitive search. You have to set up UTF-8 database on your hosting server properly to make it work even after restoration of your backup, which also should be very carefully installed and executed. Note that pure latin symbols are still present as 1-byte even in UTF-8, so there could be a mix of records, which could be easily found, and which could not be found at all. Also, some earlier PHP versions do not have default string functions to work with UTF-8, like it's mentioned in the above paragraph, but your hoster may also not support the special "mb-" library functions which do this. That's why in the miniBB script we use extended functions, which are based on regular expressions for this case, but work with "mb-" functions by default if they are available.

It's very important to start and continue running your forum in the initial encoding only. If you start in let's say 'iso-8859-2' or 'windows-1251' and then decide to switch to 'utf-8', it's first of all related to the database conversion difficulties, which could be not an easy thing at all, 'cause mySQL database is very capricious regarding this case.

Our recommendation for avoiding future headache, is to start the forums straight in UTF-8 encoding. Default miniBB installation is optimized for this. Please note that starting from mySQL ver.5.5.3, it supports an extended encoding named 'utf8mb4', and collations like 'utf8mb4_unicode_ci'. All this provides the full support of UTF-8 in the database, incl. astral symbols, and mobile device emojis.

So, whatever encoding you're going to run on, the following steps are must-have to verify at first before your forum goes public:

  • Make sure your language pack have the proper <meta encoding> tag. Some of the older miniBB translations still have ISO or Windows, so you may need to convert them to UTF-8. Make sure that whenever you may have setup or installed non-latin symbols, this file is properly converted to UTF-8. Here's an example description of how to do this properly. After that, make sure that your forum's HTML source shows this meta encoding tag properly.
  • Depending on the version of mySQL you have (miniBB installation tool shows your version on the first screen), make sure your forum's mySQL database is properly set for 'utf8' or 'utf8mb4' encoding, having every "character_set" variables and "collations" like 'utf8' or 'utf8mb4'. We have a checking script for that. After you have set up and installed your forum, just put this script in the forums folder and execute it to see if everything is properly installed. Note that fields having pure numerical values, could have 1-byte type encoding like 'latin1_swedish_ci', but fields having string/text values, should have 'utf8_unicode_ci' or 'utf8mb4_unicode_ci' - all these fields could be present in the same database.

    At the end of the script, you will find an example sql-command to execute after your database is created. Execute this request in mySQL-client tool (like phpMyAdmin) and reload the script to make sure you have at least the following:

    character_set_database: utf8
    character_set_system: utf8
    collation_database: utf8_general_ci

    or, if your mySQL version is equal or greater than 5.5.3, then this:

    character_set_database: utf8mb4
    character_set_system: utf8
    collation_database: utf8mb4_unicode_ci

    Note that character_set_filesystem should be binary unless you're on a file system that supports multi-byte UTF-8-encoded characters in file names, and that's why character_set_system is always 'utf8' and can't be overridden.

    If other fields are of another type, there may be problem or mistake which you'd need to solve.

    At the next stage it's important to verify that your forum script properly searches and located the non-latin records in mySQL database. In miniBB, there're mostly two types of records to check: usernames and posts/topic titles.
  • Use Register function to set up an account having non-latin characters; you may adjust $userRegName (listing all allowed non-latin characters one-by-one and saving setup_options.php in UTF-8 - read below for more), $uname_maxlength and $viewUnameLngLim options for that. The "username" field in miniBB database is set to have 200 chars by default; that means, having 'utf8mb4' as the base encoding, it would be limited to 50 chars if consisting of UTF-8 chars only ('utf8mb4' takes 4 bytes per char). Our recommendation is still to not allow long usernames, as it affects the layout. For the Mobile layout, 15 chars is the considerable limitation. After registering such account, try to logout it on the main page and re-login. If you're properly logged in, that mostly means it's properly registered; for more checking, go to the Admin panel - Search users - try to locate this account, choosing the Username option. It should be found from there; if not, there's kind of problem with encoding or database.
  • Next, try login with these credentials again, and post sort of topic, also having UTF-8 characters in the topic title and the message. At first, you should see that whatever long username you've used, it should be properly split on the topic page (so it doesn't break your layout). $viewUnameLngLim option sets at what char number it should split.
  • Then, go to the Search page, click the "Username" to locate posts, enter the username you have posted from to locate, and make sure to correctly choose between "Fields", i.e. depending on what you've been posted, a Topic or a Message. Click search and if you could locate your post from this UTF-8 username, it works. If not, there's kind of problem with your setup, or database configuration, which you need to investigate further.

Note #1: if you'd like your forum having no problems with non-latin chars in usernames, always allow only Alpha-Numerical chars in usernames, with possibly some extra encoding-independent chars - like it's allowed in the $userRegName option in the default configuration. Putting extra non-latin chars in this option (you simply need to listen all possible one-by-one to allow them in username), make sure you save setup_options.php in UTF-8 encoding with no signature, like mentioned here.

The last step to check if you have properly setup an UTF-8 mode, is to create a backup of your current "test" forum database; save it on your local computer, unpack if necessary, and open the data file in a default text editor for editing. You should see all UTF-8 chars present 'as is', naturally you should read them amongst the mySQL commands. If you will see kind of garbled characters, that doesn't work for good; however it's not terribly bad either. The most important thing, is that in this case you should have a backup which you could restore later on the database with a similar configuration like yours. I.e. this database should have all character sets and collations like your current one has.

Note#2: if something doesn't work (on Registration/Login/Search/Backup stages), before you submit the next step, you could try to enable 'mysqli_set_charset' option which is present in miniBB 3.4 and later versions (mysqli module only). Before the closing ?> tag of setup_options.php try to put one of the following:

$mysql_set_charset='utf8';

OR:

$mysql_set_names=array('utf8', 'utf8_general_ci');

This sets the default character set to be used when sending data from and to the database server. This or that may work on various version servers; however the first method is preferred. In most cases, this should stricty enable utf8-mode for databases even having 'latin1' on 'client', 'connection' or 'results'. Having this set up, execute dbs_check.php like mentioned above, and it should show:

character_set_database: utf8
character_set_system: utf8
collation_database: utf8_general_ci

These are enough settings for running the database in UTF-8 mode; all other settings may be even 'latin1' (but of course, if you make it all 'utf8'/'utf8_general_ci' it's the most proper way.

Note#3: it's important to check how mySQL handles the 'lower' function applied to strings or text, specially this affects usernames which could contain unicode characters. Only if mySQL is properly configured to handle lowercase, this will protect you from accounts which look very similar, but are different by just one uppercase or lowercase letter. Sometimes mySQL couldn't handle it properly, so the Registration script couldn't compare the common usernames in lowercase, this may bring sort of undesired results on some forums.

It also affects case-insensitive logins. If your mySQL doesn't support case-insensitive mode for mySQL, most likely you should set $loginsCase option to FALSE to avoid confusion amongst members. The FALSE value of this option forces anyone to enter their username considering lowercase and uppercase letters, as they were registered. If $loginsCase is set to TRUE, and mySQL doesn't support lowercase comparision, unicode-based usernames will fail on ignoring the case. Also, in this case most likely you have to make your forums for registered-members only ($allForumsReg=TRUE;) - so Guests couldn't manipulate the lowercase or upperase to imitate existing accounts.

The same affects the search function. If a unicode phrase is searched, a special mySQL configuration is required for case-insensitive search; if it's not configured, the unicode search will only return results which are recorded 'as is' in the original message, regarding the original transcription.

Templates

Templates are used to separate HTML code from PHP. They are located in "templates" folder and are regular HTML files (or TXT files - if we talk about email templates - read below). Similarly to PHP scripts, templates are free and opened to modify and customize. And similarly to PHP scripts, for templates modification you have to use a plain simple text editor like Notepad2. Avoid WYSIWYG editors, as they could add something unnatural to what is purely "hand-made".

All templates are coded with the W3C recommendations and standards in mind.

If you decide to modify templates, refer to the current page building principles. Customizing templates, try to leave all variables in their positions, as they all are important. Variables format is similar to the regular PHP "variable variables": {$...}. Templates parser transforms all such variables to their values (HTML content or anything else). Follow the same format, when plugging-in a new variable.

Some templates are used in different scenarios. For example, user_dataform.html is used both for registering a new Profile and editing Profile, main_post_form.html appears on all posts, topics and editing pages, also in Private Messages.

Pay attention to email templates (filenames beginning with "email_" and ending with ".txt"). These templates are used in sending automated forum messages. They have a special format: the first line of every template should be SUBJECT>>...<<. Between "SUBJECT>>" and "<<" there should be put the Subject of a certain email message. Avoid removing this line, and keep the proper format of it!

If you add or modify email templates, translating into your own language, make sure to save them with Unix-type line endings (LF). Editors like Notepad2 allow to check it easily; go to the menu "File" -> "Line Endings". Other text editors could provide a similar feature. It is important to keep such type of linefeed, because some server-side mail transfer agents (like Postfix) dislike something other than Unix-type line endings, and will add junk to messages. If you check the miniBB option named $eeol, above it describes more of this subject.

In main_header.html, you will find page title defined as <title>$title</title>. Avoid removing or changing this. The Title is changing dynamically according to the page, f.e., on the topic page it becomes Topic's name, and on topic lists it becomes Forum's name. For some other forum pages, it is also automated. This is a very important feature, which helps search engines to index your forum properly. That's why we recommend to think about the "valid" forum names: as short and descriptive they would be, as it's better. in the header template, also take care about other search-engines-related META-tags like "keywords" and "description".

Custom templates

There is possibility to make a custom template and call it from the script. For example, you need to create separate page before user registration (agreement): you can add any custom template, which is not included in miniBB. Design your template as usual (all script pre-defined variables also work), put it in "/templates" directory and call from the script like:

index.php?action=tpl&tplName=custom_template

where tplName is a name for your created template (in this case, "custom_template.html").

In that way you can also create stuff like "Most loved topics and answers" with the direct list of topics, any FAQs, manuals, description pages, agreements etc., etc., as like as the whole site!

Language packs

Each language pack defines how a basic interface sentense or a word could be displayed on the forum and under the Admin panel.

Default miniBB language is English; however our community supplied many translations in other languages. All are found under the "Downloads". In a case if you don't find the translation to your language, it would be perfect if you could take the English pack, translate it and submit back to us. That way you would help users from your country.

One forum could use multiple language interfaces. Language packs are placed in the forums folder named "lang". Usually, only "eng.php" pack is supplied as default. If you'd like to set another default language, modify the $lang setting of setup_options.php as described above

Language pack simply consists of PHP variables and their values. It is a basic PHP script on its own, and similarly like for all scripts, for modifications of the language pack we strictly recommend a plain text editor, like Notepad2.

Keep the original structure of the language pack as it's supplied with miniBB, and always refer to the default eng.php as this is the only up-to-date version which constains all proper language definitions. Also, try to use apostrophes (' ') instead of quotes (" ") for sentenses: they work a bit faster in PHP.

Some phrases and sentenses could contain special Uppercase definitions enclosed in curly brackets (braces) like "{ }". Do not translate these definitions and do not modify them in any other way. They define some dynamic variables, which will replace these definitions during the script execution; that way your forum would better interact with users. In most cases, translate just the sentense coming prior to these defs, or some phrase inside of them if they consist of two parts, like for example, "{MOVED_EXT}...{/MOVED_EXT}" (the part between could be removed for some cases), or "{NEXT_MSG_LNK}...{/NEXT_MSG_LNK}" (the part between would be hyperlinked).

Any language pack should also contain this:

  • $Lang:English:$ the string is referred to language "Title", which appears in the "Language" menu of the Profile. When making another version of pack, write language name in English between "$Lang:" and ":$"
  • $l_meta tag is META-LANGUAGE value for your html encoding. Usually it looks like '<meta http-equiv="content-type" content="text/html;charset=utf-8">' where you need to change only charset value. Refer to W3C docs for more info on encoding.
  • $l_months variable defines array of month names separated by ":". Make sure to include EXACTLY 12 values!

Other variables come in assorting order. While working on miniBB, we have added them in the new versions' "order of appearance". If you will see a commenting string like "/* v1.1 */" or "/* v.3.3 */", it means that variables coming in a block after this string were added or changed for a mentioned version.

Important: language pack's filename can have only of 3 letters (examples: eng.php for English, ger.php for German, fre.php for French etc.).

On a multilingual forum, where more than 1 language is installed, and if you are using board's emailing features, you will probably need to create emailing templates for each language separately, naming them with a corresponding prefix. For example, if you'd like English and French interfaces available, and make it possible for registered users to change their preferred language in Preferences, do the following:

  • Download and copy eng.php, fre.php files to /lang/ folder;
  • Create emailing templates for the French language, taking English templates from /templates/ folder, which begin with email_ and end with _eng.txt; leave English templates as they are, but create French language templates, naming them with "fre" postfix, i.e. they should begin with email_ and end with _fre.txt; copy all these templates to the /templates/ folder;
  • For allowing members to receive email notifications on the preferred language, set $emailusers=2; in setup_options.php (read more above this option above).

Having multilingual forums, be always sure you have installed additional, or other than English languages successfully. Specially test any processes related to the email notifications: new user sign up, notification about new post made, password's restoration. If your language is installed improperly, it may cause the software working wrong.

If you have multilanguage forum, it would be a good idea to create many manuals on each language, naming it manual_LNG.html, where LNG is the prefix for your language pack. By default, only manual_eng.html is included. If there is no manual for user's language, empty page will be displayed.

Please note: some variables specified in language pack, are both used in PHP scripts and JavaScript interface notices. That's why in some places it is not suitable to use apostrophes in your custom translation. This specially affects 3rd party language packs not checked by miniBB team, or for example, the variable called $l_accessDenied, which could be edited upon special rules on forums, and some other variables from the premium add-ons, which are mentioned in plugins instructions. If you are experiencing troubles posting a messages or getting a JavaScript error on page, it could be the reason of the wrong interpretation of apostrophes. Check the JavaScript Error Console of your browser for errors.

Important: if you create a new, or modify an existing Language pack, make sure you save it with Windows-type line-endings (CR+LF). Editors like Notepad2 allow to check it easily; go to the menu "File" -> "Line Endings". Other text editors could provide a similar feature. This is necessary for auto-recognition of the Language title in the Profile (the script: bb_func_inslng.php).

Skins: CSS file

CSS (cascading style sheet placed in /css/default.css) is designed to fit all font colors, table borders and sizes on the page in one file. It is included only once in main_header.html. It is W3C compliant. You can edit it as you wish, to fit your forums design to your page's design. Even if you don't know CSS, it is very easy to change mostly a couple of colors in HEX, fonts and sizes in pixels/points. Some example CSS skins downloadable from our site can also contain icon packages and image backgrounds and it's easy to add your own background to any CSS skin. You can find skin parameter description in CSS file itself - all main parts of it have small notes explaining the meaning of subsequent font/color/border and other parameters.

Administrative options

Admin panel

You can go to the admin panel manually typing in your browser admin panel's filename which you have entered in options file. But usually, you only need to login as admin into forums, and you'll see admin panel link at the bottom of each page.

Admin panel is very small and very simple. Here is the list of options:

  • Add a forum. We have talked about it earlier. With this operation, you can add forum name, description, icon. Forum icons are displayed near forums table. They are placed in directory /img/forum_icons. Icon should be .GIF or .JPG with the size of 16x16 pixels. Here you just need to type a filename of image WITHOUT directory name. If no image specified, default.gif is loaded. You may use straight HTML in forum's name or description, putting, for example, direct HTML links there.
  • Edit a forum. Click on it, choose forum to edit from drop-down list. Editing form appears. You can change forum name, description, and order there. For editing, press "Edit form" button. Below you can see fast preview of how forums will look like. Re-ordering forums is simple: you just need to click on ⇑ or ⇓ symbols to "move" forum up or down. Also, you'll see the forum ID marked in bold in this list - you could use it where it's required to know, for example, when moving a topic to another forum.

    From this menu you can also DELETE forum. Note that deleting forum will immediately deletes ALL posts and topics corresponding to it. We don't recommend to do that, 'cause there is no way back. If you still need to delete forum, just click on the checkbox saying "Delete forum" and press "Edit". Forum will be deleted and there will be NO ASKING TWICE, so be careful with this thing.

    Deleting forums always means some risk, so if you will never delete forums, open your admin panel file for editing, find the following line:

    case 'editforum3':

    and add after it the following line:

    if(isset($_POST['deleteforum'])) unset($_POST['deleteforum']);

    You should have:

    case 'editforum3':
    if(isset($_POST['deleteforum'])) unset($_POST['deleteforum']);
    $forumname = (isset($_POST['forumname']) ? $_POST['forumname']:'');
    $forumdesc = (isset($_POST['forumdesc']) ? $_POST['forumdesc']:''); ...

    etc. This will avoid forum deleting in any case - even if intruders will know out about your password (we hope this never happens).

  • Forums supertitles (categories). Since miniBB is designed for small/medium communities, we have not planned to make splitting forums list by additional category. If you have 4-5 forums, there is no need to create categories, because in this case, your forums will look badly organised. However, there is a possibility to emulate categories for forums, this feature is invented since version 2.0 RC3 and called "supertitles". Supertitles appear BEFORE the main forum title, emulating category, and you probably may add supertitles AFTER you created a list of forums and arranged them in desired order. Go to forums preview when editing any forum, click on forum's title when you want to put supertitle, and add it in corresponding field. Notice that moving the main forum title affects also supertitle, so putting one forum from one "category" to another means actually that you need to remove supertitle from this forum and add it to another forum's title. You may use straight HTML in supertitles.
  • Removing member's account. There are a few ways of removing or blocking the forum member's account:
    1. Being logged as Administrator, go to the Admin Panel and locate "Delete Profile" link;
    2. Being logged as Administrator or Moderator, go to the Member's Public Profile on forum (this is possible, for example, clicking the Username provided near each message posted), then click "Edit Profile" link available at the very bottom of the Profile; then click "Delete Profile" link available under the Username field.
    In both cases described above, the script will follow to a section where User ID should be provided before deletion. In the second case described above, User ID is substituted automatically for your convenience. In some cases, it's also possible to delete an account which was never posted on forum; the first case described above, is for that. User ID could be found on any hyperlink leading to the user's Public Profile. These links may appear under the Admin Panel's Search Users option, or under the Public Profile links on forum. The link looks similar to: http://.......?action=userinfo&user=243. The last digits (f.e., 243) mean the User ID.

    Under the "Delete Profile" section, there could be set two checkboxes to provide a different method for removing an account:

    1. Remove all user's messages and topics (user's topics will be deleted with possible other users messages inside); not ticking this box means the account will be removed, but all messages posted will stay on forum, as being posted from the Guest account under the current Username;

    2. Keep this profile blocked, meaning the account will stay in active on forum, but it won't be removed completely.

    This could allow to fight spammers more effectively. Often there is a case when some account floods a lot of messages, and later there is no way to remove them all easily at once. But combining the options described above, it's possible to:

    • Remove the account completely, BUT leave all messages associated with it on forum, as they would be posted from a Guest account under the current Username (do not tick the checkbox #1 and do not tick the checkbox #2)
    • Remove the account completely, AND completely remove all messages associated with it on forum (tick the checkbox #1 and do not tick the checkbox #2)
    • Do not completely remove the account, keeping it blocked on forum, BUT remove all messages associated with it on forum (tick the checkbox #1 and tick the checkbox #2)
    • Do not completely remove the account, making it just inactive, AND keep all messages of this account on forum (do not tick the checkbox #1 and tick the checkbox #2) - this case is similar to a simple blocking of account, which doesn't require to enter the section of Removing account - to make an account inactive, just enter its Public Profile and locate "Member" link, saying "Yes" or "No".

    Be careful: there is no extra asking on removing the user's account, assuming each Admin or Moderator is made sure what is going to happen. Still, in a case or providing a non-existing User ID to remove, the script will throw an error.

    Be patient: on large forums, it may takes some bigger time to remove all topics and posts associated with the removed account.

    Removing an account is automatically available to the Administrator and any Moderator on forums; however it's possible to restrict some Moderators from this procedure. For this, specify an array of their User IDs under bb_specials.php, putting a non-documented array named $excludeDeleteUsers. For example: `$excludeDeleteUsers = array(2,3);` in bb_specials.php would mean users with IDs 2 and 3 can not remove accounts; despite they could have all other Moderators rights on the forum.
  • Banning an IP address. Banning somebody's IP address means access from this IP will be completely blocked to forum. The forum will give just an "Access Denied" message with the possible reason of banning, if it has been provided. No areas on forum will be visible to this IP address at all. It's a very strong ban.

    Currently, miniBB supports banning of IPv4 addresses only. IPv6 are the planned option to implement when these addresses would be going more worldwide (if somewhen).

    Banning could be completed from any message on forum, containing an IP address, which is visible, similarly operational, to the Administrator or Moderator only. The IP address is hyperlinked and could be clicked; that opens up a new window where it's possible to "Ban user's IP/ID" or "Unset/unban users' IPs/IDs" (the second link is also available straight under the Admin Panel). The section itself lists all Usernames ever posted from this IP on forum, that way allowing to catch "trolls".

    (Hint: If you would like to ban an IP address, which is not present on forum, you may click any IP address, and substitute that one is necessary under the opening form.)

    "Ban user's IP/ID" section opens up the form, where you should set up the IP address to ban, and the Reason of it, which is a single short message. It a case of direct banning from a forum message, IP address is substituted automatically for your convenience. Despite providing a Reason is optional, it's also important, because later it allows to distinguish the IP addresses, which may be possibly unbanned. Also, it is visible to the client entering from this IP address, and could be clarified properly.

    It's possible to ban not just a single IP address, but the whole network or subnetwork based on it. For this, you will need to substitute the last digits with a 'plus' sign, that way providing a "mask" for this IP. For example, entering 191.88.32.+ will ban the whole range of IPs between 191.88.32.0 and 191.88.32.255; entering 191.88.+ will ban the whole network in range between 191.88.0.0. and 191.88.255.255.

    A "hidden" feature of this procedure, left from the earlier miniBB releases, also allows to put a single User ID instead of IP address. Then if such account is logged in, it gets the complete ban, with a page displaying a reason and not letting this member even read the forum. In some way, it just replicates making an account Inactive from the Profile, so most likely it should be never used.

    "Unset/unban users' IPs/IDs" section provides the listing of all currently banned IPs. Tick the checkbox(es) near each of them you would like to unban, and click the button below to remove one or many from the list, that way - unbanning it/them, and allowing access to the forum.

    Banning is automatically available to the Administrator and any Moderator on forums; however it's possible to restrict some Moderators from this procedure. For this, specify an array of their User IDs under bb_specials.php, putting a non-documented array named $excludeBanning. For example: `$excludeBanning=array(2,3);` in bb_specials.php would mean users with IDs 2 and 3 can not ban; despite they could have all other Moderators rights on the forum.
  • Search users. Admin is allowed to search users by ID, username (login) or email, also inactive users (haven't posted anything since registration) and haven't made new posts since defined date. Each record found displays user's login with link to userinfo on the board, registration date, email (even if "hidden") and last reply's post date. In some cases, also found records' count is displayed. Search users results are splitted by pages, if results count is really big.

    Searching on ID, you need to enter decimal. Searching on email or login, you need to enter some string. If you do not enter something on ID or login, ALL users list will be displayed.

    When searching inactive users, you do not need to enter something. Receiving inactive users list, you can delete many of them by one-time, checking boxes and clicking "Delete" button.

    When you search users that haven't posted anything since [date], you need to define this date in YYYY-MM-DD format, which means: "4-digits-year"-"2-digits-month"-"2-digits-day". Script is looking for people, who's last reply date is EARLIER than entered date (not including!). That means, if you enter 2002-03-07, for example, you will look for people, who's last reply was earlier than on 7th March, 2002. People with last reply on 7th March will not be shown, also as "inactive" users, too.

    Clicking on [Delete], you can pop-up window with "Remove user" option, where user's ID will be automatically written in form. "Remove user" operation is described above.

  • Delete email notifications. In some cases it could happen that somebody has subscribed to a topic or even few of them, but the email address provided under the profile, is for some reason no longer accepting incoming emails, or not available at all. This could be contolled watching "mailer-daemon feedback" messages, which will say "Could not deliver message" or give a similar response. In that case, it's possible to block or remove this account, AND delete this email address from the possible topics subscriptions afterall, so miniBB will not ever try to send to this email address.

    Entering this area of the admin panel is allowing this. Type in a single email address to delete it from all topic subscriptions at once. For complete emptying the subcriptions table (for example, in a case of switching the emailing option OFF forever), click "Delete All" button. Be careful: this section is only for those administrators understanding what they do, and the script will not give an extra alert upon deletion.

    If you have Private Messaging add-on installed, and if this user has set the emailing option to ON (i.e. send an email when somebody sends a PM), this option should be set to OFF automatically as soon as this email address has been removed from topics subscriptions.
  • Export emails. This operation is necessary, if you want to make a mass-mail for your users. PLEASE, DON'T SPAM YOUR FORUM USERS! You need the email list only for important news, f.e., site's moving to new address, forums reconstruction etc.

    You can extract only emails or email+username, use tab separator or comma between these values, and output emails to the screen or separate file attachment. If you've chosen last one you will get a download window after pressing submit button.

  • Restore Admin data in database. This option updates users table and sets new admin password, username and email if you have changed any of these in the options file. Yes, you can change your admin name anytime you want, more so - we recommend to do it regularly.

"Hidden" admin forums options

Private (closed from public) forums

Only site owner can define private forums and users which are allowed to post and view them. Edit bb_specials.php file, find variable $clForums=array(); and add $clForumsUsers[]=array();. $clForums array defines closed forums ID(s), and $clForumsUsers[] elements defines users which are allowed to post in this forum. Here is an example:

$clForums = array(1,3,6);
$clForumsUsers[1] = array(2,5);
$clForumsUsers[3] = array(10,11);
$clForumsUsers[6] = array(12,22);

That means: forums with IDs 1,3,6 are private. Users with IDs 2 and 5 are allowed to post and view forum under ID 1, users with IDs 10 and 11 are allowed to post and view forum under ID 3, users with IDs 12 and 22 are allowed to post and view forum under ID 6. If you are able to think logically, it must not be difficult for you to set these arrays, and it be more simplier for you to edit this file once, else for us to write giant interface, which would be out of concepts of miniBB.

If you don't want to have private forums, leave these arrays blank (but don't remove them!).

Note 1: when setting $clForums array without $clForumsUsers array, you won't get any results, and these forums will be available to anyone, until you define user IDs, which have access to a private forum. Specify empty $clForumsUsers array for some forum, even if it has no users allowed. Another words, these settings are working only together, not separately.

Note 2: it is not necessary define admin ID (1), because admin can enter any private forum and has full access to it.

Note 3: topic titles from private forums don't appear on statistics, last discussions, user info and search pages, and first forums page, too. Anyway, if allowed user or admin is logged, they will appear everywhere automatically.

Archived (read-only) forums

Site owner can create so called "archive" forums. In read-only forums, nobody except admin or defined moderator can make or edit posts. Edit bb_specials.php with array variable $roForums in it. Like in private forums (see above), add read-only comma-separated forums IDs into this array.

Replies-only forums

Site owner can create so called "post-only" forums. That means, users can do anything except for creating new topics in these forums. It is very useful, if you combine your forums with guestbook or administrative news flash, for example. Edit bb_specials.php with array variable $poForums in it. Like in private forums (see above), add read-only comma-separated forums IDs into this array. In post-only forums, nobody except admin can make or edit topics.

Example:

$poForums=array(1);

That means, forum with ID 1 is "post-only".

If you have "post-only" forum as guestbook, for example, or just want to redirect user to some thread exactly when he is clicking on forum's title to view topics, you can define it in bb_specials.php as $redthread array. Example from our forums:

$redthread=array(8=>355);

means when user visits some forum with ID 8, he will redirected to the topic with ID 355, so the full URL will be like action=vthread&forum=8&topic=355. This is optional feature, it is not necessary to include this array if you don't need it.

Custom member titles

By default, miniBB doesn't use ranking system (user ranks like 'Administrator', 'Member' are displayed only, and if it is anonymous user, nothing is displayed). We have special solution addon for displaying user ranks basing on their posts amount, but it is possible to define special user rankings, for "special" members (for example, most-active-poster-of-all-time). Open bb_specials.php for that, find $userRanks array, and edit it.

$userRanks=array(1 => 'Boss', 17 => 'Team member', 9 => 'Team member');

That means, user's rank with ID 1 is Boss (of course! :), and users with IDs 17 and 9 are "Team members". These rankings will be displayed under nickname in every post. In this way, you also can define so called "special avatars", when image is displayed instead of rank. Just provide full image URL as the rank's description.

Registered-users-only forums

These forums mean, that only registered (and logged correspondly) users can make new topics, new posts and edit their messages here. Use this setting only if you want to separate some forums for all and registered only members at the same time. Use general setting variable $allForumsReg (see above), if you want to make registered-users-only forums for everybody. Variable $regUsrForums=array(); in bb_specials.php means array of forums IDs which are protected.

Example:

$regUsrForums=array(1,2);

That means, forums with ID 1,2 are only for registered users.

In a case of registered-user-only forums, the post-topic or post-thread box with login information WILL APPEAR even if user is not logged in. User will be able to enter his login/pass to make a post. Anonymous or incorrectly logged users will be informed with "Access denied" message. In many cases, they can loose the information they typed, so please warn users of your board someway, that they must register before making any post! In the latest releases, we have defined language pack's variables for it, they are called $l_anonAllowed, and $l_anonDisallowed, and contain the text appearing near each message form, if user is not logged in.

Moderators definition

Moderators are people helping admin in managing the forums (read more in moderators section. Array of bb_specials.php named `$mods` defines the the set of forums/user IDs of members, which are allowed to be moderators in these forums specifically, or have some other moderator functions in other sections.

Example:

$mods=array(
1=>array(9,996),
2=>array(9)
);

means that user with ID = 9 is the moderator for forums with IDs 1 and 2, and user 996 is moderator for forum 1.

Moderators have only access to a specified forum.

Displaying list of moderators is available on the first forums page. In default version, it is hidden. If you want this list to be shown under each forum's row, modify templates/main_forums_cell.html if you have a "regular" forums layout (having set $statsPageModern=FALSE;), or templates/main_modern_fcell.html (having set $statsPageModern=TRUE;), and paste {$moderatorsList} (for example, directly after {$forum_desc}). It will display usernames of moderators for the current forum. If there is no moderator specified, nothing will be displayed.

Excluding certain forums from recent discussions

If you want to exclude some forum from "Recent discussions" list, you can set it in the bb_specials array $lastOut. For example: $lastOut=array(6); excludes forum with ID 6 from "Last discussions" list on the first page. It's not necessary to add this new value if you don't need this.

Sorting specific thread in DESCENDING order

You can specify the ID of the thread (topic), which messages can be sorted in DESCending order. By default, every thread is sorted in ASCending order. Specially useful for questbooks. For this, set new array in your bb_specials.php file:

$themeDesc=array(THREAD_IDs);

where THREAD_IDs can be array of IDs of topics. For example:

$themeDesc=array(355,11);

will set DESC order for topics with ID 355 and 11.

Note that this option will not affect page listing in last discussions and topics list. When some topic is splitted by pages, last replies will be available when you click on topic's title. If you have such kind of sorted thread (like guestbook), it is better to exclude it from last discussions and set the exact redirect from forum's title (see "Post-only forums" and $redthread).

When you set this kind of topic, near its title, users will see an icon from /img/topic_reverse.gif.

Deleting messages

Only admin is allowed to delete user messages. Admin needs to be logged into the system. For deleting any message, go to the topic/thread list and click on "Delete" on the top of the message. JavaScript alert should appear; click "Ok", and the post will be deleted. After delete, message is not available for recovering. We are not keeping Recycle Bins.

NOTE: you can not delete FIRST message of the topic. That's because the first message in thread list is TOPIC TEXT in reality. If you want to delete first message, it means you want to delete the WHOLE TOPIC. For this, see "Deleting topics".

Deleting topics

Admin or moderators are allowed to delete all available user topics (moderator - for each specified forum); also if $userDeleteMsgs setting is defined, this is possible for regular members, too (for their own topics/replies). Login, go to the bottom of topic page. You will find the link "Delete topic". Click on it. JavaScript alert should appear; click "Ok", and topic will be deleted, with all associated posts, too. Click on "Cancel", and you'll keep the old things. After delete, topic is not available for recovering. No Trash Cans.

"Cleaning up the board" solution. When your board runs for a big time, you'll probably want to remove some old necessary topics. miniBB has a smart solution build-in, how to do it easy (beginning from version 2.0 RC2). Login as admin and in your Preferences, set default sorting to "New topics", then go to some forum, which you want to clean-up, and go to the last page of topics within this forum. Another words, begin the cleaning from the oldest topics to the newest topics. Go inside some topic, review it, and if you find it unnecessary, delete it as described above. After that, you will be redirected to the page where topic was previously found; near next topic that you need to check, you will find a little mark '»'. This will help you to not lose the last topic you stayed on.

Editing messages

Board administrator can edit any message from the forum at any time, plus, if it is "new topic text", he can edit also topic title. Moderator can edit any message within allowed forum at any time, and also change topic's title. For editing the message, click on "Edit" link on the top of each message in posts list (it appears when allowed person is logged in).

When editing message, admin or moderator can choose, either this message could be edited by user after, or not. Beginning from version 2.0 RC2, by default, all messages become opened for further editing; however, checking the box marked as "Edit", admin or moderator can disable this.

If you want to override "strike through Edit" text near checkbox, when editing a message as admin or moderator, just add $l_editLock='Mark as edited and lock post'; in your language pack (if $l_editLock variable is set, it will overwrite default setting).

Message author can edit topic's title only, if administrator has set necessary option (see above).

When admin or moderator edits his own message, "Edited by" string will show his name instead of simple "Admin" or "Moderator" title when editing/disabling another's message; at the same time, if admin or moderator do not check "Edit" box when editing another's message, status of this message will be kept as it was (or like it was not edited by admin at all).

Moving topics

Only administrator can move topics from one forum to another. Moving topics is a specific operation, we don't recommend to do it often (since many users will not understand what's going on). Do it only if topics thematics is not the same as the one of a forum. After decision, login as admin, go to the bottom of the topic page, click on "Move topic" and move topic correspondly to the forum you want. You can move topic only to the "another" forum, else there is no sense for this action (don't move topic to the same forum). When moving topics, only forum info is updated, nor datetime or anything. If topic is moved from one closed forum to another, and subscribers are NOT in this forum, their subscriptions will be DELETED.

Locking topics

This is very smart "censorship" operation, which prohibits users from making new posts in special topics. For locking topic, log in as admin, go to the bottom of each page. You will find kinda "lock topic" link. When you press it, topic will be locked. On an old place instead of "lock topic" you should see "unlock topic" link. Click on it, and topic will be unlocked.

Both topic's author (if he is a registered user) and admin can lock/unlock topics. Even if admin has locked this topic, registered author can unlock it - if the corresponding value not set in your options (see $userUnlock option above).

Beginning from version 2.0 RC3, it is also could be prohibited, that topic's author can not lock his topic at all (see $userUnlock option above). At the same time, when topic is locked, nobody from participants of topic is not able to edit his message anymore.

"Stickying" topics

"Sticky topic" means the topic, which will be shown on the top of the topics list every time. This is useful for some announcements or really hot discussions, which you want to present first. Sticky topics appear ONLY in topics list. Last discussions page stays untouched! Last discussions is actually fresh meat, there is no necessarity to show sticky posts every day, in the time when new stuff is going.

Sticky topics are available for setting both for admin and moderators. For stickying topic, go to the bottom of the thread and find the "Make sticky" link. Just click on it. When the topic is already sticky, you will find the "Make unsticky" link.

Sticky topics also can be locked. If you lock sticky topic, and then unlock it again, the sticky status will be kept, and vice versa.

Viewing subscriptions

Entering topic, logged admin can view which users are subscribed to this topic ("Subscriptions" link). Entering view panel, admin can also delete unwanted subscriptions, checking boxes near user's email.

Note: if there are no subscriptions, link will not appear.

"Preferences" for admin

Actually, admins preferences doesn't change anything special. As usual user, Admin can go to that panel and edit something, but all forums-working datas (Admin email, login and password) are taken from options file. In the admin panel, you will find operation called "Restore Admin data in database", clicking on it, you will automatically copy (or insert) your options data to corresponding Admin field in database. Then you can choose another email and other stuff (ICQ, for example) that will be shown on the "about user" page. So, your email shown in the above mentioned user info page can be independent on the email in the setup options file.

If you are using "Direct email" plugin, you can set another email for emailing admin, so you can have 2 different emails for system messages and direct user emailing.

Moderators

In miniBB concepts, moderators are digital persons who are allowed:

  1. Lock, unlock, delete and move any topic - the same way as admin;
  2. Edit any message (with topic's title) - the same way as admin;
  3. Post a new topic in post-only forum;
  4. View poster IP (and view all users that have posted under this IP).

Moderators have no admin's privileges and have no access to the administration panel.

Moderators privileges are splitted by forums.

Each moderator can be defined only by administrator in bb_specials.php file (see above).

Each moderator has special description near his nickname (defined in $l_moderator variable in language). If moderator has special rank, his rank will be displayed instead of it.

Forums-wide user options

Users hierarchy

There is "liberal" users hierarchy in miniBB. Topics can be made both by anonymous users and registered users. Let's see what happens.

  • Anonymous users (Guests). If you are lazy, or do not register for some reasons, you can make anonymous post, even under your usual nick, if it's not taken by another already. Simply type your username in "Login" field without password, and make a post under this name. If you leave both fields blank, your name automatically will be "Anonymous" (it depends on forums language setup even). However, if you will enter the nick which corresponds to any registered user you won't be able to post. This feature is only available, if forum's administrator has not set the forums for registered users. Notice that Administrator may disable some anonymous nicknames for using - in that case, your nickname will be posted as default "Anonymous".
  • Registered users (Members/Partakers). WE STRONGLY RECOMMEND all users to register - in any way, will you visit this forum often or not. Why? First, no one else will take your "unique" username/nick, and Guests will not be able to post messages under your nickname. Second, registered members have rights to edit their messages for some immediate time. Finally, any registered user can take any Guest name simply by filling in the registration form, that way faking someone's posts.

User info is displayed on the separate page. On the threads page, you'll find only user's nick and, if this user is registered, a "member" beneath. Clicking on it, you'll get all possible info about user, which either is specified/allowed or not (see below). NOTE: by clicking on user's nickname, you "quote" his nickname in the reply form!

User's login

User login form is located on every topics or threads page, as well as on the first page. On the topic page, you are able just to log-in without posting any text. Login and password credentials are stored as a cookie in encrypted format (MD5 by default, but possible to recode in bb_cookies.php for custom secure algorithms).

Depending on the forums setup, user login can expire in a different time (this is set in $cookie_expires option). Cookies renewing algorithm also allows users to stay logged for a longer period of time even after the browser is closed (this is set in $cookie_renew option - as soon as an expiratiod period becomes smaller than this time, and if a user is logged in at that time, then the cookie is reset for another expiration period). If you are aware of your account, do a manual logout before leaving the forums.

Guest name is remembered in a cookie during the expiration period.

Starting with miniBB v3.4, there is possible to use a forum's account Username, or Email as a 'login name'. Previous versions of miniBB support only Username as a 'login name'.

User's language

Registered users can change their board's interface language in their profile, choosing from dropdown list. However, administrator of multilanguage board also can set some links for anonymous users, so they will be able to view the board on desired language. For this, you need to put the link containing variable "setlang" and the value corresponding to the language file name. Example: http://.......index.php?setlang=rus will display board in Russian; however this setting will not affect logged-in user.

User's registration (Sign Up)

For registering, a new forum participant should click on "Registration" menu and fill in the form. If there's a Captcha add-on installed, it will ask at first to fill in the human verification code before registration.

Necessary fields are:

  • LOGIN: partaker's username, must be unique - if a user with identical login already exists, it wouldn't be possible to register. Login must contain only chars combination defined by the Admin. Usually, this is about only latin A-Z letters, digits, "_" sign, and the apostrophe. It's possible to extend such combination in the $userRegName option as described in the Configuration step above.

    The length of the username should not exceed 15 chars by default, but it's also possible to increase - in the $uname_maxlength option. $uname_minlength could define the minimum length, but it equals to 3 chars by default. For the Admin, we always recommend to keep usernames format as short as possible, because this stricly affects the look&feel of the Mobile layout, and overall of the forum.

    There are also some other limitations on usernames, which are defined in the verifyUsername function of bb_func_checkusr.php (this function is possible to rewrite on a custom basis, putting it under bb_specials.php for example):

    • they should not consist of digits only and they should not start with a digit - if you have a Private Messaging add-on installed, this could lead to a conflict when sending a PM, applying user ID - then it could mess with username); but if you don't have this add-on installed, you could remove these rules in a re-defined function;
    • they should not consist of a repeated character only (like '______' etc.);
    • they should start only with an allowed character, and not with '_'.

    Re-defining the function, you could also apply your own restrictions and rules. Follow the current function to duplicate its logics.

  • PASSWORD: could contain only A-Z letters, digits and "_" sign, with no spaces, the length is from 5 to 30 chars (this is default and is not available as the option).
  • PASSWORD ONCE AGAIN: a regular double check, this should repeat the "PASSWORD" value above.

    All passwords are encrypted with an MD5-function by default, and that way are kept in database (prior to miniBB ver.4). Participants are recommended to use tricky lowercase/uppercase/digits combinations, so they are not easy-to-guess.

  • EMAIL: account's email address. Must be also unique (more than one user with the similar email address is not allowed). Email is checked by a special function to avoid mispelled or bad-syntax addresses. If you couldn't register some email address, please report to admin, or at least, miniBB team.

Depending on what option the current forum has, an account could be registered straight after filling out the form, and could be logged into the forum automatically. Otherwise, if the Admin didn't allow straight registrations, there's need to check for the instructions in the email inbox at first.

As soon as the registration completes, depending on the configuration (check $emailusers option), a registration email is being sent to the email address specified. This email doesn't contain a plain password. If you as the Admin would like to allow to email the password, modify templates/email_user_password_eng.txt (or the same template of another language), and somewhere put a sentense containing {$passwd}. Registration email is the only moment where it's possible to catch a password in a plain mode, and this message could be saved for further member's assistance, but not for any other purpose. Note that sending a password over email is a security risk.

Starting from miniBB ver.2.0 RC4, it's allowed for the Admin to disallow user registrations (set $enableNewRegistrations=FALSE; in setup_options.php), but at the same time, to register them, logging as the Admin and visiting the link under ?action=registernew. For example, paste in templates/admin_panel.html:

<!-- Register new user --><li><a href="{$indexphp}action=registernew">New user Sign Up</a></li>

this link would drive the Admin straight to the new participant's registration form. There you as the Admin could enter all regular and required user data, click "Submit" button - despite a common registration message would be displayed, the new account would be created after it. This is an implementation for those who'd like to allow entering the forums to trusted users only.

New topics and replies

New topic form is placed at the bottom of each topics listing page. You need to type topic's title ("New topic") and body ("Message"). At least, "New topic" field must be filled in. If you write in it and don't write in "Message", message will be automatically equal to topic's title.

New post form is located at the bottom of each threads page.

Note: if the anti-spam protection is enabled (usually it is), you can make posts and topics only once-per-defined-time. Usually, this time is 1-2 minutes - and it means, you can make posts not often than 1 per 1-2 minutes as well.

Email notifications

Email notifications can be enabled or disabled by forums admin. Usually, on large forums they are disabled. If enabled, every user who makes a post, can subscribe to them. Alternatively, there us also a way to make notifications available without posting some text. Notifications are sent to user's email when someone replies to the topic after this user. Users can subscribe to notifications even if they are not topic authors. Users can also unsubscribe from notifications. For that, got to the desired topic and find "Unsubscribe" link instead of notifications checkbox, and just click on it.

According to the setup, user may receive notifications on custom language (in multilanguage forums). Admin receives notifications on default board's language.

Automatic links highlighting

If you are using links like http://www.minibb.com (beginning with "http://", "https://", "ftp://", "www" or "mailto:"), they are automatically converted to the clickable hyperlinks. But, when checking "Disable" box, links ARE NOT automatically highlighted, both as BB-codes (see below).

BB Codes

miniBB doesn't support straight HTML code, it is displayed like you type it. However the message text can contain so called "BB-codes" - special codes which are transformed to the allowed HTML code upon submission.

Currently, miniBB supports the following codes:

Codes
[url=http://SOME_URL]HYPERLINK TEXT[/url], [url]http://SOME_URL[/url]
Transformed to
<a href="http://SOME_URL" target="_blank" rel="nofollow">HYPERLINK TEXT</a>
Explanation
Puts the text between URI tags with "nofollow" attribute.
Special Notes
Guests are not allowed to use this tag; registered members are allowed to use it only if amount of their postings is greater than specified under $allowHyperlinks option. This limitation doesn't affect the admin.
Code
[urlc=http://SOME_URL]HYPERLINK TEXT[/url]
Transformed to
<a href="http://SOME_URL" target="_blank" >HYPERLINK TEXT</a>
Explanation
Puts the text between URI tags with no extra attributes.
Special Notes
Available to admin only.
Code
[nourl]SOME URL or ANYTHING ELSE[/nourl]
Transformed to
SOME URL or ANYTHING ELSE
Explanation
Removes the link attribute from any kind of URL which can be transformed into link. Useful if you would like to provide an URI but without the referenced tag.
Special Notes
Available to everyone.
Code
[imgs=http://SOME_URL]ALTERNATIVE TEXT[/imgs]
Transformed to
<a href="http://SOME_URL" target="_blank" rel="nofollow"><img src="http://SOME_URL" alt="ALTERNATIVE TEXT" title="ALTERNATIVE TEXT" style="width:150px" /></a>
Explanation
Puts the tag for the external picture which can be enlarged when you click on it. Available extension of the images are gif, jpg, jpeg, png.
Special Notes
Available to everyone.
Code
[img=http://SOME_URL]ALTERNATIVE TEXT[/img]
Transformed to
<img src="http://SOME_URL" alt="ALTERNATIVE TEXT" title="ALTERNATIVE TEXT" />
Explanation
Puts the tag for the external picture which is displayed in the thread with no applying to size. Available extension of the images are gif, jpg, jpeg, png.
Special Notes
Available to everyone. This tag is also used for the smilies add-on.
Code
[b]SOME TEXT[/b]
Transformed to
<strong>SOME TEXT</strong> (SOME TEXT)
Explanation
Puts the Bold attribute for the text.
Special Notes
Available to everyone.
Code
[i]SOME TEXT[/i]
Transformed to
<em>SOME TEXT</em> (SOME TEXT)
Explanation
Puts the Italic attribute for the text.
Special Notes
Available to everyone.
Code
[u]SOME TEXT[/u]
Transformed to
<u>SOME TEXT</u> (SOME TEXT)
Explanation
Puts the Underline attribute for the text.
Special Notes
Available to admin and moderators only.
Code
[font#HEX_CODE]SOME TEXT[/font]
Transformed to
<span style="color:#HEX_CODE">SOME TEXT</span>
Explanation
Puts the color attribute for the text.
Special Notes
Available to the admin and moderators only. HEX_CODE must consist of 6 chars numerical color code in Hex format, for example red is FF0000.
Code
[quote=SOME NAME]SOME TEXT[/quote], [quote]SOME TEXT[/quote]
Explanation
Puts the quoting block in the text which differs from the main text by another background, font style and possibly other attributes.
Special Notes
Available to everyone.
Code
[hl]SOME TEXT[/hl]
Explanation
Puts the highlighting block in the text which differs from the main text by another background and styling (for example, programming quote, special excerpt etc.)
Special Notes
Available to everyone.
Code
[alignleft|right|center]SOME TEXT[/align]
Explanation
Aligns the block of the text by the left, right or center.
Special Notes
Available to everybody.

The codes could be properly nested, for example you can put a Bold tag for URL; however you should follow the order of the code. If the Bold code opens first, it should be closed last.

The codes could be typed in UPPERCASE or lowercase; but there should be no spaces in tags themselves (for example [ b ] text [ /b ] will not work, [b] text [/b] will).

Above the message form, when you compose new topic, new reply or edit the message, there are buttons which help to apply the styling to your message in BB codes format quickly. Highlight the text you have wrote in the form, then click the button to apply the attribute. In some cases, like for URL or IMG tag, you will be asked to enter additional attributes. In Internet Explorer, scripted windows must be enabled to use this feature.

Quoting messages

Topic posters can quote other messages. There is no "quote" BB-code included, as on some bulletin boards. Instead of it, you can use "italic" style to separate quotes. For better comfort, there is a "quote" link near every post made. For making a quote, you need to select some text and press this link. Selected text will be automatically inserted into reply box at the bottom of the page.

This feature is based on JavaScript code and works only in newest browser versions. Specific or old browsers users may experience some troubles with it.

Locking topics

Topic authors can lock their topics, if they think it is correct. In order to do it, topic author needs to be logged in. At the bottom of the topic's page he must see small "lock topic" link. Clicking on it, topic becomes closed.

Nobody except topic author or administrator can lock the topic. If topic was locked by admin, topic author can unlock it ONLY if it is defined in forum options (in most cases it's not).

Editing messages

Registered users (and only registered) can edit THEIR messages, but only if they are cookie-logged and only if the time of the message is not expired. For this, just click on "Edit" near each post (if it is your message, you'll see the link, else not). When editing message, "automatic highlights" are replaced with "real" BB-codes, so there is no need to delete them once again. Also, "real" HTML tags are replaced back to codes. Via editing, user can add new BB-codes, links etc. - like in any new post or topic. User can edit only his POST, not topic's title, even if he is the author of the topic. After message is edited by user, info about that is displayed near each post.

There is no way to delete your message (and if not allowed, to edit topic's title), if you are topic's author. Only admin can do this.

In some cases, after administrator has edited user's message, for user, it is no way to edit it once again.

Editing preferences

For editing user preferences, you need to log in and go to the "preferences" appearing in menu. You can type new data for your account, except login, that can not be changed. If you don't want to change your password leave the password field and go next to the fields you want to edit, you don't need to write your password once more, 'cause are already logged. Then done just press submission button below.

This action works exactly like registration: you need to type grammatically correct data. Thus, you can not change your email to the one of someone who already registered (incl. admin's email ;) ). Updating preferences, you don't need to enter password, if you don't want to change it. Just leave these fields blank.

Exceptions:

  • Show email to public? option allows (or not) other users to view your email in user info. It does not affect emailing notifications etc.
  • Sort topics by option switches sorting filter. On topics and last discussions pages, you can view topic names sorted by new topics or new posts. This is one of the points of why to register: logging into the forums, you can quickly view, what's new. This option is saved on all pages, since anonymous users will need to click on "sort" every time.

Changing user password

Login, go to the preferences, type new password 2 times in "password" fields. Your password will be updated to the new one.

Note: after changing password your old password will not be valid, and you will need to re-login on the login page. If you will edit more settings, you'll get the message "not allowed" or something similar.

Resetting forgotten password

miniBB passwords are encrypted using MD5 algorithm. You can decode MD5-hash only with special hacker tools, using forces or dictionaries; it is impossible to decode it in "easy way". As longer password you have, as it more difficult to encode it. If you have forgotten your password, PHP-script can't restore it anymore, but instead, it generates new random password.

Follow these steps to get new password:

  • Click on "password" links near login form;
  • Enter an email you've mentioned in the registration form;
  • If your email is correct (we hope, yes :) you will receive further instructions via email;
  • Follow link described in email and confirm your password;
  • Your password will be changed only after confirmation. You will be able to change it to something "human" in "preferences".

Forums search panel

You can quickly search forums for keywords. Search panel is placed under the "Search" link in menu. You can search text in topics and posts, in topics only, in poster names, in specified forums, by all words, any words or the whole phrase. Newest messages are shown first.

Search phrase length can't be more than 100 chars. Minimum length of any word is 3 symbols. As more search parameters you specify, as more longer by time and specific by content will be search results.

Search within specified forums is also available. You can either search in all forums or choose a forum you want to search in.

Search algorithm tries to perform a search on a comprehend words. By fragment, we mean here fragment of the whole word from the beginning. For example if you search for a word "fox", it will be found in the sentense "The quick brown fox jumps over the lazy dog.", also as the word "jump" will be found. But the word "foxy" will not be found, also as "row" won't be found. Searching by whole phrase, script will find "fox jumps over", but won't find "fox dog" - use "Words or fragments" criteria for finding many words in the text at the same time.

Statistics

Under "Statistics" menu, you can get all available information about forums. This is the most "not needed" part of a forum. In statistics, you will find:

  • Total number of registered users (except admin);
  • Total number of topics;
  • Total number of posts;
  • Who is administrator;
  • Who is last registered user;
  • Most popular topics list (top 5, top 10, top 20, top 40), which is generated according to how many answers were posted in topic;
  • Most viewed topics list (top 5, top 10, top 20, top 40), which is generated according to how many views each topic has;
  • Most active registered users list (top 5, top 10, top 20, top 40).

You can define period of days which will be used in calculating stats (this setting affects only most popular topics and most viewed topics, username stats are NOT affected). Setting $l_stats_popular, $l_stats_aUsers, $l_stats_viewed in language pack to empty values (for example, $l_stats_aUsers='';), will remove corresponding panel from Statistics page.

Notes for developers

Please, don't study this section if you are unfamiliar with PHP, mySQL and programming at all, more so - don't even try described below. We are not giving additional support on these topics. They all are working like described; if something is not working on your side, miniBB is not the reason here.

Database modules

Default version of miniBB is supported only by mySQL database. Anyway, we have developed special SQL-functions module which contains basic SQL-functions, which could be extended by another databases, supported by PHP. We plan to work on it in near future, but every developer who can help us in making another DB module is welcome. You'll get all necessary credits.

Making a DB module is average simple. Since SQL functions are mostly the same (at least, by logic), in many cases you just need to make another database connection which is supported by PHP, and design database request if necessary. SQL requests mostly are parsed into array pointers, which can be accessed, f.e., via mysql_fetch_row() function. Probably, most databases can support this operation. In other words: just look, how mySQL parser works, and include other commands. Note: don't change names of variables, like $result or $sus, because some are called from the outside script.

Below are described miniBB general/universal functions available in setup_mysql.php and prepared for programmers who want to extend plugins via this SQL-module separately.

string makeLim (int page, int numRows, int viewMax)

Returns SQL-string like "limit 10,20" prepared for inserting in SQL-request. If page=0, returns only single like "limit 10" string. numRows is the amount of total database request rows received via request. vieMax is the maximum amount of rows should be displayed (set in setup_options.php).


string getClForums (array closedForums, string more, string prefix, string field, string syntax, string condition)

Returns SQL-string like "where id=1 or id=2 or id=3" prepared for inserting additionally in SQL-request. "closedForums" must be a simple array of values which request will be compared to. "more" could be 'where' or simply ''. "prefix" inserts a point "." after table name. "field" is field name which values are compared to. "syntax" is alternatively 'and' or 'or'. "condition" is '=' or '!='. Example: if $closedForums=array(6,7)

$xtr = getClForums ($closedForums, 'where', '', 'forum_id', 'and', '!=');

returns:

where forum_id!=6 and forum_id!=7


resource db_simpleSelect (boolean sus, [string table, [string fields, [string uniF, [string uniC, [string uniV, [string orderby, [string limit, [string uniF2, [string uniC2, [string uniV2]]]]]]]]])

Returns resource identifier on successfull SQL-request or FALSE on failure. "sus" determines either we need to make a first request (if 0) or just go through request rows (1). "table" is table name, "fields" are request fields separated by comma. "uniF", "uniC", "uniV" describes correspondly unique values which is used in additional request like "where id=1", if set. "orderby" specifies field name which is used in ordering result, and "limit" adds 'limit' statement (could be set via makeLim() function). "uniF2", "uniC2", "uniV2" are another set of additional unique fields. Example:

db_simpleSelect(0, 'minibb_topics', 'topic_id, topic_title','topic_id','>','10', 'topic_id DESC', 20, 'topic_id', '!=', 25')

returns resource ID for the following request:

select topic_id, topic_title from minibb_topics where topic_id>10 and topic_id!=25 order by topic_id DESC limit 20


int insertArray (array insertArray, string tabh)

Returns SQL error-number after executing the request like "insert into users (id, name) values (1, 'Paul')". "insertArray" must be prepared simple array of variable names which MUST correspond to their values. In the given example, it should be array('id','name'), and in that case, in the script itself, there must be variable $id and $name, and their values correspondly must be 1 and 'Paul'. "tabh" is table name where values must be inserted ('users' in the given example).


int updateArray (array updateArray, string tabh, string uniq, string uniqVal)

Returns affected rows amount after executing an update request. In many cases similar to insertArray(). "updateArray" must be the same type array, and "tabh" is table name. "uniq" is unique field's name, and "uniqVal" is it's value. Example: if we have $updateArray=array('id','name'), and variable names, $tabh are the same as in the insertArray() example, and $uniq='user_id' and $uniqVal='2', SQL-command will be the following:

update users set id=1, name='Paul' where user_id=2


int db_delete (string table, [string uniF, [string uniC, [string uniV, [string uniF2, [string uniC2, string[uniV2]]]]]])

Executes DELETE request in SQL-query, return amount of affected rows. Field names mean the same as in db_simpleSelect.


int db_calcAmount (string tbName, string tbKey, string tbVal, string setName, string setField)

Function to get amount of values from table $tbName by criteria $tbKey='$tbVal'; then update another necessary table's $setName field $setField by this amount. Call this function after deleting reply, topic, user, or moving topic, or inserting new reply.

Another functions in SQL-module are specific. They either don't fit to described universal functions or are too complex for designing something special for them. You can make your own specific functions, identificating them with prefix "db_" at the beginning.

Including in your own PHP script

If you are the creator of your own PHP site, you probably have the same header and footer for the whole site, or just want to use another functions that fit into your project and miniBB together. As usual, they are .php files, and are included in, for example, index.php. Since miniBB owns the same index.php in its structure by default, you can change the name of miniBB's index.php to something else, afterall setting $indexphp option in setup_options.php. Including forums from your own script requires a knowledge of PHP and things what are happening inside of miniBB. If you simply include your board using include(); you will get errors like "Headers already sent" or similar. This could happen when user loggs in to the forums, and cookies are set (they can not be set in that case, because some of your HTML stuff goes before include(); ). In this case, miniBB is a stick on two ends. The most efficient solution is to include your board this way:

<?php

ob_start();

include ('./index.php');

$flushed = ob_get_contents();
ob_end_clean();

/* Output your header here */
echo 'header';

echo $flushed;

/* Output your footer here */
echo 'footer';
?>

where echo 'header'; stands for the output of your common header, and echo 'footer'; stands for the output of your common footer.

Most probably you will have completely another paths and filenames; we hope you are able to turn your thinking on for changing them. You may also change $pathToFiles setting in setup_options.php, which will make your life easier with including files from different paths.

Keywords-rich and user-friendly URLs using Apache's mod_rewrite engine

If you have Apache server with mod_rewrite module turned on, you probably already know what benefits it could bring you. Bundling miniBB in mod_rewrite mode means overriding default URLs. They won't look like ./index.php?action=vtopic&forum=4 or ./index.php?action=vthread&forum=1&topic=75, but: 4_0.html or 1_75_0.html, or even containing keywords related to topic titles. Such kind of links will be more likely interpreted with search crawlers when referrencing to your website from the other external webpages.

It is very important to understand what such kind of URLs would be useful for. URLs could be user-friendly or keywords-rich. Those are different things. "User-friendly" means a very short URL, which could be written manually on paper without mistakes, and that way re-typed easily on the other computer. It also could be remembered fast (depends on your brain's memory resources of course). "Keywords-rich" stands for the URL which contains a lot of keywords in it, related to the topic's title and actually build up on this title. Most-likely if there are more than 3 words in a topic's title, it can't be called "user-friendly" already. However such URLs are useful for SEO, specially in terms when somebody refers to your specific topic in the other website's context. In that case, the crawler gets more chances to apply some keywords to your page in its internal mechanism.

miniBB supports both types of such URLs. It's only your choice, what kind of type you will use for your forums. Each of them has cons and pros.

Keywords-rich-URLs are useful for SEO and they mean point of the current web context fashion. However if you change the topic's title, the forum script will automatically change the URL, too. It means if it was previously indexed in the crawler, now the crawler needs to eliminate it and reference to the new URL, which appears after 301-header redirection. A lot of redirections, i.e. if the topic title has been renamed often for some reason, means "bad" for the crawler. It is useful only for the forums which do not change their topic titles too often, and most likely 90% of such URLs will not be user-friendly at all. Additionally, such URLs may be useful for English-based forums only. International forums must either contain specific algorithms regarding special characters in topic titles, either to use encoded characters in URLs themselves, which means they have a very limited ability of being transferred via the global web.

User-friendly-URLs in miniBB contain digits only (actually, forum and topic IDs). They are forever static, not depending on the topic's title change and not depending on what kind of language the forums use. They are completely user-friendly and short, and may be typed on any computer in the world. We recommend to use them for non-English communities and for those who carry about static longterm content a lot.

For enabling mod_rewritten URLs, you need to uncomment and set to TRUE a $mod_rewrite option under setup_options.php.

Notice that only links to threads and forums listings will be rewritten that way. There is no special need in changing links to Registration, Statistics, User profiles and other pages. Search indexers need just your content.

In the user-friendly mode, hyperlinks are build under the following scenario:

  • List of topics: [FORUM_ID]_[PAGE].html
  • List of threads: [FORUM_ID]_[TOPIC_ID]_[PAGE].html

When you are sure that mod_rewrite module is set up correctly on your server, you need to create .htaccess file and put under the forums folder. It should look like this:

RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on
RewriteRule ^([0-9]+)/$ ./index.php?page=$1&mdrw=on

where index.php is your forums file (it could have other name, if you renamed it earlier). Make sure that under forums folder you don't have other .HTML files matching the above scheme. They may not be displayed properly.

If you don't want index.php interpreted as index.html, remove the second line in the aforementioned code. Your forums manual could be also interpreted as a content page; if you want to avoid it, remove the third line in the code.

If you would like to set up the keywords-rich mode for your forum URLs, refer to our "Keywords-rich URLs" package under the Downloads area. Such add-ons are available only for miniBB beginning from the version 2.4. There are different variations of how the URLs could be transformed, and it's very up to you how you will apply them to the forums; it very depends on the forums language, audience and marketing positions as well, not saying you should be an advanced enough coder to make such thing happen. It's very specific. Even for our default forums, we are using currently the modified version of one of the add-ons presented in such package. It is not suitable for everybody automatically - of course, if you want to achieve a really professional result with it. MiniBB is not lame in this aspect.

Beginning from version 2.0 RC5, pay attention at "mdrw" variable, it must be set ONLY in .htaccess configuration, telling the script to put "NOINDEX,NOFOLLOW" tags in the HTML header. So crawlers will index your mod_rewrite-like pages, 1_0.html, for example, but not index.php?action=vforum&forum=1. These 2 different addresses point to the same page, and it could be interpreted as duplicated content. So, putting "mdrw" variable, we force the crawler not to index your .php page, if it's URL already presented as the "static" .html. If you use mod_rewrite, providing links to your forum pages from another sources, try to avoid .php addresses for content pages as well.

PHP scripts

When developing PHP scripts for miniBB, to reduce the overall size of files and that's why speed them up a little bit, we intentionally avoid tabulation, extra spaces and commenting in the code. But the code you see in miniBB scripts, is exact and supplied "as is" right after writing it up, so it's very opened for modifications and friendly to edit. We work on the same file versions, as they are supplied in the official package, as Notepad2 editor provides the full control and easy navigation in such code. You may use extra programs to "tabulate" it on your own, if you feel comfortable to edit it that way; but please, if you provide your own modifications to miniBB community, follow the common strategy of keeping the code clean.

Upgrading miniBB

If you want to have always up-to-date miniBB version, check for updates constantly. Our RSS feed contains any news related to miniBB new versions. When the new version is coming out, it is recommended for all users to upgrade immediately, because having the newest version you get a bigger chance to keep your forums safe, and all our plugins are tested only with the latest release. As soon you upgrade - as easy will be your next upgrade.

For upgrading miniBB, you will need to do the following:

  • BACK UP YOUR CURRENT FILES AND DATABASE - else you may lose your work with no way back;
  • almost always overwrite core script files;
  • in some cases update customized files, settings, laguage pack and/or templates;
  • in rare cases update database structure.

By "core script files", we mean here basic .php scripts, which in most cases are not necessary to edit. You probably could change these files only if you have heavily customized your version. In this case, you are losing possibility to upgrade easily. All core scripts in the package by default have prefix "bb_", also as "index.php", "setup_mysql.php" are also core scripts. Exceptions are:

  • css/default.css - could and should be modified to have your own unique colors/fonts layout;
  • bb_codes.php - this file could be modified to have your own BB codes;
  • bb_cookie.php - could be modified to have your own authorization routine;
  • bb_plugins.php - could be modified to have various extensions (addons and plugins);
  • bb_specials.php - could be modified to have additional special options of forums

One file you modify in any case, is called "setup_options.php". This is a settings file, and upgrading miniBB, you should never to overwrite this file, keeping your settings. Additionally, you may add new settings at the end of file, if needed. We are always adding new options at the end of this file in new version.

Customizing your board, you probably always will change the template called "main_header.html". It is kept in /templates/ directory amongst other HTML templates. Upgrading miniBB, keep in mind all templates you have upgraded. If some changed template is mentioned in upgrade history, you can either overwrite it, either edit it, changing updated code or variables, and keeping your previous work.

Language pack (eng.php or whatever is placed in /lang/ directory) is also subject to update in many cases. Since we ourselves are supporting only English version of the board, other language packs, created by 3rd party, most commonly need to be updated, if English pack is changed. If you have other language than English, or have made some changes even to your default English version, you shouldn't overwrite new original language pack, bud edit your own.

miniBB 2.x series releases contain very detailed upgrading history. It is kept in a file called "!UPDATE.txt", which you can download in our "Downloads" section in "Update History" package. This file contains a list of all changes, which have been done from version to version. History begins from the release 2.0 RC1, the first release of 2.x series - if you're uprading from older 1.x series, start checking from this section.

Before upgrade, you must get the clue how you'll upgrade (hopefully, you got it from the description above), and to know your current version of miniBB. It is hidden from public for security reasons; however, it is always kept in a file "bb_functions.php". Edit this file and notice your version at the very top.

In most common cases, you should close your forums before upgrade, so users don't affect database with new postings or registrations. Rename your default forums index file, commonly "index.php", to "index_u.php", and then set the option $indexphp in setup_options.php as 'index_u.php?'. You can set another filename, of course, any filename. Create a NEW index.php file and put there simple text like "We are upgrading. Please, come again in few minutes!", then upload it to server. In that case, users visiting your forum, will see the warning message, at the time only you will know the name of temporary index file, and will be able to run it in order to see your results after upgrading.

When you are ready to upgrade, download latest miniBB release, and start checking !UPDATE.txt file from the version you currently have. For example, if you're having version "2.0 RC1f", find the section "Changes comparision: 2.0 RC1f - 2.0 RC1g" and follow down below the history file content until the end. So you should pass all comparision versions: 2.0 RC1g - 2.0 RC2, 2.0 RC2 - 2.0 RC2a, 2.0 RC2a - 2.0 RC2b etc. Each section provides you detailed information, on which core files you need to overwrite, which customized files you should modify, and which SQL commands you should execute in order for upgrading your database structure.

Take all newest files from the latest release, despite they are mentioned as earlier versions. If you will some way notice or remember, which files you have overwritten already, it is not necessary to upgrade them twice, if they are mentioned in the next history sections. For example, "index.php" of "bb_functions.php" are 2 files which are almost always necessary to upgrade. So you just need to ovewrite these files once, despite they are mentioned in many cases.

When adding new option(s), language variables, special arrays, take a look at the default file(s) from the latest package - in most common cases, you need to paste these options the same way in your modified files.

History file may also contain some non-critical updates, or just mention miniBB changes, which will not affect your old installation. They are mentioned just for your knowledge, and there is nothing to upgrade.

After you have done all upgrade changes, test your board, manually pointing to the "index_u.php" file you have renamed before. If there are no critical errors shown from the first step, and you are able to login/out, post new topic and reply - the board should work ok. In any way, if some errors will be found after your upgrade, users will notice you. Create a new topic titled "Forum software upgraded" and notice the users about your software changes.

Finally, rename your index file back and put it's name in setup_options.php file. Forums are ready to rock again!

If upgrading process seems difficult to you, we are always ready to help you for a reasonable rate. Check our Paid Support section for more details.

Ok. Here comes the End of the Manual... but not the Ending!


© 2001-2010 Paul Puzyrev, Sergei Larionov, www.minibb.net


© 2011-2018 Paul Puzyrev www.minibb.com

 
An Amazing miniBB-based Forum Powered by Easy Forum Software miniBB ®


  ⇑