Customizing Captchas

Hi guys,

I’m trying to customize the appearance of my captcha image based on the theme used. In other words, depending on the theme, the captcha would appear differently (ex: different background color, etc). If it wasn’t for the themes, I could achieve this by simply changing CCaptchaAction’s property inside the controller’s actions method, such as:




	public function actions()

	{

		return array(

			'captcha'=>array(

				'class'=>'CCaptchaAction',

				'backColor'=>'#000000', // black

			),


		);

	}



…but since I’m using themes, it would be much more convenient and efficient to change all that in the view that renders the captcha image. Is there a way to do that?

Thanks,

Alex

sorry for the bump, but I was wondering if somebody could help me out about this issue…I’d really appreciate it.

you can load a theme-config, however, based on your current theme string




public function actions()

{

    return array(

        'captcha'=> include ($path.to.themeConfig)

    );

}



thanks a lot mbi. I got it working by following your advice :)