coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: BellaStar on February 17, 2011, 05:54:18 PM

Title: Captcha problem with my theme
Post by: BellaStar on February 17, 2011, 05:54:18 PM
I'm creating a gallery that will display images to logged in users only. I will create the accounts on a need to basis (no user registration). I want the users to post comments on pictures and use the captcha system for the comments. I have everything running fine, except for the captcha, the image doesn't appear when the gallery is viewed with a theme I created. If I switch to the curve theme, for instance, then the captcha image shows up. My theme is based on the curve theme. I have looked in the docs and forum, and couldn't find any solution.

Technical info:
- Clean install of cpg 1.5.12
- GD library and Free Type are enabled
- Account for testing:
   username: test
   password: test
- Website: http://family.thealmostaranch.com (http://family.thealmostaranch.com)
Title: Re: Captcha problem with my theme
Post by: Αndré on February 17, 2011, 10:11:52 PM
Please attach your whole theme as zip file if you need help with your custom theme. Maybe you want to contribute that theme and share it with the community?
Title: Re: Captcha problem with my theme
Post by: BellaStar on February 17, 2011, 10:46:59 PM
Sorry, didn't realize you'd need the theme files. I've attached them to this message (this is the first time I try an attachment here, so hopefully it'll work).

Never thought of contributing my themes 'cause I'm far from being perfect in my coding, I'm sure of that.
Title: Re: Captcha problem with my theme
Post by: Joe Carver on February 17, 2011, 11:48:02 PM
Although I do not have time to look at the theme a quick suggestion
is to look at / replace the file captcha.php.

Try: http://family.thealmostaranch.com/photogallery/captcha.php

You will see there is no image.

Also - try taking the gallery out of the frame you have it in.

Also - Make sure if using an HTML / php editor that all files are saved as UTF-8 without BOM.

Title: Re: Captcha problem with my theme
Post by: Αndré on February 18, 2011, 08:30:09 AM
It's definitely a theme error, probably a whitespace or blank line outside the <?php ?> block, because
I haven't tested that, but please try if it works when you remove the first line
<meta http-equiv="content-type" content="text/html;charset=utf-8">
in theme.php completely.
Title: Re: Captcha problem with my theme
Post by: BellaStar on February 20, 2011, 04:54:21 PM
André:
Thank you! That solved it. I can now see the Captcha image and it works.

Joe:
Thank you for the suggestions. André's solution is the one that worked. Never heard of utf-8 without BOM. Will have to look that up.