Go to file
Yizhe Shen b491baae1e Fixed MVP voicing to voice by nick instead of username.
- Switched the actual voicing of players to use the player's nick
- Some small formatting changes
2014-06-25 11:51:39 -04:00
.idea Sneakily add myself to contributors list, start to add updating databases 2013-11-12 20:22:32 -05:00
local Upload plugin default 2013-01-02 20:27:52 -06:00
php Merge pull request #286 from Cydrobolt/patch-2 2014-02-15 19:30:23 -06:00
storage Whoops 2013-11-12 20:27:35 -05:00
.gitignore adding gitignore .db 2013-12-14 17:09:06 -08:00
LICENSE Added license 2013-08-02 16:27:49 -05:00
README.md Preparations for future updates 2014-06-20 16:43:10 -05:00
__init__.py Preparations for future updates 2014-06-20 16:43:10 -05:00
config.py Improvements to skip; improved definitions; updated README 2014-06-17 21:41:15 -05:00
plugin.py Fixed MVP voicing to voice by nick instead of username. 2014-06-25 11:51:39 -04:00
test.py Tinkering 2013-08-02 20:48:20 -05:00

README.md

#Configuration

Setting up the plugin

  1. Download Supybot
  2. Download TriviaTime and place it into the plugins folder
  3. Load TriviaTime
  4. Configure your question file and database location in config.py or with commands
  5. Use 'addquestionfile [filename]' command to load questions, the argument is optional

Setting up PHP

  1. Download PHP and PHP-MySQL (for PDO)
  2. Configure config.php to point to your TriviaTime database in the plugin/TriviaTime/Storage/db folder

IMPORTANT: How to update

  1. Stop the game, if it is currently in progress.
  2. Backup your entire Supybot directory. The most important file needed is the database in /storage/, but it's best to be safe.
  3. Unload TriviaTime. Since you are unloading the plugin, you will not have to restart or kill your bot.
  4. Do not delete any files in TriviaTime/storage during this process (aside from samplequestions, if you wish).
  5. Copy over the changed files.
    • Version v1.01 to v1.02 files changed: README.md, triviatime.css, about.html.php, plugin.py (no changes to config or database; should be a quick and easy update).
    • Version v1.02 to v1.03 files changed: README.md, plugin.py (no changes to config or database; should be an even quicker and easier update).
    • Version v1.03 to v1.04 files changed: README.md, plugin.py, init.py, config.py (the changes to config only involded descriptions; no changes to database).
    • Version v1.04 to v1.05 files changed: plugin.py
    • Version v1.05 to v1.06 files changed: README.md, plugin.py
  6. If there were any changes to the database, they should be updated automatically. Otherwise, further instructions for updating that version will appear here.
  7. If config.py was changed, you will need to manually add your desired values again. You can compare the previous file (the backup) to the new file.
  8. Load TriviaTime again. If you followed the instructions correctly, you won't have an error.
  9. If everything went smoothly, you have now sucessfully updated the plugin to the latest version. Use .info to verify you are on the latest version.

Setting up permissions for sqlite (website)

If you do not plan on using the webpage you can ignore this.

In order to use the website to delete/accept edits, reports, new questions, and deletes, you will need to set the proper permissions for the sqlite db, called 'trivia.db' by default. The default location for the database is inside of the supybot's directory, with the .conf file, inside of plugins/TriviaTime/storage/db.

PHP's PDO requires that the user that php is run under has write access to the folder that the db is stored in. For this reason I would suggest moving the database to its own folder, which the webservers user has write access.

I would recommend either creating a new group and adding the user that runs supybot and the webservers user to it, or changing the permissions of the database so that the group who owns it is the webserver, and the user who owns it is the user who runs supybot. After doing that, changing permissions to 775 will allow the group who owns the file to write to the database.