Skip to content

Commit 9904916

Browse files
committed
Merge branch 'develop'
2 parents b7d1179 + 6449e7a commit 9904916

File tree

9 files changed

+29
-149
lines changed

9 files changed

+29
-149
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.git/
2-
.github/
32

43
.gitattributes
54
docker-compose.yml

.github/ISSUE_TEMPLATE/bug-report--de-.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report--en-.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature-request--de-.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature-request--en-.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
# TS3 Ranksystem
2-
![latest-tsn-rs-compat](https://jvmerkle.de/badges/latest-tsn-rs-compat.svg)
3-
![docker-build](https://img.shields.io/docker/cloud/build/jvmerkle/ts3-ranksystem.svg)
4-
![docker-automated](https://img.shields.io/docker/cloud/automated/jvmerkle/ts3-ranksystem.svg)
5-
![docker-pulls](https://img.shields.io/docker/pulls/jvmerkle/ts3-ranksystem.svg)
2+
![compat](https://jvmerkle.de/badges/latest-tsn-rs-compat.svg) ![build](https://img.shields.io/docker/cloud/build/jvmerkle/ts3-ranksystem.svg) ![auto](https://img.shields.io/docker/cloud/automated/jvmerkle/ts3-ranksystem.svg) ![pulls](https://img.shields.io/docker/pulls/jvmerkle/ts3-ranksystem.svg)
63

74
System that automatically grants ranks in the form of server groups for online time or online activity to users, using the given server groups of the TS3 server.
85

9-
This is a modified fork of the TSN-Ranksystem which is updated irregularly to a stable version. It is intended to be fully compatible to TSN-Ranksystem at all times. The changeset on branch `develop` is always rebased onto TSN-Ranksystem and later on merged into `master`.
6+
This is a modified fork of the TSN-Ranksystem which is updated irregularly to a stable version. It is intended to be **fully compatible to TSN-Ranksystem at all times**. The changeset on branch `develop` is always rebased onto TSN-Ranksystem and later on merged into `master`.
107

118
Please make sure that your TSN-Ranksystem (database) version is not above the (database) version of this fork (downgrade).
129

1310
## Docker
1411
You can find the docker images on docker hub as [jvmerkle/ts3-ranksystem](https://hub.docker.com/r/jvmerkle/ts3-ranksystem).
1512
Please note that the container **MUST BE accessed via a trusted proxy server only** (e.g. nginx).
16-
Make sure to set `BASE_HREF` to the relative URL path of the rank system (e.g. `https://foobar.com/frank/ranksystem` => `BASE_HREF=/frank/ranksystem/`) in the `docker-compose.yml`
13+
Make sure to set `BASE_HREF` to the absolute URL path of the rank system (e.g. `https://foobar.com/frank/ranksystem` => `BASE_HREF=/frank/ranksystem/`) in the `docker-compose.yml`
1714

1815
### First time setup
1916
Enable the `INSTALL_MODE=1` in the file `docker-compose.yml` by uncommenting the line. Then start the rank system with:
2017
```sh
21-
docker-compose up
18+
docker-compose up -d
2219
```
2320
Navigate to the `install.php` with your browser and set up the rank system.
2421
After performing the first time setup re-edit the `docker-compose.yml` by commenting or removing the `INSTALL_MODE`.

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ volumes:
77
services:
88
ranksystem:
99
image: jvmerkle/ts3-ranksystem
10-
restart: on-failure
10+
restart: always
1111
stop_signal: SIGTERM
1212
depends_on:
1313
- ranksystem-db
@@ -29,7 +29,7 @@ services:
2929

3030
ranksystem-db:
3131
image: mariadb
32-
restart: on-failure
32+
restart: always
3333
volumes:
3434
- ranksystem-db:/var/lib/mysql
3535
environment:

install.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,12 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
409409
}
410410

411411
if ((!isset($_POST['install']) && !isset($_POST['confweb'])) || $err_lvl == 1 || $err_lvl == 2 || $err_lvl == 3) {
412+
$dbtype = "";
413+
$dbhost = "";
414+
$dbname = "";
415+
$dbuser = "";
416+
$dbpass = "";
417+
412418
if(isset($show_warning)) {
413419
$dbhost = $_POST['dbhost'];
414420
$dbname = $_POST['dbname'];
@@ -420,10 +426,17 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
420426
$dbuser = $_GET['dbuser'];
421427
$dbpass = $_GET['dbpass'];
422428
} else {
423-
$dbhost = "";
424-
$dbname = "";
425-
$dbuser = "";
426-
$dbpass = "";
429+
try {
430+
include "other/dbconfig.php";
431+
$dbtype = $db['type'];
432+
$dbhost = $db['host'];
433+
$dbname = $db['dbname'];
434+
$dbuser = $db['user'];
435+
$dbpass = $db['pass'];
436+
}
437+
catch (ErrorException $ex) {
438+
439+
}
427440
}
428441
?>
429442
<div id="page-wrapper">
@@ -446,7 +459,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
446459
<div class="form-group">
447460
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#isntwidbtypedesc"><?php echo $lang['isntwidbtype']; ?><i class="help-hover fas fa-question-circle"></i></label>
448461
<div class="col-sm-8">
449-
<select class="selectpicker show-tick form-control required" id="basic" name="dbtype" required>
462+
<select class="selectpicker show-tick form-control required" id="basic" name="dbtype" value="<?php echo $dbtype; ?>" required>
450463
<option disabled value=""> -- select database -- </option>
451464
<option data-subtext="Cubrid" value="cubrid">cubrid</option>
452465
<option data-subtext="FreeTDS / Microsoft SQL Server / Sybase" value="dblib">dblib</option>

other/dbconfig.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
$db['type']="type";
3-
$db['host']="hostname";
4-
$db['user']="dbuser";
5-
$db['pass']="dbpass";
6-
$db['dbname']="ts3_ranksystem";
2+
$db['type']=""; // Database type
3+
$db['host']=""; // IP address or hostname
4+
$db['user']=""; // Database user name
5+
$db['pass']=""; // Database password
6+
$db['dbname']=""; // Database name
77
?>

0 commit comments

Comments
 (0)