NOTE: This script will soon become invalidated when Special:Forum is removed from the service. If you have converted to the "Discussions" feature, do not use this script.
ArchiveBoards is a script that strives to make it easier for sysops to create boards that don't allow users to post threads, nor reply to any threads within it. To prevent users trying to bypass the nature of the script, it also removes the buttons on posts so that users cannot move the thread somewhere out of the board and continue the conversation.
Suggestions to improve the scripts are fully welcomed on the talkpage. Please also let me know of any bugs as well and I will endeavour to fix them as quickly as possible!
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.
Note: This script has required configuration options. You cannot import this script using the ImportJS page, as the required configuration values will not be specified before the script is fired and therefore, there will be no indication of the script having worked as intended.
There are some custom configuration options that you can use if you want to:
An array style list of board names for where the script must be fired. This is a required property or nothing will happen
As this is required, there are no default values. However, the format should be ["Board1","Board2","Board3"], where each array value is the name of a board. Underscores not required
A list of CSS based formatting that allows the notice to be styled
Note that you only need to define the fields you wish to change from the defaults, and they may be defined in any order. However, this definition must precede the importArticles() call!
Limit the number of boards that can be specified to prevent abuse of the script to close all board
Remove "closed" boards from dropdown menus, such as those on the "Start a Discussion" area on articles.
2 June 2016
Feature update (v1.0.4): The script no longer fires under the Topic namespace. Previously, it was possible to get around the removal of the posting forms to create new discussions in boards that were closed by this script using the topic board dropdown in that namespace. — SuperSajuuk
11 February 2015
Feature update (v1.0.3): The script will now display a padlock icon on Special:Forum for boards that are listed in the boards array — SuperSajuuk
9 February 2015
Minor update (v1.0.2): With thanks to Dantman, the script was updated to use a different format for creating the notices — SuperSajuuk (props to Dantman!)