• Resolved WPSeeker

    (@wpseeker)


    Hi

    I’m testing putting Vcard info in the QR code but I keep getting a message on my phone saying there is no contact info.

    This is my code and shortcode. I do see the info being output in the HTML of the page but it seems like the formatting of the VCard isn’t coming out correctly to make it work.

    
    $qrlink = 
    'BEGIN:VCARD
    VERSION:2.1
    N:Gump;Forrest;;Mr.
    FN:Forrest Gump
    END:VCARD';
    
    '.do_shortcode("[lh_qr_code text='".$qrlink."']").';

    This is how it is output in HTML but I can’t see what the problem is.

    <img src="https://mywebsite.com/lh_qr_codes/?text=BEGIN:VCARD
    VERSION:2.1
    N:Gump;Forrest;;Mr.
    FN:Forrest Gump
    END:VCARD" width="150" height="150">

    Any ideas?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter WPSeeker

    (@wpseeker)

    I got it to work by copying the code from another QR code plugin that output the address correctly. This is the format that made it work.

    $qrlink = 'BEGIN%3AVCARD+VERSION%3A4.0%0D%0AN%3AForrest%3BGump%3B%3BMr.%3B%0D%0AFN%3AForrest+Gump%0D%0AORG%3ABubba+Gump+Shrimp+Co.%0D%0ATITLE%3AShrimp+Man%0D%0ATEL%3BTYPE%3DWORK%2Cvoice%3BVALUE%3Duri%3Atel%3A%2B1-111-555-1212%0D%0AADR%3BTYPE%3DWORK%2CPREF%3A%3B%3B100+Waters+Edge%3BBaytown%3BLA%3B30314%3BUnited+States+of+America%0D%0ALABEL%3BTYPE%3DWORK%2CPREF%3A100+Waters+Edge%5CnBaytown%5C%2C+LA+30314%5CnUnited+States+of+America%0D%0AEND%3AVCARD'
    ;

    Is there any way your plugin can be made to automatically translate the spaces and characters like this?

    Thanks

    • This reply was modified 8 years, 1 month ago by WPSeeker.
    Thread Starter WPSeeker

    (@wpseeker)

    Ok, I figured out the solution. Here it is for anyone who needs it.

    '.do_shortcode("[lh_qr_code text=".urlencode($qrlink)."]").';

    Plugin Author shawfactor

    (@shawfactor)

    Guys,

    you can just do this:

    [lh_qr_code text=”BEGIN%3AVCARD%0D%0AVERSION%3A2.1%0D%0AN%3AGump%3BForrest%3B%3BMr.%0D%0AFN%3AForrest+Gump%0D%0AEND%3AVCARD”]

    and paste it into your post or page etc

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘VCard Problems’ is closed to new replies.