1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Backward Compatibility Fixes.

This commit is contained in:
Cameron
2016-12-01 19:12:25 -08:00
parent 5dd2ad8b99
commit c3df2134e2
4 changed files with 40 additions and 14 deletions

View File

@@ -255,8 +255,17 @@ class signup_shortcodes extends e_shortcode
$options['required'] = true; $options['required'] = true;
$options['pattern'] = '(?=^.{'.$len.',}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$'; $options['pattern'] = '(?=^.{'.$len.',}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$';
$options['autocomplete'] = 'off'; $options['autocomplete'] = 'off';
$options['class'] = vartrue($parm['class'],'');
$options['placeholder'] = vartrue($parm['placeholder'],''); if(!empty($parm['class']))
{
$options['class'] = $parm['class'];
}
if(!empty($parm['placeholder']))
{
$options['placeholder'] = $parm['placeholder'];
}
// $options['pattern'] = '\w{'.$len.',}'; // word of minimum length // $options['pattern'] = '\w{'.$len.',}'; // word of minimum length
@@ -277,9 +286,18 @@ class signup_shortcodes extends e_shortcode
{ {
return false; return false;
} }
$options = array('size'=>30,'class'=>'e-password tbox','required'=>1);
$options['class'] = vartrue($parm['class'],''); $options = array('size'=>30,'class'=>'e-password tbox','required'=>1); //defaults
$options['placeholder'] = vartrue($parm['placeholder'],'');
if(!empty($parm['class']))
{
$options['class'] = $parm['class'];
}
if(!empty($parm['placeholder']))
{
$options['placeholder'] = $parm['placeholder'];
}
return e107::getForm()->password('password2', '', 20, $options); return e107::getForm()->password('password2', '', 20, $options);
} }
@@ -301,7 +319,7 @@ class signup_shortcodes extends e_shortcode
function sc_signup_email($parm=null) function sc_signup_email($parm=null)
{ {
$options = array('size'=>30,'required'=>1,'class'=>'tbox form-control input-text e-email'); $options = array('size'=>30,'required'=>1,'class'=>'tbox form-control e-email');
$options['title'] = LAN_SIGNUP_108; // Must be a valid email address. $options['title'] = LAN_SIGNUP_108; // Must be a valid email address.
$options['class'] = vartrue($parm['class'],''); $options['class'] = vartrue($parm['class'],'');
$options['placeholder'] = vartrue($parm['placeholder'],''); $options['placeholder'] = vartrue($parm['placeholder'],'');
@@ -378,8 +396,8 @@ class signup_shortcodes extends e_shortcode
$uc = e107::getUserClass(); $uc = e107::getUserClass();
$frm = e107::getForm(); $frm = e107::getForm();
if(deftrue('BOOTSTRAP')) // if(deftrue('BOOTSTRAP'))
{ // {
$text = "<div class='checkboxes'>"; $text = "<div class='checkboxes'>";
$label = $tp->toHTML($uc->getName($classnum),false, 'defs'); $label = $tp->toHTML($uc->getName($classnum),false, 'defs');
@@ -389,11 +407,13 @@ class signup_shortcodes extends e_shortcode
$text .= "</div>"; $text .= "</div>";
return $text; return $text;
} // }
// code below is too unpredictable for reliable BC.
global $USERCLASS_SUBSCRIBE_ROW; global $USERCLASS_SUBSCRIBE_ROW;
e107::getDebug()->log($USERCLASS_SUBSCRIBE_ROW);
$tmp = explode(',',$current_value); $tmp = explode(',',$current_value);

View File

@@ -53,7 +53,7 @@ if(!defined($USERCLASS_SUBSCRIBE_START))
<td class='forumheader3' style='width:70%;margin-left:0px'> <td class='forumheader3' style='width:70%;margin-left:0px'>
<table style='".USER_WIDTH."'>"; <table style='".USER_WIDTH."'>";
} }
/*
if(!defined($USERCLASS_SUBSCRIBE_ROW)) if(!defined($USERCLASS_SUBSCRIBE_ROW))
{ {
$USERCLASS_SUBSCRIBE_ROW = " $USERCLASS_SUBSCRIBE_ROW = "
@@ -68,7 +68,7 @@ if(!defined($USERCLASS_SUBSCRIBE_ROW))
<span class='smalltext'>{USERCLASS_DESCRIPTION}</span> <span class='smalltext'>{USERCLASS_DESCRIPTION}</span>
</td> </td>
</tr>"; </tr>";
} }*/
if(!defined($USERCLASS_SUBSCRIBE_END)) if(!defined($USERCLASS_SUBSCRIBE_END))
{ {

View File

@@ -1010,7 +1010,7 @@ class e_form
foreach($avFiles as $fi) foreach($avFiles as $fi)
{ {
$img_path = $tp->thumbUrl(e_AVATAR_DEFAULT.$fi['fname']); $img_path = $tp->thumbUrl(e_AVATAR_DEFAULT.$fi['fname']);
$text .= "\n<a class='e-expandit' title='Choose this avatar' href='#{$optioni}'><img src='".$img_path."' alt='' onclick=\"insertext('".$fi['fname']."', '".$idinput."');document.getElementById('".$previnput."').src = this.src;\" /></a> "; $text .= "\n<a class='e-expandit' title='Choose this avatar' href='#{$optioni}'><img src='".$img_path."' alt='' onclick=\"insertext('".$fi['fname']."', '".$idinput."');document.getElementById('".$previnput."').src = this.src;return false\" /></a> ";
$count++; $count++;
@@ -1871,11 +1871,13 @@ class e_form
//width should be explicit set by current admin theme //width should be explicit set by current admin theme
// $size = 'input-large'; // $size = 'input-large';
$height = ''; $height = '';
$cols = 70;
switch($size) switch($size)
{ {
case 'tiny': case 'tiny':
$rows = '3'; $rows = '3';
$cols = 50;
// $height = "style='height:250px'"; // inline required for wysiwyg // $height = "style='height:250px'"; // inline required for wysiwyg
break; break;
@@ -1926,7 +1928,7 @@ class e_form
$ret .= e107::getBB()->renderButtons($template,$help_tagid); $ret .= e107::getBB()->renderButtons($template,$help_tagid);
$ret .= $this->textarea($name, $value, $rows, 70, $options, $counter); // higher thank 70 will break some layouts. $ret .= $this->textarea($name, $value, $rows, $cols, $options, $counter); // higher thank 70 will break some layouts.
$ret .= "</div>\n"; $ret .= "</div>\n";

View File

@@ -23,4 +23,8 @@ mark { text-decoration: underline; color:#FF0000; font-weight:bold; }
#login-template { width:60%; max-width:350px; margin-right:auto;margin-left:auto; } #login-template { width:60%; max-width:350px; margin-right:auto;margin-left:auto; }
div.form-group { padding-top: 5px } div.form-group { padding-top: 5px }
div.news-empty { text-align:center; font-weight: bold } div.news-empty { text-align:center; font-weight: bold }
div.checkboxes label.checkbox { display: block }
textarea.bbarea { margin:0; }