Go to file
tannn 8dd13316bb Merge pull request #266 from rootcoma/logging
Fix rmnew, remove dupe answers in kaos
2013-12-13 12:40:48 -08: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 Narrowing regex for profile route 2013-12-12 21:02:20 -08:00
storage Whoops 2013-11-12 20:27:35 -05:00
.gitignore Update .gitignore for PyCharm 2013-11-12 18:03:12 -05:00
LICENSE Added license 2013-08-02 16:27:49 -05:00
README.md First draft explaining permissions with sqlite 2013-12-10 17:24:22 -08:00
__init__.py Fix typo 2013-11-12 20:28:34 -05:00
config.py Fix db coming up at 'tri via.db' 2013-12-09 22:10:39 -08:00
plugin.py Fix rmnew, remove dupe answers in kaos 2013-12-13 12:12:10 -08:00
test.py Tinkering 2013-08-02 20:48:20 -05:00

README.md

This plugin is in beta. Please report all bugs on GitHub.

Configuration

Setting up 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

How to update (beta only)

  1. Unload TriviaTime
  2. Install the new files
  3. Drop all the tables (uncomment all the drops in plugin.py)
  4. Load TriviaTime

Important - Setting up permissions for sqlite

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.