Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it in dark templates? #3

Open
chiliec opened this issue Dec 19, 2014 · 7 comments
Open

How to use it in dark templates? #3

chiliec opened this issue Dec 19, 2014 · 7 comments
Milestone

Comments

@chiliec
Copy link

chiliec commented Dec 19, 2014

No description provided.

@mdmunir
Copy link
Contributor

mdmunir commented Dec 19, 2014

What is dark templates?
Simple answer. it used like a official captcha.

@chiliec
Copy link
Author

chiliec commented Dec 19, 2014

I mean may be you knows how to use it on dark background, like that:
dark

@chiliec
Copy link
Author

chiliec commented Dec 19, 2014

Official captcha is non-transparent, just white background:
light

@mdmunir
Copy link
Contributor

mdmunir commented Dec 19, 2014

got it

@mdmunir mdmunir added this to the 1.0.2 milestone Dec 19, 2014
@dantux
Copy link

dantux commented Feb 1, 2016

Hey mdmunir, I also want to use this on a dark template. I noticed if I change the protected function renderImage to output jpeg instead of png (imagejpeg), the background is white.
How can I extend your CaptchaAction? I tried to override the function, but for some reason doesn't work. Is it because the function is protected?

captcha

@dantux
Copy link

dantux commented Feb 1, 2016

I found a workaround for now. In the view, I changed the template by setting the background to white:
'template' => '<span style="background-color: white">{image}</span><div class="col-xs-5 pull-right">{input}</div>',

Now it shows OK:

captcha2

@mdmunir
Copy link
Contributor

mdmunir commented Feb 1, 2016

@dantux

I tried to override the function, but for some reason doesn't work. Is it because the function is protected?

Are you sure. Its should be OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants