[RC2] Anti Bot Question

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
crestonecreations
Registered User
Posts: 11
Joined: Wed Dec 07, 2005 3:10 pm
Location: Port Townsend, Washington
Contact:

Post by crestonecreations » Sat Aug 12, 2006 6:40 pm

I love this MOD - thanks.
It is working beautifully for registrations -

but -
not for guest postings.
Incorrect answers to the challenge question succeed in posting.
Any clues for debugging - troubleshooting?
the forum address is hoelectric.com/ask

thank you,
Clyde Lovett,
Crestone Creations

911radio
Registered User
Posts: 32
Joined: Thu Oct 14, 2004 12:39 pm

Post by 911radio » Sun Aug 13, 2006 4:08 pm

I get this error when using EM to install on version 2.0.21:

Critical Error

FIND FAILED: In file [includes/usercp_register.php] could not find:

if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}

MOD script line #552 :: FAQ :: Report

CRITICAL ERROR: Could not modify [includes/usercp_register.php]

sweda
Registered User
Posts: 30
Joined: Sat Dec 04, 2004 3:30 pm
Contact:

Post by sweda » Mon Aug 14, 2006 8:15 pm

I'm using Easymod to try and install this but I keep getting critical errors regarding language files not being available to read - for example "Could not open [language/lang_french/lang_admin.php] for reading".

I was under the impression that the mod would install for the default language (which is set to English) but this doesn't seem to be the case. Do I need to install the German and French language files to proceed or is there a way to edit the .mod file (I can't find any instructions as to which lines to take out).

Any help would be gratefully appreciated.

MagMo
Registered User
Posts: 20
Joined: Sat Apr 15, 2006 3:01 pm
Contact:

Post by MagMo » Tue Aug 15, 2006 12:56 pm

Hi
crestonecreations wrote: I love this MOD - thanks.
It is working beautifully for registrations -

but -
not for guest postings.
Incorrect answers to the challenge question succeed in posting.
Any clues for debugging - troubleshooting?
the forum address is hoelectric.com/ask
Without an correct question guest posting is not possible. Therefore i think you made a mistake during installing this mod.
Please check your installation. Did you execute all changes?
Or use your backup files and install the mod again, accurately.
911radio wrote: I get this error when using EM to install on version 2.0.21:

Critical Error

FIND FAILED: In file [includes/usercp_register.php] could not find:

if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}

MOD script line #552 :: FAQ :: Report

CRITICAL ERROR: Could not modify [includes/usercp_register.php]
This "find"-code is part of the file includes/usercp_register.php (2.0.21). I don't know why the EM couldn't find it. Are you using an original or modified includes/usercp_register.php?
sweda wrote: I'm using Easymod to try and install this but I keep getting critical errors regarding language files not being available to read - for example "Could not open [language/lang_french/lang_admin.php] for reading".

I was under the impression that the mod would install for the default language (which is set to English) but this doesn't seem to be the case. Do I need to install the German and French language files to proceed or is there a way to edit the .mod file (I can't find any instructions as to which lines to take out).

Any help would be gratefully appreciated.
If you only use/need the english language files open the file anti-bot-question_v_1_0_3.txt and delete the following code:

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_french/lang_admin.php

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

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['Anti_Bot_Quest'] = 'Questions anti-robots';
$lang['Anti_Bot_Question'] = 'Activer la question anti-robots à l\'enregistrement';
$lang['Anti_Bot_Question_explain'] = 'Oblige les utilisateurs à répondre correctement à une question pour s\'enregistrer.';
$lang['ABQ_Admin_Title'] = 'Gestion des questions anti-robots';
$lang['ABQ_Delete_Title'] = 'Supprimer la question anti-robots';
$lang['ABQ_Admin_Explain'] = 'Ici, vous pouvez créer de nouvelles questions et en éditer ou supprimer des anciennes.<br />Le Mod utilise une des questions suivantes. La question est choisie au hasard.<br /><br />Exemple:<br />Question: Qui dans les choix suivants est un animal ? Voiture, Europe, Cheval, Montagne<br />Réponse : Cheval<br />';
$lang['ABQ_Question'] = 'Question';
$lang['ABQ_Answer'] = 'Réponse';
$lang['ABQ_Answer_Explain'] = 'Sensible à la case ! (MAJUSCULE/minuscule)';
$lang['ABQ_CaseSensitive'] = 'Les minuscules et les majuscules doivent-elles être prises en compte dans les réponses ?';
$lang['ABQ_VarName'] = 'Sélectionnez le nom de la variable de post';
$lang['ABQ_VarName_Explain'] = 'Choisissez une combinaison. Cela n\'a pas d\'effet visible sur le formulaire d\'enregistrement pour les visiteurs humains.';
$lang['Anti_Bot_Question_Guest'] = 'Activer la question anti-robots pour les invités';
$lang['Anti_Bot_Question_Guest_explain'] = 'Les invités doivent répondre correctement à la question anti-robots s\'ils désirent écrire un message et que la question anti-robots est activée.';
$lang['ABQ_Use_HTML'] = 'Utiliser du code HTML dans la question';
$lang['ABQ_Use_HTML_Explain'] = 'Si dans la question, du code HTML est utilisé alors sélectionnez \'Oui\'.<br />Le code HTML suivant ne peut pas être utilisé (indépendamment de ce réglage) : <textarea> <table>';
$lang['ABQ_ImageURL'] = 'URL de l\'image';
$lang['ABQ_Image'] = 'Image';
$lang['ABQ_No_Image'] = 'L\'image sélectionnée n\'existe pas.';
$lang['ABQ_Image_DNE'] = 'N\'existe pas.';
$lang['ABQ_Create_Question'] = 'Créer la question et la réponse';
$lang['ABQ_Edit_Question'] = 'Editer la question';
$lang['ABQ_Delete_Question'] = 'Supprimer la question';
$lang['ABQ_No_questions'] = '<br />Il n\'y a aucune question anti-robots.<br /><br />';
$lang['ABQ_not_updated'] = 'La base de données n\'a pas été mise à jour.';
$lang['ABQ_Question_too_long'] = 'Votre question est trop longue (max. %s caractères)';
$lang['ABQ_Answer_too_long'] = 'Au moins une de vos réponses est trop longue (max. %s caractères)';
$lang['ABQ_Missed_Question'] = 'Vous devez au moins entré une question pour la question ant-robots !';
$lang['ABQ_Missed_Answer'] = 'Vous devez au moins entré une réponse à la question ant-robots !';
$lang['ABQ_New_Question_created'] = 'La nouvelle question anti-robots a été ajouté avec succès !';
$lang['ABQ_BildPHP'] = 'Utiliser le ficher bild.php pour montrer des images';
$lang['ABQ_BildPHP_Explain'] = 'Ce fichier rend l\'identification des images plus difficiles pour les robots. Cependant, cela ne marche pas pour tous les serveurs (dépend de la configuration du serveur). Faites un essai, si les images s\'affichent alors vous devriez activer cette option.';
$lang['ABQ_Configuration'] = 'Configuration';
$lang['ABQ_Questions'] = 'Questions';
$lang['Anti_Bot_Quest_MOD'] = 'Mod Question anti-robots';
$lang['ABQ_Config'] = 'Configuration du Mod Question anti-robots';
$lang['ABQ_Config_explain'] = 'Le formulaire ci-dessous vous autorise à configurer toutes les options du Mod Question anti-robots.';
$lang['ABQ_Config_updated'] = 'Configuration mise à jour avec succès !';
$lang['ABQ_Click_return_config'] = 'Cliquez %sIci%s pour retourner à la configuration du Mod Question anti-robots';
$lang['ABQ_confirm_aktiv'] = 'La confirmation visuelle est (aussi) activée.';
$lang['ABQ_up_to_date'] = 'Votre installation est à jour, aucune mise à jour n\'est disponible pour votre version du MOD Anti Bot Question.';
$lang['ABQ_not_up_to_date'] = 'Votre installation <b>ne semble pas</b> être à jour. Des mises à jour sont disponibles pour votre version du Mod Anti Bot Question, svp, visitez <a href="http://phpbb.mwegner.de/downloads.php" target="_new">http://phpbb.mwegner.de/downloads.php</a> pour obtenir la dernière version du MOD.';
$lang['ABQ_Latest_version_info'] = 'La dernière version disponible du MOD Anti Bot Question est la <b>%s</b>.';
$lang['ABQ_Current_version_info'] = 'Vous utilisez la version <b>%s</b> du MOD Anti Bot Question.';
$lang['ABQ_Connect_socket_error'] = 'Impossible de se connecter au serveur du MOD Anti Bot Question, l\'erreur rapportée est la suivante :<br />%s';
$lang['ABQ_Socket_functions_disabled'] = 'Impossible d\'utiliser les fonctions sockets.';
$lang['ABQ_Version'] = '1.0.3';
// Anti Bot Question Mod - End

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

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

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['ABQ_explain'] = 'Cette question est malheureusement nécessaire pour empêcher les robots publicitaires de s\'inscrire sur ce forum. Merci de votre compréhension.';
$lang['ABQ_post_explain'] = 'Cette question est malheureusement nécessaire pour empêcher les robots publicitaires de poster des messages sur ce forum. Merci de votre compréhension.';
$lang['ABQ_explain2'] = '(sensible à la casse( Majuscules/minuscules))';
$lang['ABQ_Incorrect'] = 'Votre réponse est inexacte, réessayez Svp.';
$lang['ABQ_Question'] = 'Question anti-robots';
$lang['ABQ_Answer'] = 'Votre réponse';
// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_german/lang_admin.php

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

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['Anti_Bot_Quest'] = 'Anti Bot Fragen';
$lang['Anti_Bot_Question'] = 'Anti Bot Frage bei der Registrierung aktivieren';
$lang['Anti_Bot_Question_explain'] = 'Benutzer müssen bei der Registrierung eine vorgegebene Frage richtig beantworten.';
$lang['ABQ_Admin_Title'] = 'Anti Bot Fragen verwalten';
$lang['ABQ_Delete_Title'] = 'Anti Bot Frage löschen';
$lang['ABQ_Admin_Explain'] = 'Du kannst hier neue Fragen ertsellen und alte Fragen bearbeiten oder löschen.<br />Der Mod verwendet die hier angegebenen Fragen. Nach dem Zufallsprinzip wird jeweils eine der Fragen ausgewählt.<br /><br />Beispiel für eine Frage-Antwort-Kombination:<br />Frage: Wobei handelt es sich um ein Tier? Auto, Berg, Europa, Pferd<br />Antwort: Pferd<br />';
$lang['ABQ_Question'] = 'Frage';
$lang['ABQ_Answer'] = 'Antwort';
$lang['ABQ_Answer_Explain'] = 'Groß-/Kleinschreibung beachten!';
$lang['ABQ_CaseSensitive'] = 'Soll die Groß-/Kleinschreibung bei den Anti Bot Fragen beachtet werden';
$lang['ABQ_VarName'] = 'Welche Bezeichnung soll die POST-Variable des Anti Bot Frage haben';
$lang['ABQ_VarName_Explain'] = 'Wähle eine beliebe Kombination aus. Hat für menschliche Besucher keinen sichtbaren Einfluss auf das Registrierungsformular.';
$lang['Anti_Bot_Question_Guest'] = 'Anti Bot Frage für Gäste aktivieren';
$lang['Anti_Bot_Question_Guest_explain'] = 'Wenn der Mod für Gäste aktiviert wird, dann muss die vorgegebene Frage beim Schreiben eines Beitrags von Gästen beantwortet werden.';
$lang['ABQ_Use_HTML'] = 'In der Frage HTML-Code verwenden';
$lang['ABQ_Use_HTML_Explain'] = 'Wenn in der Frage HTML-Code verwendet werden soll, dann hier \'Ja\' wählen.<br />Folgender HTML-Code kann unabhängig von dieser Einstellung NICHT verwendet werden: <textarea> <table>';
$lang['ABQ_ImageURL'] = 'Bild-URL';
$lang['ABQ_Image'] = 'Bild';
$lang['ABQ_No_Image'] = 'Das angegebene Bild ist nicht vorhanden.';
$lang['ABQ_Image_DNE'] = 'Existiert nicht (mehr).';
$lang['ABQ_Create_Question'] = 'Frage & Antwort erstellen';
$lang['ABQ_Edit_Question'] = 'Frage bearbeiten';
$lang['ABQ_Delete_Question'] = 'Frage löschen';
$lang['ABQ_No_questions'] = '<br />Es wurde keine Anti-Bot-Frage erstellt.<br /><br />';
$lang['ABQ_not_updated'] = 'Die Änderung wurde nicht übernommen';
$lang['ABQ_Question_too_long'] = 'Die Frage ist zu lang (maximale Länge %s Zeichen)';
$lang['ABQ_Answer_too_long'] = 'Mindestens eine der Antworten ist zu lang (maximale Länge %s Zeichen)';
$lang['ABQ_Missed_Question'] = 'Du musst eine Frage angeben.';
$lang['ABQ_Missed_Answer'] = 'Du musst mindestens eine Antwort angeben.';
$lang['ABQ_New_Question_created'] = 'Die neue Anti-Bot-Frage wurde erfolgreich erstellt';
$lang['ABQ_Question_updated'] = 'Die Anti-Bot-Frage wurde erfolgreich geändert';
$lang['ABQ_Question_deleted'] = 'Die Anti-Bot-Frage wurde erfolgreich gelöscht';
$lang['ABQ_Click_return_ABQ'] = '%sHier%s klicken um zur Anti-Bot-Frage Administration zurückzukehren';
$lang['ABQ_BildPHP'] = 'Ausgabe des Bildes über die Datei bild.php';
$lang['ABQ_BildPHP_Explain'] = 'Die Ausgabe des Bildes über die Datei erschwert die Identifikation des Bildes durch Bots. Allerdings funktioniert dies nicht auf allen Servern (abhängig von der Server-Konfiguration).<br />Wenn das nachfolgende Bild zu lesen ist (Text: Test), dann kann / sollte diese Option aktiviert werden.';
$lang['ABQ_Configuration'] = 'Konfiguration';
$lang['ABQ_Questions'] = 'Fragen';
$lang['Anti_Bot_Quest_MOD'] = 'Anti Bot Question Mod';
$lang['ABQ_Config'] = 'Anti Bot Question Mod Konfiguration';
$lang['ABQ_Config_explain'] = 'Hier kannst du die Einstellungen des Anti Bot Question Mod ändern.';
$lang['ABQ_Config_updated'] = 'Anti Bot Question Mod Konfiguration geändert';
$lang['ABQ_Click_return_config'] = 'Klicke %shier%s, um zur Anti Bot Question Mod Konfiguration zurückzukehren';
$lang['ABQ_confirm_aktiv'] = 'Die visuelle Bestätigung ist (ebenfalls) aktiv!';
$lang['ABQ_up_to_date'] = 'Dein Anti Bot Question Mod ist auf dem neuesten Stand; es sind keine Updates für diesen Mod verfügbar.';
$lang['ABQ_not_up_to_date'] = 'Dein Anti Bot Question Mod ist wahrscheinlich <b>nicht</b> auf dem neuesten Stand. Es sind Updates für deine Mod-Version verfügbar, bitte besuche <a href="http://phpbb.mwegner.de/downloads.php" target="_new">http://phpbb.mwegner.de/downloads.php</a>, um die aktuellste Version zu erhalten.';
$lang['ABQ_Latest_version_info'] = 'Die neueste verfügbare Version ist Anti Bot Question Mod <b>%s</b>.';
$lang['ABQ_Current_version_info'] = 'Du verwendest Anti Bot Question Mod <b>%s</b>.';
$lang['ABQ_Connect_socket_error'] = 'Die Verbindung zum Anti Bot Question Mod-Server konnte nicht aufgebaut werden. Es trat folgender Fehler auf:<br />%s';
$lang['ABQ_Socket_functions_disabled'] = 'Die Socket-Funktionen konnten nicht benutzt werden.';
$lang['ABQ_Version'] = '1.0.3';
// Anti Bot Question Mod - End

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

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

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['ABQ_explain'] = 'Diese Frage ist leider notwendig um automatische Anmeldungen zu erschweren.';
$lang['ABQ_post_explain'] = 'Diese Frage ist leider notwendig das automatische Schreiben von Beiträgen zu erschweren.';
$lang['ABQ_explain2'] = 'Bitte beachte die korrekte Gro&szlig;-/Kleinschreibung.';
$lang['ABQ_Incorrect'] = 'Die Sicherheitsfrage wurde falsch beantwortet.';
$lang['ABQ_Question'] = 'Sicherheitsfrage';
$lang['ABQ_Answer'] = 'Deine Antwort auf die Sicherheitsfrage';
// Anti Bot Question Mod - End
After this change try again to install the mod.

/EDIT
zx wrote: I have a broken image on the ABQ config page - why might that be? I've uploaded the images into SubSilver & the template I'm using. Maybe I should be configuring all this in SubSilver first?
Upload all images into the following folder: images/anti_bot/
(see the installation-guide)
If you see a broken image, it is not an error. It is a test, if you see a broken image your server doesn't support this mod function. Disable the 'Use the file bild.php to show images'-option. If you can see the image enable this option.

rtoupin
Registered User
Posts: 8
Joined: Wed Jun 29, 2005 2:20 am

Okay.....now for dummies

Post by rtoupin » Tue Aug 15, 2006 3:43 pm

I don't code, but I would take the risk if I understood what needed to be done. I am having the same problem someone else had with this error message:

"Could not query anti-bot-question information

DEBUG MODE

SQL Error : 1146 Table 'cwcforum001.ANTI_BOT_QUEST_TABLE' doesn't exist

SELECT * FROM ANTI_BOT_QUEST_TABLE ORDER BY lang ASC, anti_bot_img ASC, question ASC

Line : 59
File : admin_anti_bot_quest.php"


So, for dummies....what file do I have to change, what code do I need to enter and where in the file should I place the code, or does that make a difference (other than before or after the file start)

For example, where you took the other guys usercp_register.php and told him what to change, I would be happy to change this file if I could do it without mucking it up...

Thanks...

Robin (NOT A PROGRAMMER)

User avatar
crestonecreations
Registered User
Posts: 11
Joined: Wed Dec 07, 2005 3:10 pm
Location: Port Townsend, Washington
Contact:

Post by crestonecreations » Tue Aug 15, 2006 4:03 pm

MagMo wrote: Hi
crestonecreations wrote:I love this MOD - thanks.
It is working beautifully for registrations -

but -
not for guest postings.
Incorrect answers to the challenge question succeed in posting.
Any clues for debugging - troubleshooting?
the forum address is hoelectric.com/ask
Without an correct question guest posting is not possible. Therefore i think you made a mistake during installing this mod.
Please check your installation. Did you execute all changes?
Or use your backup files and install the mod again, accurately.


thank you. I suppose I could start over from my backup, but that would seem to be a shame. The point of my question was to ask for your guidance in troubleshooting MY mistake. I am not skilled in programming, so any help, short of just "doing it all over again" would be appreciated.

Thank you for your patience.
Clyde Lovett,
Crestone Creations

MagMo
Registered User
Posts: 20
Joined: Sat Apr 15, 2006 3:01 pm
Contact:

Post by MagMo » Tue Aug 15, 2006 4:54 pm

rtoupin wrote: So, for dummies....what file do I have to change, what code do I need to enter and where in the file should I place the code, or does that make a difference (other than before or after the file start)
You find the solution for your problem here.
If you don't understand it, please read this: How to Install MODs
crestonecreations wrote: The point of my question was to ask for your guidance in troubleshooting MY mistake. I am not skilled in programming, so any help, short of just "doing it all.
Could you please link your "posting.php" as a textfile for download?

User avatar
crestonecreations
Registered User
Posts: 11
Joined: Wed Dec 07, 2005 3:10 pm
Location: Port Townsend, Washington
Contact:

Post by crestonecreations » Tue Aug 15, 2006 5:06 pm

MagMo wrote: Could you please link your "posting.php" as a textfile for download?


Many thanks MagMo.
I have posted this file at:
http://hoelectric.com/phpbb/posting.php.txt
or you can go to
http://hoelectric.com/phpbb/index.html

you time is appreciated.
Clyde Lovett,
Crestone Creations

MagMo
Registered User
Posts: 20
Joined: Sat Apr 15, 2006 3:01 pm
Contact:

Post by MagMo » Tue Aug 15, 2006 5:31 pm

Hi,
crestonecreations wrote: I have posted this file at:
http://hoelectric.com/phpbb/posting.php.txt
you forgot this change:

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------ 
# 
posting.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
		case 'editpost':
		case 'newtopic':
		case 'reply':

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
			// Anti Bot Question Mod - Start
			if ($board_config['anti_bot_quest_guest'] && !$userdata['session_logged_in'])
			{
				if (empty($HTTP_POST_VARS[$board_config['anti_bot_quest_get']]) || empty($HTTP_POST_VARS['idabq']))
				{
					$sql = 'SELECT *
						FROM ' . ANTI_BOT_QUEST_TABLE . '
						WHERE lang = \'' . $board_config['default_lang'] . '\' 
						LIMIT 1';
					if (!$result = $db->sql_query($sql))
					{
						message_die(GENERAL_ERROR, 'Could not obtain anti-bot-question information', '', __LINE__, __FILE__, $sql);
					}
					if ($db->sql_numrows($result) > 0)
					{
						$error = TRUE;
						$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['ABQ_Incorrect'];
					}
				}
				else
				{
					$abq_aw = htmlspecialchars(stripslashes($HTTP_POST_VARS[$board_config['anti_bot_quest_get']]));
					$abq_id = intval(htmlspecialchars(stripslashes($HTTP_POST_VARS['idabq'])));

					$sql = 'SELECT answer1, answer2, answer3, answer4, answer5
						FROM ' . ANTI_BOT_QUEST_TABLE . '
						WHERE id = ' . $abq_id;
					if(!$result = $db->sql_query($sql))
					{
						message_die(GENERAL_ERROR, 'Could not obtain anti-bot-question information', '', __LINE__, __FILE__, $sql);
					}
					if( $db->sql_numrows($result) == 0 )
					{
						$sql = 'SELECT answer1, answer2, answer3, answer4, answer5
							FROM ' . ANTI_BOT_QUEST_TABLE . '
							WHERE lang = \'' . $board_config['default_lang'] . '\' 
							LIMIT 1';
						if(!$result = $db->sql_query($sql))
						{
							message_die(GENERAL_ERROR, 'Could not obtain anti-bot-question information', '', __LINE__, __FILE__, $sql);
						}
						if( $db->sql_numrows($result) == 0 )
						{
							// Keine Frage vorhanden > Anti-Bot-Question übergehen
						}
						else
						{
							$error = TRUE;
							$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['ABQ_Incorrect'];
						}
					}
					else
					{
						$abqrow = $db->sql_fetchrow($result);
						if ($board_config['anti_bot_quest_casesen'])
						{
							if (($abq_aw == $abqrow['answer1']) || (($abqrow['answer2'] != '') && ($abq_aw == $abqrow['answer2'])) || (($abqrow['answer3'] != '') && ($abq_aw == $abqrow['answer3'])) || (($abqrow['answer4'] != '') && ($abq_aw == $abqrow['answer4'])) || (($abqrow['answer5'] != '') && ($abq_aw == $abqrow['answer5'])))
							{}
							else
							{
								$error = TRUE;
								$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['ABQ_Incorrect'];
							}
						}
						else
						{
							$abq_aw = strtolower($abq_aw);
							if (($abq_aw == strtolower($abqrow['answer1'])) || (($abqrow['answer2'] != '') && ($abq_aw == strtolower($abqrow['answer2']))) || (($abqrow['answer3'] != '') && ($abq_aw == strtolower($abqrow['answer3']))) || (($abqrow['answer4'] != '') && ($abq_aw == strtolower($abqrow['answer4']))) || (($abqrow['answer5'] != '') && ($abq_aw == strtolower($abqrow['answer5']))))
							{}
							else
							{
								$error = TRUE;
								$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['ABQ_Incorrect'];
							}
						}
					}
				}
			}
			// Anti Bot Question Mod - End

User avatar
crestonecreations
Registered User
Posts: 11
Joined: Wed Dec 07, 2005 3:10 pm
Location: Port Townsend, Washington
Contact:

Post by crestonecreations » Tue Aug 15, 2006 6:20 pm

MagMo wrote: Hi,
you forgot this change:


Thanks very much - it's all working great now.
I learned quite a bit by fixing that - beyond just my misplaced code - so thanks again for your time.
Cheers,
Clyde Lovett,
Crestone Creations

helvissa
Registered User
Posts: 43
Joined: Thu Aug 10, 2006 7:15 pm
Contact:

Post by helvissa » Tue Aug 15, 2006 6:57 pm

Hello, I've been sent over here from the anti-spam thread....

I installed the anti-bot question mod, but there's something wrong....

(you can see this at my messageboard, www.prettypettythieves.com/messageboard)

Code has appeared at the top of the board, and some members are having trouble logging in. Also, no one can register! Which obviously stops the spam, but not in quite the way I'd hoped!

// Anti Bot Question Mod - Start $lang['ABQ_explain'] = 'This question is unfortunately necessary in order to make automatic registrations more difficult.'; $lang['ABQ_post_explain'] = 'This question is unfortunately necessary in order to make automatic postings more difficult.'; $lang['ABQ_explain2'] = '(case sensitive)'; $lang['ABQ_Incorrect'] = 'The Anti-Bot-Question answer you entered was incorrect.'; $lang['ABQ_Question'] = 'Anti-Bot-Question'; $lang['ABQ_Answer'] = 'Your answer'; // Anti Bot Question Mod - End
Warning: Cannot modify header information - headers already sent by (output started at /home/helvacom/public_html/prettypettythieves/messageboard/language/lang_english/lang_main.php:5) in /home/helvacom/public_html/prettypettythieves/messageboard/includes/page_header.php on line 483

Warning: Cannot modify header information - headers already sent by (output started at /home/helvacom/public_html/prettypettythieves/messageboard/language/lang_english/lang_main.php:5) in /home/helvacom/public_html/prettypettythieves/messageboard/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/helvacom/public_html/prettypettythieves/messageboard/language/lang_english/lang_main.php:5) in /home/helvacom/public_html/prettypettythieves/messageboard/includes/page_header.php on line 486

When clicking on 'register', nothing happens except the following message:

// Anti Bot Question Mod - Start $lang['ABQ_explain'] = 'This question is unfortunately necessary in order to make automatic registrations more difficult.'; $lang['ABQ_post_explain'] = 'This question is unfortunately necessary in order to make automatic postings more difficult.'; $lang['ABQ_explain2'] = '(case sensitive)'; $lang['ABQ_Incorrect'] = 'The Anti-Bot-Question answer you entered was incorrect.'; $lang['ABQ_Question'] = 'Anti-Bot-Question'; $lang['ABQ_Answer'] = 'Your answer'; // Anti Bot Question Mod - End
Parse error: syntax error, unexpected ',' in /home/helvacom/public_html/prettypettythieves/messageboard/includes/usercp_register.php on line 110

I take it that unexpected ',' means that a comma has popped up where it shouldn't. I thought this might be the code which goes in after 'confirm_code' => 'confirm_code', but I copied and pasted this exactly from the txt file, and even taking out some commas (which I later put back in) makes no difference.

Could anyone suggest what I should do?

User avatar
crestonecreations
Registered User
Posts: 11
Joined: Wed Dec 07, 2005 3:10 pm
Location: Port Townsend, Washington
Contact:

Post by crestonecreations » Tue Aug 15, 2006 7:10 pm

thank you
Last edited by crestonecreations on Tue Aug 15, 2006 8:19 pm, edited 1 time in total.
Clyde Lovett,
Crestone Creations

MagMo
Registered User
Posts: 20
Joined: Sat Apr 15, 2006 3:01 pm
Contact:

Post by MagMo » Tue Aug 15, 2006 8:15 pm

Hi
helvissa wrote: Could anyone suggest what I should do?
Yes, i can:
helvissa wrote: Code has appeared at the top of the board, and some members are having trouble logging in. Also, no one can register! Which obviously stops the spam, but not in quite the way I'd hoped!
It seems to me that you added the code change after the "?>" and not before. Check this change:

Code: Select all

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

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

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['ABQ_explain'] = 'This question is unfortunately necessary in order to make automatic registrations more difficult.';
$lang['ABQ_post_explain'] = 'This question is unfortunately necessary in order to make automatic postings more difficult.';
$lang['ABQ_explain2'] = '(case sensitive)';
$lang['ABQ_Incorrect'] = 'The Anti-Bot-Question answer you entered was incorrect.';
$lang['ABQ_Question'] = 'Anti-Bot-Question';
$lang['ABQ_Answer'] = 'Your answer';
// Anti Bot Question Mod - End
helvissa wrote: When clicking on 'register', nothing happens except the following message: ...
Please check all changes you have done in the file includes/usercp_register.php. If you couldn't find a mistake, please link your "includes/usercp_register.php" as a textfile for download.

rtoupin
Registered User
Posts: 8
Joined: Wed Jun 29, 2005 2:20 am

Post by rtoupin » Tue Aug 15, 2006 10:25 pm

"So, for dummies....what file do I have to change, what code do I need to enter and where in the file should I place the code, or does that make a difference (other than before or after the file start)[/quote]You find the solution for your problem here.
If you don't understand it, please read this: How to Install MODs"

soooo.......

I read it and I read the mods, but I must have missed the part where it tells me which file to add the code to and where in the file to add it to make the changes work. I added the code to

usercp_register.php

At the end of the file as follows:


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

#
#-----[ FIND ]------------------------------------------------
#
define('CONFIRM_TABLE', $table_prefix.'confirm');

#
#-----[ AFTER, ADD ]------------------------------------------------
#
// Anti Bot Question Mod - Start
define('ANTI_BOT_QUEST_TABLE', $table_prefix.'anti_bot_quest');
// Anti Bot Question Mod - End

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>

so....where did I screw it up>?

And like the man said..thanks for being patient.

P.S. My mis-written usercp file can be found here:

http://www.calgaryworship.com/usercp.txt

Erchamion
Registered User
Posts: 2
Joined: Thu Aug 17, 2006 9:48 pm

Post by Erchamion » Thu Aug 17, 2006 9:53 pm

Hi everyone,

I installed this mod and it's working ok. But the problem is that my forum is in serbian and when I switch to Serbian language I dont have the anti bot question. When the forum is on english language all is ok.

Does anyone know what to change to make it work on serbian. I suppose that this will be needed for other languages too.

Thanks in advance.
Erchamion.

Post Reply

Return to “[2.0.x] MODs in Development”

cron