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] 2 3   Go Down

Author Topic: Most Simple Comment Spam protection for 1.4.x  (Read 67196 times)

0 Members and 1 Guest are viewing this topic.

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Most Simple Comment Spam protection for 1.4.x
« on: September 14, 2006, 06:24:21 pm »

Please read this before you look at rest of the thread

For the First Time readers especially. This Mod/hack has reached a version 1.0 (release date Nov. 11 , 2006). I am attaching the Zipped Folder with this Starting Post. It has all the Instructions, files required and explanations in it. This will save you lots of time and you do not have to read the discussion till the date 10th July, 2007. For discussion/issues post in the thread

The Contents of Zipped Folder are
It contains
1-- Most Simple Comment Spam protection for 1.doc   (MS WORD version Manual)
2-- Most Simple Comment Spam protection.pdf (pdf version Manual)
3-- done.php file
4-- capimage.jpg  File
5-- db_input2.php File ( its is a copy of original db_input.php file. It is renamed to db_input2.php and 3 extra code lines have been added to it)
5-- db_input.php File ( it is the original db_input.php file + 3 extra code lines have been added to it)


Features:

•   This is a CAPTCHA Alternative which is independent of your hosting server setting.
•   It is very simple and only 3 lines are added to the db_input.php file.No other core file is modified.
•   If you want to disable this Hack, simply remove those 3 Lines added to db_input2.php.
•   Other functions of coppermine gallery are not affected.
•   No server side font Support is required.
•   You can create your own image with code written on it and use with this Mod.
•   No server side dynamic image generation support is required.
•   It takes hardly 5-10 minutes to make this work properly.
•   It easy to add and easy to remove and works 100% on any server.
•   Special Thanks to all people who gave the feedback on the mod thread.

Read the instruction in doc Or PDF..and apply the Mod properly. Incase you need help post in this thread


« Last Edit: July 11, 2007, 07:17:27 am by pinpoint222 »
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Moderators - correct this code in the Locked hack plz
« Reply #1 on: September 14, 2006, 07:26:40 pm »

Read the FIRST POST. Version 1.0 has been released .( dated Nov. 11 , 2006)

You do not need filesneeded02.zip now,so do not download filesneeded02.zip.

 
« Last Edit: November 11, 2006, 03:44:23 pm by pinpoint222 »
Logged

tomeq11

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
    • www.enjoy.lajcik.net
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #2 on: October 25, 2006, 11:48:51 pm »

Hello pinpoint222

Really good idea, it works good... but....

...I have one problem - this protection also works when I add a new album and I want to write a description of this album (in album properties visible only in admin mode) and there's no field to write this code. Please help
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #3 on: October 26, 2006, 09:17:59 am »

HI
thank you for contacting..

This HACK/MOD is for comment system. You want to apply this hack for New albums etc.  Applying it for other new albums etc will require new Thread. I am replying to your answer here.

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



Please discuss one topic per thread.
Logged

newkai

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #4 on: October 30, 2006, 12:00:38 am »

Note: This does apply to this hack, as installation of this hack affects the ability to edit album's properties. In other words, this is a bug report!

What tomeq11 asked, and I'm having the same problem...

Your hack messes up the ability to change album info! When I try to change my album properties, I get the comments error page!

When I edit an album's properties and click "Update Album", I get "Comments Could not be added. Redirecting. Please wait..."

So what we're asking is if you could modify your hack so it doesn't get rid of our ability to edit our albums!  :)

Your hack works great to prevent spam though!

Thanks,

Kai
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #5 on: October 30, 2006, 08:54:15 am »

This step was dropped. Read the First Post of the Thread. All files and explanations written in that post now
« Last Edit: November 11, 2006, 03:45:54 pm by pinpoint222 »
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #6 on: October 30, 2006, 10:28:50 am »

Oh Please do Not apply the changes i mentioned in my last post

I have made a working tested solution . IT IS CORE HACK FREE Solution. NO More messing with db_input.php file at All.

Here is what you have to do..

1-- Simply make a copy of db_input.php file and name it as db_input2.php. Keep both files in the same folder.

2- Open db_input.php and remove these 3 lines u added before.

Quote
if ($_POST['thenum'] != '6B38'){
header('Location: done.php');
die();
}


Now db_input.php is back to its original form.

3- Now IN the theme.php file find this line
Quote
<form method="post" name="post" action="db_input.php">

and now it to

Quote
<form method="post" name="post" action="db_input2.php">


Thats it.i have tested it..so it is Working and Now my hack does not involve db_input.php file at all. All the changes will be done in db_input2.php file. SO CORE FILES are NOT CHANGED at all.

The file db_input2.php which we created will be used Only to add comments.

So here is the Summary of this MOD Now for everyone

1-- Change Theme.php as described in the start of this thread
2-- Make a copy of original db_input.php file and name it db_input2.php
3-- Add the 3 LINES to db_input2.php file.
4-- Keep both db_input.php and db_input.php in the same folder
5-- Upload the image and done.php as described at the start of the thread.
6- All check .tested and go.
7-- The end


I think there should be no problem now. if it works or it it doesnt post please

Thanks



Logged

newkai

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #7 on: October 31, 2006, 06:29:08 pm »

Hmmm, it is now allowing me to post comments no matter what code I put in!

I can edit my photo albums again though!
Logged

newkai

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #8 on: October 31, 2006, 06:30:48 pm »

Oh, maybe it has to do with the fact that I had already added the greendummy line... duh! I'll check that out and report back!
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #9 on: October 31, 2006, 06:36:16 pm »

yes.. all the steps in the dummygreen post are no longer needed now.
Logged

newkai

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #10 on: October 31, 2006, 06:37:36 pm »

OK, all set! Thanks!
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #11 on: November 05, 2006, 12:41:05 pm »

I use your spam protection and it looks good.
There is only one thing, why do i have now 2 white squares up and below the "OK" button ?

Thanks
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #12 on: November 05, 2006, 12:44:24 pm »

I use your spam protection and it looks good.
There is only one thing, why do i have now 2 white squares up and below the "OK" button ?

Thanks


Sorry here is the link http://www.ceesjoore.nl/coppermine/displayimage.php?album=lastup&cat=-32&pos=0
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #13 on: November 05, 2006, 12:54:01 pm »

Quote
I use your spam protection and it looks good.
There is only one thing, why do i have now 2 white squares up and below the "OK" button ?

Thanks

Sorry here is the link http://www.ceesjoore.nl/coppermine/displayimage.php?album=lastup&cat=-32&pos=0



Re:

Thats related to template... try this fix

find these lines

Quote
<td align="left">
                                <input type="hidden" name="event" value="comment" />
                                <input type="hidden" name="pid" value="194" />
                                <input type="submit" class="comment_button" name="submit" value="OK" />
                                </td>


and replace them with this


Quote
<td class="tableb_compact" align="left">
                                <input type="hidden" name="event" value="comment" />
                                <input type="hidden" name="pid" value="194" />
                                <input type="submit" class="comment_button" name="submit" value="OK" />
                                </td>



it should work ..let me know..thanks
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #14 on: November 05, 2006, 02:54:09 pm »

Ok that worked fine.
Is there also a way to change the size of the fonts, because they are bigger now and not on one line ?

Thanks
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #15 on: November 05, 2006, 03:45:59 pm »

..Yes ofcos.

font size color etc are controlled by "Class" (CSS) files... in this hack i used "class=tableb_compact"..u can replace it whatever class u like...

 For ur website..

find this
Quote
<td class="tableb_compact" align="left">

and change it to

Quote
<td class="tableh2_compact" align="left">

 it will fix the size n color.hope it helps.
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #16 on: November 05, 2006, 05:52:24 pm »

..Yes ofcos.

font size color etc are controlled by "Class" (CSS) files... in this hack i used "class=tableb_compact"..u can replace it whatever class u like...

 For ur website..

find this
and change it to

 it will fix the size n color.hope it helps.

The fonts stay the same size with this fix, they change when i change the font size in the menu bar from explorer bij view.
All the other fonts stay the same size only the one added with the captcha hack are react on the exporer option. :-\
example   http://www.ceesjoore.nl/coppermine/displayimage.php?album=32&pos=1
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #17 on: November 05, 2006, 06:10:32 pm »

The fonts stay the same size with this fix, they change when i change the font size in the menu bar from explorer bij view.
All the other fonts stay the same size only the one added with the captcha hack are react on the exporer option. :-\
example   http://www.ceesjoore.nl/coppermine/displayimage.php?album=32&pos=1

I have removed the text behind the box and now it looks good.

Thanks for helping
Logged

pinpoint222

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 77
    • The Rawalpindi Website
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #18 on: November 05, 2006, 06:18:32 pm »

No. To make font size permanent and not changing u need simply open theme.php find this

Quote
<!-- BEGIN CAPTCHA Image -->
 <tr>
                <td colspan="1">
                        <table width="100%" cellpadding="0" cellspacing="0">

        <tr bgcolor="#FFFFFF">
          <td class="tableb_compact" align="right"><font size="2" face="Verdana, Arial, Helvetica,

sans-serif"><b>Enter this  Code <img src="http://www.yoursite.com/CPG/Themes/classic/images/capimage.jpg"> in the

Box</b></font></td>
          <td class="tableb_compact" align="left">         
                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <input name="thenum" type="text" id="checkit" > Type Four Letter Code
           </font></td>

                                <td align="left">
                                <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>

</table>
               </td>
        </tr>

<!-- END CAPTCHA Image -->



Then remove this line ( it comes twice)

Quote
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">

And now ur font size wont change even if u use explorer.
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Most Simple Comment Spam protection for 1.4.x
« Reply #19 on: November 05, 2006, 06:33:50 pm »

@pinpoint222 

Ok now it looks good all text in one line now  :D

Thanks for helping me out.
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.032 seconds with 20 queries.