For Ubuntu with Apache:
apt-get install composer apache2 libapache2-mod-php php7.0-mysql mysql-server-5.7
Clone the repository:
git clone https://github.com/derula/swlrp-server.git
Install dependencies:
cd swlrp-server/
composer install
Create the database in the MySQL (if it doesn't already exist):
mysql -u <username> -p
CREATE DATABASE <dbname>
exit
Create the config file in swlrp-server/config/
cd config/
cp config.yml.vendor config.yml
Change the DB section of the config file according to needs
Execute schema/setup.sql in your database
cd schema/
mysql <dbname> -u <username> -p < setup.sql
Run the refresh_properties script in swlrp-server/scripts/
cd swlrp-server/scripts
php refresh_properties.php
Simply use the swlrp-server/public
folder as webroot.
Also redirect all requests that would otherwise result in a "404 file not found" back to swlrp-server/public/index.php
,
e.g. using ModRewrite (Apache) or try_files (nginx).
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)? /index.php?uri=/$1 [L,NC,QSA]
Also make sure to enable the rewrite mod and restart Apache:
a2enmod rewrite
service apache2 restart
In the Models/Profile section of config.yaml, you can set up which properties and texts will be available. Properties are limited to 40 characters, texts allow up to 20000 characters and rich elements. For each property or text, you can set certain options:
Note that after you changed the available property/text names (changed a name, added/removed a property/text),
you have to run the refresh_properties
script again. This will:
Note that no actual data will be deleted. If for some reason you want to bring back a previously-removed property, simply add it back to the config and re-run the script. The old data will be available again.
In order for the page to work inside the in-game browser, you need to be aware that the game is using a really old version of Chrome. This means:
composer.json
. Transpiled assets are now available in
public/assets/*.compat.js
. If you need to change the JavaScript, note that you will need to transpile and commit these
files manually.For the homepage, the repository contains some loading screens that are Copyright Material of Funcom Oslo AS. We have written permission from Funcom's legal department to use these on the project's current "official" installation. However, if you want to launch a fork website, you may need to ask for permission separately.
The emoticons are "Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko," and free to use if credited. (See also /public/assets/images/emoticons/credits.txt)