Anti_reg_robot

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
bettesser
Mitglied
Beiträge: 23
Registriert: 04.06.2004 19:13

Anti_reg_robot

Beitrag von bettesser »

Ich hatte damals schonmal das Problem und konnte nicht wirklich Mods einbauen, ich habe da totale Sche*** mit gemacht und dann habe ich mich an den anti_reg_robot gewagt, den ich unbedeingt haben will. Das Problem ist folgendes:
Ich habe alle Dateien richtig geändert[habe sie einem Freund geschickt, er meinte auch alles ok... habe es selber mehrmals überpüft und 2mal neugemacht, also kann es daran nicht liegen], ich habe auch das mit mysql richtig gemacht und auch die Bilder bzw. das was ich für anti_reg_robot hochladen sollte, hochgeladen. Jetzt kommt zwar keine Fehlermeldung oder sonstiges, nur es gibt halt keine Abfrage, als wenn ich den Mod nie eingebaut hätte.

Kleine Zusammenfassung:
Alle Dateien geändert, was nötig war hochgeladen und in mysql das erledigt, was fehlt?
Benutzeravatar
Underhill
Mitglied
Beiträge: 1180
Registriert: 24.09.2003 11:40
Wohnort: 742 Evergreen Terrace

Beitrag von Underhill »

Hi,

gibt es einen Link auf dein phpBB?

Und: Warum benutzt du nicht das "visual_confirmation" aus dem "contrib"-Verzeichnis von phpBB? Das funktioniert immer sehr gut...

Gruss
Underhill
Benutzeravatar
Schumi
Ehemaliges Teammitglied
Beiträge: 4925
Registriert: 07.10.2002 12:37

Verschoben

Beitrag von Schumi »

Verschoben von Administration und Benutzung nach Modifikationen
bettesser
Mitglied
Beiträge: 23
Registriert: 04.06.2004 19:13

Beitrag von bettesser »

So ich habe das alles nochmal 10000000000000 probiert und habe jetzt einen kleinen Fehler entdeckt, vielleicht kann mir einer helfen! Was muss ich hier machen? Denn dort ist ein kleiner Fehler.

In der Instalationsdatei steht dies:

Code: Alles auswählen

#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
	<tr>
	  <td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
		<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
	  <td class="row2">
		<input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="100" value="{PASSWORD_CONFIRM}" />
	  </td>
	</tr>
Wenn ich nach maxlength="100"suche, geht net weil maxlength="32" stattmaxlength="100"
Ich habe daran vorher noch nix verändert, habe es neu hochgeladen! Was mach ich da?
Benutzeravatar
Underhill
Mitglied
Beiträge: 1180
Registriert: 24.09.2003 11:40
Wohnort: 742 Evergreen Terrace

Beitrag von Underhill »

Nochmal:
Underhill hat geschrieben:...
gibt es einen Link auf dein phpBB?
...
oder:

Welche phpBB Version hat das Forum?
Welches MOD genau soll eingebaut werden?
Ist die Anleitung des Mods auch die verwendete phpBB Version?

oder

poste bitte die installanweisung als link und die aktuelle "profile_add_body.tpl" als txt als link ab - dann koennen wir dir sicher helfen...


Gruss
Underhill
bettesser
Mitglied
Beiträge: 23
Registriert: 04.06.2004 19:13

Beitrag von bettesser »

Also, ich habe 2 Foren und ich benutzte eines als "Testforum", wo ich halt mods ausprobiere. Ich benutze die Version 2.0.8 von phpbb.

Der LInk dazu ist www.testforum.dike-gcek.de

Der Mod der eingebaut werdem soll, ost der Anti_reg_robot.
"profil_add_body" ist in dem Packet von 2.0.8 ja mit drine, ich habe noch nichts verändert!

Und der Mod ist folgender.

Code: Alles auswählen

##############################################################
## MOD Title: Anti Robotic Register Flood
## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
## MOD Description:	This will add a Random-graphical-text Vadiation field in
##			Registration form to protect your phpBB from being flooded
##			of robotic-member-registration (like many free webhost signup form...)
## MOD Version: 1.1.4
##
## Installation Level: easy
## Installation Time: 10 Minutes
## Files To Edit: 4
##	includes/constants.php
##	includes/usercp_register.php
##	language/lang_english/lang_main.php
##	templates/subSilver/profile_add_body.tpl
##
## Included Files: 27
##	antirobot_pic.php
##	images/anti_robotic_reg/anti_robotic_reg_*.gif (26 files)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/
##############################################################
## Author Notes:
##
##############################################################
## Version History
##
## v1.1.4
##	- made phpBB 2.0.4 compatible
## v1.1.3
##	- changed Error Message to the form - "Alexander Gingelmaier" <alex@celtisnet.de>
## v1.1.2
##	- fixed some HTML issues
## v1.1.1
##	- fixed a refresh bug
## v1.1.0
##	- improved the performance
## v1.0.0
##	- inititla release
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

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

#
#-----[ FIND ]--------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-------------------------------------
#
// Anti Robotic Register
define('ANTI_ROBOT_TABLE', $table_prefix.'anti_robotic_reg');


#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
	<tr>
	  <td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
		<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
	  <td class="row2">
		<input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="100" value="{PASSWORD_CONFIRM}" />
	  </td>
	</tr>


#
#-----[ AFTER, ADD ]--------------------------------------
#
	<!-- BEGIN switch_validation -->
	<tr>
	  <td class="catSides" colspan="2" height="28">&nbsp;</td>
	</tr>
	<tr>
	  <th class="thSides" colspan="2" height="12" valign="middle">{L_VALIDATION}</th>
	</tr>
	<tr>
	  <td class="row1" valign="top"><span class="gen">{L_VALIDATION}:<br /></span><span class="gensmall">{L_VALIDATION_EXPLAIN}</span></td>
	  <td class="row2" align="center"><span class="gen"><img src="{S_ANTI_ROBOT1}" alt="" border="0"><img src="{S_ANTI_ROBOT2}" alt="" border="0"><img src="{S_ANTI_ROBOT3}" alt="" border="0"><img src="{S_ANTI_ROBOT4}" alt="" border="0"><img src="{S_ANTI_ROBOT5}" alt="" border="0"><br /><br /><input type="text" name="reg_key" maxlength="5" size="6"></span></td>
	</tr>
	<!-- END switch_validation -->


#
#-----[ OPEN ]--------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]--------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]-------------------------------------
#
// Anti Robotic Registration
$lang['Wrong_reg_key'] = 'Anti Robotic Register Validation Error';
$lang['Validation'] = 'Validation';
$lang['Validation_explain'] = 'To make sure you are not a robot, please type what letters you see in the image right';


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

#
#-----[ FIND ]--------------------------------------------
#
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}

#
#-----[ AFTER, ADD ]--------------------------------------
#
function gen_reg_key()
{
	$key = "";
	$max_length_reg_key = 5;
	$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");

	$count = count($chars) - 1;

	srand((double)microtime()*1000000);

	for($i = 0; $i < $max_length_reg_key; $i++)
	{
		$key .= $chars[rand(0, $count)];
	}

	return($key);
}

#
#-----[ 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 ]--------------------------------------
#
		//
		// Anti Robotic Registration
		//
		$sql = "SELECT * FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "' LIMIT 1";
		if( !$result = $db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain registration information', '', __LINE__, __FILE__, $sql);
		}

		$anti_robot_row = $db->sql_fetchrow($result);
 
		if (( strtolower($HTTP_POST_VARS['reg_key']) != $anti_robot_row['reg_key'] ) or ($anti_robot_row['reg_key'] == ''))
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Wrong_reg_key'];
		}
		else
		{
			$sql = "DELETE FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "'";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete validation key', '', __LINE__, __FILE__, $sql);
			}
		}
		// --------------------------
		//


#
#-----[ FIND ]--------------------------------------------
#
	$template->assign_vars(array(
		'USERNAME' => $username,
		'CUR_PASSWORD' => $cur_password,
		'NEW_PASSWORD' => $new_password,

#
#-----[ BEFORE, ADD ]-------------------------------------
#
	//
	// Anti Robotic Registration
	//
	if ($mode == 'register')
	{
		$sql = "DELETE FROM " . ANTI_ROBOT_TABLE . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . $userdata['session_id'] . "'";
		if( !$result = $db->sql_query($sql) )
		{
				message_die(GENERAL_ERROR, 'Could not delete validation key', '', __LINE__, __FILE__, $sql);
		}

		$reg_key = gen_reg_key();

		$sql = "INSERT INTO ". ANTI_ROBOT_TABLE . " VALUES ('" . $userdata['session_id'] . "', '" . $reg_key . "', '" . time() . "')";
		if( !$result = $db->sql_query($sql) )
		{
				message_die(GENERAL_ERROR, 'Could not check registration information', '', __LINE__, __FILE__, $sql);
		}
	}
	//-----------------------
	//


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

#
#-----[ AFTER, ADD ]--------------------------------------
#
		// Anti Robotic Registration MOD
		'L_VALIDATION' => $lang['Validation'],
		'L_VALIDATION_EXPLAIN' => $lang['Validation_explain'],
		'S_ANTI_ROBOT1' => append_sid('antirobot_pic.'.$phpEx.'?id=1'),
		'S_ANTI_ROBOT2' => append_sid('antirobot_pic.'.$phpEx.'?id=2'),
		'S_ANTI_ROBOT3' => append_sid('antirobot_pic.'.$phpEx.'?id=3'),
		'S_ANTI_ROBOT4' => append_sid('antirobot_pic.'.$phpEx.'?id=4'),
		'S_ANTI_ROBOT5' => append_sid('antirobot_pic.'.$phpEx.'?id=5'),


#
#-----[ FIND ]--------------------------------------------
#
			if ( $board_config['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_gallery_path'])) )
			{
				$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
			}
		}
	}

#
#-----[ AFTER, ADD ]--------------------------------------
#
	else
	{
		$template->assign_block_vars('switch_validation', array() );
	}

#
#-----[ SQL ]---------------------------------------------
#
CREATE TABLE phpbb_anti_robotic_reg (
	session_id char(32) DEFAULT '' NOT NULL,
	reg_key char(5) NOT NULL,
	timestamp int(11) unsigned NOT NULL,
	PRIMARY KEY (session_id));

#
#-----[ COPY ]--------------------------------------------
#
copy antirobot_pic.php to antirobot_pic.php

#
#-----[ COPY ]--------------------------------------------
#
copy images/anti_robotic_reg/anti_robotic_reg_*.gif to images/anti_robotic_reg/

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
So, ich müsste jetzt alles geschrieben haben, noch was vergessen? ;)
Benutzeravatar
rabbit
Ehemaliger Übersetzer
Beiträge: 4199
Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:

Beitrag von rabbit »

hi,

an der maxlength="32" sollte es eigentlich nicht liegen, aber ändere das doch mal testweise in 100 um... :)
Offizieller Übersetzer des Categories Hierarchy MOD 2.1.x
Deutscher UserGuide für den Categories Hierarchy MOD v2.1.4
Empfohlener Hoster: All-Inkl.com
Benutzeravatar
Underhill
Mitglied
Beiträge: 1180
Registriert: 24.09.2003 11:40
Wohnort: 742 Evergreen Terrace

Beitrag von Underhill »

Hi,

speichere bitte deine "profile_add_body.tpl" als Txt und verlinke sie mal...

oder

Hast du den Kommentar

Code: Alles auswählen

<!-- Visual Confirmation -->
innerhalb oder ausserhalb der "switch_validation" gestellt?

Ausserdem bekomme ich maechtig viele PHP-Warnungen raus... (Unable to access ./includes/functions_post.php) hast du was an den PHP-Pfaden (include=...) verstellt?

gruss
underhill
Benutzeravatar
Underhill
Mitglied
Beiträge: 1180
Registriert: 24.09.2003 11:40
Wohnort: 742 Evergreen Terrace

Beitrag von Underhill »

ah - die PHP-Warnungen sind weg... :wink:

include oder template problem?

verlinke auch bitte nochmal dein

Code: Alles auswählen

usercp_register.php
als txt...

ich schaetze da was nicht nicht richtig geparsed...


Gruss
Underhill
Babangida
Mitglied
Beiträge: 4
Registriert: 16.08.2004 01:47

Beitrag von Babangida »

Hallo,

ich habe das selbe Problem.
Es ist wie beschrieben installiert.
Es tut sich nichts..
Antworten

Zurück zu „phpBB 2.0: Mod Support“