• [MOD] Anti-Spam v1.0 for Guestbook & Comments 5 0 5 1
Currently:  

Author Topic: [MOD] Anti-Spam v1.0 for Guestbook & Comments  (Read 183069 times)

0 Members and 1 Guest are viewing this topic.

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #15 on: April 04, 2006, 07:25:20 PM »
this is my comment_form.html below

i have "<noscript>"
and "</noscript>" deleted otherwise a saw nothing about the securety code  :oops: i hope it's not bad  :D

Code: [Select]
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td valign="top" class="head1">
      <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <tr>
          <td valign="top" class="head1">{lang_post_comment}</td>
        </tr>
        <tr>
          <td valign="top" class="row1">
            <form name="commentform" action="{self}" method="post" onsubmit="postbutton.disabled=true;">
              <table cellpadding="4" cellspacing="0" border="0">
                <tr>
                  <td width="90"><b>{lang_name}</b></td>
                  <td>
                    <input type="text" name="user_name" size="30" value="{user_name}" class="commentinput" />
                  </td>
                </tr>
                <tr>
                  <td width="90"><b>{lang_headline}</b></td>
                  <td>
                    <input type="text" name="comment_headline" size="30" value="{comment_headline}" class="commentinput" />
                  </td>
                </tr>
                <tr>
                  <td width="140" valign="top"><b>{lang_comment}</b></td>
                  <td>
                    <textarea name="comment_text" cols="35" rows="10" class="commenttextarea">{comment_text}</textarea>
                  </td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>{bbcode}</td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>
                       <table>
                         <tr>
                           <td>{secure_image} </td>
                           <td><input type="text" name="prevent_code" value="" size="5" /> </td>
                         </tr>
                         <tr><td colspan="2"><b>{lang_enter_secure_code}</b></td>
                         </tr>
                        </table>
                  <script type="text/javascript">
                  function spamcode () {
                       var spamy = {prevent_code};
                       window.document.commentform.prevent_code.value = spamy;
                  }
                  document.write('<input type="hidden" name="prevent_code" value="0" \/>');
                  </script>
                    </td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>
                    <input type="hidden" name="action" value="postcomment" />
                    <input type="hidden" name="id" value="{image_id}" />
                    <input type="submit" name="postbutton" value="{lang_post_comment}" class="button" onclick="spamcode()" />
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>



Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #16 on: April 04, 2006, 07:29:59 PM »
Youīre kidding me!

You donīt have to delete these tags :o

They are necessary!

This MOD is created so that users with javascript donīt have to enter the security-code!
Thatīs the trick!

Okay, I have tested your details.php - thereīs no mistake - it works fine :wink:

Project offline

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #17 on: April 04, 2006, 07:49:13 PM »
Thanks Flo2005

I have make the changes with the "<noscript>" and the "</noscript>"  :D
i can post without enter the code and i will wait for spam attacks  :evil:

many thanks for the fast replays  :lol:



Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #18 on: April 04, 2006, 07:55:32 PM »
Now you can do a test!

Deactivate javascript on your Browser and now you should see the secure-code otherwise the secure-code is not printed on the screen and will process by javascript!

Good luck :wink:

Project offline

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #19 on: April 04, 2006, 08:09:05 PM »
it works perfect  :D
thanks for your patient Flo2005.  :lol:
It's all my fould, but it's a tricky mod  :P



Offline havanna

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #20 on: April 07, 2006, 01:33:00 PM »
Hallo zusammen

Irgendwie finde ich in meiner Guestbook.php nicht diese Stelle

$comment_mail = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_mail']));

Hat jemand eine Idee warum diese nicht vorhanden ist?

Dirk

Offline caminator

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #21 on: April 08, 2006, 04:40:00 PM »
Can someone help me please.

When I am trying to change the code I cannot find these lines in details.php.

Quote
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_text']))) : "";

    $site_template->register_vars(array(
      "bbcode" => $bbcode,

The only thing close to this that I find is on line 447:

Quote
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_text'])), 2) : "";

Is this the correct lines to replace?  They are very similar, but not exact, but I'm assuming it is anyway.  Thanks!

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #22 on: April 08, 2006, 07:12:30 PM »
i guess, you are using 1.72?

then it should be the correct place.

Code: [Select]
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_text'])), 2) : "";
    $site_template->register_vars(array(
      "bbcode" => $bbcode,

this is what you should search for then
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline caminator

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #23 on: April 08, 2006, 08:36:33 PM »
Yes, 1.72, and thank you!!  I'll let you know how it goes for me when I get a chance to do it later.

Offline caminator

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #24 on: April 10, 2006, 04:21:13 PM »
I am having all sorts of problems getting this to work.  I am using 1.7.2.  Does this change things?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #25 on: April 10, 2006, 07:54:48 PM »
i will test it in the next days with 1.72,
but i think that no big modifiactions are needed to make this work.
Only some phrases could be different where to put the modified code,
but i will post it then.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline caminator

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #26 on: April 10, 2006, 09:50:53 PM »
Thank you!  These bots are killing me, so I really needa get something working so they can't post.  I hate to make registered users only, because a lot of my family memebers don't have computer knowledge enough to create and remember their info.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #27 on: April 11, 2006, 09:05:08 PM »
i looked at the code and only in step 4 is only one thing different between 1.71 and 1.72.
I modified my first post.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Nelske

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #28 on: April 13, 2006, 12:14:47 PM »
I only did the Guestbook part of the mod, but for some reason i don't get to see the "security code" to enter before posting. I see the field in wich you enter the code.
I've done everything up to the details.php point (thinking that's only for comments?!) and extracted the images in /templates/my template/images/.

what am i doing wrong?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Anti-Spam v1.0 for Guestbook & Comments
« Reply #29 on: April 13, 2006, 12:27:17 PM »
the field to enter the security code ONLY appears if javascript has been disabled in the browser,
thats the trick of this mod.
otherwise the security field will be field out automaticlly.

P.S.: You can test it, if you disable js in your browser.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump