From 7035c8932ab7b45507cd8971a52196cbccb66bff Mon Sep 17 00:00:00 2001 From: marktaiwan Date: Sun, 22 Mar 2015 22:15:43 +0800 Subject: [PATCH 1/2] file selector: correct typo, click event target --- js/file-selector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/file-selector.js b/js/file-selector.js index 9869e347..fc9c83e2 100644 --- a/js/file-selector.js +++ b/js/file-selector.js @@ -141,11 +141,12 @@ $(document).on('click', '.dropzone .remove-btn', function (e) { removeFile(file); }); -$(document).on('keypress click', '.dropzone, .dropzone .file-hint', function (e) { +$(document).on('keypress click', '.dropzone', function (e) { e.stopPropagation(); - // accept mosue click or Enter - if (e.which != 1 && e.which != 13) + // accept mouse click or Enter + if ((e.which != 1 || e.target.className != 'file-hint') && + e.which != 13) return; var $fileSelector = $(''); From 86cfb53328a0f4e3fc83bb21981277b2c5ff374b Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Sun, 29 Mar 2015 10:56:17 +0800 Subject: [PATCH 2/2] Let's write some more documentation --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 46abe61d..7018cdc8 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Most things (other than installation) that apply to upstream vichan also apply t If you are not interested in letting your users make their own boards, install vichan instead of infinity. +**Much like Arch Linux, infinity should be considered ``rolling release''. Unlike upstream vichan, we have no install.php. Database schema and templates are changed often and it is on you to read the Git log before updating!** + Installation ------------ Basic requirements: @@ -48,6 +50,17 @@ Step 4. Infinity can function in a *very* barebones fashion after the first two apt-get install graphicsmagick gifsicle php5-fpm mysql-client php5-mysql php5-cli php-pear php5-apcu php5-dev; add-apt-repository ppa:jon-severinsson/ffmpeg; add-apt-repository ppa:nginx/stable; apt-get update; apt-get install nginx ffmpeg; pear install Net_DNS2; pecl install "channel://pecl.php.net/dio-0.0.7" ``` -Step 5. The current captcha provider listed inc/config.php is dead. You may want to work around this. +Page Generation +------------ +A lot of the static pages (claim.html, boards.html, index.html) need to be regenerated every so often. You can do this with a crontab. + +```cron +*/10 * * * * cd /srv/http; /usr/bin/php /srv/http/boards.php +*/5 * * * * cd /srv/http; /usr/bin/php /srv/http/claim.php > /srv/http/claim.html +*/20 * * * * cd /srv/http; /usr/bin/php -r 'include "inc/functions.php"; rebuildThemes("bans");' +*/5 * * * * cd /srv/http; /usr/bin/php /srv/http/index.php +``` + +Also, main.js is empty by default. Run tools/rebuild.php to create it every time you update one of the JS files. Have fun!