Visuelle Bestätigung ist nicht aktiviert! #2

Ersetzt das Original phpBB CAPTCHA gegen eins mit diversen Konfigurationsmöglichkeiten.

Visuelle Bestätigung ist nicht aktiviert! #2

Beitragvon bitshaker » 27. Mai 2006 18:57

Hallo zusammen,

ich habe das AVC gerade bei mir im Forum eingefügt. Im Admin-Menü wird´s auch angezeigt und es läßt sich alles richtig einstellen.

Allerdings kann ich unter 'Allgemeines >> Konfiguration' das AVC-MOD nicht aktivieren. Dort finde ich unter Account-Freischaltung aktivieren nur die folgenden drei Punkte:
- Keine
- Per E-Mail
- Durch den Admin

Ich denke auch, daß ich alle notwendigen (vier) Seiten geändert und zudem alle neuen Seiten hochgeladen habe. Diese Schritte habe ich insg. zweimal durchgeführt.

Kann mir hier bitte einer weiterhelfen?

Den AVM-MOD kann man doch sicherlich auch durch Ändern des richtigen Wertes direkt in der Datenbank ändern. Kann mir einer die dafür notwendige Tabelle und den Wert nennen?

Die verwendete phpBB-Version ist v2.0.20


Viele Grüße,

Thorsten
Benutzeravatar
bitshaker
 
Beiträge: 3
Registriert: 27. Mai 2006 18:20
Wohnort: Trier

Beitragvon AmigaLink » 27. Mai 2006 19:02

Direkt unter Account-Freischaltung aktivieren findest du Aktiviere visuelle Bestätigung. Damit wird das CAPTCHA ein und ausgeschaltet.
Wenn die Einstellung nicht da ist, dann hast du beim update von phpBB 2.0.10 auf 2.0.11 mist gebaut. :)
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon bitshaker » 27. Mai 2006 19:12

Hallo,

danke für Deine schnelle Antwort.

Du hast so Zielsicher das Update von phpBB 2.0.10 auf 2.0.11 angesprochen. Kannst Du mir einen Tipp geben, wo der Fehler sein könnte?

Kann man Dein MOD nicht einfach in der Datenbank irgendwo durch setzen eines Wertes einschalten?


Ciao, Thorsten

Zugefügt nach 56 Minute(n):

Hallo nochmal,

also ich hab´s jetzt selbst herausgefunden. Per Zufall (andere würden es Recherche nennen) bin ich an das Dokument 'visual_confirmation_en_1.1.3.txt' gekommen. Darin waren die notwendigen Änderungen in den Dateien 'admin_board.php' und 'board_config_body.tpl' beschrieben, die bei mir noch gefehlt hatten und die auch in Deiner MOD-Beschreibung gefehlt haben.

Ist Dein MOD als Erweiterung oder als eigenständiger MOD gedacht gewesen? Wenn er als Erweiterung gedacht ist, dann hatte ich das falsch verstanden.

Lange Rede, kurzer Sinn ... nun funktioniert´s!


Viele Grüße,

Thorsten
Benutzeravatar
bitshaker
 
Beiträge: 3
Registriert: 27. Mai 2006 18:20
Wohnort: Trier

Beitragvon AmigaLink » 27. Mai 2006 20:14

Hehe - Das konnte ich so Zielsicher sagen, weil die VC beim 2.0.11 zum Standart wurde. Bei älteren phpBB Versionen musste sie extra installiert werden und befand sich im contrib ordner. :)

Zuständig für die algemeine Board-Konfiguration ist die admin_board.php und die dazu gehörige board_config_body.tpl (letzteres wurde bei dem update schon öffters vom ein oder anderem vergessen zu bearbeiten). Und in der Datenbank ist es das feld enable_confirm in der tabelle phpbb_config (1 = eingeschaltet, 0 = ausgeschaltet). :)

Zugefügt nach 4 Minute(n):

Jetzt warst du ein hauch schneller. :)

Mein MOD ist ein Ersatz für das Original!
Ihn Erweiterung zu nennen wäre untertrieben, da er das Original CAPTCHA-Image vollkommen ersetzt und sehr stark Konfigurierbar ist.
Eigenständig kann man den MOD wiederum auch nicht nennen, da er auf die Codegenerierung des Orriginals zugreift. ;)
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

selbiges Problem

Beitragvon benjaming » 7. Jun 2006 15:01

Hallo,

ich habe genau das gleiche Problem, was genau muß in den Dateien geändert werden?

Danke
Benny
benjaming
 
Beiträge: 1
Registriert: 7. Jun 2006 14:57

Beitragvon bitshaker » 7. Jun 2006 22:58

Hallo Benny,

ich weiß auch nicht mehr, wo ich das runtergeladen habe. Aber die Text-Datei hatte ich mir aufgehoben:

Code: Alles auswählen
########################################################
## MOD Title:      Installation Guide for Visual Confirmation
## MOD Author:      phpBB Group < N/A > (phpBB Group) http://www.phpbb.com/
##          ycl6 < ycl6@users.sourceforge.net > (Mac / Y.C. LIN) http://macphpbbmod.sourceforge.net/
## MOD Description:   This guide tells you what to edit in your php files
##         in order to use the Visual Confirmation MODification
##         available inside your phpBB package (inside contrib folder)
## MOD Version:      1.1.3
##
## Installation Level:   Easy
## Installation Time:   5 Minutes
##
## Files To Edit:   5
##   profile.php
##   admin/admin_board.php
##   includes/constants.php
##   includes/usercp_register.php
##   templates/subSilver/admin/board_config_body.tpl
##
## Included Files:    1
##   includes/usercp_confirm.php
##
#################################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##   This is only the installation guide,
##      the actually author for Visual Confirmation MOD is phpBB Group
##
##   The original Visual Confirmation files can be found in
##      contrib/visual_confirmation.zip
##
##   If you are using usercp_confirm.php from visual_confirmation.zip
##      change <code>if (!preg_match('/^[A-Z1-9]+$/', $confirm_id))</code>
##      to <code>if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))</code>
##
##############################################################
## MOD History:
##
##   2004-03-20 - Version 1.0.0
##      - First Release
##
##   2004-07-16 - Version 1.1.0
##      - For v2.0.9
##
##   2004-07-16 - Version 1.1.1
##   - A error in usercp_confirm.php, fixed
##      - For v2.0.9
##
##   2004-07-17 - Version 1.1.2
##   - Fixed error in update guide: includes/usercp_register.php
##      instead includes/constants.php
##      - For v2.0.9
##
##   2004-09-02 - Version 1.1.3
##   - Fixed COPY action synthax
##      - For v2.0.10
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy includes/usercp_confirm.php to includes/usercp_confirm.php

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#
define('IN_PHPBB', 1);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*

   This code has been modified from its original form by psoTFX @ phpbb.com
   Changes introduce the back-ported phpBB 2.2 visual confirmation code.

   NOTE: Anyone using the modified code contained within this script MUST include
   a relevant message such as this in admin_board.php ... failure to do so will
   affect a breach of Section 2a of the GPL and our copyright

   png visual confirmation system : (c) phpBB Group, 2003 : All Rights Reserved

*/

#
#-----[ FIND ]------------------------------------------
#
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Visual Confirmation
$confirm_yes = ($new['enable_confirm']) ? 'checked="checked"' : '';
$confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : '';

#
#-----[ FIND ]------------------------------------------
#
   "L_ADMIN" => $lang['Acc_Admin'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Visual Confirmation
   "L_VISUAL_CONFIRM" => $lang['Visual_confirm'],
   "L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'],

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
if ( !defined('IN_PHPBB') )

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*

   This code has been modified from its original form by psoTFX @ phpbb.com
   Changes introduce the back-ported phpBB 2.2 visual confirmation code.

   NOTE: Anyone using the modified code contained within this script MUST include
   a relevant message such as this in constants.php ... failure to do so will affect
   a breach of Section 2a of the GPL and our copyright

   png visual confirmation system : (c) phpBB Group, 2003 : All Rights Reserved

*/

#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Visual Confirmation
define('CONFIRM_TABLE', $table_prefix.'confirm');

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#
if ( !defined('IN_PHPBB') )

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*

   This code has been modified from its original form by psoTFX @ phpbb.com
   Changes introduce the back-ported phpBB 2.2 visual confirmation code.

   NOTE: Anyone using the modified code contained within this script MUST include
   a relevant message such as this in usercp_register.php ... failure to do so
   will affect a breach of Section 2a of the GPL and our copyright

   png visual confirmation system : (c) phpBB Group, 2003 : All Rights Reserved

*/

#
#-----[ FIND ]------------------------------------------
#
   $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'username' => 'username'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'confirm_code' => 'confirm_code'

#
#-----[ FIND ]------------------------------------------
#
   else if ( $mode == 'register' )
   {
      if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
      }
   }

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Visual Confirmation
   if ($board_config['enable_confirm'] && $mode == 'register')
   {
      if (empty($HTTP_POST_VARS['confirm_id']))
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
      }
      else
      {
         $confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
         if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
         {
            $confirm_id = '';
         }
         
         $sql = 'SELECT code
            FROM ' . CONFIRM_TABLE . "
            WHERE confirm_id = '$confirm_id'
               AND session_id = '" . $userdata['session_id'] . "'";
         if (!($result = $db->sql_query($sql)))
         {
            message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
         }

         if ($row = $db->sql_fetchrow($result))
         {
            if ($row['code'] != $confirm_code)
            {
               $error = TRUE;
               $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
            }
            else
            {
               $sql = 'DELETE FROM ' . CONFIRM_TABLE . "
                  WHERE confirm_id = '$confirm_id'
                     AND session_id = '" . $userdata['session_id'] . "'";
               if (!$db->sql_query($sql))
               {
                  message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
               }
            }
         }
         else
         {      
            $error = TRUE;
            $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
         }
         $db->sql_freeresult($result);
      }
   }

#
#-----[ FIND ]------------------------------------------
#
   else
   {
      $template->assign_block_vars('switch_namechange_disallowed', array());
   }

#
#-----[ AFTER, ADD ]------------------------------------------
#

   // Visual Confirmation
   $confirm_image = '';
   if (!empty($board_config['enable_confirm']) && $mode == 'register')
   {
      $sql = 'SELECT session_id
         FROM ' . SESSIONS_TABLE;
      if (!($result = $db->sql_query($sql)))
      {
         message_die(GENERAL_ERROR, 'Could not select session data', '', __LINE__, __FILE__, $sql);
      }

      if ($row = $db->sql_fetchrow($result))
      {
         $confirm_sql = '';
         do
         {
            $confirm_sql .= (($confirm_sql != '') ? ', ' : '') . "'" . $row['session_id'] . "'";
         }
         while ($row = $db->sql_fetchrow($result));
      
         $sql = 'DELETE FROM ' .  CONFIRM_TABLE . "
            WHERE session_id NOT IN ($confirm_sql)";
         if (!$db->sql_query($sql))
         {
            message_die(GENERAL_ERROR, 'Could not delete stale confirm data', '', __LINE__, __FILE__, $sql);
         }
      }
      $db->sql_freeresult($result);

      $sql = 'SELECT COUNT(session_id) AS attempts
         FROM ' . CONFIRM_TABLE . "
         WHERE session_id = '" . $userdata['session_id'] . "'";
      if (!($result = $db->sql_query($sql)))
      {
         message_die(GENERAL_ERROR, 'Could not obtain confirm code count', '', __LINE__, __FILE__, $sql);
      }

      if ($row = $db->sql_fetchrow($result))
      {
         if ($row['attempts'] > 3)
         {
            message_die(GENERAL_MESSAGE, $lang['Too_many_registers']);
         }
      }
      $db->sql_freeresult($result);
      
      $confirm_chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',  'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',  'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');

      list($usec, $sec) = explode(' ', microtime());
      mt_srand($sec * $usec);

      $max_chars = count($confirm_chars) - 1;
      $code = '';
      for ($i = 0; $i < 6; $i++)
      {
         $code .= $confirm_chars[mt_rand(0, $max_chars)];
      }

      $confirm_id = md5(uniqid($user_ip));

      $sql = 'INSERT INTO ' . CONFIRM_TABLE . " (confirm_id, session_id, code)
         VALUES ('$confirm_id', '". $userdata['session_id'] . "', '$code')";
      if (!$db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Could not insert new confirm code information', '', __LINE__, __FILE__, $sql);
      }

      unset($code);
      
      $confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=1") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=2") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=3") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=4") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=5") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=6") . '" alt="" title="" />';
      $s_hidden_fields .= '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />';

      $template->assign_block_vars('switch_confirm', array());
   }

#
#-----[ FIND ]------------------------------------------
#
      'EMAIL' => $email,

#
#-----[ AFTER, ADD ]------------------------------------------
#
      // Visual Confirmation
      'CONFIRM_IMG' => $confirm_image,

#
#-----[ FIND ]------------------------------------------
#
      'L_EMAIL_ADDRESS' => $lang['Email_address'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
      // Visual Confirmation
      'L_CONFIRM_CODE_IMPAIRED' => sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
      'L_CONFIRM_CODE' => $lang['Confirm_code'],
      'L_CONFIRM_CODE_EXPLAIN' => $lang['Confirm_code_explain'],

#
#-----[ OPEN ]------------------------------------------
#
profile.php

#
#-----[ FIND ]------------------------------------------
#
define('IN_PHPBB', true);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*

   This code has been modified from its original form by psoTFX @ phpbb.com
   Changes introduce the back-ported phpBB 2.2 visual confirmation code.

   NOTE: Anyone using the modified code contained within this script MUST include
   a relevant message such as this in profile.php ... failure to do so will affect
   a breach of Section 2a of the GPL and our copyright

   png visual confirmation system : (c) phpBB Group, 2003 : All Rights Reserved

*/

#
#-----[ FIND ]------------------------------------------
#
      include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
      exit;
   }

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Visual Confirmation
   else if ( $mode == 'confirm' )
   {
      // Visual Confirmation
      if ( $userdata['session_logged_in'] )
      {
         exit;
      }

      include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
      exit;
   }

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   <tr>
      <td class="row1">{L_ACCT_ACTIVATION}</td>
      <td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED} />{L_NONE}&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER}&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED} />{L_ADMIN}</td>
   </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
      <td class="row1">{L_VISUAL_CONFIRM}<br /><span class="gensmall">{L_VISUAL_CONFIRM_EXPLAIN}</span></td>
      <td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} />{L_YES}&nbsp; &nbsp;<input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} />{L_NO}</td>
   </tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

# EoM



Nach dem Hinfügen des Codes hatte es bei mir funktioniert - viel Glück!


Ciao, Thorsten
Benutzeravatar
bitshaker
 
Beiträge: 3
Registriert: 27. Mai 2006 18:20
Wohnort: Trier

Beitragvon AmigaLink » 8. Jun 2006 10:16

Ein Blick in die Updateanleitung von 2.0.10 auf 2.0.11 führt ebenfalls zum Ziel. :)
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW


Zurück zu Advanced Visual Confirmation



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 18 Gäste

cron