• Resolved digikal117

    (@digikal117)


    I am looking to create a page in which each user will find many different collectible cards, but all will be locked and greyed out.

    With specific QR code scans, users will be able to unlock those different cards, that become colored, and after being unlocked, can be opened and zoomed in.

    Here’s a screenshot of an app from which I’m taking inspiration: https://ibb.co/pvsrVWM

    Do you have an idea of a possible way to achieve this?

    Thanks in advance!

    • This topic was modified 3 years, 7 months ago by digikal117.
    • This topic was modified 3 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Assuming you do not wish to build a similar mobile app and want such functionality for your hosted WP website, you could build a link into the QR which contains a certain query string your site will recognize as authorization to unlock card images. However, this will not be very secure. The link and query string could be easily extracted from the QR. People could then easily share the plain text link and short circuit the need to scan the QR. At issue is, unlike mobile apps, web pages cannot access phone hardware like cameras. All data has to come to your server via HTTP protocol.

    When the PHP code on the page the link leads to sees the correct query string, it simply serves unlocked content instead of locked.

    Thread Starter digikal117

    (@digikal117)

    Thank you for your reply. It was quite enlightening.
    So, once we’re not using QR code on a website, which method would you recommend so that the admin could manually control the available content for the users, on each of their account pages?

    Moderator bcworkz

    (@bcworkz)

    You could do it by requiring registration and login to see protected content. That’s essentially how the URL from the “Link to the page you need help with:” field of the new forum topic form works. You didn’t use it here, but if you did, it would appear below your OP only to logged in members. If not logged in, you would not see this URL. For an example where the field was used, see https://www.ads-software.com/support/topic/unable-to-access-website-following-migration/

    Similar logic for an entire page as for a single field. Template code for the page could look something like:

    if ( is_user_logged_in()) {
       // serve colored, zoomable images
    } else {
       // serve small B&W images
    }

    Your site would be configured to require admins to create users on request via contact form or similar messaging.

    Or you could allow open registration and manage content by user role. The default subscriber role might only see B&W images. An added “member” role could be assigned by admins which allow access to full color images. There are a few membership types of plugins that would allow you to easily do this.
    https://www.ads-software.com/plugins/search/membership/

    Thread Starter digikal117

    (@digikal117)

    Thank you for your reply!
    I guess I’m now visualizing a way of making it work.
    Have a good week!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘unlocking content access with QR code’ is closed to new replies.