Advanced features


Use of own questions

You need a Software to open a SQLite-Database. For example you can use the DB Browser for SQLite. Now open the Database Questions.sqlite, which is located in the directory qcaptcha/data/ and select the Tab Browse data. All Questions, which are not randomly generated computational tasks, can be found in the table questions_XX (e.g.: questions_en).

To add a question, create a new row and enter the full question including question marks in the column question and enter in the column answer the corresponding answer. You can add multiple correct awnsers by separating them with semicolons too. For example: Answer-1;Answer-2;Answer-3. Responses are case-insensitive.

Add more languages

You need a Software to open a SQLite-Database. For example you can use the DB Browser for SQLite. Now open the Database Questions.sqlite, which is located in the directory qcaptcha/data/ and select the Tab Execute SQL. First, create with the following SQL command a table named basic_XX. Replace XX with the abbreviation of the respective language (ISO-639-1).

CREATE TABLE "basic_XX" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"key"	TEXT,
	"value"	TEXT
)

Next, simply add the same columns as in the other basic_XX tables in your new table and translate the text of the row value.

CREATE TABLE "numbers_XX" (
	"id"	INTEGER,
	"name"	TEXT,
	PRIMARY KEY("id")
)

In the next step, create the table numbers_XX and insert 20 columns with the id from 0 to 20 and write in the column name the respective number word in the appropriate language.

CREATE TABLE "questions_XX" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"question"	TEXT,
	"answer"	TEXT
)

The last step is to create the questions_XX table where you can write down your questions. The captcha already masters mathematical questions in the appropriate language. More about adding your own questions learn in the section Use of own questions. Important: You also need to add the language in the file qcaptcha/QCaptcha.php. Simply add them in the same line as shown below.

$acceptedLanguages = array ('de', 'en', 'nl'); //Languages which exists in the Database 

To test your language you need to change the language of your browser

Change default language

The default language is used if the user's preferred languages are not available. This is by default English. You can change this setting if you edit the following line in the file qcaptcha/QCaptcha

$language = 'en'; //Default Language


Advanced features


Use of own questions

You need a Software to open a SQLite-Database. For example you can use the DB Browser for SQLite. Now open the Database Questions.sqlite, which is located in the directory wp-content/plugins/qcaptcha/data/ and select the Tab Browse data. All Questions, which are not randomly generated computational tasks, can be found in the table questions_XX (e.g.: questions_en).

To add a question, create a new row and enter the full question including question marks in the column question and enter in the column answer the corresponding answer. You can add multiple correct awnsers by separating them with semicolons too. For example: Answer-1;Answer-2;Answer-3. Responses are case-insensitive.

Add more languages

You need a Software to open a SQLite-Database. For example you can use the DB Browser for SQLite. Now open the Database Questions.sqlite, which is located in the directory wp-content/plugins/qcaptcha/data/ and select the Tab Execute SQL. First, create with the following SQL command a table named basic_XX. Replace XX with the abbreviation of the respective language (ISO-639-1).

CREATE TABLE "basic_XX" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"key"	TEXT,
	"value"	TEXT
)

Next, simply add the same columns as in the other basic_XX tables in your new table and translate the text of the row value.

CREATE TABLE "numbers_XX" (
	"id"	INTEGER,
	"name"	TEXT,
	PRIMARY KEY("id")
)

In the next step, create the table numbers_XX and insert 20 columns with the id from 0 to 20 and write in the column name the respective number word in the appropriate language.

CREATE TABLE "questions_XX" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"question"	TEXT,
	"answer"	TEXT
)

The last step is to create the questions_XX table where you can write down your questions. The captcha already masters mathematical questions in the appropriate language. More about adding your own questions learn in the section Use of own questions. Important: You also need to add the language in the file wp-content/plugins/qcaptcha/QCaptcha.php. Simply add them in the same line as shown below.

$acceptedLanguages = array ('de', 'en', 'nl'); //Languages which exists in the Database 

To test your language you need to change the language of your browser

Change default language

The default language is used if the user's preferred languages are not available. This is by default English. You can change this setting if you edit the following line in the file wp-content/plugins/qcaptcha/QCaptcha

$language = 'en'; //Default Language