When using the size attribute in /hr_qr_codes/ it is the size per pixel.
However when using it in the shortcode it is used for the width/height in pixels totally.
This behaviour results in blurry images no matter which size we choose.
To fix it for me, we have to adjust the code slightly.
//echo '<img src="'.$src.'" height="'.$size.'" width="'.$size.'" />';
echo '<img src="'.$src.'" />';
Any chance to review this?
]]>Nice plugin, very handy. I would like to avoid my logs to fill up with php notices, is it possible to update the plugin to check the $_GETS?
$text = isset($_GET['text']) ? $_GET['text'] : '';
$format = isset($_GET['format']) ? $_GET['format'] : 'svg';
$outfile = isset($_GET['outfile']) ? $_GET['outfile'] : false;
$level = isset($_GET['level']) ? $_GET['level'] : 'QR_ECLEVEL_L';
$size = isset($_GET['size']) ? $_GET['size'] : '3';
$margin = isset($_GET['margin']) ? $_GET['margin'] : '3';
$saveandprint = isset($_GET['saveandprint']) ? $_GET['saveandprint']: false;
$back_color = isset($_GET['back_color']) ? $_GET['back_color'] : 0xFFFFFF;
if (!is_numeric($back_color)){ $back_color = hexdec($back_color); }
$fore_color = isset($_GET['fore_color']) ? $_GET['fore_color'] : 0x000000;
if (!is_numeric($fore_color)){ $fore_color = hexdec($fore_color); }
Thank you in advance!
]]>Hi @shawfactor,
I saw your plugin, and this led me to seek more areas that QR codes could be used.
I wanted to use the Qr code at the bottom of my post contents, where it shows automatically at the centre.
I also wanted it to show at pages (optional) but wanted it to be restricted from showing on any BuddyPress associated pages or content values.
I later got to see a plugin that did part of this but had the issue that it showed on all pages was not centred and showed on BuddyPress associated pages.
Please could you kindly assist me in this
below was the plugin I wanted to use:
https://github.com/ikamal7/Posts-QR-Code-generate
Hello,
I would like the said qrcode to attach to my registration screen for my customers when they register. Is this possible? if so, can anyone help me do this?
Thank you,
]]>Hello (and thanks for the excellent plugin):
It’s possible that the QR Code links to %post_id% ignorating the the custom permalink structure defined by WordPress?
Thank you.
]]>Hey there,
how can we pass values dynamically to the plugin?
https://www.example.com/page/?text=testingthis
Best,
Elmar
Hi, I have spend hours to get the correct Shortcodes.
Why don’t you write examples for Shortcodes to your Installation Guide?
Until now I could not find the correct Shortcode for the Background Color.
I would say for example:
[lh_qr_code urlencode=”1″ size=”100″ back_color=”#FF0000″]
But it does not work for the Background!? Please help … Thanks!
]]>Dear plugin author,
I added support for short links to the function and fixed some issues. Feel free to include my changes in the next version.
function the_post_qrcode( $size = '150', $opts = [] ) {
$opts += [
"fore_color" => null,
"back_color"=> null,
"margin" => null,
"short" => false,
];
$src = add_query_arg( 'text', urlencode( $opts["short"] ? wp_get_shortlink() : get_permalink() ), site_url('/lh_qr_codes/') );
if ($opts["fore_color"]){
$src = add_query_arg( 'fore_color', $opts["fore_color"], $src );
}
if ($opts["back_color"]){
$src = add_query_arg( 'back_color', $opts["back_color"], $src );
}
if ($opts["margin"]){
$src = add_query_arg( 'margin', $opts["margin"], $src );
}
$src = apply_filters( 'lh_qr_codes_template_src', $src);
echo '<img src="'.$src.'" height="'.$size.'" width="'.$size.'" />';
}
Best regards
]]>only show the below codes in the html of post:
\<\img src=”https://www.example.com/lh_qr_codes/?text=https%3A%2F%2Fwww.example.com%2F1133″ height=”150″ width=”150″ \/\>\
how can I do next?
thanks!
]]>only show the below codes in the html of post:
<img src="https://www.example.com/lh_qr_codes/?text=https%3A%2F%2Fwww.example.com%2F1133" height="150" width="150" />
how can I do next?
]]>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
]]>Updated the plugin now I get
Also what would be the correct way to call the png
[lh_qr_code format=”png”]
Warning: Illegal string offset ‘text’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 87
Warning: Illegal string offset ‘format’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 101
Warning: Illegal string offset ‘format’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 101
Warning: Illegal string offset ‘fore_color’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 110
Warning: Illegal string offset ‘back_color’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 118
Warning: Illegal string offset ‘margin’ in /homepages/41811431/htdocs/wordpressRC/wp-content/plugins/lh-qr-codes/lh-qr-codes.php on line 126
]]>theme 2016
version 4.5.3
all other plugins disabled
I get a broken image place holder.
using short code [lh_qr_code] in a page.
https://www.s241811445.onlinehome.us/wordpressRC/