Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 7 8 9 10 [11] 12 13 14 15 ... 24   Go Down

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

0 Members and 1 Guest are viewing this topic.

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Captcha (Visual Confirmation) for adding comments
« Reply #200 on: November 01, 2006, 01:44:18 am »

I dont know why but I just happen to see that my site has a red X instead of the confirmation code.
http://claudebriere.net/coppermine/displayimage.php?album=72&pos=2

It was working well before ???.

Can you help?

Thanks.
Claude
Logged

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Captcha (Visual Confirmation) for adding comments
« Reply #201 on: November 01, 2006, 04:54:44 am »

I dont know why but I just happen to see that my site has a red X instead of the confirmation code.
http://claudebriere.net/coppermine/displayimage.php?album=72&pos=2

It was working well before ???.

Can you help?

Thanks.
Claude

I switched to the plugin version and it is working. But when a wrong code is used it goes to a error page (white page with codes...)
http://claudebriere.net/coppermine/displayimage.php?pos=-1697
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 #202 on: November 01, 2006, 06:01:26 am »

For plugin version, address your issue on the respective thread i.e. the plugin version thread.
Logged
Chief Geek at Ranium Systems

jakejammin

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #203 on: November 01, 2006, 06:59:38 am »

Any suggestions you could make would be wonderful and I have enabled the debug info just in case it is helpful.  www.darktea.co.uk

Thank you


We can not see your phpinfo page.  Make sure the GD Support has FreeType Support listed.  I found out today, just because you see GD Support installed does not mean that GD Support has FreeType installed.

Again it must say FreeType Support enabled.  If it does not ask your host provider if they have FreeType Support enabled on their servers.

Hope that helps ;)
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 #204 on: November 01, 2006, 07:08:30 am »

@niks_007: Try removing the below mentioned code from captcha.php file

Code: [Select]
require("include/init.inc.php");

@Nishant: Did you do what i said?
Logged
Chief Geek at Ranium Systems

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Captcha (Visual Confirmation) for adding comments
« Reply #205 on: November 01, 2006, 08:12:59 am »

@ceesjoore: Your server doesn't have one of the functions ( imageftbbox() )required by this mod. You need to ask your webhost for this. That function is generally present if freetype is enabled.


Abbas,
My hosting provider told me that they don't have that function, so there is no solution for my problem now.
But thanks for helping.
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 #206 on: November 01, 2006, 08:18:29 am »

@ceesjoore: There are other captcha mods too (Mods: Comments). Try one of those.
Logged
Chief Geek at Ranium Systems

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Captcha (Visual Confirmation) for adding comments
« Reply #207 on: November 01, 2006, 03:48:50 pm »

I think there is some confusion in adding this mod for the average user which does not know PHP or how it is coded.

So I'm going to post a clear how to:

I will do this in steps for everyone.

...

Jake

Thanks Jake i will give this a try. Maybe i missed something in editing my files.

Cheers!
Hein
Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Captcha (Visual Confirmation) for adding comments
« Reply #208 on: November 01, 2006, 03:52:20 pm »

Hi...
       I am extreemly Thankfull to Mr. Abbas Ali and others who have helped me
       Yes It has started Working... realy thanks alot to all.

Thanks
Nishant
www.lakesparadise.com
Logged

mrdummy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #209 on: November 01, 2006, 07:10:16 pm »

It works, but i have edited in themes.inc.php

After reading this topic, i checked sample theme.php version and there is indeed same code.
The problem that i use igames theme. The theme.php has no function and template input code inside.

I must copy both codes from /sample/theme.php.
First part is template part, found at row 813-867.
copy to theme/theme.php, then add the code what is written in the first topic post.
Code: [Select]
<!-- begin captcha mod -->
<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>
<!-- end captcha mod -->
behind code
Code: [Select]
<!-- END input_box_no_smilies -->
    <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>
The <!-- xxx --> are just for marking new mods.

Second part, function part, is found at row 2248-2356. Copy whole part to your theme/theme.php, below the code.
Add after
Code: [Select]
'{COMMENT}' => $lang_display_comments['comment'],the code
Code: [Select]
'{CONFIRM}' => $lang_display_comments['confirm'],
You may place both parts below own theme/theme.php without troubles.

The code for db_input.php is found by row 113: case 'comment':
The code for language file is found:
- by 'non_exist_comment' around row 101 (remove the comma because it's last string in array!)
(there are TWO 'non_exist_comment' codes, at row 90 and 101...... :( Forgot to remove it?)
- by 'report_comment_title' around row 1033 or 1034 after adding code, remove also comma.
You may copy same code in another language files and translate it in your language.

I use Dreamweaver to edit the php files without troubles. Even for Dutch language file.
Alle files are from version 1.4.10, but igames theme is perhaps added.
Actually, if you're good with php, you can also copy code from theme.inc.php because it's same code, but don't copy function_exist part, but only between {} in if function_exists code.
Logged

mrdummy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Captcha (Visual Confirmation) for adding comments
« Reply #210 on: November 01, 2006, 09:24:51 pm »

There is more.
http://forum.coppermine-gallery.net/index.php?topic=29564.msg168167#msg168167 has good code to switch captcha off when user is logged in. Thanks.

But the template part is too much long (for just small difference). I have much shorter code for template part:
Code: [Select]
// HTML template for the form to add comments
$template_add_your_comment = <<<EOT
        <form method="post" name="post" action="db_input.php">
                <table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">
                        <tr>
                                        <td width="100%" class="tableh2_compact"><b>{ADD_YOUR_COMMENT}</b></td>
                        </tr>
                        <tr>
                <td colspan="1">
                        <table width="100%" cellpadding="0" cellspacing="0">

<!-- BEGIN user_name_input -->
                                                        <tr>
                                                                <td class="tableb_compact">
                                        {NAME}
                                </td>
                                <td class="tableb_compact">
                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />
                                </td>
<!-- END user_name_input -->
<!-- BEGIN input_box_smilies -->
                                <td class="tableb_compact">
                                {COMMENT}
                                                                </td>
                                <td width="100%" class="tableb_compact">
                                <input type="text" class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />
                                                                </td>
<!-- END input_box_smilies -->
<!-- BEGIN input_box_no_smilies -->
                                <td class="tableb_compact">
                                {COMMENT}
                                                                </td>
                                <td width="100%" class="tableb_compact">
                                <input type="text" class="textinput" id="message" name="msg_body"  maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />
                                </td>
<!-- END input_box_no_smilies -->
                                <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>
EOT;
if (!USER_ID) {
$template_add_your_comment .= <<<EOT
<!-- begin captcha mod -->
<tr>
<td class="tableb_compact" colspan="2"></td>
  <td class="tableb_compact">
    {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>
<!-- end captcha mod -->
EOT;
}
$template_add_your_comment .= <<<EOT
                        </table>
                </td>
        </tr>
<!-- BEGIN smilies -->
        <tr>
                <td width="100%" class="tableb_compact">
                        {SMILIES}
                </td>
        </tr>
<!-- END smilies -->
                </table>
        </form>
EOT;

Look at the part
Code: [Select]
if (!USER_ID) {
$template_add_your_comment .= <<<EOT
<!-- begin captcha mod -->
<tr>
<td class="tableb_compact" colspan="2"></td>
  <td class="tableb_compact">
    {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>
<!-- end captcha mod -->
EOT;
}
and the trick with .= behind the string $template_add_your_comment does the work. This is much shorter and lesser same code repeats.
Logged

jakejammin

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Captcha (Visual Confirmation) for adding comments
« Reply #211 on: November 02, 2006, 04:49:18 pm »

There is more.
http://forum.coppermine-gallery.net/index.php?topic=29564.msg168167#msg168167 has good code to switch captcha off when user is logged in. Thanks.

Why would you want to do that??? The phpBB forum found out that spam bots can now, not only Register but login and post spam all in one quick swoop..... The spam bots I'm sure can do that to coppermine as well.....
I would assume....
Logged

darktea

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Captcha (Visual Confirmation) for adding comments
« Reply #212 on: November 02, 2006, 06:04:48 pm »

Thanks Nibbler for you quick and accurate response.  I feel quite embarrassed about, but because it is the first time I have changed the code I had assumed that was the problem and I guess I ignore the obvious.  It is all working perfectly now.
Logged

Quinttindew

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Captcha (Visual Confirmation) for adding comments
« Reply #213 on: November 06, 2006, 10:46:58 am »

Fatal error: main() [function.require]: Failed opening required 'include/turing.class.php' (include_path='.:/usr/local/lib/php') in /home/admin/domains/movishon.com/public_html/platinum/album/include/init.inc.php on line 195

Hi
I get this Error by init.inc.php  , what can i do

faith fully

Q
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 #214 on: November 06, 2006, 12:58:14 pm »

This mod does not uses any file named turing.class.php Perhaps you posted on the wrong thread.
Logged
Chief Geek at Ranium Systems

Sosha

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Captcha (Visual Confirmation) for adding comments
« Reply #215 on: November 19, 2006, 07:37:55 pm »

Hi, i successfully installed this mod to my gallery a few weeks back, but all of a sudden it has stopped working and doesn't show (or red x's) the captcha image. Ive just double checked all my files to make sure there's nothing missing or has been reset to default and i cant find anything wrong.
However my site is hosted with hosting-unlimited who are notorious on these boards it seems

the gallery is at http://www.tarannau.com/footballers/gallery/

any help appreciated
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Captcha (Visual Confirmation) for adding comments
« Reply #216 on: November 19, 2006, 08:59:46 pm »

Hi, i successfully installed this mod to my gallery a few weeks back, but all of a sudden it has stopped working and doesn't show (or red x's) the captcha image. Ive just double checked all my files to make sure there's nothing missing or has been reset to default and i cant find anything wrong.
However my site is hosted with hosting-unlimited who are notorious on these boards it seems

the gallery is at http://www.tarannau.com/footballers/gallery/

any help appreciated

You might want to try this plugin http://forum.coppermine-gallery.net/index.php?topic=36319.0. It's based on this mod and does not involved editing files yourself.

Cheers!
Hein
Logged

Sosha

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Captcha (Visual Confirmation) for adding comments
« Reply #217 on: November 20, 2006, 08:48:58 pm »

Ok well I installed the plugin and it seemed to work but just like with the mod the captcha image red x'd out

Is there some sort of server mis-configuration that I can bitch to my hosts about?
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Captcha (Visual Confirmation) for adding comments
« Reply #218 on: November 20, 2006, 09:52:19 pm »

Ok well I installed the plugin and it seemed to work but just like with the mod the captcha image red x'd out

Is there some sort of server mis-configuration that I can bitch to my hosts about?

Search the whole thread of that plugin i mentioned. In there is the solution to your problem iirc.

Cheers!
Hein
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 #219 on: November 21, 2006, 06:10:46 am »

And for support on that plugin, please post your issue on that thread.
Logged
Chief Geek at Ranium Systems
Pages: 1 ... 7 8 9 10 [11] 12 13 14 15 ... 24   Go Up
 

Page created in 0.026 seconds with 20 queries.