1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Signup and FAQs cleanup

This commit is contained in:
Cameron
2013-03-10 22:07:06 -07:00
parent 53eb60195e
commit 61616c95b0
7 changed files with 36 additions and 18 deletions

View File

@@ -212,6 +212,7 @@ class signup_shortcodes extends e_shortcode
$options['title'] = LAN_SIGNUP_108; // Must be a valid email address. $options['title'] = LAN_SIGNUP_108; // Must be a valid email address.
$text = e107::getForm()->email('email',($_POST['email'] ? $_POST['email'] : $email),100,$options); $text = e107::getForm()->email('email',($_POST['email'] ? $_POST['email'] : $email),100,$options);
$text .= "<div class='e-email-hint' style='display:none' data-hint='Did you mean <b>[x]</b>?'><!-- --></div>"; $text .= "<div class='e-email-hint' style='display:none' data-hint='Did you mean <b>[x]</b>?'><!-- --></div>";
$text .= "<input type='text' name='email2' value='' style='display:none' />"; // spam-trap.
return $text; return $text;
} }

View File

@@ -176,6 +176,10 @@ class e_form
* @param $value * @param $value
* @param $maxlength * @param $maxlength
* @param $options * @param $options
* - size: mini, small, medium, large, xlarge, xxlarge
* - class:
* - typeahead: 'users'
*
*/ */
function text($name, $value, $maxlength = 80, $options= array()) function text($name, $value, $maxlength = 80, $options= array())
{ {
@@ -183,7 +187,8 @@ class e_form
{ {
parse_str($options,$options); parse_str($options,$options);
} }
/*
if(!vartrue($options['class'])) if(!vartrue($options['class']))
{ {
if($maxlength < 10) if($maxlength < 10)
@@ -205,6 +210,7 @@ class e_form
$options['class'] = 'tbox input-text'; $options['class'] = 'tbox input-text';
} }
} }
*/
if(vartrue($options['typeahead'])) if(vartrue($options['typeahead']))
{ {
@@ -215,7 +221,12 @@ class e_form
} }
} }
if(vartrue($options['size']) && is_numeric($options['size']))
{
$options['class'] .= " input-".$options['size'];
unset($options['size']); // don't include in html 'size='.
}
$options = $this->format_options('text', $name, $options); $options = $this->format_options('text', $name, $options);

View File

@@ -340,6 +340,10 @@ define("LAN_CATEGORIES", "Categories");
define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode."); define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode.");
define("LAN_COPYRIGHT", "Copyright"); define("LAN_COPYRIGHT", "Copyright");
define("LAN_CREATE_CATEGORY", "Create Category");
define("LAN_CREATE_ITEM", "Create Item");
define("LAN_SECURITYL_0", "Looking for trouble (none)"); define("LAN_SECURITYL_0", "Looking for trouble (none)");
define("LAN_SECURITYL_5", "Balanced"); define("LAN_SECURITYL_5", "Balanced");
define("LAN_SECURITYL_7", "High"); define("LAN_SECURITYL_7", "High");

View File

@@ -40,9 +40,9 @@ class faq_admin extends e_admin_dispatcher
protected $adminMenu = array( protected $adminMenu = array(
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'), 'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'),
'main/create' => array('caption'=> LANA_FAQ_CREATE_ITEM, 'perm' => 'P'), 'main/create' => array('caption'=> LAN_CREATE_ITEM, 'perm' => 'P'),
'cat/list' => array('caption'=> LANA_FAQ_CATEGORIES, 'perm' => 'P'), 'cat/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
'cat/create' => array('caption'=> LANA_FAQ_CREATE_CATEGORY, 'perm' => 'P'), 'cat/create' => array('caption'=> LAN_CREATE_CATEGORY, 'perm' => 'P'),
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'), 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0') // 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0')
); );

View File

@@ -7,14 +7,12 @@
*/ */
define('LANA_FAQ_CREATE_ITEM', 'Create FAQ');
define('LANA_FAQ_CATEGORIES', 'Categories');
define('LANA_FAQ_CREATE_CATEGORY', 'Create Category');
define('LANA_FAQ_QUESTION', 'Question'); define('LANA_FAQ_QUESTION', 'Question');
define('LANA_FAQ_ANSWER', 'Answer'); define('LANA_FAQ_ANSWER', 'Answer');
define('LANA_FAQ_COMMENT', 'Comment'); define('LANA_FAQ_COMMENT', 'Comment'); //FIXME Use generic
define('LANA_FAQ_UNAME', 'User name'); define('LANA_FAQ_UNAME', 'User name'); //FIXME Use generic
define('LANA_FAQ_ULOGINNAME', 'User login'); define('LANA_FAQ_ULOGINNAME', 'User login'); //FIXME Use generic
define('LANA_FAQ_PREF_1', 'Allow submitting of FAQs by:'); define('LANA_FAQ_PREF_1', 'Allow submitting of FAQs by:');
define('LANA_FAQ_PREF_2', 'Allow submitting of Questions by:'); define('LANA_FAQ_PREF_2', 'Allow submitting of Questions by:');
define('LANA_FAQ_PREF_3', 'Use Classic Layout'); define('LANA_FAQ_PREF_3', 'Use Classic Layout');

View File

@@ -44,9 +44,10 @@ $USER_SHORT_TEMPLATE_START = "
<br /> <br />
<br /> <br />
{USER_FORM_START} {USER_FORM_START}
<p>".LAN_USER_70.": {USER_FORM_RECORDS} ".LAN_USER_57." {USER_FORM_ORDER} <div class='form-inline'>
".LAN_USER_70.": {USER_FORM_RECORDS} ".LAN_USER_57." {USER_FORM_ORDER}
{USER_FORM_SUBMIT} {USER_FORM_SUBMIT}
</p> </div>
{USER_FORM_END} {USER_FORM_END}
</div> </div>
<br /> <br />
@@ -54,10 +55,10 @@ $USER_SHORT_TEMPLATE_START = "
<table style='".USER_WIDTH."' class='table fborder e-list'> <table style='".USER_WIDTH."' class='table fborder e-list'>
<thead> <thead>
<tr> <tr>
<td class='fcaption' style='width:2%'>&nbsp;</td> <th class='fcaption' style='width:2%'>&nbsp;</th>
<td class='fcaption' style='width:20%'>".LAN_USER_58."</td> <th class='fcaption' style='width:20%'>".LAN_USER_58."</th>
<td class='fcaption' style='width:20%'>".LAN_USER_60."</td> <th class='fcaption' style='width:20%'>".LAN_USER_60."</th>
<td class='fcaption' style='width:20%'>".LAN_USER_59."</td> <th class='fcaption' style='width:20%'>".LAN_USER_59."</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -13,7 +13,10 @@
require_once("class2.php"); require_once("class2.php");
if(vartrue($_POST['email2'])) // spam-trap.
{
exit;
}
$qs = explode(".", e_QUERY); $qs = explode(".", e_QUERY);
if($qs[0] != 'activate') if($qs[0] != 'activate')