Skip to content

Commit 6d4ec2b

Browse files
authored
Sync docs with sourcebans-pp 1.8.x (#47)
1 parent 5d7089e commit 6d4ec2b

7 files changed

Lines changed: 82 additions & 37 deletions

File tree

content/docs/could_not_find_driver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ toc = true
1010

1111
### Web
1212

13-
* Ensure you have installed the mysql extension of your PHP version (Ex: <samp>php7.2-mysql</samp>)
13+
* Ensure you have installed the mysql extension of your PHP version (Ex: <samp>php8.2-mysql</samp>, replace `8.2` with whichever PHP version you have installed)
1414
* Ensure `pdo_mysql` module is loaded, check `phpinfo()` for this
1515

1616
### Plugin

content/docs/debugging_connection.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ toc = true
1818

1919
* You can use RCON through in-game console, if not view [TCP Error](#tcp-error) below
2020

21-
### "Error connecting" in server list with current 1.6 release
22-
23-
If you're using the current release 1.6 and experiencing connection issues in the server list (although everything looks fine in the debug tool), you should try and install the latest development version (1.x branch on GitHub).
24-
25-
Note: You need to use Composer for the latest development version.
26-
2721
### Using the debug tool
2822

2923
In SourceBans++'s root directory, there's a connection debug tool named `sb_debug_connection.php`
@@ -35,9 +29,9 @@ Edit this section of that file with the corresponding server info
3529
* Config part
3630
* Change to IP and port of the gameserver you want to test
3731
*/
38-
$serverip = "";
39-
$serverport = 27015;
40-
$serverrcon = ""; // You only need to specify this, if you want to test the rcon tcp connection either! Leave blank if it's only the serverinfo erroring.
32+
$serverip = "";
33+
$serverport = ""; // Defaults to 27015 if left empty
34+
$serverrcon = ""; // Leave empty if you're only testing the serverinfo connection
4135
```
4236

4337
Once complete, navigate to the file in your browser, and if done properly it will attempt to connect to the specified server.

content/docs/discord_forward_setup.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,24 @@ toc = true
2222

2323
### Configuring
2424

25-
* Add the convar `sbpp_discord_banhook` and assign the value of the Discord webhook link for where you want ban messages to go
25+
After loading the plugin once, SourceMod auto-generates `cfg/sourcemod/sbpp_discord.cfg` containing every convar below. Edit that file (or copy the convars to `autoexec.cfg`) and set the webhook URLs you want to use. Leave any hook empty to disable that channel.
2626

27-
* Add the convar `sbpp_discord_reporthook` and assign the value of the Discord webhook link for where you want report messages to go (If missing, it will default to `sbpp_discord_banhook`'s convar value)
27+
#### Webhook endpoints
2828

29-
Make sure to put these convars in an executable configuration file (preferably `autoexec.cfg`). Please also keep in mind that this only pushes the notifications if action is taken in-game, it has no affect if you - for example - ban someone on the web panel.
29+
* `sbpp_discord_banhook` — webhook for ban events
30+
31+
* `sbpp_discord_reporthook` — webhook for in-game reports
32+
33+
* `sbpp_discord_commshook` — webhook for communication blocks (mute/gag)
34+
35+
#### Appearance & links
36+
37+
* `sbpp_discord_username` — username shown on the webhook message (default: `Sourcebans++`)
38+
39+
* `sbpp_discord_pp_url` — URL to a profile picture used by the webhook
40+
41+
* `sbpp_website_url` — base URL of your SourceBans++ web panel; embeds will link admins/players back to it when set
42+
43+
* `sbpp_discord_roleid` — Discord role ID to mention when a report comes in. Leave empty to disable the mention
44+
45+
Please also keep in mind that this only pushes the notifications if action is taken in-game, it has no effect if you — for example — ban someone on the web panel.

content/docs/mariadb.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,72 @@
11
+++
22
title = "MariaDB"
3-
description = "Setting up a MariaDB server on Ubuntu 16.04 LTS"
3+
description = "Setting up a MariaDB server on Ubuntu LTS"
44
date = 2018-02-18T20:30:47-05:00
55
weight = 23
66
draft = false
7-
bref = "This guide will walk you through on setting up a MariaDB server on Ubuntu 16.04 LTS"
7+
bref = "This guide will walk you through on setting up a MariaDB server on Ubuntu LTS"
88
toc = true
99
+++
1010

11-
### Adding Repo
11+
SourceBans++ requires MariaDB >= 10.0 (or MySQL >= 5.6). The instructions below target current Ubuntu LTS releases (22.04 / 24.04) and install the MariaDB 10.11 LTS series.
12+
13+
### Option A: Install from the Ubuntu repository
14+
15+
Recent Ubuntu LTS releases ship a recent enough MariaDB by default and this is the simplest path:
1216

1317
```
14-
sudo apt-get install software-properties-common
15-
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
16-
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main'
17-
sudo apt-get update
18+
sudo apt update
19+
sudo apt install mariadb-server
1820
```
1921

20-
### Installing
22+
### Option B: Install from MariaDB's official repository
23+
24+
Use this if you want a newer release than your distro provides. The legacy `apt-key adv` approach is deprecated; use `signed-by` instead.
2125

2226
```
23-
sudo apt-get install mariadb-server
27+
sudo apt install curl gnupg ca-certificates apt-transport-https
28+
sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'
29+
echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://deb.mariadb.org/10.11/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mariadb.list
30+
sudo apt update
31+
sudo apt install mariadb-server
2432
```
2533

34+
The official [MariaDB Repository Configuration Tool](https://mariadb.org/download/?t=repo-config) can generate the same snippet for any distro/version.
35+
2636
### Setup
2737

28-
Run `mysql_secure_installation`
38+
Run `sudo mysql_secure_installation`
2939

3040
### Configuring
3141

42+
Skip this section if your web panel and game servers connect to the database from the same host (`localhost`).
43+
3244
1. Navigate to your MariaDB config (Ex: <samp>/etc/mysql/mariadb.conf.d/50-server.cnf</samp>)
3345

34-
2. Comment out `bind-address` by prefixing it with a `#`, so it looks like `#bind-address = 127.0.0.1`
46+
2. Either comment out `bind-address` by prefixing it with a `#`, or set it to `0.0.0.0` (IPv4) or `::` (IPv4 + IPv6) to listen on all interfaces
3547

36-
3. Restart MySQL via `sudo systemctl restart mysql`
48+
3. Restart MariaDB via `sudo systemctl restart mariadb`
3749

3850
### Granting Permission
3951

40-
Sign in to MySQL shell via `sudo mysql -u root -p` and enter your password
52+
Sign in to MariaDB shell via `sudo mariadb -u root -p` (or `sudo mysql -u root -p`) and enter your password
4153

4254
Run the following, adjusting it to suit your own needs
4355

4456
* <mark>Username</mark> - The user you wish to create
4557

46-
* <mark>Host</mark> - The host you wish to whitelist
58+
* <mark>Host</mark> - The host you wish to whitelist (e.g. `localhost`, an IP, or `%` for any host)
4759

4860
* <mark>Password</mark> - The password to use for the user creation
4961

5062
```
51-
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'HOST' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
63+
CREATE USER 'USERNAME'@'HOST' IDENTIFIED BY 'PASSWORD';
64+
GRANT ALL PRIVILEGES ON `DATABASENAME`.* TO 'USERNAME'@'HOST';
5265
FLUSH PRIVILEGES;
5366
```
5467

68+
The combined `GRANT ... IDENTIFIED BY ...` syntax is removed in MariaDB 10.4+ / MySQL 8+, so create the user first and grant privileges in a second statement. Granting on a specific database (rather than `*.*`) keeps the principle of least privilege.
69+
5570
### Done!
5671

5772
From here on, you are done with setting up a MariaDB server!

content/docs/quickstart.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@ Before we get started, let's make sure you meet these following requirements:
1414

1515
* Web
1616

17-
* A working MySQL/[MariaDB](/docs/mariadb) database
17+
* A working MySQL (>= 5.6) or [MariaDB](/docs/mariadb) (>= 10.0) database
1818

19-
* PHP Version >= 5.6 (and PHP Version < 7.4 for SB++ 1.6.3 release)
20-
* GMP extension (for A2S queries)
19+
* PHP Version >= 8.2
20+
* `memory_limit` >= 64M
21+
* GMP extension
22+
* PDO + `pdo_mysql`, OpenSSL, and XML extensions
23+
24+
* If installing from the `main` (development) branch, [Composer](https://getcomposer.org/) is required to pull web dependencies. Release archives ship with these pre-bundled.
2125

2226
* Game
2327

24-
* Sourcemod >= 1.7
28+
* SourceMod >= 1.11 (1.12 stable recommended)
2529

2630
* Metamod: Source
2731

2832
If you're using Cloudflare, Rocket Loader must be disabled otherwise SourceBans++ will become unresponsive.
2933

34+
> Note: if you are still on SB++ 1.6.x or older, see the [Updating](/docs/updating) guide before installing — these versions only support PHP < 7.4 and pre-1.11 SourceMod.
35+
3036
### Uploading
3137

3238
* Download the latest release from the <a href="https://github.com/sbpp/sourcebans-pp/releases" target="_blank_">release</a> page
@@ -73,8 +79,6 @@ Navigate to your Sourcebans++ installer (`example.com/install`) to begin install
7379

7480
- <mark>Steam API Key</mark> - Your Steam API key, which can be obtained <a href="https://steamcommunity.com/dev/apikey" target="_blank_">here</a>
7581

76-
- <mark>SourceBans URL</mark> - Your SourceBans site with <samp>protocol</samp> included! (Ex: `https://example.com`), the <samp>http://</samp> or <samp>https://</samp> is <em>required</em>
77-
7882
- <mark>SourceBans EMail</mark> - The email address to send password reset and/or ban submissions from, leave empty if you don't have one to use and don't plan to use it
7983

8084
3. System check, look over everything and make sure everything is green before continuing

content/docs/translating.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ toc = true
2424
define('theme_author', "IceMan, SourceBans++ Dev Team");
2525

2626
// Set the version of the theme here
27-
define('theme_version', "1.5.5-dev");
27+
define('theme_version', "1.8.0-dev");
2828

2929
// Set the link of the theme here
30-
define('theme_link', "https://sbpp.sarabveer.me/");
30+
define('theme_link', "https://github.com/sbpp/sourcebans-pp");
3131

3232
// Set the screenshot filename for your theme (must be inside your theme folder)
3333
// Must be: 250px wide X 170px High
@@ -38,11 +38,13 @@ toc = true
3838

3939
5. Modify the body content of the file
4040

41+
> Note: SourceBans++ 1.7.0+ uses Smarty 5, which dropped the `{php}` tag. Custom themes that previously used `{php}` must switch to the [`{load_template}`](https://github.com/sbpp/sourcebans-pp/blob/main/web/includes/SmartyCustomFunctions.php) tag.
42+
4143
### Plugin
4244

4345
1. Navigate to SourceMod's `translations` directory
4446

45-
2. The files you will need to modify are <samp>sourcebans.phrases.txt</samp>, <samp>sourcecomms.phrases.txt</samp>, and <samp>sourcesleuth.phrases.txt</samp>
47+
2. The files you will need to modify are <samp>sbpp_main.phrases.txt</samp>, <samp>sbpp_comms.phrases.txt</samp>, <samp>sbpp_sleuth.phrases.txt</samp>, <samp>sbpp_report.phrases.txt</samp>, and <samp>sbpp_checker.phrases.txt</samp>
4648

4749
3. Within `Phrases` key section, for each sub key sections, append a key value pair, with the two letter language code being the key and the value being the translation (If `#format` kv pair is present, be sure to follow it)
4850

content/docs/updating.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ Download the latest zip-archive from the <a href="https://github.com/sbpp/source
2626

2727
6. After it displays <mark>Installation up-to-date.</mark>, delete <mark>updater</mark> directory and you are done
2828

29+
### Web Panel (Upgrading from 1.6.x or 1.7.0 to 1.8.x)
30+
31+
1.7.0+ requires PHP >= 8.2 (see [Quickstart](/docs/quickstart)) and adds a `SB_SECRET_KEY` value in <mark>config.php</mark> used by the JWT-based session manager. Existing installs need to populate it before logging in.
32+
33+
1. Make sure your host is on PHP >= 8.2 before uploading the new files
34+
35+
2. Follow the regular [Web Panel](#web-panel) steps above
36+
37+
3. Navigate to <samp>example.com/upgrade.php</samp> in your browser. The script will append `SB_SECRET_KEY` to <mark>config.php</mark> and confirm with <mark>config.php updated correctly.</mark>
38+
39+
4. Delete <mark>upgrade.php</mark> from your server when done — it can leak sensitive information if left exposed
40+
41+
5. If you use a custom theme, note that Smarty 5 dropped the `{php}` tag — use the [`{load_template}`](https://github.com/sbpp/sourcebans-pp/blob/main/web/includes/SmartyCustomFunctions.php) tag instead
42+
2943
### Plugin
3044

3145
1. Upload and overwrite all contents in <mark>game</mark> to your root game directory (Ex: <samp>tf</samp>, <samp>cs</samp>, etc)

0 commit comments

Comments
 (0)