Codeigniter: Replace captcha in Tank_auth - codeigniter

Has anyone ever tried to replace the default captcha in Tank_Auth with their own customized captcha? The default captcha for Tank_Auth is just too difficult for most users. I want to replace it with Cool Captcha and would like to know if replacing it is a good or bad idea.

I recently did this. I replaced Codeigniter's default catpcha with Cool Captcha. Download a copy of it in my github Tank_Auth fork.

I'm doing this atm. You might want to do some research on captcha first though. A lot of these are even easier to get past if they are easy to read.
Check out this related question:
Most effective form of CAPTCHA?
And these two blog posts dealing with that same question:
http://www.evengrounds.com/developers/alternatives-to-captcha
and
http://www.sitepoint.com/captcha-alternatives/
Of course it all depends what and where you use your captcha.

you can configure tank_auth to use reCaptcha, you have to edit the config file

Follow the below mentioned 2 simple steps.
Go to 'yourprojectname/application/config/tank_auth.php'.
Search for $config['captcha_registration'] = TRUE; make it FALSE

Related

Octopress has a pasword protected plugin?

There are no signs of questions in stackexchange regarding this one and I have done the reasearch. Having said that, I have to protect blog posts which are personal related but always wanted to let it stay online without me having to worry about access - the soultion is password protection as I used to do in Wordpress. e.g: https://pwntoken.wordpress.com/2015/02/17/real-world-penetration-testing-a-gh0st-from-offensive-security/
My question is something similar among those solutions which wordpress plugins provided are possible over the octopress framework? how do one accomplish this?
Ben Balter has really nice way to go. See https://github.com/benbalter/jekyll-auth

Call to JFactory::getApplication()->login changes user's password

I have followed this tutorial to create a component in Joomla 2.5.19. I have modified the code a bit to suit my needs. I have changed
$response = $auth->authenticate($credentials, $options);
to
JFactory::getApplication()->logout(null, $options);
$authorized = JFactory::getApplication()->login($credentials, $options);
But this call to login changes user's password. Does any one have any clue, why it is behaving like this.
Note: I have also installed latest version of JomSocial.
Thanks,
The password itself is not changing, what is happening is that the method hashing of the password prior to storing in the the database has changed. Users with existing passwords with the old hashing have their hashing changed when they login. If you use the JUser API with your authentication system this will work seamlessly, you would only know that it happens if you look in the database.
I only briefly reviewed the link you posted with the tutorial, and from first glance this is not the correct way to achieve external authentication in Joomla. You should write an authentication plugin which hooks into core events and seamlessly integrated with the framework.
Although you could most definitely make this approach "work," in the long run, by working against the framework; maintaining the code could become more and more difficult.
The link below is for Joomla 3.2, but the concepts apply. I would recommend reverse engineering existing core authentication plugins.
If you choose to continue with the component approach check out the com_users login controller and model for his they handle login posts. Both should have relevant methods.
http://docs.joomla.org/J3.2:Creating_an_Authentication_Plugin_for_Joomla
I figured it out with the help of Elin...
Turned out to be a rehash... In Joomla 2.5.19, (libraries/joomla/user/helper.php) JUserHelper::verifyPassword() is actually rehashing and updating the password in database.
Thank you #Elin. Can you submit you comment as answer so I can accept it :)

What is the correct approach to learn Codeigniter?

In the last 3 months, i have learnt html, css, js and php and now i'm trying to learn Framework Codeigniter. My teacher gave me a rough idea abt MVC and asked me to download a project made on codeigniter from internet and edit it.
I downloaded a login form project and tried to read it. But i'm still kind of confused how everything works. i hv 2 questions:
What is the correct approach to learn codeigniter?
In how many days one can learn codeigniter? (i practice around 6-7 hrs a day)
The best way to learn codeigniter is to read the manual of codeigniter
Because, codeigniter framework is so much popular for their well formatted and clean documentation.
Or you can check this for beginner level tutorial
Or if you want to learn codeigniter by doing practical projects then you can follow this link
I learned CI over a weekend using this technique.
Start with simply setting up a 2 page site.
Home and About Us.
Pass simple string variables from the controllers to the views.
Next, bring a model into it.
Make a method in your model that returns some plain text, to the controller and finally to the model.
Next, make the model actually make a request to your database and return the result to the constructor then view.
After that try these:
write a helper function
Try making a basic route
Log a debugging message
upload a file from a form using the upload library
That's a good grounding in CI
Keep in mind Codeigniter is no longer in development also.
If your keen on sticking with PHP, you might want to check out the similar active project called "Laravel" after getting the hang of CIs very simple MVC structure.
Good luck!
the common way is read their manual and follow the guide, the another approach is search youtube for codeigniter turial, there are many good tutorial out there and easy to follow for example here is my result in the first place for keyword "codeigniter tutorial"
https://www.youtube.com/watch?v=BP9NRZXOvIw&list=PLIQyGVrcLTeXsq37O7IBGaUwu6xEwqBWV&index=1

Is there a quick way of adding captcha in pyrocms contact form?

I am working on a very simple contact form, by modifiying default contact form of pyrocsms standard installation. I have looks at the documentation about adding captcha, but seems to not find any clear way of adding it. Is there a plugin/addons that simplify adding captcha in PyroCMS? Or, I should go deeper into CodeIgniter captcha helper, as shown here : CAPTCHA Helper ?
Thanks
We had a captcha in there ages ago but the clear opinion of the community was that it was a pain in the ass and more people were against it being there than were for.
Instead we implemented Akismet, so you can just use that instead. That way they check if its spam for you, instead of pestering your users so hard they dont even bother submitting the form.

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.
If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).
If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.
Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.
What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.
EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.
The JForm class helps you build forms.
Documentation can be found here:
joomla CMS: http://docs.joomla.org/API16:JForm
joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html
This class provides you with ready to use form elements and form loading and/or processing methods
This class includes validation methods, date picker control, color picker, etc.
Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.
The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new
This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Or you could just create add a html module to any position and then write the form in html i.e.
<form method="post" action="mycreatedpage.php"> <input type="text"/> <input type="submit">
Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.
Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.
I have got good working experience with Joomla RSForm Pro. It has got options for
validation
user email/admin emails on submit
file uploads
and many more
Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html
Good luck!
Create View.
Create Model.
Create Table.
Create Controller ( if Needed ).
Create Form xml file.
Go here for more information:
http://docs.joomla.org/Standard_form_field_types
Take a look at the Chronoforms extension - does more than you want.
You have two options:
Use an already built custom form extension
Create your own custom form extension (or outsource it)
Now if you only want to modify the user registration form, then you can do some PHP customization to accomplish your goal.
Making forms in Joomla can be done in a couple of ways.
If you just wanted a contact us, you can just create a page with a menu item for the User contact form. This gives you a page with a Members address and contact form. So all you would need to do was add the user as the company of the websites home address and email. But the form is very basic, name, title, textarea for message.
Next up from that you could just make a Custom HTML module add add a form to it in plain HTML like +Sean said above this, you would need to code in PHP your own form process script. You would not get error in form data checking unless you also wrote it.
Next you might rather look on the Joomla Extension Directory JED for one of the good extensions for 3 and 2.5 Joomla RSForms!Pro is good, and can do all we have needed. This lets you add fields one by one and move your form around. Then can auto generate or custom the html of the form.
You can easily create your own forms with Fabrik
Chronoforms are now a days a very popular solution for custom forms in joomla. Chornoforms support twitter bootstrap also. In simple 5 steps you can create a contact form with unlimited fields and also embed various function like DB save, Email, Thanks Message, Redirection on any page. There is events and events will have particular events.
Also possibility of extension of Normal joomla registeration. It will not extend the core registration but at the time of registration you can take various information from users.
I would use Chrono Forms, they work really well and are easy to use.
Download here
Here is a full tutorial on the new Chronoforms 5 to help you get started quickly and understand most of the features available.
CLICK HERE
You can use plugin to insert external php form in content. It is easy and you don't need to make plugin etc. Please use this.
I suggest you to use breezingforms: http://crosstec.de/en/extensions/joomla-forms-download.html
It's one of the best solutions for custom form creation in joomla.

Resources