QR Code Generator..
-
Updated and hopefully fixed a couple of issues:
- Increased timeout to allow for higher latency connection, should now generate QR Code + Customisation on first click
- Added a simple >Back Link< (thanks to Tuck for suggestion) to the QR Generator on the ‘View Downloadable Image’ page < Upon returning back all previous input/output data should be removed and a new Qr Code can then be generated.
Note: This Generator does require a HTML5 compatible browser < Most of the latest browsers offer sufficient support.
-
[quote name=“iawgoM” post=“15896” timestamp=“1371464188”]
[quote author=UKMark link=topic=1954.msg15892#msg15892 date=1371461569]
Note: This Generator does require a HTML5 compatible browser < Most of the latest browsers offer sufficient support.
[/quote]Yeah…like you know what “HTML5” is…just using those fancy words and sh*t… 8) ;D
[/quote]So far it’s only Firefox that appears to know too ;D
-
[quote name=“wasthatawolf” post=“15925” timestamp=“1371480258”]
Looks good! My only suggestion is removing the requirement to enter an exact amount so it’s a little more universal.
[/quote]Hi thanks for feedback please explain ‘exact amount’, I’m a little slow today :)
If you mean what I think you mean, the idea is for merchants to use these to accept payment for a set price item, then the client reads and processes the QR Code, filling in all of the appropriate input fields on the send page of the client and then the consumer simply has to check & click send… I suppose for open donation amounts then my ‘Button Generator’ would be better suited.
Edit: Or if required to be an open amount for donation purposes etc, simply set the amount to zero 0.
-
[quote name=“iawgoM” post=“15939” timestamp=“1371489124”]
You can just give people the option - use predefined amount or no amount on their QR code. If it’s going to be used as pricetag on eash item, you will want to have price defined. It it’s donation, its good enough to open your FTC wallet and enter payment address - end user can input the amount himself…why not.
[/quote]That’s why I suggested for donation amounts simply enter 0 :)
- The client won’t send 0
- Saves me more .js headaches :D
NM I will sort it ::)
-
[quote name=“d2” post=“16447” timestamp=“1371660064”]
[quote author=UKMark link=topic=1954.msg15875#msg15875 date=1371453092]
[quote author=d2 link=topic=1954.msg15856#msg15856 date=1371445756]
Doesn’t seem to be rendering a new one if any of the data is changed and you click generate again.
[/quote]Ok thanks for testing, so I can debug further tell me what browser are you using?
[/quote]Sorry for late response. I was testing it in Chrome. After I generate, I change amount & label and hit generate again and it doesn’t re-gen just keeps the initial QR there. The same happens with Firefox. If you change the image template, it will update the QR with the new image but still won’t update the amount or label.
[/quote]No worries!
Once you click on ‘view downloadable image’ (on screen generated QR -
[quote name=“d2” post=“16476” timestamp=“1371668028”]
Image download rough example:[code]
$fileName = $_Post[‘amount’] . ‘-FTC-’ . str_replace(" “,”_",$_Post[‘label’]) . ‘.png’;
header(“Content-type: image/png”);
header("Content-Length: " . filesize($generatedFile));
header(“Content-Disposition: attachment; filename=$fileName”);
header(‘Content-Transfer-Encoding: binary’);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
fpassthru($generatedFile);
exit;[/code]
Updated to something that might actually work. I use similar code in an icon gallery I built, will find my code in a little while and post it.
[/quote]Sounds good…I’m listening…
Bear in mind I’m dealing with data URI (not an actual image) this needs converting to an image before it can be download…
-
Yup no probs d2, thanks! 8)
I’ve sent you a PM for when you get time :)
-
Ok further to everyone’s input I have made a few changes:
- Amount & Label inputs are now optional
- Image is now downloadable from the generation page (right click…blah…blah)
- All of D2’s requests/suggestions should now work - Generate a QR and then hit the ‘Clear QR Code’ button and then regenerate a fresh QR code without losing any input data < Providing it is in Firefox this works fully :)
[url=http://host.feathercoin.com/qrgen.php]http://host.feathercoin.com/qrgen.php[/url]
-
[quote name=“d2” post=“17112” timestamp=“1371967348”]
Nevermind! Seems I must have had the js cached.Other thoughts: why not run your clear routine when Generate is pressed before your generation routine fires?
[/quote]Yeah I had the .js caching issue when testing, I think there is a way to force it to look for the latest version without renaming it, I’ll look into that.
The problem with running before generate is it clears [i]all[/i] of the cache in none gecko browser :) So any input would be gone and generate wouldn’t fire on those browsers. -
Hmm that is quite strange indeed.