Sign in:
Username:
Password:  
»Forgot your password?

Home | Forum | How to Protect Your Web Form | How to Protect Your Email | Sign Up

Insure yourself from spam! The Anti Spam Insurance Company - ProtectWebForm!

Forum - Wordpress Installation

PostMessage
paburmester
2006-08-25 23:15:09
How can I install this protection on my Wordpress Blog? I upload the
file in my plugin directory and activated but this not work. I think I
have to config comment.php but I dont know how?
Can somebody help me?
Regards,
oleg
2006-08-26 05:51:07
If you have enabled smartcaptcha, you may not see the protection
image, but the protection may work fine.
Could you send me the url of your blog.
paburmester
2006-08-27 22:32:54
what is smartcapcha?
oleg
2006-08-28 00:01:59
Smart captcha is described here:
http://www.protectwebform.com/smartcaptcha

In your admin area, below the protection images, which you have
generated, there are links:
"enable/disable smart captcha", which allow you to switch on/off the
smart captcha.
paburmester
2006-08-28 06:22:46
Ok, thanks. Yes Smart captcha is already enabled.
This is my Wordpress blog: http://blog.feydevocion.com As you can see
its all new, because I want to add all the plugins and then start to
post.
Can you please help me?
Regards,
oleg
2006-08-28 06:31:48
I do not see protectwebform plugin to be enabled.
You need to enable it per plugin admin area.

If you do not succeed, you may give me (send to webmaster [a t]
protectwebform.com) your admin login/password, and I will do
everything myself.
paburmester
2006-08-28 06:45:06
Sorry, now its enabled.
Thanks
paburmester
2006-08-30 07:57:10
Please, somebody help me.
paburmester
2006-08-30 23:36:10
Finally it works, but only in my wordpress default theme :( Hey oleg,
how can I do for this fabulous protection works in my other theme?
Please help me

Regards
oleg
2006-08-31 02:29:53
Could you write me your wordpress version and theme name, please. I'll
try to investigate this issue.
paburmester
2006-08-31 07:56:34
Hi, I use Wordpress 2.0.3 and my theme is Rin.
Thank you very much!
oleg
2006-08-31 13:33:17
I looked through the code of the Rin 1.1 theme and fond out that this
theme is not calling standard wordpress function "do_action"
e.g.:
<?php do_action('comment_form', $post->ID); ?>

this means that no plugins which must be called while comment form
rendering are enabled and will be called.
So the protectwebform captcha plugin will not work too.
paburmester
2006-08-31 13:54:54
Hi, thanks oleg for your help. Its there a way to use it using this
template? I really hope so..
Regards,
oleg
2006-08-31 14:05:53
Yes,
I can try to integrate it with the theme code. I need a day or so to
do this. I will answer you then.
paburmester
2006-08-31 14:09:11
Thank you men! You are my hero! :D

Regards
paburmester
2006-09-01 20:36:14
Thanks for your help Oleg, now all works fine.
I recomend this function to all my contacts, thanks again.
Regards
maguila
2006-09-26 16:25:59
www.maguila.com.ar WP 2.0, the plugin don't works, thanks for help.
oleg
2006-09-27 07:22:52
what theme are you using?
maguila
2006-09-27 15:31:56
My theme is "Firefox V2"
oleg
2006-09-28 03:35:58
Work of protection often depends on theme. Theme writers are not going
to follow any standards.

I've downloaded Firefox V2 2.1 installed (fixed 2 bugs :) ) and the
theme worked but captcha not.

then I opened theme/Fire.../comment.php file
found lines:
--------------------------------------------
<p id ="ff_replyAddons">
<?php do_action('comment_form', $post->ID); echo "\n"; ?>
</p>
--------------------------------------------
and placed them right after:
--------------------------------------------
<p>
<textarea id="comment" name="comment" cols="10" rows="10"
tabindex="4"></textarea>
</p>
--------------------------------------------

Thats it. Protection was installed for me and works OK.
vinod.negi
2006-09-28 03:36:20
I have downloaded captcha plugin for wordpress. I installed it on my
site and activated the same. But it doesn't appear on my form when i
am submitting a content
oleg
2006-09-28 05:24:00
Installation depends on the theme you are using, cause theme
developers do not follow any standards, as I wrote before.

The protectwebformcaptcha plugin depends on the html produced by theme
plugins. In some cases you need to update theme a little bit to
install the plugin successfully.

You could simply write down the name of the theme you are using, and I
will try to help you.
vinod.negi
2006-09-28 23:13:24
Thanks oleg for reply. I have generated using the customized setting.
Here is the PHP code i got.

<?php
/*
Plugin Name: Captcha From ProtectWebForm
Plugin URI: http://www.protectwebform.com/plugin_wordpress
Description: This plugin protects WP comment form with captcha from
protectwebform.com, which is implemented as smart captcha (read:
http://www.protectwebform.com/smartcaptcha/) and has audio support and
reload image link.
Author: Oleg from ProtectWebFrom
Author URI: http://www.protectwebform.com
Version: 1.0.1
*/

/* Copyright 2006 www.protectwebform.com
**
** This program is free for use software.
** All rights reserved with protectwebform.com
**
*/

//////////////////////////////////////
// Edit these two options:
// !!! Go to the http://www.protectwebform.com
// !!! sign up and get this two values
$protectwebform_id = "1330";
$protectwebform_passphrase = "ys0mxcg8vt96";
//
/////////////////////////////////////

function protectwebform_quote ($mixVar) {
return "'".(get_magic_quotes_gpc() ? $mixVar:
addslashes($mixVar))."'";
}

function protectwebform_referer() {
global $post;

// merging get parameters:
$params = "";
while(list ($key, $val) = each ($_GET)) {
if(!($key == 'p' || $key == 'page_id')) {
$params = "{$params}&amp;{$key}={$val}";
}
}

// building referer
$referer = get_settings('home').'/'.get_settings('blogfilename').
'?__page____params__#protectwebform_field';

$page = (($post->post_status == "static") ? "page_id" :
"p")."={$post->ID}";

return str_replace('__params__', $params, str_replace('__page__',
$page, $referer));
}

function protectwebform_display_captcha() {
global $user_ID, $protectwebform_id, $protectwebform_passphrase;

// not showing to the registered user
if ($user_ID)
return $post_ID;

// showing to the non-registered user
if (!$user_ID) {
echo "<script type=\"text/javascript\">";
echo "var protectwebform_id = \"".$protectwebform_id."\";\n";
echo "var protectwebform_passphrase =
\"{$protectwebform_passphrase}\";\n";
echo "var protectwebform_referer =
\"".protectwebform_referer()."\";\n";
if($_POST['protectwebform_wrong_code']) {
echo "var protectwebform_wrong_code = true;\n";
} else {
echo "var protectwebform_wrong_code = false;\n";
}

echo "</script>";
echo "<a href=\"http://www.protectwebform.com/\" title=\"Protected
with protectwebform.com!\"><img
src=\"http://www.protectwebform.com/images/ssl_lock.gif\"
border=\"0\"></a>";
?>
<a name="protectwebform_field"></a>

<script type="text/javascript">
// searching for the right form
var pwf_inserted = false;
for (var e = 0; e < document.forms.length; e++)
for (var i = 0; i < document.forms[e].elements.length; i++) {
if (document.forms[e].elements[i].name == 'comment' &&
document.forms[e].elements[i].type == 'textarea') {
// inserting our protection html
var txtAreParent = document.forms[e].elements[i].parentNode;
var txtAreNext = document.forms[e].elements[i].nextSibling;
var div = document.createElement('div');
div.innerHTML =
"<input type=\"hidden\" name=\"protectwebform_referer\"
value=\"" + protectwebform_referer + "\">"
+ "<span id=\"protectwebform_text_block\">Enter the code shown
in the image:</span>"
+ "<br>"
+ "<span NOWRAP id=\"protectwebform_image_block\" ><img
id=\"protectwebform_image\"
src=\"http://www.protectwebform.com/image/" + protectwebform_id +
"/\"></span><span style=\"visibility:hidden;\" NOWRAP
id=\"protectwebform_reload_block\">&nbsp; &nbsp;<a
id=\"protectwebform_link_reload\" href=\"\" title=\"Click here to
reload the image.\" onclick=\"return
protectwebform_reload_image();\"><img
src=\"http://www.protectwebform.com/images/reload.gif\"
border=0></a></span><span style=\"visibility:hidden;\" NOWRAP
id=\"protectwebform_audio_block\">&nbsp;&nbsp;<a
id=\"protectwebform_link_audio\" target=\"_blank\"
href=\"http://www.protectwebform.com/audio/\" title=\"Listen to the
code.\"><img border=0
src=\"http://www.protectwebform.com/images/play.gif\"></a>"
+ "<span NOWRAP id=\"protectwebform_textbox_block\"><br><input
id=\"protectwebform_textbox\" type=\"text\"
style=\"vertical-align:top;\" name=\"protectwebformcode\"
value=\"\"></span>";
if(protectwebform_wrong_code) {
div.innerHTML = "<font color=\"red\">Worng protection code
passed. Try again, please. <br /></font>" + div.innerHTML
}

txtAreParent.insertBefore(div, txtAreNext);
pwf_inserted = true;
break;
}
}
if(!pwf_inserted) {
document.write("ProtectWebForm Captcha Warning: Can't find the
comment form text area or submit button, omitting protection!");
}
</script>
<?
echo "<script language=\"JavaScript\"
src=\"http://www.protectwebform.com/javascript/{$protectwebform_id}/\"></script>";
}
// wrong code passed
if($_POST['protectwebform_wrong_code']) {
echo "<script type=\"text/javascript\">";

if (isset($_POST['comment_back'])) {
echo "if(document.forms[i].comment != null)";
echo "\t\tdocument.forms[i].comment.value =
".protectwebform_quote($_POST['comment_back']).";\n";
}
if (isset($_POST['author_back'])) {
echo "if(document.forms[i].author != null)";
echo "\t\tdocument.forms[i].author.value =
".protectwebform_quote($_POST['author_back']).";\n";
}
if (isset($_POST['url_back'])) {
echo "if(document.forms[i].url != null)";
echo "\t\tdocument.forms[i].url.value =
".protectwebform_quote($_POST['url_back']).";\n";
}
if (isset($_POST['email_back'])) {
echo "if(document.forms[i].email != null)";
echo "\t\tdocument.forms[i].email.value =
".protectwebform_quote($_POST['email_back']).";\n";
}
echo "</script>";
}
}

function protectwebform_verify_code($comment_id) {
global $user_ID, $comment_type;
global $protectwebform_id, $protectwebform_passphrase;

// user is logged in
if ($user_ID) {
return $comment_id;
}


$protectwebformresult = @file_get_contents(
"http://protectwebform.com/verify/".$protectwebform_id."_".$protectwebform_passphrase."_"
. $_SERVER['REMOTE_ADDR'] . "/" .
$_POST['protectwebformcode']."/");
if(preg_match("|<authorization status=\"0\"|",
$protectwebformresult)) {
die("Warning. You are not authorithed to use image protection
provided by http://www.protectwebform.com. Read
http://www.protectwebform.com FAQ for more information!");
} elseif(!preg_match("|<verification result=\"no\"/>|",
$protectwebformresult)) {
return $comment_id;
}

// removing comment
wp_set_comment_status($comment_id, 'delete');

?>
<html><head><title>Wrong Protection Code Passed!</title></head>
<body>
<h1>Wrong Protection Code Passed!</h1>
<p>If you are not redirected automatically, hit button back (in
your browser) and input the correct image code.</p>
<form name="data" method="post" action="<? echo
$_POST['protectwebform_referer']; ?>">
<input type="hidden" name="comment_back" value="<? echo
$_POST['comment']; ?>" />
<input type="hidden" name="author_back" value="<? echo
$_POST['author']; ?>" />
<input type="hidden" name="email_back" value="<? echo
$_POST['email']; ?>" />
<input type="hidden" name="url_back" value="<? echo
$_POST['url']; ?>" />
<input type="hidden" name="protectwebform_wrong_code" value="1"
/>
<noscript><input type="submit" name="" Value="Click here to try
again!"></noscript>
</form>
<script
type="text/javascript">document.forms[0].submit();</script>
</body>
</html>
<?
exit();
}

add_action('comment_post', "protectwebform_verify_code");
add_action('comment_form', "protectwebform_display_captcha", 9999);
?>
minipark
2006-11-01 12:24:55
Hey Oleg, how can I implement CAPTCHA in my own theme? Is there a
simple call to a function, that I just have to add at the right place?
mtannoyances
2006-11-04 10:59:37
Hi Oleg,
How can I get your wonderful WordPress plugin to work with Ryan Duff's
WP-ContactForm plugin?

http://ryanduff.net/projects/wp-contactform/

Your plugin is stopping my comment spam, but I'm getting hammered with
feedback form spam!

Thanks,
Tim
sgrayban
2006-11-19 09:50:40
mtannoyances,

Read the section in the install page.....

Installing on all html pages. "Easy Installation" (Gateway Page).

Doesn't require modification of your code files. Change only one line
on your html page.






Post Reply:

You must be logged in to reply.
Post message
Name: 
Email: 
Url: 




Registered users: 86622

Forms protected: 48551

Further Reading & Anti Spam Resources:

Directory


    ©Copyright 2006 ProtectWebForm.com. All rights reserved. Read our Privacy Policy

Page copy protected against web site content infringement by Copyscape