summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/helpers/captcha_helper.rst86
1 files changed, 45 insertions, 41 deletions
diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst
index b40d8a252..13cf92a19 100644
--- a/user_guide_src/source/helpers/captcha_helper.rst
+++ b/user_guide_src/source/helpers/captcha_helper.rst
@@ -5,55 +5,24 @@ CAPTCHA Helper
The CAPTCHA Helper file contains functions that assist in creating
CAPTCHA images.
-.. contents:: Page Contents
+.. contents::
+ :local:
+
+.. raw:: html
+
+ <div class="custom-index container"></div>
Loading this Helper
===================
-This helper is loaded using the following code
-::
+This helper is loaded using the following code::
$this->load->helper('captcha');
-The following functions are available:
-
-create_captcha()
-================
-
-.. function:: function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '')
-
- :param array $data: Array of data for the CAPTCHA
- :param string $img_path: Path to create the image in
- :param string $img_url: URL to the CAPTCHA image folder
- :param string $font_path: Server path to font
- :returns: array('word' => $word, 'time' => $now, 'image' => $img)
-
-Takes an array of information to generate the CAPTCHA as input and
-creates the image to your specifications, returning an array of
-associative data about the image.
-
-::
-
- array(
- 'image' => IMAGE TAG
- 'time' => TIMESTAMP (in microtime)
- 'word' => CAPTCHA WORD
- )
-
-The **image** is the actual image tag::
-
- <img src="http://example.com/captcha/12345.jpg" width="140" height="50" />
-
-The **time** is the micro timestamp used as the image name without the
-file extension. It will be a number like this: 1139612155.3422
-
-The **word** is the word that appears in the captcha image, which if not
-supplied to the function, will be a random string.
-
Using the CAPTCHA helper
-------------------------
+========================
-Once loaded you can generate a captcha like this::
+Once loaded you can generate a CAPTCHA like this::
$vals = array(
'word' => 'Random word',
@@ -152,4 +121,39 @@ this::
if ($row->count == 0)
{     
echo 'You must submit the word that appears in the image.';
- } \ No newline at end of file
+ }
+
+Available Functions
+===================
+
+The following functions are available:
+
+.. function:: create_captcha([$data = ''[, $img_path = ''[, $img_url = ''[, $font_path = '']]]])
+
+ :param array $data: Array of data for the CAPTCHA
+ :param string $img_path: Path to create the image in
+ :param string $img_url: URL to the CAPTCHA image folder
+ :param string $font_path: Server path to font
+ :returns: array('word' => $word, 'time' => $now, 'image' => $img)
+
+ Takes an array of information to generate the CAPTCHA as input and
+ creates the image to your specifications, returning an array of
+ associative data about the image.
+
+ ::
+
+ array(
+ 'image' => IMAGE TAG
+ 'time' => TIMESTAMP (in microtime)
+ 'word' => CAPTCHA WORD
+ )
+
+ The **image** is the actual image tag::
+
+ <img src="http://example.com/captcha/12345.jpg" width="140" height="50" />
+
+ The **time** is the micro timestamp used as the image name without the
+ file extension. It will be a number like this: 1139612155.3422
+
+ The **word** is the word that appears in the captcha image, which if not
+ supplied to the function, will be a random string. \ No newline at end of file