# filetypes : An array of bookmark extensions that Scuttle should
# add system tags for.
# reservedusers : An array of usernames that cannot be registered
+#
+# antispamQuestion: A question to avoid spam
+# antispamAnswer: The answer to the question (users have to put exactly the same answer)
######################################################################
$sitename = 'SemanticScuttle';
);
$reservedusers = array('all', 'watchlist');
+$antispamQuestion = 'Put here the answer to 1 + 2 + 3';
+$antispamAnswer = '6';
+
include_once('debug.inc.php');
?>
} elseif (!$userservice->isValidEmail($_POST['email'])) {
$tplVars['error'] = T_('E-mail address is not valid. Please try again.');
+ // Check if antispam answer is valid
+ } elseif (strcmp($antispamAnswer, $GLOBALS['antispamAnswer']) != 0) {
+ $tplVars['error'] = T_('Antispam answer is not valid. Please try again.');
+
// Register details
} elseif ($userservice->addUser($posteduser, $_POST['password'], $_POST['email'])) {
// Log in with new username
}
}
+$tplVars['antispamQuestion'] = $GLOBALS['antispamQuestion'];
$tplVars['loadjs'] = true;
$tplVars['subtitle'] = T_('Register');
$tplVars['formaction'] = createURL('register');
<td><input type="text" id="email" name="email" size="40" class="required" /></td>
<td></td>
</tr>
+
+<?php if(strlen($antispamQuestion)>0) {?>
+<tr>
+ <th align="left"><label for="question"><?php echo T_('Antispam question'); ?></label></th>
+ <td><input type="text" id="antispamAnswer" name="antispamAnswer" size="40" class="required" value="<?php echo $antispamQuestion ?>"/></td>
+ <td></td>
+</tr>
+<?php } ?>
+
<tr>
<td></td>
<td><input type="submit" name="submitted" value="<?php echo T_('Register'); ?>" /></td>
<?php
$this->includeTemplate($GLOBALS['bottom_include']);
-?>
\ No newline at end of file
+?>