Open ankostis opened 6 years ago
Informing that i managed to abuse the CiteThisPage extension and implemented the idea laid out above for printing QRCodes for arbitrary pages.
I'm looking at how to add QR Codes for task T329973 Add feature to create a QR code for and on a Wikimedia page and am wondering if a special page like described above would be a good part of the solution. We're looking at adding it to UrlShortener, but that's previously been declined, so maybe QRLite would be a good place to do it.
Design
Use case
We need to print QRCodes with the URL of our articles on a clean sheet of paper (without the content of that articles) We want to have a pre-configured "to-be-printed" page containing a QRCode placeholder. Then each article would provide a "link" to that page, but with its page-url as a parameter, which would set the actual QRCode generated.
Good-to-have: open those links directly in browser's print dialog.
Problem
The extension's parser-function generates "static" QRCodes, in the sense, that its arguments are stored in some page. As it is now, in order change the qrcode, the above to-be-printed page must be edited, saved and then printed. This is not user-friendly, and requires edit-permissions.
Alternatives i have thought of are
(1) is a waste of effort/resources and a bit complex to setup, (2) feels clumsy.
Preferred solution
It would be nice to have a special page which allow to generate QRs based on parameters of its url, eg:
Or
Workaround
I managed to workarounp this and created a "dynamic' page for generating QRs by using Extension:UrlGetParameters. I'm sharing the code here to explain what i have in mind, and also for future reference.
PrintQRLite
: the "special"-like page to be printed embedding just a QR-codeNote: the template name
{{Template:QRLitePrintContent}}
in my page below is "pinned", but it could also come from the url.The page above dependes on this following template defining the content to print.
Template:QRLitePrintContent
: my QRCode content of the special-page above.Template:DataPageQRCode
: my template for presenting a QRCode along with a "print..." link leading to the special-pageMediaWiki:Common.js
: add this to make the "print..." links above open in browser's "print" dialog