Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2017-06-07 20:07:28

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: smd_qr_code: embed Quick Response barcodes on your site

For https sites one should change private $api = 'http://chart.apis.google.com/chart'; to

either

private $api = 'https://chart.apis.google.com/chart';

or

private $api = '//chart.apis.google.com/chart';

Last edited by whocarez (2017-06-07 20:08:19)

Offline

#32 2021-08-18 17:58:20

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: smd_qr_code: embed Quick Response barcodes on your site

To satisfy Google Pagespeed, which is complaining about "Image elements do not have explicit width and height", one can change:

$content = '<img src="' . $qrc->get_link() . '"'.$tribs.' alt="QR code" />';

to

 $content = '<img src="' . $qrc->get_link() . '"'.$tribs.' alt="QR code" width=".$width." height=".$height." />';

Offline

Board footer

Powered by FluxBB