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 ... 11 12 13 14 [15] 16 17 18 19 ... 24   Go Down

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

0 Members and 1 Guest are viewing this topic.

grafx77

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: Captcha (Visual Confirmation) for adding comments
« Reply #280 on: January 30, 2007, 11:21:34 pm »

Hello Abbas or Nibbler,

The captcha box is showing up for me, but if I enter the code in wrong, the comment is still accepted. Do you know what file I might be having a problem with?  ???

I am using version 1.4.8

My gallery is located here: http://largedogbreedz.com/gallery/

Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Captcha (Visual Confirmation) for adding comments
« Reply #281 on: January 31, 2007, 05:09:20 am »

Did you make the change in db_input.php
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 #282 on: January 31, 2007, 06:14:27 am »

If you had made the change in db_input.php then make sure that it was done at right place.
Logged
Chief Geek at Ranium Systems

grafx77

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: Captcha (Visual Confirmation) for adding comments
« Reply #283 on: January 31, 2007, 01:48:27 pm »

I really thought I made the appropriate change within the db_input.php file, but evidentally not.

I made the change and everything works now. Thank you for both your help!

 ;D
Logged

Naglfar

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Captcha (Visual Confirmation) for adding comments
« Reply #284 on: February 02, 2007, 11:57:19 pm »

Thanks so much for the mod Abbas.. The spamming was starting to get pretty bad.


http://www.borkurart.com/gallery/


Logged

nigelt74

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Captcha (Visual Confirmation) for adding comments
« Reply #285 on: February 04, 2007, 06:30:58 am »

Hi Abbas

Firstly the mod works perfectly well I have had it running for a number of months now

the only issue I am having is that sometimes the letters overlap each other is there any way to prevent this?

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 #286 on: February 05, 2007, 07:02:16 am »

Not sure but you can do some trial and error method.

Open captcha.php in editor and find this code

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

The four parameters in above code which can be useful in your case are...

150 - This is the width of captcha image
30 - Height of captcha image
5 - Number of characters to show in image
20 - Number of lines to show on image (these are the background lines which makes the captcha image difficult to read)

You can try either changing the width to a higher value or decreasing the number of characters to show. Do some tests and see which values fits the best to your need.
Logged
Chief Geek at Ranium Systems

nigelt74

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Captcha (Visual Confirmation) for adding comments
« Reply #287 on: February 06, 2007, 06:44:10 am »

Thanks for that Abbas
Logged

angelik

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Captcha (Visual Confirmation) for adding comments
« Reply #288 on: February 08, 2007, 11:37:07 am »

hello,
i wirte in this topic because i have a problem with the confirmation code.
It doesn't appeared in the page.

http://photographie.awcreation.com/displayimage.php?album=lasthits&cat=124&pos=1

i try to download again the captcha files but no change.

If you can help me?

thanks
a+


ps: sorry for my english
Logged

Nibbler

  • Guest
Re: Captcha (Visual Confirmation) for adding comments
« Reply #289 on: February 08, 2007, 02:12:11 pm »

http://photographie.awcreation.com/plugins/captcha/captcha.php gives 'internal server error'. You'd need to ask your host why that is.
Logged

angelik

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Captcha (Visual Confirmation) for adding comments
« Reply #290 on: February 08, 2007, 04:35:59 pm »

http://photographie.awcreation.com/plugins/captcha/captcha.php gives 'internal server error'. You'd need to ask your host why that is.

hello,
yes it's a mistake because the file existe in the folder
http://photographie.awcreation.com/plugins/captcha/

I will try to see what is the problem.

thanks
a+
Logged

broekh002

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Captcha (Visual Confirmation) for adding comments
« Reply #291 on: February 09, 2007, 04:28:48 pm »

Thanks a lot!!!!, where can I find this module?

Rodney

Recently i saw a lot of comment spamming on my personal gallery by bots. I thought why not implement the captcha for adding comments. I know that i can disallow Anonymous user to post comments to stop spamming but many of us don't want to do that since there are always genuine anonymous users who want to post comments.

Thanks to Edward Eliot for PhpCaptcha class which is used by this mod.

What will this mod do?
  • Will show an image with some text while adding comment
  • User will be required to enter the text exactly as shown in image in the text box provided
  • If the text entered by user doesn't matches with text shown on image then comment won't be added

The mod

Files modified
  • db_input.php
  • themes/yourtheme/theme.php
  • lang/english.php

New Files
  • captcha.php
  • include/captcha.class.php
  • fonts

First extract the attached zip file and place captcha.php and fonts directory in your coppermine root directory. Place captcha.class.php in include directory.

Then edit lang/english.php

Add
Code: [Select]
'captcha_error' => 'The confirmation code didn\'t matched',

just after
Code: [Select]
'non_exist_comment' => 'The selected comment does not exist', //cpg1.4

Add
Code: [Select]
'confirm' => 'Confirmation',

just after
Code: [Select]
'report_comment_title' => 'Report this comment to the administrator', //cpg1.4

##############

Edit themes/yourtheme/theme.php

Add
Code: [Select]
'{CONFIRM}' => $lang_display_comments['confirm'],

just after
Code: [Select]
'{COMMENT}' => $lang_display_comments['comment'],

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

just after
Code: [Select]
<!-- END input_box_no_smilies -->
                                </td>
                                <td class="tableb_compact">
                                <input type="hidden" name="event" value="comment" />
                                <input type="hidden" name="pid" value="{PIC_ID}" />
                                <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                </td></tr>

##################

Edit db_input.php

Add

Code: [Select]
        require("include/captcha.class.php");
        if (!PhpCaptcha::Validate($_POST['confirmCode'])) {
          cpg_die(ERROR, "Confirmation code didn't matched", __FILE__, __LINE__);
        }

just after

Code: [Select]
    case 'comment':
        if (!(USER_CAN_POST_COMMENTS)) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);


That's it. Hope this helps some of you out there....


Abbas

P.S: I don't know whether this can be done using a plugin or not. If someone can come out with a plugin then it will be better.
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 #292 on: February 10, 2007, 06:03:37 am »

Thanks a lot!!!!, where can I find this module?

Rodney


Means? The zip file is attached to the first post and all the instructions are also given.
Logged
Chief Geek at Ranium Systems

angelik

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Captcha (Visual Confirmation) for adding comments
« Reply #293 on: February 10, 2007, 09:07:31 am »

hello,
yes it's a mistake because the file existe in the folder
http://photographie.awcreation.com/plugins/captcha/

I will try to see what is the problem.

thanks
a+

hello,
the problem the permission of pluggin's folder .
it was 777, and to run correctly I do 755.

a+
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Captcha (Visual Confirmation) for adding comments
« Reply #294 on: February 15, 2007, 04:50:40 pm »

Would love to try the mod, as I am receive multiple spam comments..  Although I edited the required files, I cannot find any of the entries in my theme.php file..  Can some help on where to place the required code to make it work.  attached is my theme.php file, from the I-feel-dirty theme..

-- Skidpics
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 #295 on: February 16, 2007, 04:11:43 am »

@skidpics and all who have issue applying this mod:

why don't you use the corresponding plugin instead? It's easier to implement for newbies.
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Captcha (Visual Confirmation) for adding comments
« Reply #296 on: February 16, 2007, 04:28:47 am »

Thanks for the quick reply, but what plugin?  I have browsed the thread, but not found a link to any plugin, nor do I see it in the downloads section... 

-- Skidpics
Logged

jalmz

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Captcha (Visual Confirmation) for adding comments
« Reply #297 on: February 16, 2007, 07:19:14 am »

GUYS BE SURE YOU READ THE INTRUCTIONS CAREFULLY.

like this one..

First extract the attached zip file and place captcha.php and fonts directory in your coppermine root directory. Place captcha.class.php in include directory.
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Captcha (Visual Confirmation) for adding comments
« Reply #298 on: February 18, 2007, 04:22:59 pm »

And here is the link to the plugin forum..  Thanks for pointing that out..

http://forum.coppermine-gallery.net/index.php?topic=36319.0
Logged

Mohammad J

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #299 on: February 26, 2007, 06:20:54 am »

thank you Abbas for this great Capatcha!!!

I have been searching the Internet long time to find similar solution. I am going to try it right now and will give you my feedback soon....

well done!
Logged
Pages: 1 ... 11 12 13 14 [15] 16 17 18 19 ... 24   Go Up
 

Page created in 0.032 seconds with 20 queries.