QR stands for Quick Response is a standard for two-dimensional barcodes that can be read by mobile devices equipped with cameras (such as a smartphone).
+ +QR codes can encode many different types of data. The QR code on the profile page of a person in VIVO encodes information about that person in vCard format. This is a sort of digital business card, containing information about the person's name, address, telephone number, email address, and more.
+ +If you click on a person's QR code in VIVO, you will be taken to the QR Export page for that person. On this page contains the vCard QR code seen on the front page, as well as a QR code containing a simple hyperlink to the user's VIVO profile. It also contains an HTML tag for each code, that can be embedded in a web page to display that code on other sites.
+<#-- todo: make VIVO API? Currently pasting Google API code into export area, this will be static and not change if VIVO data is updated. --> + +There are apps you can download for the iPhone and Android phones that allow you to use your phone's camera to interact with QR codes placed on objects in the real world.
+ +Anything! For a state-of-the-art business card, put your hyperlink QR code on the back of it. That way anyone with a properly-equipped smartphone can quickly go to your VIVO profile by simply pointing their camera at the code. Or put your vCard QR code on your office door to provide more contact information.
+ diff --git a/productMods/templates/freemarker/body/individual-exportQrCode.ftl b/productMods/templates/freemarker/body/foaf-person--exportQrCode.ftl similarity index 100% rename from productMods/templates/freemarker/body/individual-exportQrCode.ftl rename to productMods/templates/freemarker/body/foaf-person--exportQrCode.ftl diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/AboutQrCodesController.java b/src/edu/cornell/mannlib/vitro/webapp/controller/AboutQrCodesController.java new file mode 100644 index 00000000..6b75946a --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/AboutQrCodesController.java @@ -0,0 +1,40 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.controller; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ExceptionResponseValues; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; + +public class AboutQrCodesController extends FreemarkerHttpServlet { + + private static final long serialVersionUID = 1L; + private static final Log log = LogFactory.getLog(ExportQrCodeController.class); + private static final String TEMPLATE_DEFAULT = "aboutQrCodes.ftl"; + + @Override + protected ResponseValues processRequest(VitroRequest vreq) { + try { + Map