Download the PHP package bnomei/kirby3-qrcode without Composer
On this page you can find all versions of the php package bnomei/kirby3-qrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bnomei/kirby3-qrcode
More information about bnomei/kirby3-qrcode
Files in bnomei/kirby3-qrcode
Package kirby3-qrcode
Short Description Generate QRCodes. The included Panel-Field will show the QRCode and trigger download on click.
License MIT
Informations about the package kirby3-qrcode
Kirby QRCode
Generate QRCodes easily. The included Panel-Field will show the QRCode and trigger download on click.
Installation
- unzip master.zip as folder
site/plugins/kirby3-qrcode
or git submodule add https://github.com/bnomei/kirby3-qrcode.git site/plugins/kirby3-qrcode
orcomposer require bnomei/kirby3-qrcode
Usecase
Raw PHP
Page Method
site/templates/default.php
Save as File in Page Object
When saving you can in addtion to the filename provide additional content data for the file or force an overwrite (which will change UUID and media hash) with additional function params. The logic will use the currently logged-in user or impersonate as kirby
to create the file.
site/templates/default.php
Why not overwrite file by default? Let's assume you want to send the qrcode by email. Then you do not want to overwrite later because that would change the media hash and break the URL to the image send within the email.
Could I not embed the qrcode inline using base-64 encoding? Technically yes, but almost no email clients would render it.
Trigger download
site/templates/default.qr.php
Further customization of the generated image
Advanced options can be set.
TIP: You could move that options array for frontend rendering into a config value or reuse the option('bnomei.qrcode.field') which defines the look inside the panel.
Panel Field: Url of Page/File as QRCode
Add the field to a blueprint. This will show the QRCode as PNG image and will trigger the download of the file on click.
site/blueprints/default.yml
You can define the options how the qrcode field shows the image inside the panel in your config file. Example:
site/config/config.php
You can also reuse this in your frontend code like so:
Dependencies
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
License
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.
Credits
based on V2 versions of