- Phiên bản XF tương thích
- 2.3
[XR] QR Code Share
Turn every page into a shareable moment.
The Problem
Your members read a great thread. They want to share it with a friend who's standing right next to them — or paste it into a group chat, or send it to someone who doesn't have a browser tab open.
What do they do? Copy the URL from the address bar. Paste it somewhere. Hope the other person actually clicks it.
That's friction. And friction kills sharing.
The Solution
[XR] QR Code Share adds a floating QR code button to every page on your forum. One hover, and your members get an instant, scannable QR code — generated server-side with your forum's logo embedded right in the center.
No third-party services. No external API calls. No tracking. Just a clean QR code, ready to scan or copy.
What Makes This Different
On thread pages, article pages, question threads, poll threads, and resource pages, the "Copy QR Code" button does something special: it generates a beautiful share card.
This card includes:
- Your custom background image — upload one or multiple, the addon picks one at random
- The thread/resource title with prefix tag
- Content preview — the first portion of the post, auto-formatted and trimmed
- Inline images from the post, scaled and positioned
- The QR code at the bottom with a "Scan to view more" label
One click → a ready-to-paste image lands in your clipboard. Drop it into Zalo, Telegram, WhatsApp, Facebook Messenger — anywhere that accepts images. Your forum content looks professional, not like a random link.
On all other pages, the button copies a clean QR code image with the scan prompt — simple and effective.
Right below the QR copy button, there's a Copy Link button. One tap, the current page URL goes straight to your clipboard. Flash message confirms it. Done.
Every QR code is generated with your forum logo punched into the center — not a generic black-and-white square. Configurable directly from Style Properties in your admin panel. Upload your logo, and every QR code your members share carries your brand.
Upload multiple background images to
data/assets/qrcode/ and the addon randomly selects one each time a share card is generated. Keep it fresh. Match your forum's aesthetic. Seasonal backgrounds? Themed events? Go for it.Also configurable via Style Properties — swap backgrounds without touching code.
How It Works
- Member hovers over the floating QR button (bottom-right corner, near the scroll buttons)
- A popup appears with the QR code for the current page
- Two buttons: Copy QR Code and Copy Link
- On content pages (threads, resources), "Copy QR Code" generates a full share card — background + title + content + QR
- On other pages, it copies just the QR code with scan prompt
- Everything goes to clipboard — paste it anywhere
No page reload. No redirect. No popups to close. Just hover → click → share.
Technical Details
- Server-side QR generation — uses the Endroid QR Code library (bundled, no Composer required)
- High error correction — QR codes remain scannable even with the logo overlay
- XenForo 2.2+ compatible — built for XF 2.2 and 2.3
- PHP 8.2+ — modern, clean codebase
- Pure vanilla JS — no jQuery dependency, uses XF.Element.register pattern
- Clipboard API with automatic fallback for older browsers
- Lightweight — no external requests, no CDN dependencies, no performance impact
- Non-intrusive — adds via template modification on PAGE_CONTAINER, won't conflict with your other addons
Installation
Standard XenForo addon installation:
- Upload the
upload/folder contents to your XenForo root - Install from Admin Panel → Add-ons
- Go to Style Properties → [XR] QR Code Share to set your logo and background images
- That's it. The button appears on every page immediately.
Why Your Members Will Love It
Because sharing should take one second, not ten. Because a share card with a title, preview, and QR code gets more attention than a naked URL. Because when someone scans that code at a coffee shop, at a meetup, or from a screenshot in a group chat — they land directly on your forum.
Every share is organic traffic. Every scan is a potential new member.
Version 1.0.4
Built by XR · XenForo 2.2+ · PHP 8.2+
— Grab it and let your community share smarter.
Built by XR · XenForo 2.2+ · PHP 8.2+
— Grab it and let your community share smarter.