-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL.txt
83 lines (68 loc) · 3.41 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
This is the league server code for a Clonk league. It was initially
written for the clonk.de titles and later adopted for OpenClonk.
Prequisites
===========
To run the league, you need:
-A webserver that runs PHP. Don't know which version; but 5.5.3 seems to
work
-A MySQL database
If you want to try it out locally: XAMPP worked fine for me out of the
box on a Windows machine (http://www.apachefriends.org/en/xampp.html).
-The smarty template engine: http://www.smarty.net/. Tested under 3.1.14
Installation
============
1. Extract the league code somewhere into your web root.
2. Create a database for the league (if possible). If you need, you can
probably also use a shared database. All league tables are prefixed
by "lg_".
3. Enter values into config.php:
3.1 $webroot should point to the folder where the league code (i.e.,
the config.php you are editing) is; including the trailing slash.
3.2 Update the require_once('smarty/libs/SmartyBC.class.php');
statement to point to where you put the smarty library.
3.3 Insert database credentials into the line that says
"$database = & new database[...]"
3.4 Update the $debug-statements to your liking if you want to enable
some SQL debugging information.
4. Set up the league schema. Just execute the file "table_structure.sql"
on your league database (using phpmysqladmin via your web broweser or
the direct mysql interface).
5. Create an admin user; e.g. using the following SQL statement (creates
a user named "admin" connected to forum account "forumname"):
INSERT INTO `lg_users` (`id`, `name`, `password`, `admin`, `operator`, `cuid`)
VALUES (1, 'admin', '', 1, '', 'forumname');
6. If you use mwForum users: Put the forum user into a group named
"League Moderators"
If you do not use mwForum users, grant admin permissions to your newly
created user using the following SQL statement:
INSERT INTO `lg_admin_permissions` (`user_id`, `part`, `method`) VALUES
(1, 'clan', ''), (1, 'cuid_ban', ''), (1, 'debug', ''), (1, 'game', ''),
(1, 'league', ''), (1, 'log', ''), (1, 'resource', ''),
(1, 'scenario', ''), (1, 'test', ''), (1, 'user', '');
7. Register default languages (English, German) using the following SQL
statement:
INSERT INTO `lg_languages` (`id`, `code`, `name`, `flag`) VALUES
(1, 'en', 'English', 'images/icons/flag_en.gif'),
(2, 'de', 'Deutsch', 'images/icons/flag_de.gif');
8. Register a game engine (e.g.: OpenClonk) using the following SQL
statement:
INSERT INTO `lg_products`
(`id`, `name`, `icon`, `version`, `product_string`, `motd_sid`)
VALUES (1, 'OpenClonk', 'oc.png', '5.0.0', 'OC', 0);
9. Define ranges for rank symbols. E.g. for clonk.de rank style:
INSERT INTO `lg_rank_symbols` VALUES
(1,'images/icons/rank_1.png',1,1,NULL,NULL),
(2,'images/icons/rank_2.png',2,2,NULL,NULL),
(3,'images/icons/rank_3.png',3,3,NULL,NULL),
(4,'images/icons/rank_4.png',4,6,NULL,NULL),
(5,'images/icons/rank_5.png',7,10,NULL,NULL),
(6,'images/icons/rank_6.png',11,20,NULL,NULL),
(7,'images/icons/rank_7.png',NULL,NULL,300,999999),
(8,'images/icons/rank_8.png',NULL,NULL,200,299),
(9,'images/icons/rank_9.png',NULL,NULL,100,199);
10. Make sure unnecessery files aren't left on the web root:
table_structure.sql, table_structure_alter.sql,
table_structure_updates.txt. Delete them if you're done
installing/updating.
11. Now you should be able to browse to your league, log in, press
"Admin" and set up a league using the builtin admin interface.