Page 7 of 53

Posted: Mon Jan 22, 2007 3:14 am
by lodp
this mod is working like charm, in the two days that i've got it operational, it already fought off more than 50 spammers :)

two things i'd like to bring up:

1. it would be great to have a checkbox for turning off e-mail notification to the site admin. it's an interesting read in the beginning, but it really fills up your mailbox..

2. will you come up with a version of the mod for phpBB3? it looks like beta 5 and after that rc1 will soon come out, and as i understood it they're mainly fixing bugs as of now, so you should hopefully be on the safe side if you start porting mods..

again, many thanks for your terrific work!

Posted: Mon Jan 22, 2007 3:42 am
by olpa
1. it would be great to have a checkbox for turning off e-mail notification to the site admin. it's an interesting read in the beginning, but it really fills up your mailbox..

Sorry, it's an incentive to sponsor me for further anti-spam development. However, if you know PHP, you can switch off the emails very easy.
2. will you come up with a version of the mod for phpBB3?

I don't know yet. There is rumour that phpBB 3 has built-in ability to define custom registration fields. If it is true, Textual Confirmation might be not needed. Anyway, I'm waiting for the release.

Posted: Mon Jan 22, 2007 8:10 pm
by JezUK1
Well done anyway on this mod my friend its ace!

My one says this:
Please answer the Textual Confirmation question, this stops spammers and bots from registering.


What you think?

Posted: Tue Jan 23, 2007 5:29 pm
by hotrodkush
Hey guys, just tried installing this and getting this error:
Could not insert question/answer pair!

DEBUG MODE

SQL Error : 1146 Table 'icmodified.TEXTUAL_CONFIRMATION_TABLE' doesn't exist

INSERT INTO TEXTUAL_CONFIRMATION_TABLE(question,answers) VALUES('hi
','hi')

Line : 113
File : admin_tc.php


I'm using multiple skins but ran the DB_update file after installing each of them. Any thoughts?

Posted: Tue Jan 23, 2007 5:34 pm
by drathbun
Check your edits to includes/constants.php... the table name is not being translated from the CONSTANT_STRING to the actual table name. I have not reviewed this MOD but generally that information is stored in includes/constants.php.

Posted: Tue Jan 23, 2007 8:27 pm
by hotrodkush
Thanks, I'll take a look.

EDIT: that worked, thanks alot!

Posted: Thu Jan 25, 2007 4:19 pm
by z28cave
I just wanted to thank you for this MOD. Works awesome!

Posted: Fri Jan 26, 2007 1:34 am
by GilaMonster
OK, the SQL changes are somehting I am learning, but don't know hat much about. I know I can use the db_update file and do it quickly, but I would like to learn how to do it manually. :wink:
Here's the SQL proceedure as privided:

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_textual_confirmation (
 id       INTEGER NOT NULL AUTO_INCREMENT,
 question TEXT    NOT NULL,
 answers  TEXT    NOT NULL,
 PRIMARY KEY (id)
);
INSERT INTO phpbb_textual_confirmation(question,answers) VALUES ('Are you human?', 'yes\nja\noui');
INSERT INTO phpbb_textual_confirmation(question,answers) VALUES ('Say hello', 'hello\nhi\nhallo');
My question is: Do I enter the information above into "Create new table on database"? and what do I enter for "Number of fields:"? or do I add the code somewhere else entirely? :?
Thanks for any help... :D

Posted: Fri Jan 26, 2007 3:38 am
by olpa
GilaMonster, I think you are playing with phpmysqladmin. The easiest way is to find an SQL console there to execute arbitrary SQL queries. I don't use phpmysqladmin, therefore can't suggest where it is. Probably this topic can help: How to use phpMyadmin.

To all who said thanks: thanks for the kind words!

Problem with SQL change

Posted: Fri Jan 26, 2007 4:37 pm
by TTR_Graeme
Thanks to all involved for this MOD. I have just installed it on my board.

I did have a small problem on the way, however. I have found a solution that seems to work so I thought I'd post the problem and the solution here.

I hope that someone more knowledgeable than me will check and make sure it's not a huge mistake and if not I hope this will help someone else.

When I got to this instruction...
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_textual_confirmation (
id INTEGER NOT NULL AUTO_INCREMENT,
question TEXT NOT NULL,
answers TEXT NOT NULL,
PRIMARY KEY (id)
);


...I got the following error:
ERROR: syntax error at or near "AUTO_INCREMENT" at character 70


After some searching, I found that my database, PostgreSQL, doesn't quite understand this the same way MySQL does. I guess the MOD developers and most users are using MySQL.

By using the following command instead I was able to get it to work:

Code: Select all

CREATE TABLE phpbb_textual_confirmation (
 id       SERIAL,
 question TEXT    NOT NULL,
 answers  TEXT    NOT NULL,
 PRIMARY KEY (id)
 );
However it did produce the following notices:
NOTICE: CREATE TABLE will create implicit sequence "phpbb_textual_confirmation_id_seq" for "serial" column "phpbb_textual_confirmation.id"

NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "phpbb_textual_confirmation_pkey" for table "phpbb_textual_confirmation"


If you understand the problem and the suggested solution I would very much like to hear your comments.

Thanks

Posted: Fri Jan 26, 2007 4:58 pm
by drathbun
You're correct, mysql provides the "auto_increment" attribute as a way to have the database assign the primary key. Setting up a sequence for postgresql accomplishes the same thing.

Posted: Fri Jan 26, 2007 7:05 pm
by GilaMonster
olpa wrote: GilaMonster, I think you are playing with phpmysqladmin. The easiest way is to find an SQL console there to execute arbitrary SQL queries. I don't use phpmysqladmin, therefore can't suggest where it is. Probably this topic can help: How to use phpMyadmin.

To all who said thanks: thanks for the kind words!

I clicked on SQL. I'm not sure if this is what you are refering to..
This image has been reduced...
Image
Should I copy and past the following into this and click on "go"? Is that how it works? Sorry I am so stupid about this.

Code: Select all

CREATE TABLE phpbb_textual_confirmation ( 
 id       INTEGER NOT NULL AUTO_INCREMENT, 
 question TEXT    NOT NULL, 
 answers  TEXT    NOT NULL, 
 PRIMARY KEY (id) 
); 
INSERT INTO phpbb_textual_confirmation(question,answers) VALUES ('Are you human?', 'yes\nja\noui'); 
INSERT INTO phpbb_textual_confirmation(question,answers) VALUES ('Say hello', 'hello\nhi\nhallo');
If so, do I add the entire code all at once or put the CREATE TABLE part into it and click go and then do the same thing with each of the INSERT INTO parts? Yes, I have no clue...
Thanks for any help. :D

Posted: Fri Jan 26, 2007 9:56 pm
by colin_bb
Installed with easymod, no problems at all. Really good mod, 5/5. Thanks :)

Posted: Sat Jan 27, 2007 4:08 am
by VPWanda
Great mod!
I haven't had a single spammer on my forum since I've installed it.
And it's nice not to have to remove a whole bunch of inactive accounts each day.

Posted: Sat Jan 27, 2007 4:37 am
by olpa
Again, thanks everyone for greate feedback! (And please don't forget to vote for the MOD as "Excellent".)

TTR_Graeme, according to the tool EasyMOD :: SQL Parser, the PostgreSQL code to create the table looks so:

Code: Select all

CREATE TABLE phpbb_textual_confirmation (
    id SERIAL,
    question TEXT NOT NULL,
    answers TEXT NOT NULL,
    CONSTRAINT phpbb_textual_confirmation_pk PRIMARY KEY (id)
);
However, I think your variant should work too.

GilaMonster: yes, you can copy the SQL commands to the text field "Run SQL query/queries on database..." and click on "Go". You can execute all the three command at once, or you can execute command-by-command three times. Not important.