Where does language file go for custom CAPTCHA?

Discussion forum for MOD Writers regarding MOD Development.
Locked
microUgly
Registered User
Posts: 88
Joined: Sat Jun 02, 2007 5:35 am

Where does language file go for custom CAPTCHA?

Post by microUgly »

I've created a custom captcha. It seems to work with the exception that I've been unable to give it a name in the admin. It appears as a blank item in the list.

I assumed from http://wiki.phpbb.com/Captchas that if I created the language file with the right name, and put it in the correct location, it would automatically load.

I've named the file correctly, put in the the language/en folder where I see the recaptcha language file. I've also implemented the get_name method for the plugin which returns the key for the language item.

I can only assume the language file is not being loaded, but I can't find the code that does that job to figure out why it's not loading. And I don't see anything in the other captchas to suggest I need to manually load the language file.

Little help?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Where does language file go for custom CAPTCHA?

Post by igorw »

Take a look at the init(), is_available(), acp_page() methods of phpbb_captcha_qa. They all include a call to $user->add_lang(). So yes, it needs to be loaded manually. The language file should go in language/en/mods/.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
microUgly
Registered User
Posts: 88
Joined: Sat Jun 02, 2007 5:35 am

Re: Where does language file go for custom CAPTCHA?

Post by microUgly »

Thanks evil<3. I had been referring to gd wave which I see now doesn't require those entries.
Locked

Return to “[3.0.x] MOD Writers Discussion”