Code Monkey home page Code Monkey logo

memberqrcode's Introduction

MemberQRCode

Basierend auf dem RFC 6350 (https://datatracker.ietf.org/doc/html/rfc6350) koennen VCards als QRCode erstellt werden. Diese werden auf der Webseite mittels InsertTag eingefuegt. Somit ist eine schnelle Adressweitergabe und Aufnahme in das eigene Kntaktverzeichniss am Smartphone moeglich.

Mittels MemberID {{qrcode:1}} oder bei der Installation von heimrichhannot/contao-member_plus auch die Nutzung des Alias {{qrcode::stefan-lindecke}}

Das Ausgabeformat kann mittels 2 Parameter gesteuert werden. {{qrcode::1::raw}} Valide Typen sind

  • raw, liefert die vCard zurück
  • png
  • jpg
  • gif
  • svg
  • text
  • json

Weiter Konfigurationsmoeglichkkeiten sind hier das verwendete Template und die entsprchende Versionsgroesse. Small benoetigt eine Version von 14, default eine von 22.

Beispiel

{{qrcode::2::png::vcard_small::10::2::Dies ist der QR Code fuer meine vCard}}

InsertTag MemberId OutputFormat Template Version Scale AltText
qrcode 2 png vcard_small 14 2 Dies ist der QR Code fuer meine vCard

Beispiele fuer Version: https://www.qrcode.com/en/about/version.html

Eigene Templates

Von der Vorlage kopieren und darauf achten, wenn in einer Zeile eine Erstzung durch eine Variable stattfindet, muss danach eine Leerzeile kommen.

Dies ist die Vorlage:

ORG:<?= $this->company; ?>

URL;WORK:<?= $this->website; ?>

URL;PRIVATE:<?= $this->website; ?>

EMAIL;type=WORK;type=PREF:<?= $this->email; ?>

In der RAW Ausgabe erscheint:

ORG:ktrion
URL;WORK:https://ktrion.de
URL;PRIVATE:https://ktrion.de
EMAIL;type=WORK;type=PREF:[email protected]

Wichtig hierbei ist, das jede Information in einer eigenen Zeile steht. Hat man im Template die zusaetzlichen Leerzeichen nicht

ORG:<?= $this->company; ?>
URL;WORK:<?= $this->website; ?>
URL;PRIVATE:<?= $this->website; ?>
EMAIL;type=WORK;type=PREF:<?= $this->email; ?>

sieht es folgendermassen aus, so koennen die Adressbuecher den Code aber nicht lesen.

ORG:ktrionURL;WORK:https://ktrion.deURL;PRIVATE:https://ktrion.deEMAIL;type=WORK;type=PREF:[email protected]

memberqrcode's People

Contributors

lindesbs avatar

Stargazers

Carolina M. Koehn avatar Benedict avatar

Watchers

 avatar James Cloos avatar

memberqrcode's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.