Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
My first thought was to create a new module. I need to create an API module (like this one) in order to create QR Codes with the Linux command line qrencode. See http://megaui.net/fukuchi/works/qrencode/index.en.html
This patch makes QR Codes pluggable. The encoding API/engine is moved outside in a sub-module and the image generation is implemented as Drupal hook. Admins can enable only the needed engine.
The module can be extended with other QR Codes encoders like Phpqrencode using hook_qr_codes().
Comment | File | Size | Author |
---|---|---|---|
#3 | qr_codes-pluggable-2.patch | 18.82 KB | claudiu.cristea |
#2 | qr_codes-pluggable-1.patch | 12.76 KB | claudiu.cristea |
#1 | qr_codes-pluggable.patch | 10.24 KB | claudiu.cristea |
Comments
Comment #1
claudiu.cristeaAdded also a separate settings tab for each engine (if the engine implements $op == 'config')
Comment #2
claudiu.cristeaSome improvements.
Comment #3
claudiu.cristeaAdded also qrencode http://megaui.net/fukuchi/works/qrencode/index.en.html as encoding engine.
Comment #4
levelos CreditAttribution: levelos commentedGreat patch Claudiu, I think this will help push the module to the next level. I made a few minor changes to the patch and committed.