Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 24   Go Down

Author Topic: Captcha (Visual Confirmation) for adding comments  (Read 586537 times)

0 Members and 1 Guest are viewing this topic.

paul1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #120 on: September 13, 2006, 04:06:29 pm »

The problem is partly solved. My FTP Client probably does not like overwriting files. When i first deleted the theme.php on my webhost and uploaded it again the garbage on the screen disapeared.

What remains is the fact that i cannot see the Captcha image ( www.pdejong.com/coppermine/captcha.php ).

When comparing GD settings i see that GauGAU's Freetype linkage indicates: "with TTF library" while my settings says "with Freetype" (see attachment).
Could this be the cause of not displaying the Captcha image?

Thanks,

Logged

paul1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #121 on: September 13, 2006, 06:41:04 pm »

Problem finally solved.

The problem of the not appearing Captcha image was caused by the Dutch language file. I noticed that other languages had no problems only the dutch language file. When i checked the file encoding the Dutch file used UTF-8 but others laguage files used ANSI.
Changing the Dutch file to ANSI encoding solved the problem and everything is working now!

Thanks...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Captcha (Visual Confirmation) for adding comments
« Reply #122 on: September 13, 2006, 06:43:27 pm »

huh? All cpg1.4.x language files are in utf-8 (except english, which is in iso8859-1). None of them are in ANSI.
Logged

paul1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #123 on: September 13, 2006, 08:07:18 pm »

@Gaugau: You are right of course. I assumed this to soon because both English language files are in ANSI and did not look any further.

But the fact remains that i had to change encoding of the Dutch language file to ANSI before the Captcha image appeared.
To make it even stranger, with the default dutch language file in place the captcha image appeared but of course no confirmation text.
When i opened the Dutch language file and directly saved it again without changing anything the Captcha image disappeared when refreshing the page. I tried this several times everytime using the original Dutch file from the ZIP. I also switched character encoding in cpg config but this made no difference.
This all changed for the better when i changed the encoding to ANSI for the Dutch language file.
Strange isn't it???
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Captcha (Visual Confirmation) for adding comments
« Reply #124 on: September 14, 2006, 07:11:59 am »

I just tested captcha image in dutch, spanish, korean, french etc... languages and it came fine in all of them. I didn't modified anything in those lang files, they are standard cpg149 lang files.
Logged
Chief Geek at Ranium Systems

paul1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #125 on: September 14, 2006, 08:28:14 am »

If i use Notepad to edit the language file and save it again (keeping encoding at UTF-8) the Capcha image won't appear (red cross).
If i change the encoding to ANSI before saving everything works fine. Both apply even if nothing is changed in the file.
Using Wordpad to edit and save the file automatically saves it in ANSI encoding.

Of course my problem is solved now but this is interesting for others who encounter similar problems.
Logged

taothai

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #126 on: September 14, 2006, 01:26:13 pm »

Hi !

I was trying to implement this captcha in cpg 1.4.9 but while following the instruction on implementing the second step requires editing of themes/yourtheme/theme.php but the file in question doesn't contain anything like the commands. Here is the theme I'm using themes/water_drop/theme.php it looks like this

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.9
  $Source$
  $Revision: 3125 $
  $Author: gaugau $
  $Date: 2006-06-16 08:48:03 +0200 (Fr, 16 Jun 2006) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>


May I copy themes/sample/theme.php to my current theme and replace the themes/water_drop/theme.php with the sample file? It seems to be there....
Logged

taothai

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #127 on: September 14, 2006, 01:40:28 pm »

I copied the sample theme.php and applied everything. I worked perfectly.

Thanks alot for sharing this spam blocker....

Logged

Nibbler

  • Guest
Re: Captcha (Visual Confirmation) for adding comments
« Reply #128 on: September 14, 2006, 01:42:14 pm »

Please read the thread before you post, this has already been asked and answered. Copying the entire sample theme is not a good idea.

http://forum.coppermine-gallery.net/index.php?topic=29564.msg153364#msg153364
Logged

teejnut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #129 on: September 14, 2006, 11:29:03 pm »

I've followed the instructions and double-checked everything, but the mod doesn't seem to be working right. It doesn't matter if I put in the right confirmation or not, you are still able to comment. Please see the link below for my site and the attached theme.php file that is in my water drop theme folder. Thanks for the help!  :)

http://www.teejnut.com/gallery/index.php
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Logged

heemkringduffel

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Captcha (Visual Confirmation) for adding comments
« Reply #131 on: September 15, 2006, 12:53:04 pm »

Hello, Thanks for the mod!
Is it possible to remove the lines in the backgrounds picture?
I saw in captcha.class.php at line 33 the numbers of lines, but it doesn't change in the resultate:

         $iNumLines = 0, // number of noise lines to draw
Logged

Nibbler

  • Guest
Re: Captcha (Visual Confirmation) for adding comments
« Reply #132 on: September 15, 2006, 01:09:09 pm »

Modify the 20 in captcha.php

Code: [Select]
$oPhpCaptcha = new PhpCaptcha($aFonts, 150, 30, 5, 20, false);
Logged

heemkringduffel

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Captcha (Visual Confirmation) for adding comments
« Reply #133 on: September 15, 2006, 01:24:29 pm »

Thanks, it works!
www.heemkring.be/foto
Now I search in the phpcode that the OK bottom is after the image. And that the text in the left size is grouping (each link at a new line).

Greatz, Frank.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Captcha (Visual Confirmation) for adding comments
« Reply #134 on: September 15, 2006, 01:58:36 pm »

You have added

Code: [Select]
<tr>
  <td class="tableb_compact" colspan="2">
    {CONFIRM}
  </td>
  <td class="tableb_compact" colspan="2">
    <input name="confirmCode" size="5" class="textinput" type="text"> <img src="captcha.php" align="middle">
  </td>

</tr>

at a wrong place in your theme file. Reread the instructions carefully.
Logged
Chief Geek at Ranium Systems

teejnut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #135 on: September 16, 2006, 08:49:12 am »

You have added

Code: [Select]
<tr>
  <td class="tableb_compact" colspan="2">
    {CONFIRM}
  </td>
  <td class="tableb_compact" colspan="2">
    <input name="confirmCode" size="5" class="textinput" type="text"> <img src="captcha.php" align="middle">
  </td>

</tr>

at a wrong place in your theme file. Reread the instructions carefully.

i have it in the wrong place? i've tried rereading the instructions, and still have no luck... hmm..
Logged

teejnut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #136 on: September 16, 2006, 08:49:55 am »

Logged

teejnut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #137 on: September 16, 2006, 08:52:51 am »

i double-checked the db_input.php file and the edits are there...

nevermind... i had the edits wrong in the db_input.php file. i did the edits after the comment update instead of the comment section. sorry! great mod! thanks for the help!
Logged

peter2

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Peter S foto
Re: Captcha (Visual Confirmation) for adding comments
« Reply #138 on: September 16, 2006, 08:35:31 pm »

Hi!

I followed the instructions for implementation, but instead of letters in confirmation picture, there are just lines...
What did I do wrong  ???
Please help

http://petersfoto.s5.net/displayimage.php?pos=-607
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Captcha (Visual Confirmation) for adding comments
« Reply #139 on: September 17, 2006, 05:28:40 am »

Did you uploaded the fonts folder? Make sure that there are two .ttf files in that folder and that they are not partially uploaded.

Also check whether you have FreeType support in your PHP via phpinfo.
Logged
Chief Geek at Ranium Systems
Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 24   Go Up
 

Page created in 0.027 seconds with 20 queries.