[ Index ]

PHP Cross Reference of phpBB-3.3.2-deutsch

title

Body

[close]

/phpbb/captcha/plugins/ -> qa.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 1040 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

qa:: (37 methods):
  __construct()
  init()
  is_installed()
  is_available()
  has_config()
  get_name()
  get_service_name()
  set_name()
  execute_demo()
  execute()
  get_template()
  get_demo_template()
  get_hidden_fields()
  garbage_collect()
  uninstall()
  install()
  validate()
  select_question()
  reselect_question()
  new_attempt()
  load_confirm_id()
  load_answer()
  check_answer()
  get_attempt_count()
  reset()
  is_solved()
  acp_page()
  acp_question_list()
  acp_get_question_data()
  acp_get_question_input()
  acp_update_question()
  acp_add_question()
  acp_insert_answers()
  acp_delete_question()
  validate_input()
  get_languages()
  acp_is_last()


Class: qa  - X-Ref

And now to something completely different. Let's make a captcha without extending the abstract class.
QA CAPTCHA sample implementation

__construct($table_captcha_questions, $table_captcha_answers, $table_qa_confirm)   X-Ref
Constructor

param: string $table_captcha_questions
param: string $table_captcha_answers
param: string $table_qa_confirm

init($type)   X-Ref

param: int $type  as per the CAPTCHA API docs, the type

is_installed()   X-Ref
See if the captcha has created its tables.


is_available()   X-Ref
API function - for the captcha to be available, it must have installed itself and there has to be at least one question in the board's default lang


has_config()   X-Ref
API function


get_name()   X-Ref
API function


get_service_name()   X-Ref

return: string the name of the service corresponding to the plugin

set_name($name)   X-Ref
Set the name of the plugin

param: string $name

execute_demo()   X-Ref
API function - not needed as we don't display an image


execute()   X-Ref
API function - not needed as we don't display an image


get_template()   X-Ref
API function - send the question to the template


get_demo_template()   X-Ref
API function - we just display a mockup so that the captcha doesn't need to be installed


get_hidden_fields()   X-Ref
API function


garbage_collect($type = 0)   X-Ref
API function


uninstall()   X-Ref
API function - we don't drop the tables here, as that would cause the loss of all entered questions.


install()   X-Ref
API function - set up shop


validate()   X-Ref
API function - see what has to be done to validate


select_question()   X-Ref
Select a question


reselect_question()   X-Ref
New Question, if desired.


new_attempt()   X-Ref
Wrong answer, so we increase the attempts and use a different question.


load_confirm_id()   X-Ref
See if there is already an entry for the current session.


load_answer()   X-Ref
Look up everything we need and populate the instance variables.


check_answer()   X-Ref
The actual validation


get_attempt_count()   X-Ref
API function


reset()   X-Ref
API function


is_solved()   X-Ref
API function


acp_page($id, $module)   X-Ref
API function - The ACP backend, this marks the end of the easy methods


acp_question_list($module)   X-Ref
This handles the list overview


acp_get_question_data($question_id)   X-Ref
Grab a question and bring it into a format the editor understands


acp_get_question_input()   X-Ref
Grab a question from input and bring it into a format the editor understands


acp_update_question($data, $question_id)   X-Ref
Update a question.
param mixed $data : an array as created from acp_get_question_input or acp_get_question_data


acp_add_question($data)   X-Ref
Insert a question.
param mixed $data : an array as created from acp_get_question_input or acp_get_question_data


acp_insert_answers($data, $question_id)   X-Ref
Insert the answers.
param mixed $data : an array as created from acp_get_question_input or acp_get_question_data


acp_delete_question($question_id)   X-Ref
Delete a question.


validate_input($question_data)   X-Ref
Check if the entered data can be inserted/used
param mixed $data : an array as created from acp_get_question_input or acp_get_question_data


get_languages()   X-Ref
List the installed language packs


acp_is_last($question_id)   X-Ref
See if there is a question other than the one we have




Generated: Wed Nov 11 20:28:18 2020 Cross-referenced by PHPXref 0.7.1