I got bunch of errors and warnings after activating this plugin and even after.
Here is the output:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; QrctWp has a deprecated constructor in /testsite.com/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php on line 11
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /testsite.com/wp-includes/functions.php on line 4146
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /testsite.com/wp-includes/functions.php on line 4146
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /testsite.com/wp-includes/functions.php on line 4146
Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /testsite.com/wp-includes/functions.php on line 4146
Notice: register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead. in /testsite.com/wp-includes/functions.php on line 3838
Notice: has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in /testsite.com/wp-includes/functions.php on line 4030
Warning: Cannot modify header information - headers already sent by (output started at /testsite.com/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php:11) in /testsite.com/wp-admin/includes/misc.php on line 1114
Plugin’s author, please update this wonderful thing!
]]>hi,
this is just a small patch that will make qr-code-tag use protocol-sensitive urls for its assets (js, qr-code-image-files, css, etc).
this way the plugin won’t produce any browser errors by requesting unsafe resources from ssl-enabled urls.
heres the diff:
diff --git a/lib/qrct/QrctWp.php b/lib/qrct/QrctWp.php
index cc7fdf3..c266cd2 100644
--- a/lib/qrct/QrctWp.php
+++ b/lib/qrct/QrctWp.php
@@ -71,7 +71,7 @@ class QrctWp
// blame php. not wp.
$this->pluginBase = basename($baseFile,'.'.pathinfo($baseFile, PATHINFO_EXTENSION)).
"/".basename($baseFile);
- $this->pluginUrl = WP_PLUGIN_URL.'/'.dirname($this->pluginBase).'/';
+ $this->pluginUrl = plugins_url("/", $baseFile);
// load text translation
load_plugin_textdomain($this->pluginDomain, false, './'.dirname($this->pluginBase).'/lang');
@@ -549,4 +549,4 @@ class QrctWp
require_once(dirname(__FILE__).'/QrctWp-admin.inc.php');
}
-}
\ No newline at end of file
+}
]]>
Here are the scripts from the VIEW SOURCE of my wp-admin login page:
<script type='text/javascript' src='wp-includes/js/...'></script>
<script type='text/javascript' src='wp-includes/js/jquery/...'></script>
<script type='text/javascript' src='https://....com/wp-content/plugins/qr-code-tag/js/jquery.tooltip.min.js?ver=3.2.1'></script>
<script type='text/javascript' src='https://....com/wp-content/plugins/qr-code-tag/js/qrct.js?ver=3.2.1'></script>
<script type='text/javascript' src='wp-content/plugins/.../assets/global.js?ver=1.1'></script>
So, you see that all the other src=” are relative, and the QR Code’s src=” is not, since it starts with https://domain.com/… instead of //domain.com/… or wp-content/plugins/…
Please fix. Thank you.
]]>I came across [qrcodetag]_[/qrcodetag]
and figured I’d see what it actually did…
Turns out, exactly what I wanted – a link to the current page URL. Great that this feature was already included, but please document/promote it better in the next release, so the next person doesn’t have to hunt and guess.
Just a suggestion and thanks for the plugin!
Hi
Great plugin and very customisable which puts it in my “must have” folder.
But …. I’m having an issue merging the code into my template.
I know there’s an issue where it can’t be in a page twice, but I use the widget only in my “contact me” page (via widget logic), so there’s no conflict there.
I’m using a conditional tag as I only want the QR to appear in blog entries and not in regular pages.
In the index.php I located (the_content) and confirmed the correct location by using random text after which correctly appeared at the bottom/end of every blog page.
I swapped the random text with the <img… code as mentioned in the plugin settings page, but it’s not showing and I can’t see why.
I tried variations on the PHP, but I can’t get it working.
The code I used was
‘
<?php if (!is_page()) : ?>
<img src=”<?php
global $qrcodetag;
echo $qrcodetag->getQrCodeUrl($content, $size, $encoding, $ecc, $margin, $version); ?>”>
<?php endif; ?>
‘
I also tried:
<?php if (!is_page()) : ?>
<?php global $qrcodetag; ?>
<img src="<?php echo $qrcodetag->getQrCodeUrl($content, $size, $encoding, $ecc, $margin, $version); ?>" />
<?php endif; ?>
Neither worked.
Am I missing something obvious?
Ta
CallumW
This is a great plugin. Only one issue: The caching system doesn’t quite work right.
Basically, a new QR code image is created with every request and stored locally, every time the page is loaded. This means I had nearly 54,000 QR code images stored in the cache for a blog that only has about 200 total posts.
It may be that the problem lies with WP-SuperCache, which I (and pretty much everyone else) use to limit server load.
Whatever the case, and other than that problem, it works great. Fix the cache issues and it’s one of the best plugins out there.
]]>