📚 Library QR Gate Register Code & Documentation

28 views
Skip to first unread message

Thirunavukkarasu TC

unread,
Dec 20, 2025, 8:30:45 AM12/20/25
to lisquizonline

This documentation provides everything you need to install, configure, and operate the Library QR Gate Register System.


📚 Library QR Gate Register Documentation

Version: 1.5

Core Function: QR-based automated entry/exit tracking with live occupancy and bulk member notification.


🛠 1. Installation & Setup

A. Plugin Installation

  1. Create Folder: Navigate to /wp-content/plugins/ and create a folder named library-gate-register.

  2. Create File: Create a file inside named library-gate-register.php.

  3. Paste Code: Paste the Version 1.5 code provided in the previous message into this file.

  4. Activate: Go to WordPress Dashboard > Plugins and click Activate on "Library QR Gate Register".

B. Requirements

  • HTTPS: Your website must have an SSL certificate (https://) for the browser to allow camera access.

  • SMTP: For bulk emails, install the WP Mail SMTP plugin to ensure QR codes are not marked as spam.


⚙️ 2. Configuration (Admin)

Defining Floors and Gates

Go to Library Register > Library Gates in your sidebar. Use the following format:

  • Use a Colon (:) to separate a floor from its gates.

  • Use a Comma (,) to separate multiple gates.

  • Put each floor on a new line.

Example:

Ground Floor: Main Gate, Cafe Gate

First Floor: Study Wing, Lab Entrance


📄 3. Shortcode Reference

ShortcodePurposeVisibility
[library_qr]Displays the user's personal Digital ID & QR Code.Logged-in Members
[library_scanner]Opens the camera to scan member codes.Admin/Staff Only

Recommended Page Setup:

  1. "My Library Pass" Page: Create a page for students and paste [library_qr]. Link this in your member menu.

  2. "Staff Scanner" Page: Create a private page for library staff and paste [library_scanner].


📧 4. Bulk Emailing System

How to send QR codes:

  1. Go to Library Register > Visit Reports.

  2. Click the button: "📧 Send QR to All Users".

  3. The system will loop through all registered WordPress members and send a professionally designed HTML email containing their unique QR code.


📊 5. Reports & Analytics

The Reporting Dashboard

Accessible via Library Register > Visit Reports.

  • Live Status: Users currently inside are marked with a green "● Active" dot.

  • Duration: The system automatically calculates total time spent once the user scans "Out."

  • CSV Export: Click "📊 Export CSV" to download all data for use in Microsoft Excel or Google Sheets.

Understanding Entry/Exit Logic

  • Scan 1: If the user is not in the library, the system logs a Check-In.

  • Scan 2: If the user is already "Active," the next scan logs a Check-Out and calculates the time.

  • Live Occupancy: The scanner screen displays a real-time count of people currently on that specific floor.


📱 6. Gate Hardware Setup

Tablet/Mobile Configuration:

  1. Mount a tablet at each gate.

  2. Open the Staff Scanner Page created in Step 3.

  3. Select the Current Location (e.g., First Floor | Lab Entrance) from the dropdown.

  4. The device is now a dedicated scanner for that specific gate.


❓ 7. Troubleshooting

  • Camera won't open: Check that the page is loaded over https://. Ensure you have granted camera permissions to the browser.

  • User not found: Ensure the member is registered in WordPress with the same email used for the QR code.

  • Emails not arriving: Check your WP Mail SMTP settings. Many hosting providers block default PHP mail to prevent spam.



library-gate-register.php
Reply all
Reply to author
Forward
0 new messages