SuperTuxKart Addons Website
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api Clear joined server when log in and out Sep 3, 2018
assets [S] Add option to also delete addons when deleting user account May 24, 2018
bugs Move URL related methods to URL class Oct 31, 2017
cron added phpcs Jul 12, 2018
dl Rename upload directory to dl Aug 7, 2014
docker-tools dockerized Jul 20, 2018
include Throw for server id not found so STK can decide for server recovery Sep 20, 2018
install Allow to keep the server connection for clients when polling Sep 2, 2018
json added phpcs Jul 12, 2018
locale Update translations Oct 13, 2016
phpcs Fix phpstan/phpcs/phpunit warnings and errors Jul 14, 2018
phpstan Fix phpstan/phpcs/phpunit warnings and errors Jul 14, 2018
stats Use script mode for the default example config and stats Nov 10, 2017
tests Fix phpstan/phpcs/phpunit warnings and errors Jul 14, 2018
tools added phpcs Jul 12, 2018
tpl/default added phpcs Jul 12, 2018
.bowerrc Add bower (maybe use later). Move assets to folder May 30, 2014
.dockerignore dockerized Jul 20, 2018
.gitattributes dockerized Jul 20, 2018
.gitignore Detect Mysql extension is loaded on install. Update names of Upload t… Nov 10, 2017
.travis.yml Fix phpstan/phpcs/phpunit warnings and errors Jul 14, 2018
COPYING (stkaddons) Adding stkaddons' code Jan 30, 2010
CREDITS Rewrite README file Aug 18, 2014
Dockerfile dockerized Jul 20, 2018
Dockerfile-db-init dockerized Jul 20, 2018
INSTALL.md dockerized Jul 20, 2018
README.md [D] Removed mbcrypt as it was not used Jul 14, 2018
about.php Move all file sytem related functionality inside the FileSystem class Dec 29, 2016
addons-menu.php Fix cache files not showing when they have an entry in the database b… Dec 28, 2016
addons-panel.php Add GPL license header to test files Oct 25, 2016
addons.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
bower.json Refactor Bug class to use properties as separate variables instead of… Feb 4, 2015
composer.json [D] Removed mbcrypt as it was not used Jul 14, 2018
composer.lock [C][D] Fix config file for cron jobs Jul 26, 2018
docker-compose.dev.yml dockerized Jul 20, 2018
docker-compose.yml dockerized Jul 20, 2018
download.php Replace DB_PREFIX string concatenation with {DB_VERSION} in SQL strings Mar 26, 2018
downloads Make download script work with new configuration. Dec 18, 2014
error.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
favicon.ico Add favicons for all modern browsers or displays. Jun 17, 2015
generate_xml.php added phpcs Jul 12, 2018
image.php Rename SImage to StkImage Oct 30, 2017
index.php added phpcs Jul 12, 2018
login.php Move URL related methods to URL class Oct 31, 2017
manage-panel.php added phpcs Jul 12, 2018
manage.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
music.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
password-reset.php Add GPL license header to test files Oct 25, 2016
phpunit.xml Try to fix travis build. Aug 17, 2014
privacy.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
rankings.php Use 2 decimal places for rankings scores and add more info about play… Jul 2, 2018
register.php Add GPL license header to test files Oct 25, 2016
upload.php added phpcs Jul 12, 2018
users-menu.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016
users-panel.php [S] Add option to also delete addons when deleting user account May 24, 2018
users.php Change GPL license header to use modern english and proper punctuation Oct 25, 2016

README.md

STK Addons Website

This is the source code for the SuperTuxKart asset sharing and distribution platform. The official location of the production website is http://addons.supertuxkart.net/.

Build Status

Build Status

Branches

The master branch contains the latest code, not stable or production ready.

The production branch contains stable code that is ready for production (the live addons server is based on this branch).

Installation

The whole installation procedure can be seen in the INSTALL.md file.

Common Problems

Permissions

A common problem on Linux are the permissions for the assets/cache and dl directories. There are several ways to solve this problem:

  • Change the permission of the directories with chmod 775 (not recommended)
  • Add yourself to the owner group of these directories and give the group read & write access, or change the owner of those directories to the user under which your webserver is running (usually www-data). The latter can be achieved using: sudo chown -R www-data:www-data <directory>

Bower doesn't work

If bower --version doesn't give any output, it hasn't found the nodejs installation. You can fix that with ln -s /usr/bin/nodejs /usr/bin/node

Class not found after creating a new class

Example:

Error: Class 'Debug' not found in /stk-addons/index.php on line 0

This is due to composer not knowing about it. To fix it update composer with composer dump-autoload.

Testing

The project uses PHPUnit for unit testing (it's installed automatically by composer if you have enabled the developer dependencies)

Run tests from the root of the project with (it will use the default phpunit.xml found in the root directory):

./vendor/bin/phpunit

If you want to give it a custom configuration use the --configuration flag, like this:

./vendor/bin/phpunit --configuration custom.xml

Translation and locales generation

To generate all locales supported (system wide), run the script in locale/locale-gen.sh.

After that, update the translations.pot files by running the locale/update-pot.sh script.

Then after getting the updated translate po files from https://www.transifex.com/supertuxkart/supertuxkart/ run the locale/generate-mo.sh script.

Contributing

All contributions are welcome: ideas, patches, documentation, bug reports, complaints, etc!

Git message conventions

Some messages include the prefix [tag] at the beginning of the commit message, if present these mean that you need to make manual modifications to your code/infrastructure for it to work with that commit.

  • [C] - modified the config file, update your config.php file accordingly
  • [D] - updated the composer/bower dependencies, run the appropriate bower/composer update commands
  • [S] - updated the SQL schema, modify your SQL schema accordingly

PHP

The PHP coding standard is heavily based on PSR-2, with some modifications:

  • The line limit is 120 characters.
  • Opening braces for control structures MUST go on the next line, and closing braces MUST go on the next line after the body.
if ($a === 42)
{
    bar();
}
else
{
    foo();
}

Other

For JavaScript, CSS, and SQL you should use 4 spaces, not tabs. The JavaScript coding standard is based on http://javascript.crockford.com/code.html and the CSS coding standard is based on http://make.wordpress.org/core/handbook/coding-standards/css/.

The JavaScript and CSS coding standards are modified to use the same line limit as PHP.

License

STK Addons Website is licensed under GPL version 3. See COPYING for the full license text.

Contact