YOURLS QRCode plugin with exposed options and full integration

Related tags

HTTP YOURLS-IQRCodes
Overview

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:

  • PHP-GD on your system
  • YOURLS 1.7.9 +
  • U-SRV v2.0.0 +

Features

Old

  • QRCodes are generated and cached for every new short url
  • A new QRCode is generated when a short url is edited
  • Cached QRCodes are deleted when its corresponding short url is deleted
  • QRCodes are displayed within the sharebox whenever the sharebox is displayed
  • QRCodes are generated for pre-existing shorturls when sharebox is displayed
  • Codes are generated from a standalone php based QRCode library
    • No calls to google!

New

  • All options are available in the admin interface
    • Code size
    • Border width
    • ECC level
    • Image file type
    • Optional logo watermark (image preview, scale, location on QR Code)
    • Image cache location
    • Auto-delete or preserve cache on plugin deactivation
  • Scan the entire database at once and generate QR Codes for any short url that is found to be missing one
  • Plenty of well documented, practical examples in the options page to help get started with integration
  • Code links are served using U-SRV, a secure system allowing greater integration
  • Updated and minimized md5.js
  • Streamlined version of the QR Code generation library
  • Almost 1/2 the size of its predecessor
    • This can halfed again by disabling and deleting the PHP QR Code cache, which was left in for enhanced performance. This setting can be found on lnie 100 of assets/phpqrcode.php
  • Append .qr to any short url to display qr code

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/>.
Comments
  • Broken image on admin page share box

    Broken image on admin page share box

    When the admin page loads and I open the share box for a particular link the image is broken. I think this has something to do with #2

    If I re-open the link (press the share icon a second time) the image loads fine, and every subsequent image loads just fine.

    bug 
    opened by joshp23 14
  • Not quite working

    Not quite working

    Followed the installation instructions and got:

    Uncaught Error: Call to undefined method ezSQL_pdo_YOURLS::fetchObjects() in /var/www/mydomain/user/plugins/iqrcodes/plugin.php:597

    Running YOURLS v 1.7.2

    Anyone got this plugin running with that version?

    opened by LymeSimon 8
  • .png-errors.txt entry on every call of admin interface

    .png-errors.txt entry on every call of admin interface

    I just notice that every time I access the admin interface a new entry(line) is attached to qrc_d41d8cd98f00b204e9800998ecf8427e.png-errors.txt inside plugin directory. This happens after a clean database/installation, too. The line added is always the same (the timestamp matches the admin interfaces access time): 2017-02-27 12:36:16: empty string!!!

    I did not notice any error while using the plugin. But the file will grow with every acess to admin interface.

    bug 
    opened by MarcJanssen 8
  • Cannot serve directory /var/www/html/ No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

    Cannot serve directory /var/www/html/ No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

    YOURLS 1.7.9, docker image USRV and IQRCODES: latest

    When I create a url I get infinite loop like in https://github.com/joshp23/YOURLS-IQRCodes/issues/33, regardless of which filetype I choose.

    I had to create cache folder in user/plugins/usrv/cache/ and gave permissions 755, but also relaxed permission 777 did not solve the issue.

    I use yourls behind nginx reverse proxy, which works fine. The error only occurs when IQRCodes is activated. It does not occur with only usrv activated.

    What can I do? Thank you

    opened by sutidor 5
  • Make sharebox QR code respect file extension option, fix SVG generation

    Make sharebox QR code respect file extension option, fix SVG generation

    This PR fixes two issues: #33, where SVG QR generation is broken and throws an error, and #34, where the QR code in the sharebox was hardcoded to .png no matter the options set in IQRCodes settings in YOURLS.

    #33 was caused due to QRVector::svg requiring (in addition to the already given parameters) a background color and foreground color. Work can be done to make this customisable for svg, but this PR hardcodes it to black on white (as per the usual).

    #34 is caused due to the href in the image element being hardcoded to a .png. This is fixed by changing the href to the <shortlink>.qr implementation based in PHP that does respect the file format option.

    This PR was tested on a YOURLS 1.7.6 installation.

    opened by serotonincrash 5
  • Short link QR code is not displayed

    Short link QR code is not displayed

    Hi, After creating a short link, the QR code is not displayed, and it cannot be displayed on the sharing page, but the QR code is generated in the cache folder. Please help me, thank you! aa

    opened by z886 5
  • 404 for /srv/

    404 for /srv/

    I use nginx and I get a 404 when calling https:///srv/....... regular short urls work fine... maybe there is a problem with the symlinks? I checked them and they point to the correct files.

    opened by tofuSCHNITZEL 5
  • QR code not being created

    QR code not being created

    We've configured the plugin and the qr code created has a broken link as you can see here,. screen shot 2017-07-07 at 13 42 38 Also when we upload the logo it doesn't seem to get saved.

    opened by nickdring 5
  • Trouble getting plugin to work on ubuntu 16.04 + php 7

    Trouble getting plugin to work on ubuntu 16.04 + php 7

    I'm not able to make the plugin work with ubuntu server 16 and php 7. If I activate the plugin the result page of a shorten url is blank. I have this error message in apache log:

    PHP Fatal error: Uncaught Error: Access to undeclared static property: QRcode::$opt in /var/www/monurl/YOURLS/user/plugins/iqrcodes/plugin.php:389\nStack trace:\n#0 /var/www/monurl/YOURLS/includes/functions-plugins.php(150): iqrcodes_add_url(Array, 'http://www.cssh...', 'testnickcssh2', '')\n#1 /var/www/monurl/YOURLS/includes/functions.php(301): yourls_apply_filter('add_new_link', Array, 'http://www.cssh...', 'testnickcssh2', '')\n#2 /var/www/monurl/YOURLS/sample-public-front-page.php(29): yourls_add_new_link('http://www.cssh...', 'testnickcssh2', '')\n#3 {main}\n thrown in /var/www/monurl/YOURLS/user/plugins/iqrcodes/plugin.php on line 389, referer: http://monurl.ca/sample-public-front-page.php

    opened by NicolasDaigneault 5
  • QR-Code Area missing in frontend

    QR-Code Area missing in frontend

    It worked fine up to a certain point and now the QR code area disappeared in the frontend. I believe it was on the right next to quick share. I can still mass generate QR codes or configure/mange the plugin in via the menu. Dont know how to analyze to give you more input. Any ideas?

    opened by juekbr 4
  • No logo on file

    No logo on file

    Hello,

    Today I installed your plugin and did an upgrade from original QRCodes. It work without any problems execpt of logo generation.

    I uploaded a 64x64 pixel picture (png) and qrcode (png) is still without Logo. I read in blue letters: No logo on file. The option "Use Logo?" is set to yes. Scaling is at the moment 0.5, but tried 1 or 0.25.

    In the cache folder, I see a logo.png picture and of course the qrc_*.png files.

    Are there any mistakes by me or is this maybe a bug? Please for help.

    regards, Andyt

    opened by Andyt8 3
  • QR code missing (Not using nginx)

    QR code missing (Not using nginx)

    The QR code is being generated as I can view them in the Cache folder, but for some reason I'm unable to access it via the admin area.

    When I try to view the link via the inspect I just get a blank white square appearing.

    I've read through the issues and none of them seem to be helping as most of the same issues seem to be an nginx problem. I working through cPanel and pretty sure it's not using nginx as I've checked for it with 'service nginx status' and got Redirecting to /bin/systemctl status nginx.service Unit nginx.service could not be found.

    The output is as follows: /srv/?id=iqrcodes&key=35b7bd4da4a8a950ff26c038512d2ab4&fn=qrc_d96f4d7c33644cb0466fbdcde86785a9.png

    Any ideas?

    opened by Gibsonion 0
  • IQR not saving settings

    IQR not saving settings

    QRCode generating works like a charm by putting .qr at the end.

    BUT: In backend I can´t set any settings by pressing SUBMIT. E.g. after changing IMAGE, Image Size or Error Correction level for PNG results in nothing. The settings are reset to default values again. U-SRV Checks both show Success (Plugin & srv.php)

    Is there something I have overlooked ?

    opened by EkkiBrue 2
  • Change QR generation datasource

    Change QR generation datasource

    I have a rather niche install I'm working on, and I'd like to generate QRs from the long url itself, rather than the short url. I know that's a bit strange, but I'm adapting a YOURLS install for crypto currency tipping links, but having the QR read the original data would make integration with mobile wallets much more smooth.

    It seems like it would be as simple as editing the plugin.php and replacing references of shorturl to url, but I'm definitely missing something. Any ideas on how to accomplish this?

    opened by RenegadeButcher 0
  • Conflict with Sleeky Theme: QR code only displaying for logged in users

    Conflict with Sleeky Theme: QR code only displaying for logged in users

    Hi. I'm having a strange issue which has left me completely stumped.

    I'm trying to generate QR codes for a publicly available service.

    When I'm logged in, everything works fine. The QR code shows in the share box and using .qr after the short link displays the code as it should.

    However, when logged out as my public users will be, the QR code in the share box is broken and when using .qr the sort of garbled code you get when opening an image in a text editor is displayed instead of the QR code image. It seems QR code images are not rendering for public users, only for logged in users. No CSS is loading for public users either which I guess is related. When logged in element.style background and margin load ok.

    It's not a problem generating the original QR code, logging in instantly fixes the problem for links which were created when logged out. It's just an issue displaying them to public users.

    Screenshot 2020-05-21 at 14 26 04

    I have tried everything I can think of but nothing is fixing the problem. All permissions seem to be ok. I've tested this problem and I'm getting the same results in Chrome, Firefox, Explorer and Safari so it's not browser related. I have also tried changing the permissions on every instance of the qrchk.php and srv.php file with no effect.

    Also, possibly connected and equally strange... when pages are generated with /srv/ in the URL, such as when displaying a QR code or an error message, the original YOURLS favicon shows instead of my own. I have no idea how to change this or even where its coming from as I have replaced the original favicon in the YOURLS images folder.

    I'm fairly inexperienced so I'm probably missing something simple, but thank you in advance for your help.

    My current configuration is: YOURLS v 1.7.9 YOURLS-IQRCodes v 2.1.2 YOURLS-U-SRV v 2.1.0 Running Sleeky Theme v 2.4.1 Server = Linux Apache PHP v 7.2.3 MySQL v 10.3.23

    In admin, U-SRV checks shows, SRV.php: Success: installed and up to date. IQR-Codes shows, Plugin: Success: U-SRV is installed and enabled. srv.php satus: Success: installed and up to date. (That typo is in the plugin code by the way).

    Files qrchk.php & srv.php copied into: /pages and /user/pages (It seems to require both to show success in admin checks).

    QR codes show ok in YOURLS_CACHE.

    Permissions =

    YOURLS_CACHE /fu and /qr all 777. Codes showing in /qr. /fu empty.

    /pages 755 /pages/qrchk.php 644 /pages/srv.php 755

    The same permissions on the same files in /user/pages and /plugins/iqrcodes/assets. Cache folder in /plugins/iqrcodes set to 777.

    opened by P14M 2
  • Not generate SVG QR

    Not generate SVG QR

    Hi im working with a AWS Instance through Bitnami LAMP it Generates QRs on JPG, and PNG format

    YOURLS v 1.7.4 YOURLS-IQRCodes-2.1.1 YOURLS-U-SRV-2.1.0 phpMyAdmin v 4.9.1 PHP v 7.3.10 MySQL v 8.0.17

    image

    but when i try to generate SVG QRs doesn't, the loader keeps spinning in a infinite loop. image

    if i refresh the browser the link has been created but QR doesn't show image

    image

    Caché folders and sub folders on

    • user/cache
    • user/cache/qr
    • user/plugins/iqrcodes/cache

    has 777 permissions

    Also the files qrchk.php & srv.php

    located in

    • user/plugins/iqrcodes/assets
    • /pages

    has 777 permissions

    image

    image

    Any idea how i can make SVG Qrs to work?

    (sorry my english)

    Thanks in advance!

    opened by djcesar 5
Releases(2.3.1)
Owner
Josh Panter
Josh Panter
Retry Plugin for EightPointsGuzzleBundle

GuzzleBundleRetryPlugin Requirements PHP 7.3 or above Guzzle Bundle Guzzle Retry middleware Installation Using composer: composer.json { "require"

Eugen Ganshorn 3 Jan 12, 2022
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.

Requests for PHP Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent Requests Python librar

null 3.5k Dec 31, 2022
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

This is a port of the VCR Ruby library to PHP. Record your test suite's HTTP interactions and replay them during future test runs for fast, determinis

php-vcr 1.1k Dec 23, 2022
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.

Requests for PHP Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent Requests Python librar

null 3.5k Dec 31, 2022
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs

PHP Curl Class: HTTP requests made easy PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs. Installation Requirements Quic

null 3.1k Jan 5, 2023
Simple handler system used to power clients and servers in PHP (this project is no longer used in Guzzle 6+)

RingPHP Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function. RingPHP be used to power HTTP clie

Guzzle 846 Dec 6, 2022
Application for logging HTTP and DNS Requests

Request Logger Made by Adam Langley ( https://twitter.com/adamtlangley ) What is it? Request logger is a free and open source utility for logging HTTP

null 13 Nov 28, 2022
librestful is a virion for PocketMine servers that make easier, readable code and for async http requests.

librestful is a virion for PocketMine servers that make easier, readable code for async rest requests.

RedMC Network 17 Oct 31, 2022
A simple PHP Toolkit to parallel generate combinations, save and use the generated terms to brute force attack via the http protocol.

Brutal A simple PHP Toolkit to parallel generate combinations, save and use the generated terms to apply brute force attack via the http protocol. Bru

Jean Carlo de Souza 4 Jul 28, 2021
🐼 Framework agnostic package using asynchronous HTTP requests and PHP generators to load paginated items of JSON APIs into Laravel lazy collections.

Framework agnostic package using asynchronous HTTP requests and generators to load paginated items of JSON APIs into Laravel lazy collections.

Andrea Marco Sartori 61 Dec 3, 2022
Pushpin is a publish-subscribe server, supporting HTTP and WebSocket connections.

Pushpin and 1 million connections Pushpin is a publish-subscribe server, supporting HTTP and WebSocket connections. This repository contains instructi

Fanout 14 Jul 15, 2022
A functional and simple rate limit control to prevent request attacks ready-to-use for PHP.

RateLimitControl A functional and simple rate limit control to prevent request attacks ready-to-use for PHP. Features: Prepared statements (using PDO)

b(i*2)tez 5 Sep 16, 2022
Proxy method and property interactions in PHP. ⚡️

Proxy method and property interactions in PHP. Provides a Proxy class that can be used to intercept method calls, property access and updates. Support

Ryan Chandler 4 Mar 28, 2022
Composer package providing HTTP Methods, Status Codes and Reason Phrases for PHP

HTTP Enums For PHP 8.1 and above This package provides HTTP Methods, Status Codes and Reason Phrases as PHP 8.1+ enums All IANA registered HTTP Status

Alexander Pas 72 Dec 23, 2022
Read-only WebDAV server written in php8.0; supports browsing archives and GETting files in encodings other than what's on disk

Best Read-only WebDAV Server: TODO Features and notes of implementation Keeping generated files in a place that nginx can find them (2 ways to do this

Joe Koop 1 Nov 17, 2021
Finds installed HTTPlug implementations and PSR-7 message factories.

Finds installed HTTPlug implementations and PSR-7 message factories.

The PHP HTTP group 1.1k Dec 29, 2022
Event-driven, streaming HTTP client and server implementation for ReactPHP

HTTP Event-driven, streaming HTTP client and server implementation for ReactPHP. This HTTP library provides re-usable implementations for an HTTP clie

ReactPHP 640 Dec 29, 2022
A simple yet powerful HTTP metadata and assets provider for NFT collections using Symfony

Safe NFT Metadata Provider A simple yet powerful HTTP metadata and assets provider for NFT collections using Symfony.

HashLips Lab 66 Oct 7, 2022
Authenticate users with fingerprints, patterns and biometric data.

WebAuthn Authenticate users with fingerprints, patterns and biometric data. use Laragear\WebAuthn\Http\Requests\AssertedRequest; public function logi

Laragear 93 Dec 25, 2022