joshp23 / YOURLS-IQRCodes

YOURLS QRCode plugin with exposed options and full integration
GNU General Public License v3.0
22 stars 11 forks source link

YOURLS-IQRCodes

YOURLS Integrated QRCodes plugin with exposed options and full integration

This is an updated fork of Inline QRCode which is more compact, configurable, and just as efficient with more features.

Requires:

Features

Old

New

Installation

  1. Download and install YOURLS and U-SRV. U-SRV will have created it's cache, within which will sit the IQRCodes's cache.
  2. Download the latest release of this repo and extract the iqrcodes folder to YOURLS/user/plugins/
    • the following commands are run from YOURLS root folder. Eg, /absolute/path/to/YOURLS
  3. Symlink or copy qrchk.php into the pages folder. Automation of this task is planned for a future release.
    • Symlink:
      ln -s user/plugins/iqrcodes/assets/qrchk.php user/pages/qrchk.php
    • Copy:
      cp user/plugins/iqrcodes/assets/qrchk.php user/pages/qrchk.php
  4. Set permissions and cache
    • There needs to be two cache folders (relative to YOURLS root)
      • user/plugins/iqrcodes/cache
        is included with the plugin download
      • /path/to/U-SRV/cache/qr
        iqrcodes will attempt to create this
    • In case of failure just do somethign like the following (as root):
      • mkdir /PATH/TO/U-SRV/CACHE/qr
      • chmod -R 777 /PATH/TO/U-SRV/CACHE
      • chown -R www-data:www-data /PATH/TO/U-SRV/CACHE
      • chown -R www-data:www-data /PATH/TO/YOURLS/user/plugins/iqrcodes
  5. Enable module, default config works fine, or visit IQRCodes page to fine tune.
  6. Have fun!

Hint:

Want to embed these QR codes into a worpress widget? Check out this gist

Note:

If you are using YOURLS with Nginx and using this directive, you may end up with 404's instead of images. You may want to have a look at this comment and thread.

If this becomes an issue, try changing

(try_files $uri $uri/ /yourls-loader.php;)

to

if (!-e $request_filename){ rewrite ^(.+)$ /yourls-loader.php?q=$1 last; }

Credits

Inline QRcode by Savoul Pelister is the base of this fork

PHP QR Code by Dominik Dzienia (aka deltalab) generates the actual QR Codes

JavaScript MD5 by Sebastian Tschan (aka BlueImp) hashes the filenames in js

Tips

Dogecoin: DARhgg9q3HAWYZuN95DKnFonADrSWUimy3

===========================

Copyright (C) 2016 Josh Panter

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.