This is an extension to generate a standard / traditional barcode (as images)
Requirements ¶
- Yii 1.1 or above (Tested on Yii 1.1)
- PHP GD Lib
Usage ¶
I've updated extension for simple use :
[1] Download 'barcodegenerator_v1_0_1.zip', extract and copy folder 'barcodegenerator' to your extensions folder (protected/extensions)
[2] In /protected/config/main.php :
'controllerMap' => array(
// ...
'barcodegenerator' => array(
'class' => 'ext.barcodegenerator.BarcodeGeneratorController',
),
),
[3] Now You Can Call action of this extension like this (in browser, assume your yii apps folder is /sampleapps) : > http://localhost/sampleapps/barcodegenerator/generatebarcode?code=1234567890ABCDEF
[4] For further usage, you can attach on any html img tag :
<img src="http://localhost/sampleapps/barcodegenerator/generatebarcode?code=1234567890ABCDEF">
Example page
Can you provide a sample page?
check new update
Thanks for your feedback. I've updated extension (barcodegenerator_v1_0_1.zip) for simple use :D
Can you provide a demo please?
Great work.Can you provide a demo please?
Thank you
I have been looking for something like this.
it's can work
[1] Download 'barcodegenerator_v1_0_1.zip', extract and copy folder 'barcodegenerator' to your extensions folder (protected/extensions)
[2] mv protected/extensions/barcodegenerator/BarcodeGeneratorController.php /protected/controllers/
[3] Edit BarcodeGeneratorController.php line class BarcodeGeneratorController extends CExtController to class BarcodeGeneratorController extends Controller
[4] In /protected/config/main.php :
**'components' => array(** //.... 'barcodegenerator' => array( 'class' => 'ext.barcodegenerator.BarcodeGeneratorController', ), ),
[5] Now You Can Call action of this extension like this (in browser, assume your yii apps folder is /sampleapps) :
Http: //localhost/sampleapps/barcodegenerator/generatebarcode&code=1234567890ABCDEF
[6] For further usage, you can attach on any html img tag :
<img src="http://localhost/sampleapps/barcodegenerator/generatebarcode&code=1234567890ABCDEF">
<img src="http://localhost/sampleapps/barcodegenerator/generatebarcode&code=<?php echo $_IDUSER; ?>">
What is the encoding type of generated barcodes?
There is no info about the encoding scheme used by this extension, I think it's code39, please confirm.
Thanks
Type
What type of code are you used
EDIT:
It is Code 39: http://en.wikipedia.org/wiki/Code_39
Composer and Packagist
Can you add composer to this library?
Superb
This was extension was really Superb. it is very helpful if you provide decoding facility of generated bar codes.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.