Move salvaged docs to wiki
35
Home.md
@ -1 +1,34 @@
|
||||
Welcome to the vichan wiki!
|
||||
Important information about our wiki
|
||||
=====================================
|
||||
|
||||
Most of our wiki's contents come from the Tinyboard wiki, last updated on 16th October 2012, which was hosted on the old Tinyboard domain, tinyboard.org. Most of this documentation was written by Michael Foster, known on Github and IRC as [@savetheinternet](https://github.com/savetheinternet), between 2010 and 2012.
|
||||
|
||||
While it is probable that most of this documentation will work for you, parts of it may be out of date due to its age or inapplicability to vichan.
|
||||
|
||||
Getting started
|
||||
---------------
|
||||
* [Why Tinyboard?](why_tinyboard.md)
|
||||
* [Installing Tinyboard](installation.md)
|
||||
* [Configuration Basics](config.md)
|
||||
* [Introduction to the moderator interface](mod_interface.md)
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
* [Cache](config/cache.md)
|
||||
* [DNS Blacklists (DNSBL)](config/dnsbl.md)
|
||||
* [Flood filters](config/flood_filters.md)
|
||||
* [Word filters](config/word_filters.md)
|
||||
* [reCAPTCHA](config/recaptcha.md)
|
||||
* [Boardlinks](config/boardlinks.md)
|
||||
* [Events](events.md)
|
||||
* [Markup syntax](config/markup.md)
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
* [“Your request looks automated” error](your_request_looks_automated.md)
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Using Git](git.md)
|
||||
* [Upgrading Tinyboard](upgrading.md)
|
||||
* [Special:AllPages](special_allpages.md)
|
||||
|
22
bans.md
Normal file
@ -0,0 +1,22 @@
|
||||
Bans
|
||||
====
|
||||
|
||||
Tinyboard currently accepts three forms of bans:
|
||||
* IP address (“static”) bans
|
||||
* Range/wildcard bans
|
||||
* CIDR netmask bans
|
||||
|
||||
Static bans apply to a single IP addess, such as “127.0.0.1” and “::1” for IPv6.
|
||||
|
||||
IP range bans allow the use of the asterisk character (`*`) as a wildcard. For example, “127.0.0.” or just “127.0.” would match “127.0.0.1”. To use this, `$config['ban_range']` must be enabled.
|
||||
```php
|
||||
$config['ban_range'] = true;
|
||||
```
|
||||
With CDIR netmask bans, “10.0.0.0/8” would match “10.0.0.0 - 10.255.255.255” for example. Due to MySQL limitations, this is currently an IPv4-only feature. To use this, `$config['ban_cdir']` must be enabled.
|
||||
```php
|
||||
$config['ban_cidr'] = true;
|
||||
```
|
||||
See also
|
||||
--------
|
||||
* [Configuration basics](config.md)
|
||||
* [Mod interface](mod_interface.md)
|
18
capcodes.md
Normal file
@ -0,0 +1,18 @@
|
||||
Capcodes
|
||||
========
|
||||
|
||||
A “capcode” may be used by staff to attribute the post to `Anonymous ## Mod` (and alike). To use a moderator capcode (only available in the moderator interface), simply append `## Mod` to your name and/or tripcode with a space before it. A common mistake when trying to use a capcode is leaving out the preceding space; that is required to seperate it from a standard secure tripcode.
|
||||
|
||||
Administrators may use anything, such as “Admin” or “God”, as a capcode.
|
||||
|
||||
Custom capcodes
|
||||
---------------
|
||||
It is possible to configure certain or all capcodes to display differently.
|
||||
```php
|
||||
// Change "## Mod" to make everything purple, including the name and tripcode
|
||||
$config['custom_capcode']['Mod'] = array(
|
||||
'<span class="capcode" style="color:purple"> ## %s</span>',
|
||||
'color:purple', // Change name style; optional
|
||||
'color:purple' // Change tripcode style; optional
|
||||
);
|
||||
```
|
34
config.md
Normal file
@ -0,0 +1,34 @@
|
||||
Configuration Basics
|
||||
====================
|
||||
|
||||
It’s important that you read this page and don’t just assume it’s okay to make changes to [`inc/config.php`](../inc/config.php); it’s not. [`inc/config.php`](../inc/config.php) is used only to hold default values. It’s updated very frequently, so placing your local configuration there would make upgrading a very complicated process.
|
||||
|
||||
Instead, edit [`inc/instance-config.php`](../inc/instance-config.php).
|
||||
|
||||
Config files
|
||||
------------
|
||||
Tinyboard is made up of multiple configuration files:
|
||||
* [`inc/config.php`](../inc/config.php) — These are the defaults. Do not edit this file or you will have a very hard time upgrading in the future.
|
||||
* [`inc/instance-config.php`](../inc/instance-config.php) — Make all your site-wide changes here. This file is generated upon installation.
|
||||
* `<board>/config.php` — Optional board-specific configuration files can also be made. These files don’t exist by default.
|
||||
|
||||
The syntax for [`inc/instance-config.php`](../inc/instance-config.php) and `<board>/config.php` is exactly the same to that of [`inc/config.php`](../inc/config.php). You can copy lines from `config.php` and place them in either one of these config files. That is what `config.php` is for.
|
||||
|
||||
The configuration variable (`$config`) is just one huge associative array, occasionally split into “sections”.
|
||||
|
||||
Loading order
|
||||
-------------
|
||||
It’s important to understand how the configuration files work to get the most out of Tinyboard.
|
||||
* [`inc/config.php`](../inc/config.php) — `$config` is reset with the defaults.
|
||||
* [`inc/instance-config.php`](../inc/instance-config.php) — Some `$config` values are overwritten or changed.
|
||||
* `<board>/config.php` — If it exists, some more `$config` values are overwritten.
|
||||
|
||||
Comments
|
||||
--------
|
||||
The comments in [`inc/config.php`](../inc/config.php) are probably the greatest source of documentation. It is filled with descriptions for specific config variables as well as examples, for you to copy into [`inc/instance-config.php`](../inc/instance-config.php) and modify.
|
||||
|
||||
See also
|
||||
--------
|
||||
* [“Events”](events.md)
|
||||
* [Custom flood filters](config/flood_filters.md)
|
||||
* [Cache](config.md)
|
25
config/boardlinks.md
Normal file
@ -0,0 +1,25 @@
|
||||
Boardlinks
|
||||
==========
|
||||
|
||||
For lack of a better name, “boardlinks” are those sets of navigational links that appear at the top and bottom of board pages. They can be a list of links to boards and/or other pages such as status blogs and social network profiles.
|
||||
|
||||
“Groups” in the boardlinks are marked with square brackets. Tinyboard allows for infinite recursion with groups. Each `array()` in `$config['boards']` represents a new square bracket group.
|
||||
|
||||
Custom links can be defined by using `key => value` pairs.
|
||||
|
||||
Examples:
|
||||
```php
|
||||
// [ a / b / c ]
|
||||
$config['boards'] = array('a', 'b', 'c');
|
||||
|
||||
// [ a ] [ b / c ] [ d / e ] [ home ]
|
||||
$config['boards'] = array(
|
||||
array('a'),
|
||||
array('b', 'c'),
|
||||
array('d', 'e'),
|
||||
array('home' => '/')
|
||||
);
|
||||
|
||||
// PHP 5.4.0+ syntax
|
||||
$config['boards'] = [ ['a'], ['b', 'c'], ['d', 'e'], ['home' => '/'] ];
|
||||
```
|
44
config/cache.md
Normal file
@ -0,0 +1,44 @@
|
||||
Cache
|
||||
=====
|
||||
|
||||
Static files
|
||||
------------
|
||||
You may have noticed that Tinyboard uses “static” files for nearly everything — we only use `.php` files for stuff that requires immediate database interaction like posting, reporting, deleting and of course the entirety of the moderator interface. This is for performance reasons; static files load much faster than `.php` files, which query the database upon every single page load, wasting valuble processing power. Although you can create your own `index.php` to do whatever you like, Tinyboard recommends the use of our themes system which builds `.html` files when an action occurs, such as posting.
|
||||
|
||||
APC, XCache and Memcached
|
||||
-------------------------
|
||||
On top of the static file caching system, you can enable the additional caching system which is designed to minimize SQL queries and can significantly increase speeds when posting or using the moderator interface.
|
||||
|
||||
### APC
|
||||
[APC (Alternative PHP Cache)](https://web.archive.org/web/20121003095626/http://php.net/manual/en/book.apc.php) is the preferred method of caching. To enable it, add the following to your [`instance-config.php`](../../inc/instance-config.php):
|
||||
```php
|
||||
$config['cache']['enabled'] = 'apc';
|
||||
```
|
||||
You will need to install the APC extension if you don’t already have it. If you have PECL, you can use
|
||||
```
|
||||
pecl install apc
|
||||
```
|
||||
|
||||
### XCache
|
||||
|
||||
[XCache](https://web.archive.org/web/20121003095626/http://xcache.lighttpd.net/) seems to be similar to APC but has some improvements.
|
||||
```php
|
||||
$config['cache']['enabled'] = 'xcache';
|
||||
```
|
||||
You can install Xcache [from source](https://web.archive.org/web/20121003095626/http://xcache.lighttpd.net/wiki/InstallFromSource) or [from binary release](https://web.archive.org/web/20121003095626/http://xcache.lighttpd.net/wiki/InstallFromBinary).
|
||||
|
||||
### Memcached
|
||||
|
||||
To use Memcached, you have to be running a daemon memcached process at all times.
|
||||
```php
|
||||
$config['cache']['enabled'] = 'memcached';
|
||||
|
||||
$config['cache']['memcached'] = array(
|
||||
array('localhost', 11211)
|
||||
);
|
||||
```
|
||||
Install memcached with
|
||||
```
|
||||
pecl install memcached
|
||||
```
|
||||
Note: Tinyboard uses **memcached** — not **memcache**; there is a difference.
|
54
config/dnsbl.md
Normal file
@ -0,0 +1,54 @@
|
||||
DNS Blacklists (DNSBL)
|
||||
======================
|
||||
|
||||
To further prevent spam and abuse, you can use DNS blacklists (DNSBL). A DNSBL is a list of IP addresses published through the Internet Domain Name Service (DNS) either as a zone file that can be used by DNS server software, or as a live DNS zone that can be queried in real-time.
|
||||
|
||||
By default, Tinyboard checks all addresses against just one blacklist:
|
||||
```
|
||||
tor.dnsbl.sectoor.de
|
||||
```
|
||||
This prevents Tor exit nodes from making posts and is recommended as a large majority of abuse comes from Tor because of the strong anonymity associated with it.
|
||||
|
||||
You can add more blacklists by [putting them in your configuration](../config.md). You should refer to the blacklist’s documentation to figure out which responses you wish to block.
|
||||
```php
|
||||
// Block "127.0.0.2" responses from this blacklist.
|
||||
$config['dnsbl'][] = array('bl.spamcannibal.org', 2);
|
||||
|
||||
// This does exactly the same thing as above:
|
||||
// $config['dnsbl'][] = array('bl.spamcannibal.org', array(2));
|
||||
// $config['dnsbl'][] = array('bl.spamcannibal.org', '127.0.0.2');
|
||||
|
||||
// Block "127.0.0.8" and "127.0.0.9" responses from this blacklist.
|
||||
$config['disbl'][] = array('dnsbl.dronebl.org', array(8, 9));
|
||||
|
||||
// Determine whether or not to block listed users with an anonymous function (PHP 5.3.0+)
|
||||
// This is especially relevant if you plan to use Http:BL.
|
||||
$config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
|
||||
$octets = explode('.', $ip);
|
||||
|
||||
// days since last activity
|
||||
if ($octets[1] > 14)
|
||||
return false;
|
||||
|
||||
// "threat score" (http://www.projecthoneypot.org/threat_info.php)
|
||||
if ($octets[2] < 5)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}, 'dnsbl.httpbl.org'); // hide our access key
|
||||
|
||||
|
||||
// Just block anything listed in here (ie. not NXDOMAIN)
|
||||
$config['dnsbl'][] = 'another.blacklist.net';
|
||||
```
|
||||
See [here](https://web.archive.org/web/20121003095945/http://www.dnsbl.info/dnsbl-list.php) for a larger list of blacklists.
|
||||
|
||||
This syntax for configuring DNSBL servers was stolen (with permission) from [Frank Usrs](https://web.archive.org/web/20121003095945/mailto:frankusrs@gmail.com).
|
||||
|
||||
Exceptions
|
||||
----------
|
||||
To combat false positives, administrators can add “exceptions” to these lists, meaning that certain IP addresses will skip the DNSBL check entirely.
|
||||
```php
|
||||
$config['dnsbl_exceptions'][] = '8.8.8.8';
|
||||
$config['dnsbl_exceptions'][] = '55.55.55.55';
|
||||
```
|
108
config/flood_filters.md
Normal file
@ -0,0 +1,108 @@
|
||||
Custom Flood Filters
|
||||
====================
|
||||
|
||||
Custom flood filters detect known types of attacks and reject posts accordingly. They are made up of a **condition** and an **action**, for when all conditions are met.
|
||||
|
||||
Conditions
|
||||
----------
|
||||
These condition names are case-insensitive. All conditions are optional. If you don’t care about a particular value, don’t include it in your filter.
|
||||
|
||||
### ~~Posts in past X minutes~~
|
||||
Condition | Format
|
||||
--------------------------------------------- | ------
|
||||
~~posts_in_past_x_minutes~~ | array(`x`,`y`)
|
||||
~~threads_with_no_replies_in_past_x_minutes~~ | array(`x`,`y`)
|
||||
|
||||
~~Checks if there has been `x` posts or more in the past `y` minutes (on the current board).~~
|
||||
|
||||
The above conditions are currently unavailable in the latest git revision.
|
||||
|
||||
### Input
|
||||
Condition | Format
|
||||
--------- | ------
|
||||
name | Regexp
|
||||
trip | String
|
||||
email | Regexp
|
||||
subject | Regexp
|
||||
body | Regexp
|
||||
filename | Regexp
|
||||
extension | Regexp
|
||||
ip | Regexp
|
||||
OP | Boolean
|
||||
has_file | Boolean
|
||||
|
||||
### Custom
|
||||
Custom | Format
|
||||
------ | ------
|
||||
custom | Function
|
||||
|
||||
Similar to [events](../events.md) but the function must return true if the condition was met.
|
||||
```php
|
||||
$config['flood_filters'][] = array(
|
||||
'condition' => array(
|
||||
'name' => '/^Anonymous$/',
|
||||
'body' => '/h$/i',
|
||||
'OP' => false,
|
||||
'custom' => function($post) {
|
||||
if ($post['name'] == 'Anonymous')
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
),
|
||||
'action' => 'reject'
|
||||
);
|
||||
```
|
||||
|
||||
Actions
|
||||
-------
|
||||
|
||||
### Reject
|
||||
Variable | Type | Format | Default
|
||||
-------- | -------- | ------ | -------
|
||||
message | Optional | String | `"Posting throttled by flood filter."`
|
||||
|
||||
The post is rejected and an error message is displayed.
|
||||
|
||||
### Ban
|
||||
Variable | Type | Format | Default | Description
|
||||
---------- | -------- | ------- | ---------------- | -----------
|
||||
reason | Required | String | — | The displayed ban reason.
|
||||
expires | Optional | Integer | `0` (indefinite) | The ban length in seconds.
|
||||
reject | Optional | Boolean | `true` | Whether to allow the post before banning.
|
||||
message | Optional | String | `NULL` | If defined, display an error instead of the ban page.
|
||||
all_boards | Optional | Boolean | `false` | Whether to make the ban global.
|
||||
|
||||
The user is immediately banned and the post may be rejected.
|
||||
|
||||
Example
|
||||
-------
|
||||
The following example, to be added in a configuration file, blocks users posting a reply with the name “surgeon”, ending his posts with “regards, the surgeon” or similar.
|
||||
```php
|
||||
$config['flood_filters'][] = array(
|
||||
'condition' => array(
|
||||
'name' => '/^surgeon$/',
|
||||
'body' => '/regards,\s+(the )?surgeon$/i',
|
||||
'OP' => false
|
||||
),
|
||||
'action' => 'reject',
|
||||
'message' => 'Go away, spammer.'
|
||||
);
|
||||
```
|
||||
Instead of rejecting the post, you can ban the user too.
|
||||
```php
|
||||
$config['flood_filters'][] = array(
|
||||
'condition' => array(
|
||||
'name' => '/^surgeon$/',
|
||||
'body' => '/regards,\s+(the )?surgeon$/i',
|
||||
'OP' => false
|
||||
),
|
||||
'action' => 'ban',
|
||||
'expires' => 60 * 60 * 3, // 3 hours
|
||||
'reason' => 'Go away, spammer.'
|
||||
);
|
||||
```
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Events](../events.md)
|
56
config/markup.md
Normal file
@ -0,0 +1,56 @@
|
||||
Markup Syntax
|
||||
=============
|
||||
|
||||
Since v0.9.6, Tinyboard’s markup syntax has become customizable. `$config['markup']` is an array of markup rules. Each markup rule is an array containing a regular expression for matching the text, and a replacement which can either be a string (using `$*` references), or a callback.
|
||||
|
||||
The input has already been HTML-escaped.
|
||||
|
||||
Defaults
|
||||
--------
|
||||
|
||||
### Code
|
||||
```php
|
||||
$config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
|
||||
$config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
|
||||
$config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
|
||||
$config['markup'][] = array("/^\s*==(.+?)==\s*$/m", "<span class=\"heading\">\$1</span>");
|
||||
```
|
||||
|
||||
### Translation
|
||||
(Of course this isn’t exactly how it will look.)
|
||||
|
||||
Input | Output
|
||||
--------------- | ------
|
||||
`''text''` | `<em>text</em>`
|
||||
`'''text'''` | `<strong>text</strong>`
|
||||
`**text**` | `<span style="background:#000000;color:#FFFFFF;padding:2px;">text</span>`
|
||||
`==text==` | `<span style="font-size:2em;font-weight:bold;">text</span>`
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
### Standard
|
||||
```php
|
||||
$config['markup'][] = array("/<3/", "♥");
|
||||
```
|
||||
Input | Output
|
||||
----- | ------
|
||||
`<3` | ♥
|
||||
|
||||
### Callback
|
||||
Callbacks can be used for more advanced markup.
|
||||
```php
|
||||
$config['markup'][] = array(
|
||||
'/MD5<(.+)>/',
|
||||
function($matches) {
|
||||
return md5($matches[1]);
|
||||
}
|
||||
);
|
||||
```
|
||||
Input | Output
|
||||
----------- | ------
|
||||
`MD5<test>` | 098f6bcd4621d373cade4e832627b4f6
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Configuration Basics](../config.md)
|
9
config/recaptcha.md
Normal file
@ -0,0 +1,9 @@
|
||||
reCAPTCHA
|
||||
=========
|
||||
|
||||
To enable reCAPTCHA, grab a public and private key pair from [here](https://web.archive.org/web/20121016193132/https://www.google.com/recaptcha/admin/create) and add them to [a config file](../config.md).
|
||||
```php
|
||||
$config['recaptcha'] = true;
|
||||
$config['recaptcha_public'] = '<your public key>';
|
||||
$config['recaptcha_private'] = '<your private Key>';
|
||||
```
|
17
config/word_filters.md
Normal file
@ -0,0 +1,17 @@
|
||||
Word Filters
|
||||
============
|
||||
|
||||
A wordfilter (sometimes referred to as just a “filter” or “censor”) automatically scans users’ posts as they are submitted and changes or censors particular words or phrases.
|
||||
|
||||
Standard replacement
|
||||
--------------------
|
||||
```php
|
||||
$config['wordfilters'][] = array('cat', 'dog');
|
||||
```
|
||||
|
||||
Regular expressions
|
||||
-------------------
|
||||
Using Perl Compatible Regular Expressions, you can match more words or phrases, even if they aren’t exact. To use regular expression wordfilters, you must include ‘true’ as the third element in the array. The following example changes both “cat” and “car” to “dog”.
|
||||
```php
|
||||
$config['wordfilters'][] = array('/ca[rt]/', 'dog', true);
|
||||
```
|
71
events.md
Normal file
@ -0,0 +1,71 @@
|
||||
“Events”
|
||||
========
|
||||
|
||||
Tinyboard’s “events” are similar to those in Javascript. Events handlers are anonymous functions that are registered to Tinyboard. When Tinyboard carries out an action such as deleting a file, generating a tripcode or checking whether an IP address is banned, you can interfere with the response or make Tinyboard do something else at the same time. You can bind an infinite amount of handlers to an event.
|
||||
|
||||
If you’re familiar with jQuery, you can think of Tinyboard’s `event_handler` function as jQuery’s `bind`.
|
||||
|
||||
If event handlers return a string or true it will interupt the action. See examples below.
|
||||
|
||||
Anonymous functions
|
||||
-------------------
|
||||
Anonymous functions are only available in PHP 5.3.0+. However, you can instead use real functions as event handlers if you don’t meet this requirement.
|
||||
|
||||
Examples
|
||||
--------
|
||||
To disallow a certain filename when posting (for whatever reason):
|
||||
```php
|
||||
event_handler('post', function($post) {
|
||||
if ($post->has_file && $post->filename == 'bad_filename.png')
|
||||
return 'You cannot post with that filename';
|
||||
});
|
||||
```
|
||||
To force all posts to have a certain tripcode:
|
||||
```php
|
||||
event_handler('post', function($post) {
|
||||
$post->trip = '!hello.world';
|
||||
});
|
||||
```
|
||||
To trick Tinyboard into thinking a specific thread is locked:
|
||||
```php
|
||||
event_handler('check-locked', function($id) {
|
||||
if ($id == 50)
|
||||
return true;
|
||||
});
|
||||
```
|
||||
To disallow a thread from being bumped:
|
||||
```php
|
||||
event_handler('bump', function($id) {
|
||||
if ($id == 50)
|
||||
return true;
|
||||
});
|
||||
```
|
||||
To create a custom “poster ID” for a specific IP address:
|
||||
```php
|
||||
event_handler('poster-id', function($ip, $thread) {
|
||||
if ($ip == '4.3.2.1')
|
||||
return 'Hello';
|
||||
});
|
||||
```
|
||||
|
||||
Events
|
||||
------
|
||||
Event | Called | Parameters | Returned value
|
||||
--------------------- | -------------------------------------------------- | --------------------------- | --------------
|
||||
**post** | Before a new post is entered in the database. | `object $post` | If not false, the post is rejected and the returned value is displayed as an error message.
|
||||
**post-after** | After a new post is entered in the database. | `array $post` | —
|
||||
**write** | After a file has been written to. | `string $path` | —
|
||||
**unlink** | After a file has been deleted. | `string $path` | —
|
||||
**check-flood** | Before checking if a poster is flooding the board. | `array $post` | If true, the poster will be deemed malicious regardless of Tinyboard’s decision.
|
||||
**check-locked** | Before checking if a thread is locked. | `int $id` | If true, Tinyboard will treat the thread as being locked.
|
||||
**check-sage-locked** | Before checking if a thread is “sage-locked”. | `int $id` | If true, Tinyboard will treat the thread as being “sage-locked”.
|
||||
**bump** | Before bumping a thread. | `int $id` | If true, the thread will not be bumped.
|
||||
**check-robot** | Before checking if a post is duplicate (for R9K). | `string $body` | If true, the poster will be muted regardless of whether or not the content was original to Tinyboard.
|
||||
**mute-time** | Before fetching current mute time for a user. | — | If > 0, Tinyboard will use the returned value as the length of the mute (in seconds).
|
||||
**build-thread** | Before building a thread. | `int $id` | If true, the thread `.html` file will not be (re)created.
|
||||
**poster-id** | Before generating a poster ID. | `string $ip`, `int $thread` | If not false, Tinyboard will use the returned value as the poster ID instead.
|
||||
**tripcode** | Before generating a tripcode. | `string $name` | The returned value will be used as the name/tripcode combination instead. Must be in the format of `array(name, tripcode)`.
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Custom flood filters](config/flood_filters.md)
|
32
git.md
Normal file
@ -0,0 +1,32 @@
|
||||
Using Git
|
||||
=========
|
||||
|
||||
Tinyboard is still beta software and it’s not going to come out of beta any time soon. As there are often many months between releases yet changes and bug fixes are very frequent, it’s recommended that users use our git repository instead. Using git makes upgrading much easier.
|
||||
|
||||
To use git, simply clone our git repository with:
|
||||
```
|
||||
% git clone git://github.com/savetheinternet/Tinyboard.git
|
||||
```
|
||||
To pull the latest changes at any time, use:
|
||||
```
|
||||
% git pull
|
||||
```
|
||||
And it will output something like this:
|
||||
```
|
||||
remote: Counting objects: 21, done.
|
||||
remote: Compressing objects: 100% (4/4), done.
|
||||
remote: Total 15 (delta 11), reused 15 (delta 11)
|
||||
Unpacking objects: 100% (15/15), done.
|
||||
From git://github.com/savetheinternet/Tinyboard
|
||||
6c3a52a..818da9f master -> origin/master
|
||||
Updating 6c3a52a..818da9f
|
||||
Fast-forward
|
||||
inc/cache.php | 211 +++++++++++++++++++++++++++--------------------------
|
||||
inc/filters.php | 135 ++++++++++++++++++++++++++++++++++
|
||||
inc/functions.php | 65 ++++++++--------
|
||||
mod.php | 11 ++-
|
||||
post.php | 123 ++++++-------------------------
|
||||
5 files changed, 304 insertions(+), 241 deletions(-)
|
||||
create mode 100644 inc/filters.php
|
||||
```
|
||||
You may have to navigate to [`install.php`](../install.php) when there are version changes or the database will likely be incompatible.
|
BIN
img/mod/1.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
img/mod/10.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
img/mod/11.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
img/mod/12.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
img/mod/13.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
img/mod/14.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
img/mod/15.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
img/mod/16.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
img/mod/17.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
img/mod/18.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
img/mod/2.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
img/mod/3.png
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
img/mod/4.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
img/mod/5.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
img/mod/6.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
img/mod/7.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
img/mod/8.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
img/mod/9.png
Normal file
After Width: | Height: | Size: 40 KiB |
24
installation.md
Normal file
@ -0,0 +1,24 @@
|
||||
Installing Tinyboard
|
||||
====================
|
||||
|
||||
Installation for Tinyboard is simple. You used to have to import the database tables and [create a config file](config.md) yourself, but now Tinyboard does it all for you.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
1. PHP ≥ 5.2.5
|
||||
2. [mbstring](https://web.archive.org/web/20121017012357/http://www.php.net/manual/en/mbstring.installation.php) (`--enable-mbstring`)
|
||||
3. [PHP-GD](https://web.archive.org/web/20121017012357/http://php.net/manual/en/book.image.php)
|
||||
4. [PHP-PDO](https://web.archive.org/web/20121017012357/http://php.net/manual/en/book.pdo.php) with appropriate [~~driver for your database~~](https://web.archive.org/web/20121017012357/http://www.php.net/manual/en/pdo.drivers.php) (only MySQL is supported at the moment)
|
||||
|
||||
We try to make sure Tinyboard is compatible with all major web servers and operating systems. Tinyboard does not include an Apache .htaccess file nor does it need one.
|
||||
|
||||
Installing
|
||||
----------
|
||||
1. Download and extract Tinyboard to your web directory or get the latest development version with:
|
||||
```
|
||||
git clone git://github.com/savetheinternet/Tinyboard.git
|
||||
```
|
||||
2. Navigate to [`install.php`](../install.php) in your web browser and follow the prompts.
|
||||
3. Tinyboard should now be installed. Log in to [`mod.php`](../mod.php) with the default username and password combination: **admin** / **password**.
|
||||
|
||||
Please remember to change the administrator account password.
|
11
mod_interface.md
Normal file
@ -0,0 +1,11 @@
|
||||
Moderator interface
|
||||
===================
|
||||
|
||||
To use the moderator interface, navigate to [`mod.php`](../mod.php) and login with your username and password combination. Generally, you can prepend `mod.php?/` to any regular page to view it with moderator controls. For example, `/b/res/33.html` would become `/mod.php?/b/res/33.html`. The moderator interface doesn’t make use of the static file system.
|
||||
|
||||
Unlike some other imageboard engines, you do not need to have Javascript enabled to use the moderator inferface.
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Capcodes](capcodes.md)
|
||||
* [Bans](bans.md)
|
23
special_allpages.md
Normal file
@ -0,0 +1,23 @@
|
||||
All Pages
|
||||
=========
|
||||
|
||||
* [Bans](bans.md)
|
||||
* [Capcodes](capcodes.md)
|
||||
* [Config](config.md)
|
||||
* [Config/Boardlinks](config/boardlinks.md)
|
||||
* [Config/Cache](config/cache.md)
|
||||
* [Config/DNSBL](config/dnsbl.md)
|
||||
* [Config/Flood filters](config/flood_filters.md)
|
||||
* [Config/Markup](config/markup.md)
|
||||
* [Config/Word filters](config/word_filters.md)
|
||||
* [Config/reCAPTCHA](config/recaptcha.md)
|
||||
* [Events](events.md)
|
||||
* [Git](git.md)
|
||||
* [Installation](installation.md)
|
||||
* [Main Page](main_page.md)
|
||||
* [Mod interface](mod_interface.md)
|
||||
* [Roadmap](https://web.archive.org/web/20121016193329/http://tinyboard.org/docs/?p=Roadmap)
|
||||
* [Test](https://web.archive.org/web/20121016193329/http://tinyboard.org/docs/?p=Test)
|
||||
* [Upgrading](upgrading.md)
|
||||
* [Why Tinyboard](why_tinyboard.md)
|
||||
* [Your request looks automated](your_request_looks_automated.md)
|
20
upgrading.md
Normal file
@ -0,0 +1,20 @@
|
||||
Upgrading Tinyboard
|
||||
===================
|
||||
|
||||
Upgrading Tinyboard is easy, whether it be to a new release or a development version.
|
||||
|
||||
Git
|
||||
---
|
||||
If you use git, follow these instructions.
|
||||
* `cd` to the correct directory and run `git pull`.
|
||||
* Navigate to [`install.php`](../install.php).
|
||||
|
||||
Non-Git
|
||||
-------
|
||||
* Download and extract the latest version of Tinyboard.
|
||||
* Upload and replace all files in the archive to your server, **except** [`inc/instance-config.php`](../inc/instance-config.php).
|
||||
* Navigate to [`install.php`](../install.php).
|
||||
|
||||
See also
|
||||
--------
|
||||
* [Using Git](git.md)
|
52
why_tinyboard.md
Normal file
@ -0,0 +1,52 @@
|
||||
Why Tinyboard?
|
||||
==============
|
||||
|
||||
### Written from scratch
|
||||
Tinyboard was written from scratch, meaning it’s not based on any of the ancient and defective projects such as Futaba and Kusaba.
|
||||
|
||||
### Performance
|
||||
Tinyboard is built for speed and has proven to be incredibly fast compared to alternatives. You can make it even faster by [enabling cache](config/cache.md).
|
||||
|
||||
### Configurability
|
||||
Tinyboard is almost entirely customizable. You can [create advanced configuration files](config.md) for the entire imageboard, or for specific boards.
|
||||
|
||||
#### Cool config sutff
|
||||
* [Custom flood filters](config/flood_filters.md)
|
||||
* [Markup syntax](config/markup.md)
|
||||
* [Events](events.md)
|
||||
|
||||
### Security
|
||||
Tinyboard was written with security as a priority. It’s not vulnerable to any of the [countless](https://web.archive.org/web/20121017012402/https://github.com/frankusrs/Kusaba-X-Threadshitter) [exploits](https://web.archive.org/web/20121017012402/https://github.com/savetheinternet/kusabax-idcrack) and design flaws affecting alternatives such as Kusaba X.
|
||||
|
||||
### User-friendly
|
||||
Tinyboard has a clean and incredibly easy to use [moderator interface](mod_interface.md) with lots of features. Unlike some other imageboard engines, you don’t need Javascript enabled to use it.
|
||||
|
||||
![1](img/mod/1.png) ![2](img/mod/2.png) ![3](img/mod/3.png) ![4](img/mod/4.png) ![5](img/mod/5.png) ![6](img/mod/6.png) ![7](img/mod/7.png) ![8](img/mod/8.png) ![9](img/mod/9.png) ![10](img/mod/10.png) ![11](img/mod/11.png) ![12](img/mod/12.png) ![13](img/mod/13.png) ![14](img/mod/14.png) ![15](img/mod/15.png) ![16](img/mod/16.png) ![17](img/mod/17.png) ![18](img/mod/18.png)
|
||||
|
||||
### Tracks quotes
|
||||
Tinyboard can track post citations (“>>1234” links) so that when posts are deleted, the links are automatically removed.
|
||||
|
||||
### IPv6
|
||||
Tinyboard has full support for IPv6 clients.
|
||||
|
||||
### DNS Blacklists
|
||||
Tinyboard makes blocking open proxies and other malicious clients easy with [DNS Blacklists (DNSBL)](config/dnsbl.md).
|
||||
|
||||
### Anti-spam measures
|
||||
Tinyboard uses [unique and harder-to-defeat anti-spam measures](your_request_looks_automated.md) that keeps all generic bots out and gives attackers a hard time.
|
||||
|
||||
### Javascript
|
||||
Tinyboard comes with extensible [Javascript modules](../js) comparable to browser extensions such as [4chan X](https://web.archive.org/web/20121017012402/http://mayhemydg.github.com/4chan-x/). It can pack all enabled scripts into one file and minify it, [if you tell it to](config.md).
|
||||
|
||||
####Some cool Javascript stuff
|
||||
* [Quick reply](../js/quick-reply.js)
|
||||
* [Thread auto-updating](../js/auto-reload.js)
|
||||
* [Post hovering](../js/post-hover.js)
|
||||
* [Inline thread expanding](../js/expand.js)
|
||||
* [Client-side forced anonymous](../js/forced-anon.js)
|
||||
|
||||
### You can switch over to Tinyboard from Kusaba X without losing any data
|
||||
[A script](https://web.archive.org/web/20121017012402/https://github.com/savetheinternet/Tinyboard-Tools/blob/master/migration/kusabax.php) was made for this. All you need to do is [install Tinyboard](installation.md) (which should take less than a minute), drop the script in your Tinyboard directory and tell it where your Kusaba X config.php is located. It should figure out the rest on its own.
|
||||
|
||||
### More
|
||||
Tinyboard is packed with features, most of which aren’t listed here. See [`inc/config.php`](../inc/config.php).
|
38
your_request_looks_automated.md
Normal file
@ -0,0 +1,38 @@
|
||||
“Your request looks automated”
|
||||
==============================
|
||||
|
||||
Tinyboard’s “anti-bot” measure is unique to those in other imageboard engines. In simple terms, whenever a posting form on a page is generated (which happens whenever a new post is made), Tinyboard will add a random amount of hidden, obscure inputs to it to confuse bots and upset hackers. These fields and their respective values are validated upon posting with a 160-bit “hash”. A hash can only be used a number of times, and can expire.
|
||||
|
||||
There are a total of three scenarios that could be the cause of a “Your request looks automated” error.
|
||||
|
||||
### #1. Some browsers do things wrong
|
||||
The method of adding randomly generated fields to a form is appears to be very successful in stopping generic spambots. However, although the random inputs are fully standards-compliant, some (non-compliant) web browsers occasionally get things wrong and normal users are incorrectly deemed bots.
|
||||
|
||||
All major browsers seem to handle the fields without trouble, but there are some (specifically mobile) web browsers that will interpret things incorrectly. If you are having trouble with this error message and think the problem might be your browser, please join our [IRC channel](https://web.archive.org/web/20121003095610/irc://irc.datnode.net/tinyboard) to help us debug it.
|
||||
|
||||
### #2. “Hashes” expire
|
||||
Hashes correspond with the set of random input fields in a posting form. They can be used multiple times; otherwise, having more than one person visit the same page at the same time would mean that only one can reply. Posting forms are regenerated when the pages are, meaning that any post on the board will regenerate the main “new thread” form and that any post in a specific thread will regenerate the form for that thread. Once a form is regenerated, the old hash is still usable but is set an expiration date. If they weren’t set to expire and were instead invalidated immediately, prospective posters on the same page at the same time would have to reload before posting. `$config['spam']['hidden_inputs_expire']` sets the time (in seconds) when a hash will expire after a replacement hash has been generated.
|
||||
|
||||
### #3. “Hashes” can only be used a number of times
|
||||
This means that if, for example, 10 people visited the same page at approximately the same time and `$config['spam']['hidden_inputs_max_pass']` was set to `5`, only five of the 10 would be allowed to post. The others will have to reload the page first.
|
||||
|
||||
Confused?
|
||||
---------
|
||||
If you still don’t understand any of this page, maybe this will help:
|
||||
```php
|
||||
$config['spam']['hidden_inputs_max_pass'] = 2; // a hash may be used only twice
|
||||
$config['spam']['hidden_inputs_expire'] = 60 * 60 * 2; // expires in 2 hours
|
||||
```
|
||||
* User A, B, C and D visit the page at approximately the same time. Some time before, a posting form was generated with the unique hash `123456`.
|
||||
* User A posts. Tinyboard records that `123456` has been used once. The posting form is regenerated with a new hash (`654321`) and `123456` is set to expire in 2 hours.
|
||||
* User B posts with the same hash. `123456` is noted as being used twice and is still set to expire
|
||||
* User C tries to post with the same hash again, but `$config['spam']['hidden_inputs_max_pass']` is too low to allow that. His post is rejected on the grounds that a flood attack could be taking place.
|
||||
* 2 hours pass and user D tries to post with the same hash (without reloading the page first). His post is rejected because the `123456` hash has expired, as it’s been two hours since the first user posted. (Even if the hash hadn’t expired yet, he’d get the same error as user C.)
|
||||
|
||||
Configuring
|
||||
-----------
|
||||
If you’re not afraid of bots or if your site is somewhat popular, set `$config['spam']['hidden_inputs_max_pass']` and `$config['spam']['hidden_inputs_expire']` to something higher. Basically, `$config['spam']['hidden_inputs_max_pass']` defines how many people can visit a page at the same time and post, while `$config['spam']['hidden_inputs_expire']` defines the maximum amount of time you can sit on a page before posting.
|
||||
|
||||
TL;DR
|
||||
-----
|
||||
Try reloading the page before posting.
|