Jelmer Schreuder wrote on 02/03/11 10:43 am:Feel free to create something, or port an existing library into a package. If you choose the latter check out the packages in github.com/fuel-packages as examples. Let me know if you've created something like this and I'll import it to the fuel-packages account.
vicente pattugalan wrote on Sunday 16th of October 2011:hello, can anyone provide a working sample of this Captcha? I am following the flow of this Captcha it seems the author did not proceed his plan 'after 2-3days' to modify. I hope he will have time and this will help the community in putting captcha in their application.
thanks
Dmitry Barko wrote on Saturday 24th of September 2011:Mozhete pojasnit kak polzovatsia vashym classom captcha v fuelphp.
Readme - u vas ne zaponen.
Prosto trudno poniat ne imeja dostatochnogo upyta.
Pozhalujsta.
require_once COREPATH.'bootstrap.php'; Autoloader::add_classes(array( // Add classes you want to override here // Example: 'View' => APPPATH.'classes/view.php', )); Autoloader::register(); Fuel::init(include(APPPATH.'config/config.php'));
<?php class Controller_Captcha extends \Fuel\Core\Controller_Template { public function before() { parent::before(); } public function action_index() { \Captcha::generate(); } public function action_register() { $data = array(); if($_POST) { if(!\Captcha::check()) $data['error'][] = 'You have entered wrong chars.'; } $this->template->content = \View::factory('register/index', $data); } }
<?php if(!\Captcha::check()): ?> <form method="post"> <img src="/captcha" alt="captcha" /> <input type="text" name="keystring" /> <button type="submit">Register</button> </form> <?php else: ?> <p>Thanks for registering! Now you can login to your account.</p> <?php endif; ?> And I got: ErrorException [ Error ]: Class 'Captcha' not found APPPATH/classes/controller/captcha.php @ line 10
require_once PKGPATH.'captcha/bootstrap.php';
Mikhail Khasaya wrote on Monday 26th of September 2011:Solovej, why you copy captcha to fuel/core? You should create folder "fuel-captcha" in fuel/packages and copy all files from my github link into it (this is step 0) in my instruction ).
I don't like reCaptcha. It has bad usability)Brian Perin wrote on Tuesday 27th of September 2011:There is a reCaptcha package already
Mikhail Khasaya wrote on Monday 26th of September 2011:Solovej, why you copy captcha to fuel/core? You should create folder "fuel-captcha" in fuel/packages and copy all files from my github link into it (this is step 0) in my instruction ).
Dmitry Barko wrote on Thursday 29th of September 2011:So, your captcha package is too old.
Now fuelphp 1.0.1 version. You are uses: \Output::set_header('Pragma', 'no-cache');
I do not fount any classes with name \output. I found Response...
In you bootstrap Fuel\Core\Autoloader::add_core_namespace('Captcha');
But should be Autoloader::add_core_namespace('Captcha'); so, etc...
Maybe you can upload newer version ? For 1.0.1 or 1.1.
And add to readme installation info.
Please.
Ok!Mikhail Khasaya wrote on Thursday 29th of September 2011:I'm very busy now, but if you can wait for 2-3 days, I can fix my package for Fuel 1.0.1
Dmitry Barko wrote on Thursday 29th of September 2011:So, your captcha package is too old.
Now fuelphp 1.0.1 version. You are uses: \Output::set_header('Pragma', 'no-cache');
I do not fount any classes with name \output. I found Response...
In you bootstrap Fuel\Core\Autoloader::add_core_namespace('Captcha');
But should be Autoloader::add_core_namespace('Captcha');
so, etc...
Maybe you can upload newer version ? For 1.0.1 or 1.1.
And add to readme installation info.
Please.
class Controller_Captcha extends \Controller { public function before() { parent::before(); } public function action_index() { \Captcha::generate(); } }
public function action_register() { $data = array(); if($_POST) { if(!\Captcha::check()) $data['error'][] = 'You have entered wrong chars.'; } $this->template->content = \View::factory('register', $data); }
<?php if(!\Captcha::check()): ?> <form method="post"> <img src="/captcha" alt="captcha" /> <input type="text" name="keystring" /> <button type="submit">Register</button> </form> <?php else: ?> <p>Thanks for registering! Now you can login to your account.</p> <?php endif; ?>
It looks like you're new here. If you want to get involved, click one of these buttons!