This documentation provides everything you need to install, configure, and operate the Library QR Gate Register System.
Version: 1.5
Core Function: QR-based automated entry/exit tracking with live occupancy and bulk member notification.
Create Folder: Navigate to /wp-content/plugins/ and create a folder named library-gate-register.
Create File: Create a file inside named library-gate-register.php.
Paste Code: Paste the Version 1.5 code provided in the previous message into this file.
Activate: Go to WordPress Dashboard > Plugins and click Activate on "Library QR Gate Register".
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.
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
| Shortcode | Purpose | Visibility |
[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 |
"My Library Pass" Page: Create a page for students and paste [library_qr]. Link this in your member menu.
"Staff Scanner" Page: Create a private page for library staff and paste [library_scanner].
Go to Library Register > Visit Reports.
Click the button: "📧 Send QR to All Users".
The system will loop through all registered WordPress members and send a professionally designed HTML email containing their unique QR code.
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.
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.
Mount a tablet at each gate.
Open the Staff Scanner Page created in Step 3.
Select the Current Location (e.g., First Floor | Lab Entrance) from the dropdown.
The device is now a dedicated scanner for that specific gate.
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.