aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:49:51 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:49:51 +0000
commit514afb57ceb65ef6109f7bc60181a0aa45b8f950 (patch)
treea53626b764b691fb66e0ec1b2c5f5f1dc8ce962e /mod
parente463f5079c9eef80350184cdb8af968dc416e90e (diff)
downloadelgg-514afb57ceb65ef6109f7bc60181a0aa45b8f950.tar.gz
elgg-514afb57ceb65ef6109f7bc60181a0aa45b8f950.tar.bz2
Updated Captcha UI.
git-svn-id: http://code.elgg.org/elgg/trunk@5400 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/captcha/captcha.php3
-rw-r--r--mod/captcha/start.php23
-rw-r--r--mod/captcha/views/default/captcha/css.php16
-rw-r--r--mod/captcha/views/default/input/captcha.php12
4 files changed, 26 insertions, 28 deletions
diff --git a/mod/captcha/captcha.php b/mod/captcha/captcha.php
index 0947940ec..1a2580f15 100644
--- a/mod/captcha/captcha.php
+++ b/mod/captcha/captcha.php
@@ -13,8 +13,7 @@
$token = get_input('captcha_token');
// Output captcha
- if ($token)
- {
+ if ($token) {
// Set correct header
header("Content-type: image/jpeg");
diff --git a/mod/captcha/start.php b/mod/captcha/start.php
index 9c76ce738..898d041b6 100644
--- a/mod/captcha/start.php
+++ b/mod/captcha/start.php
@@ -2,15 +2,14 @@
/**
* Elgg captcha plugin
*
- * @package ElggCaptcha
+ * @package captcha
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider Ltd
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
- function captcha_init()
- {
+ function captcha_init() {
global $CONFIG;
// Register page handler for captcha functionality
@@ -39,8 +38,7 @@
}
}
- function captcha_page_handler($page)
- {
+ function captcha_page_handler($page) {
global $CONFIG;
if (isset($page[0])) {
@@ -53,8 +51,7 @@
/**
* Generate a token to act as a seed value for the captcha algorithm.
*/
- function captcha_generate_token()
- {
+ function captcha_generate_token() {
return md5(generate_action_token(time()).rand()); // Use action token plus some random for uniqueness
}
@@ -64,8 +61,7 @@
* @param string $seed_token
* @return string
*/
- function captcha_generate_captcha($seed_token)
- {
+ function captcha_generate_captcha($seed_token) {
global $CONFIG;
/*
@@ -88,8 +84,7 @@
* @param string $seed_token
* @return bool
*/
- function captcha_verify_captcha($input_value, $seed_token)
- {
+ function captcha_verify_captcha($input_value, $seed_token) {
if (strcasecmp($input_value, captcha_generate_captcha($seed_token)) == 0)
return true;
@@ -104,8 +99,7 @@
* @param unknown_type $returnvalue
* @param unknown_type $params
*/
- function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params)
- {
+ function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params) {
$token = get_input('captcha_token');
$input = get_input('captcha_input');
@@ -126,8 +120,7 @@
* @param unknown_type $returnvalue
* @param unknown_type $params
*/
- function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params)
- {
+ function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params) {
if (!is_array($returnvalue))
$returnvalue = array();
diff --git a/mod/captcha/views/default/captcha/css.php b/mod/captcha/views/default/captcha/css.php
index 7466cbb24..7deb4440e 100644
--- a/mod/captcha/views/default/captcha/css.php
+++ b/mod/captcha/views/default/captcha/css.php
@@ -1,6 +1,12 @@
+<?php
+/**
+ * Elgg Captcha CSS
+ *
+ * @package captcha
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
-.captcha-input-image {
- text-align: center;
- margin: auto;
-}
-
+?> \ No newline at end of file
diff --git a/mod/captcha/views/default/input/captcha.php b/mod/captcha/views/default/input/captcha.php
index 879a01c2d..2c880eb0a 100644
--- a/mod/captcha/views/default/input/captcha.php
+++ b/mod/captcha/views/default/input/captcha.php
@@ -15,12 +15,12 @@
<div class="captcha">
<input type="hidden" name="captcha_token" value="<?php echo $token; ?>" />
<label>
- <?php echo elgg_echo('captcha:entercaptcha'); ?><br /><br />
- <div class="captcha-right">
- <img class="captcha-input-image" src="<?php echo $vars['url'] . "pg/captcha/$token"; ?>" /><br />
- </div><br />
- <div class="captcha-left">
- <?php echo elgg_view('input/text', array('internalname' => 'captcha_input', 'class' => 'captcha-input-text')); ?>
+ <?php echo elgg_echo('captcha:entercaptcha'); ?>
+ <div class="captcha_image">
+ <img class="captcha-input-image" src="<?php echo $vars['url'] . "pg/captcha/$token"; ?>" />
+ </div>
+ <div class="captcha_input">
+ <?php echo elgg_view('input/text', array('internalname' => 'captcha_input')); ?>
</div>
</label>
</div> \ No newline at end of file