Index: extensions/captcha/contactform.inc.php
===================================================================
--- extensions/captcha/contactform.inc.php	(revision 8888)
+++ extensions/captcha/contactform.inc.php	(revision 8888)
@@ -0,0 +1,58 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+include(CAPTCHA_PATH.'recaptchalib.php');
+add_event_handler('display_contactform', 'add_captcha');
+add_event_handler('check_contactform_params', 'check_captcha');
+
+function add_captcha()
+{
+  global $template, $conf;
+
+  if (!is_a_guest()) return;
+
+  $template->set_prefilter('cf_form', 'captcha_prefilter');
+  $template->set_filename('captcha', realpath(CAPTCHA_PATH.'captcha.tpl'));
+  $template->assign(array(
+    'CAPTCHA_HTML'  => recaptcha_get_html($conf['captcha_publickey'], get_plugin_data('captcha')),
+    'CAPTCHA_THEME' => $conf['captcha_theme'],
+    )
+  );
+  $template->assign_var_from_handle('CAPTCHA', 'captcha');
+}
+
+function captcha_prefilter($content, $smarty)
+{
+  $search = '
+      <tr>
+        <td class="contact-form-left">&nbsp;</td>
+        <td class="contact-form-right"><input class="submit" type="submit" value="{\'cf_submit\'|@translate}"></td>
+      </tr>';
+  return str_replace($search, '<tr><td></td><td class="contact-form-right">{$CAPTCHA}</td></tr>'."\n".$search, $content);
+}
+
+function check_captcha($infos)
+{
+  global $conf;
+
+  if (!is_a_guest()) return $infos;
+
+  $resp = recaptcha_check_answer(
+    $conf['captcha_privatekey'],
+    $_SERVER["REMOTE_ADDR"],
+    $_POST["recaptcha_challenge_field"],
+    $_POST["recaptcha_response_field"]
+  );
+
+  if (!$resp->is_valid)
+  {
+    load_language('plugin.lang', CAPTCHA_PATH);
+    array_push($infos['errors'], l10n('Invalid Captcha'));
+    set_plugin_data('captcha', $resp->error);
+  }
+
+  return $infos;
+}
+
+?>
Index: extensions/captcha/main.inc.php
===================================================================
--- extensions/captcha/main.inc.php	(revision 8099)
+++ extensions/captcha/main.inc.php	(revision 8888)
@@ -14,57 +14,12 @@
 global $conf;
 
-if (script_basename() == 'register'
-  and !empty($conf['captcha_publickey'])
-  and !empty($conf['captcha_privatekey']))
+if (!empty($conf['captcha_publickey']) and !empty($conf['captcha_privatekey']))
 {
-  include(CAPTCHA_PATH.'recaptchalib.php');
-  add_event_handler('loc_end_page_header', 'add_captcha');
-  add_event_handler('register_user_check', 'check_captcha');
-}
-elseif (script_basename() == 'admin')
-{
-  add_event_handler('get_admin_plugin_menu_links', 'captcha_plugin_admin_menu' );
+  if (script_basename() == 'register') include('register.inc.php');
+  elseif (isset($_GET['/contact'])) include('contactform.inc.php');
 }
 
-function add_captcha()
-{
-  global $template, $conf;
-
-  $template->set_prefilter('register', 'captcha_prefilter');
-  $template->set_filename('captcha', realpath(CAPTCHA_PATH.'captcha.tpl'));
-  $template->assign(array(
-    'CAPTCHA_HTML'  => recaptcha_get_html($conf['captcha_publickey'], get_plugin_data('captcha')),
-    'CAPTCHA_THEME' => $conf['captcha_theme'],
-    )
-  );
-  $template->assign_var_from_handle('CAPTCHA', 'captcha');
-}
-
-function captcha_prefilter($content, $smarty)
-{
-  $search = '<p class="bottomButtons">';
-  return str_replace($search, '{$CAPTCHA}'."\n".$search, $content);
-}
-
-function check_captcha($errors)
-{
-  global $conf;
-
-  $resp = recaptcha_check_answer(
-    $conf['captcha_privatekey'],
-    $_SERVER["REMOTE_ADDR"],
-    $_POST["recaptcha_challenge_field"],
-    $_POST["recaptcha_response_field"]
-  );
-
-  if (!$resp->is_valid)
-  {
-    load_language('plugin.lang', CAPTCHA_PATH);
-    array_push($errors, l10n('Invalid Captcha'));
-    set_plugin_data('captcha', $resp->error);
-  }
-
-  return $errors;
-}
+if (script_basename() == 'admin')
+  add_event_handler('get_admin_plugin_menu_links', 'captcha_plugin_admin_menu' );
 
 function captcha_plugin_admin_menu($menu)
Index: extensions/captcha/register.inc.php
===================================================================
--- extensions/captcha/register.inc.php	(revision 8888)
+++ extensions/captcha/register.inc.php	(revision 8888)
@@ -0,0 +1,50 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+include(CAPTCHA_PATH.'recaptchalib.php');
+add_event_handler('loc_end_page_header', 'add_captcha');
+add_event_handler('register_user_check', 'check_captcha');
+
+function add_captcha()
+{
+  global $template, $conf;
+
+  $template->set_prefilter('register', 'captcha_prefilter');
+  $template->set_filename('captcha', realpath(CAPTCHA_PATH.'captcha.tpl'));
+  $template->assign(array(
+    'CAPTCHA_HTML'  => recaptcha_get_html($conf['captcha_publickey'], get_plugin_data('captcha')),
+    'CAPTCHA_THEME' => $conf['captcha_theme'],
+    )
+  );
+  $template->assign_var_from_handle('CAPTCHA', 'captcha');
+}
+
+function captcha_prefilter($content, $smarty)
+{
+  $search = '<p class="bottomButtons">';
+  return str_replace($search, '{$CAPTCHA}'."\n".$search, $content);
+}
+
+function check_captcha($errors)
+{
+  global $conf;
+
+  $resp = recaptcha_check_answer(
+    $conf['captcha_privatekey'],
+    $_SERVER["REMOTE_ADDR"],
+    $_POST["recaptcha_challenge_field"],
+    $_POST["recaptcha_response_field"]
+  );
+
+  if (!$resp->is_valid)
+  {
+    load_language('plugin.lang', CAPTCHA_PATH);
+    array_push($errors, l10n('Invalid Captcha'));
+    set_plugin_data('captcha', $resp->error);
+  }
+
+  return $errors;
+}
+
+?>
