1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

"<div class='field-help'>" etc has been replaced by the $frm->help() method and is also used by the admin-ui.

This commit is contained in:
Cameron 2021-02-04 08:45:10 -08:00
parent 82fbeab43c
commit 5870fbdb84
15 changed files with 300 additions and 210 deletions

View File

@ -515,14 +515,17 @@ class banlist_ui extends e_admin_ui
foreach ($ipAdministrator->getValidReasonList() as $bt)
{
$i = abs($bt) + 1; // Forces a single-digit positive number
$helpTip = $ipAdministrator->getBanTypeString($bt, TRUE);
$text .= "
<tr>
<td>
<strong>".$ipAdministrator->getBanTypeString($bt, FALSE)."</strong>
<div class='field-help'>".$ipAdministrator->getBanTypeString($bt, TRUE)."</div>
".$frm->help($helpTip, 'before')."
</td>
<td class='left'>
".$frm->textarea('ban_text_'.($i), $pref['ban_messages'][$bt], 4, 120, array('size'=>'xxlarge'))."
".$frm->help($helpTip, 'after')."
</td>
<td class='center'>". self::ban_time_dropdown('', BANLAN_32, $pref['ban_durations'][$bt], 'ban_time_' . ($i)) ."</td>
</tr>
@ -605,46 +608,46 @@ class banlist_ui extends e_admin_ui
</colgroup>
<tbody>
<tr>
<td>".BANLAN_63."</td>
<td>".BANLAN_63."".$frm->help(BANLAN_65, 'before')."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_rdns_on_access', 1, $pref['enable_rdns'] == 1)."
<div class='field-help'>".BANLAN_65."</div>
".$frm->help(BANLAN_65, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_64."</td>
<td>".BANLAN_64.$frm->help(BANLAN_66, 'before')."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_rdns_on_ban', 1, $pref['enable_rdns_on_ban'] == 1)."
<div class='field-help'>".BANLAN_66."</div>
".$frm->help(BANLAN_66, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_67."</td>
<td>".BANLAN_67.$frm->help(BANLAN_68, 'before')."</td>
<td>
<div class='field-spacer'>".$this->drop_box('ban_access_guest', $ban_access_guest).BANLAN_70."</div>
<div class='field-spacer'>".$this->drop_box('ban_access_member', $ban_access_member).BANLAN_69."</div>
<div class='field-help'>".BANLAN_68."</div>
".$frm->help(BANLAN_68, 'after')."
</td>
</tr>
<tr>
<td>".BANLAN_71."</td>
<td>".BANLAN_71.$frm->help(BANLAN_73, 'before')."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_retrigger', 1, $pref['ban_retrigger'] == 1)."
<div class='field-help'>".BANLAN_73."</div>
".$frm->help(BANLAN_73, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_91."</td>
<td>".BANLAN_91.$frm->help(BANLAN_92, 'before')."</td>
<td>
".$frm->text('ban_date_format', varset($pref['ban_date_format'], '%H:%M %d-%m-%y'), 40)."
<div class='field-help'>".BANLAN_92."</div>
".$frm->help(BANLAN_92, 'after')."
</td>
</tr>
</tbody>

View File

@ -140,40 +140,43 @@ $text = "
<tr>
<td>
<strong class='e-tip'>".CACLAN_11."</strong>
<div class='field-help'>".CACLAN_13."</div>
".$frm->help(CACLAN_13, 'before')."
</td>
<td>{$contentcache_label}</td>
<td class='left middle'>
".$frm->radio_switch('cachestatus', e107::getPref('cachestatus'))."
".$frm->help(CACLAN_13, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_12."</strong>
<div class='field-help'>".CACLAN_14."</div>
".$frm->help(CACLAN_14, 'before')."
</td>
<td>{$syscache_label}</td>
<td class='left middle'>
".$frm->radio_switch('syscachestatus', e107::getPref('syscachestatus'))."
".$frm->help(CACLAN_14, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_28."</strong>
<div class='field-help'>".CACLAN_29."</div>
<strong class='e-tip'>".CACLAN_28."</strong>".$frm->help(CACLAN_29, 'before')."
</td>
<td>{$jscsscache_label}</td>
<td class='left middle'>
".$frm->radio_switch('jscsscachestatus', e107::getPref('jscsscachestatus'))."
".$frm->help(CACLAN_29, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_20."</strong>
<div class='field-help'>".CACLAN_21."</div>
<strong class='e-tip'>".CACLAN_20."</strong>".$frm->help(CACLAN_21, 'before')."
".$frm->help(CACLAN_21, 'after')."
</td>
<td>{$dbcache_label}</td>
<td class='left middle'>
@ -182,8 +185,8 @@ $text = "
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_22."</strong>
<div class='field-help'>".CACLAN_23."</div>
<strong class='e-tip'>".CACLAN_22."</strong>".$frm->help(CACLAN_23, 'before')."
".$frm->help(CACLAN_23, 'after')."
</td>
<td>{$imgcache_label}</td>
<td class='left middle'>

View File

@ -548,9 +548,8 @@ class cron_admin_form_ui extends e_admin_form_ui
return "<a class='e-tip' href=''>".ADMIN_INFO_ICON."</a>
<div class='field-help'>".$text."</div>";
return $text;
<div class='field-help>".$text."</div>";
}
if($mode == 'write')

View File

@ -1046,14 +1046,14 @@ class system_tools
</colgroup>
<tbody>";
$text = "<div>";
$text = "<div class='row'>";
foreach($this->_options as $key=>$val)
{
$text .= "<div class='pull-left' style='width:50%;padding-bottom:10px'>
<a class='btn btn-default btn-secondary btn-lg btn-large pull-left' style='margin-right:10px' href='".e_SELF."?mode=".$key."' title=\"".$val['label']."\">".$tp->toGlyph($val['icon'], ['fw'=>true])."</a>
$text .= "<div class='col-md-6 col-lg-4' style='height:80px; padding-bottom:10px'>
<a class='btn btn-default btn-secondary btn-lg btn-large pull-left' style='margin-right:10px' href='".e_SELF."?mode=".$key."' title=\"".$val['label']."\">".$tp->toGlyph($val['icon'], ['fw'=>true, 'size'=>'2x'])."</a>
<h4 style='margin-bottom:3px'><a href='".e_SELF."?mode=".$key."' title=\"".$val['label']."\">".$val['label']."</a></h4><small>".$val['diz']."</small>
</div>";

View File

@ -1029,7 +1029,7 @@ class news_admin_ui extends e_admin_ui
<td>".NWSLAN_127."</td>
<td>
".$frm->select('news_default_template', $newsTemplates, $pref['news_default_template'])."
<div class='field-help'>".LAN_NEWS_88."</div>
".$frm->help(LAN_NEWS_88, 'after')."
</td>
</tr>
@ -1044,7 +1044,7 @@ class news_admin_ui extends e_admin_ui
<td>".LAN_NEWS_91."</td>
<td>
".$frm->select('news_list_limit', $this->_optrange(50, false), $pref['news_list_limit'])."
<div class='field-help'>".LAN_NEWS_92."</div>
".$frm->help(LAN_NEWS_92, 'after')."
</td>
</tr>
@ -1052,7 +1052,7 @@ class news_admin_ui extends e_admin_ui
<td>".LAN_NEWS_93."</td>
<td>
".$frm->checkboxes('news_list_templates', $this->news_renderTypes, varset($pref['news_list_templates'],0), array('useKeyValues' => 1))."
<div class='field-help'>".LAN_NEWS_94."</div>
".$frm->help(LAN_NEWS_94, 'after')."
</td>
</tr>
";
@ -1063,7 +1063,7 @@ class news_admin_ui extends e_admin_ui
<td>".LAN_NEWS_110."</td>
<td>
".$frm->number('news_cache_timeout',varset($pref['news_cache_timeout'],0), 6)."
<div class='field-help'>".LAN_NEWS_111."</div>
".$frm->help(LAN_NEWS_111, 'after')."
</td>
</tr>";
@ -1086,7 +1086,7 @@ class news_admin_ui extends e_admin_ui
<td>".NWSLAN_115."</td>
<td id='newsposts-archive-cont'>
".$frm->select('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']))."
<div class='field-help'>".NWSLAN_116."</div>
".$frm->help(NWSLAN_116, 'after')."
</td>
</tr>
<tr>
@ -1160,7 +1160,7 @@ class news_admin_ui extends e_admin_ui
<td>".NWSLAN_101."</td>
<td>
".$frm->number('subnews_resize', $pref['subnews_resize'], 5, 'size=6&class=tbox')."
<div class='field-help'>".NWSLAN_102."</div>
".$frm->help(NWSLAN_102, 'after')."
</td>
</tr>
<tr>
@ -1179,7 +1179,7 @@ class news_admin_ui extends e_admin_ui
<td>
<div class='auto-toggle-area autocheck'>
".$frm->radio_switch('news_newdateheader', $pref['news_newdateheader'])."
<div class='field-help'>".NWSLAN_112."</div>
".$frm->help(NWSLAN_112, 'after')."
</div>
</td>
</tr>
@ -1188,7 +1188,7 @@ class news_admin_ui extends e_admin_ui
<td>
<div class='auto-toggle-area autocheck'>
".$frm->radio_switch('news_unstemplate', vartrue($pref['news_unstemplate']))."
<div class='field-help'>".NWSLAN_114."</div>
".$frm->help(NWSLAN_114, 'after')."
</div>
</td>
</tr>

View File

@ -878,7 +878,7 @@ class plugin_ui extends e_admin_ui
$text .= "<tr>\n<td class='top'>".$tp->toHTML($val['label'],FALSE,'TITLE');
$text .= varset($val['preview']) ? "<div class='indent'>".$val['preview']."</div>" : "";
$text .= "</td>\n<td>".$frm->select($key,$val['itemList'],$val['itemDefault']);
$text .= varset($val['helpText']) ? "<div class='field-help'>".$val['helpText']."</div>" : "";
$text .= varset($val['helpText']) ? "".$frm->help($val['helpText'], 'after')."" : "";
$text .= "</td>\n</tr>\n";
}

View File

@ -252,7 +252,7 @@ function sendTest()
else
{
$mailheader_e107id = USERID;
$pref = e107::pref('core');
$pref = e107::pref();
$add = ($pref['mailer']) ? " (".strtoupper($pref['mailer']).") " : ' (PHP)';
@ -291,7 +291,7 @@ function sendTest()
else
{
$mes->addSuccess(LAN_MAILOUT_81. ' ('.$sendto.')');
$log->add('MAIL_01',$sendto,E_LOG_INFORMATIVE,'');
$log->add('MAIL_01',$sendto);
}
}
@ -335,24 +335,24 @@ $text = "
</td>
</tr>
<tr>
<td><label for='siteurl'>".PRFLAN_3."</label></td>
<td><label for='siteurl'>".PRFLAN_3."</label>".$frm->help(PRFLAN_159.": <strong>".SITEURL."</strong>", 'before')."</td>
<td>
".$frm->text('siteurl', $pref['siteurl'], 150, 'size=xxlarge')."
".($pref['siteurl'] == SITEURL ? "" : "<div class='field-help'>".PRFLAN_159.": <strong>".SITEURL."</strong></div>")."
".($pref['siteurl'] == SITEURL ? "" : $frm->help(PRFLAN_159.": <strong>".SITEURL."</strong>", 'after'))."
</td>
</tr>
<tr>
<td><label for='redirectsiteurl'>".PRFLAN_134."</label></td>
<td><label for='redirectsiteurl'>".PRFLAN_134."</label>".$frm->help(PRFLAN_135, 'before')."</td>
<td>";
/*
".$frm->radio('redirectsiteurl', 1, $pref['redirectsiteurl'], array('label'=>LAN_ENABLED))."
".$frm->radio('redirectsiteurl', 0, !$pref['redirectsiteurl'], array('label'=>LAN_DISABLED))."
*/
$text .= $frm->radio_switch('redirectsiteurl', $pref['redirectsiteurl'])."<div class='field-help'>".PRFLAN_135."</div>
$text .= $frm->radio_switch('redirectsiteurl', $pref['redirectsiteurl']).$frm->help(PRFLAN_135, 'after')."
</td>
</tr>
<tr>
<td><label for='sitebutton'>".PRFLAN_4."</label></td>
<td><label for='sitebutton'>".PRFLAN_4."</label>".$frm->help(PRFLAN_225, 'before')."</td>
<td>
";
/*
@ -391,29 +391,29 @@ $text .= "
</td>
</tr>
<tr>
<td><label for='sitelogo'>".PRFLAN_214."</label></td>
<td><label for='sitelogo'>".PRFLAN_214."</label>".$frm->help(PRFLAN_226, 'before')."</td>
<td>".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','w=200&help='.PRFLAN_226)."</td>
</tr>
<tr>
<td><label for='sitetag'>".PRFLAN_5."</label></td>
<td><label for='sitetag'>".PRFLAN_5."</label>".$frm->help(PRFLAN_227, 'before')."</td>
<td>
".$frm->textarea('sitetag', $tp->toForm($pref['sitetag']), 3, 59, array('size'=>'xxlarge'))."
<div class='field-help'>".PRFLAN_227."</div>
".$frm->help(PRFLAN_227, 'after')."
</td>
</tr>
<tr>
<td><label for='sitedescription'>".PRFLAN_6."</label></td>
<td><label for='sitedescription'>".PRFLAN_6."</label>".$frm->help(PRFLAN_228, 'before')."</td>
<td>
".$frm->textarea('sitedescription', $tp->toForm($pref['sitedescription']), 3, 80, array('size'=>'xxlarge'))."
<div class='field-help'>".PRFLAN_228."</div>
".$frm->help(PRFLAN_228, 'after')."
</td>
</tr>
<tr>
<td><label for='sitedisclaimer'>".PRFLAN_9."</label></td>
<td><label for='sitedisclaimer'>".PRFLAN_9."</label>".$frm->help(PRFLAN_229, 'before')."</td>
<td>
".$frm->textarea('sitedisclaimer',$tp->toForm( $pref['sitedisclaimer']), 3, 80, array('size'=>'xxlarge'))."
<div class='field-help'>".PRFLAN_229."</div>
".$frm->help(PRFLAN_229, 'after')."
</td>
</tr>
</tbody>
@ -446,17 +446,17 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
</td>
</tr>
<tr>
<td><label for='replyto-name'>".PRFLAN_174."</label></td>
<td><label for='replyto-name'>".PRFLAN_174."</label>".$frm->help(PRFLAN_175, 'before')."</td>
<td>
".$frm->text('replyto_name', $pref['replyto_name'], 100, array('size'=>'xlarge'))."
<div class='smalltext field-help'>".PRFLAN_175."</div>
".$frm->help(PRFLAN_175, 'after')."
</td>
</tr>
<tr>
<td><label for='replyto-email'>".PRFLAN_176."</label></td>
<td><label for='replyto-email'>".PRFLAN_176."</label>".$frm->help(PRFLAN_177, 'before')."</td>
<td>
".$frm->text('replyto_email', $pref['replyto_email'], 100, array('size'=>'xlarge'))."
<div class='smalltext field-help'>".PRFLAN_177."</div>
".$frm->help(PRFLAN_177, 'after')."
</td>
</tr>
@ -496,48 +496,48 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
<tr>
<td><label for='sitecontactinfo'>".PRFLAN_162."</label></td>
<td><label for='sitecontactinfo'>".PRFLAN_162."</label>".$frm->help(PRFLAN_163, 'before')."</td>
<td>
".$frm->textarea('sitecontactinfo', $pref['sitecontactinfo'], 6, 59, array('size'=>'xxlarge'))."
<div class='smalltext field-help'>".PRFLAN_163."</div>
".$frm->help(PRFLAN_163, 'after')."
</td>
</tr>
<tr>
<td><label for='sitecontacts'>".PRFLAN_168."</label></td>
<td><label for='sitecontacts'>".PRFLAN_168."</label>".$frm->help(PRFLAN_169, 'before')."</td>
<td>
".$e_userclass->uc_dropdown('sitecontacts', $pref['sitecontacts'], 'nobody,main,admin,classes', "tabindex='".$frm->getNext()."'")."
<div class='smalltext field-help'>".PRFLAN_169."</div>
".$frm->help(PRFLAN_169, 'after')."
</td>
</tr>
<tr>
<td><label for='contact_visibility'>".PRFLAN_258."</label></td>
<td><label for='contact_visibility'>".PRFLAN_258."</label>".$frm->help(PRFLAN_274, 'before')."</td>
<td>
".$e_userclass->uc_dropdown('contact_visibility', varset( $pref['contact_visibility'],e_UC_PUBLIC), null, "tabindex='".$frm->getNext()."'")."
<div class='smalltext field-help'>".PRFLAN_274."</div>
".$frm->help(PRFLAN_274, 'after')."
</td>
</tr>
<tr>
<td><label for='contact-filter'>".PRFLAN_270."</label></td>
<td><label for='contact-filter'>".PRFLAN_270."</label>".$frm->help(PRFLAN_271, 'before')."</td>
<td>
".$frm->textarea('contact_filter', $pref['contact_filter'], 5, 59, array('size'=>'xxlarge'))."
<div class='smalltext field-help'>".PRFLAN_271."</div>
".$frm->help(PRFLAN_271, 'after')."
</td>
</tr>
<tr>
<td><label for='contact-emailcopy'>".PRFLAN_164."</label></td>
<td><label for='contact-emailcopy'>".PRFLAN_164."</label>".$frm->help(PRFLAN_165, 'before')."</td>
<td>";
/*
".$frm->radio('contact_emailcopy', 1, $pref['contact_emailcopy'])."
".$frm->label(LAN_ENABLED, 'contact_emailcopy', 1)."&nbsp;&nbsp;
".$frm->radio('contact_emailcopy', 0, !$pref['contact_emailcopy'])."
".$frm->label(LAN_DISABLED, 'contact_emailcopy', 0)."
<div class='smalltext field-help'>".PRFLAN_165."</div>
".$frm->help(PRFLAN_165, 'after')."
*/
$text .= $frm->radio_switch('contact_emailcopy', $pref['contact_emailcopy'])."<div class='smalltext field-help'>".PRFLAN_165."</div>
$text .= $frm->radio_switch('contact_emailcopy', $pref['contact_emailcopy']).$frm->help(PRFLAN_165, 'after')."
@ -561,25 +561,25 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='gdpr-privacypolicy'>".PRFLAN_278."</label></td>
<td><label for='gdpr-privacypolicy'>".PRFLAN_278."</label>".$frm->help(PRFLAN_279, 'before')."</td>
<td>
".$frm->text('gdpr_privacypolicy', $pref['gdpr_privacypolicy'], 200, array('size'=>'xxlarge'))."
<div class='smalltext field-help'>".PRFLAN_279."</div>
".$frm->help(PRFLAN_279, 'after')."
</td>
</tr>
<tr>
<td><label for='gdpr-termsandconditions'>".PRFLAN_280."</label></td>
<td><label for='gdpr-termsandconditions'>".PRFLAN_280."</label>".$frm->help(PRFLAN_279, 'before')."</td>
<td>
".$frm->text('gdpr_termsandconditions', $pref['gdpr_termsandconditions'], 200, array('size'=>'xxlarge'))."
<div class='smalltext field-help'>".PRFLAN_279."</div>
".$frm->help(PRFLAN_279, 'after')."
</td>
</tr>
<tr>
<td><label>".LAN_DESCRIPTION."</label></td>
<td><label>".LAN_DESCRIPTION."</label>".$frm->help(nl2br(PRFLAN_281), 'before')."</td>
<td>
<div class='field-help'>".nl2br(PRFLAN_281)."</div>
".$frm->help(nl2br(PRFLAN_281), 'after')."
</td>
</tr>
</tbody>
@ -650,32 +650,32 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='admin-alerts-ok'>".PRFLAN_95."</label></td>
<td><label for='admin-alerts-ok'>".PRFLAN_95."</label>".$frm->help(PRFLAN_96, 'before')."</td>
<td>
".$frm->radio_switch('admin_alerts_ok', $pref['admin_alerts_ok'])."
<div class='field-help'>".PRFLAN_96."</div>
".$frm->help(PRFLAN_96, 'after')."
</td>
</tr>
<tr>
<td><label for='admin-alerts-uniquemenu'>".PRFLAN_97."</label></td>
<td><label for='admin-alerts-uniquemenu'>".PRFLAN_97."</label>".$frm->help(PRFLAN_98, 'before')."</td>
<td>
".$frm->radio_switch('admin_alerts_uniquemenu', $pref['admin_alerts_uniquemenu'])."
<div class='field-help'>".PRFLAN_98."</div>
".$frm->help(PRFLAN_98, 'after')."
</td>
</tr>";
/*<tr>
<td>".PRFLAN_199."</td>
<td>
".$frm->radio_switch('admin_slidedown_subs', $pref['admin_slidedown_subs'])."
<div class='field-help'>".PRFLAN_200."</div>
".$frm->help(PRFLAN_200, 'after')."
</td>
</tr>*/
$text .= "
<tr>
<td><label for='admin-separate-plugins'>".PRFLAN_204."</label></td>
<td><label for='admin-separate-plugins'>".PRFLAN_204."</label>".$frm->help(PRFLAN_205, 'before')."</td>
<td>
".$frm->radio_switch('admin_separate_plugins', varset($pref['admin_separate_plugins']))."
<div class='field-help'>".PRFLAN_205."</div>
".$frm->help(PRFLAN_205, 'after')."
</td>
</tr>
<tr>
@ -707,13 +707,16 @@ $text .= "
";
// Date options.
$dateHelp = PRFLAN_25." <a target='_blank' href='http://www.php.net/manual/en/function.strftime.php' rel='external'>".PRFLAN_93."</a>";
$ga = e107::getDate();
$date1 = $ga->convert_date(time(), "short");
$date2 = $ga->convert_date(time(), "long");
$date3 = $ga->convert_date(time(), "forum");
$date1 = $ga->convert_date(time(), "short")."<br />".$dateHelp;
$date2 = $ga->convert_date(time(), "long")."<br />".$dateHelp;
$date3 = $ga->convert_date(time(), "forum")."<br />".$dateHelp;
//$core_pref$date4 = e107::getDate()->convert(time(),"input");
$date4 = $tp->toDate(time(),"input");
$text .= "
<fieldset class='e-hideme' id='core-prefs-date'>
<legend>".PRFLAN_21."</legend>
@ -724,25 +727,24 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='shortdate'>".PRFLAN_22."</label></td>
<td><label for='shortdate'>".PRFLAN_22."</label>".$frm->help(PRFLAN_83.": ".$date1,'before')."</td>
<td>
".$frm->text('shortdate', $pref['shortdate'], 50)."
<div class='field-help'>".PRFLAN_83.": {$date1}</div>
".$frm->help(PRFLAN_83.": ".$date1,'after')."
</td>
</tr>
<tr>
<td><label for='longdate'>".PRFLAN_23."</label></td>
<td><label for='longdate'>".PRFLAN_23."</label>".$frm->help(PRFLAN_83.": ".$date2, 'before')."</td>
<td>
".$frm->text('longdate', $pref['longdate'], 50)."
<div class='field-help'>".PRFLAN_83.": {$date2}</div>
".$frm->help(PRFLAN_83.": ".$date2, 'after')."
</td>
</tr>
<tr>
<td><label for='forumdate'>".PRFLAN_24."</label></td>
<td><label for='forumdate'>".PRFLAN_24."</label>".$frm->help(PRFLAN_83.": ".$date3,'before')."</td>
<td>
".$frm->text('forumdate', $pref['forumdate'], 50)."
<div class='field-help'>".PRFLAN_83.": {$date3}</div>
<div class='field-help'>".PRFLAN_25." <a target='_blank' href='http://www.php.net/manual/en/function.strftime.php' rel='external'>".PRFLAN_93."</a></div>
".$frm->help(PRFLAN_83.": ".$date3,'after')."
</td>
</tr>";
@ -842,17 +844,22 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='user-reg'>".PRFLAN_224."</label></td>
<td><label for='user-reg'>".PRFLAN_224."</label>".$frm->help(PRFLAN_30, 'before')."</td>
<td>
".$frm->radio('user_reg', $elements, $pref['user_reg'])."
<div class='smalltext field-help'>".PRFLAN_30."</div>
".$frm->help(PRFLAN_30, 'after')."
</td>
</tr>
</tr>";
$srch = array('[', ']');
$repl = array("<a href='".e_ADMIN_ABS."notify.php'>", '</a>');
$PRFLAN_154a = str_replace($srch,$repl, PRFLAN_154a);
$text .= "
<tr>
<td><label for='user-reg-veri'>".PRFLAN_154."</label></td>
<td><label for='user-reg-veri'>".PRFLAN_154."</label>".$frm->help($PRFLAN_154a, 'before')."</td>
<td>
".$frm->select_open('user_reg_veri', array('size'=>'xlarge'));
$veri_list = array(PRFLAN_152,PRFLAN_31,PRFLAN_153);
@ -862,14 +869,11 @@ $text .= "
$text .= $frm->option($v_title, $v, ($pref['user_reg_veri'] == $v));
}
$srch = array('[', ']');
$repl = array("<a href='".e_ADMIN_ABS."notify.php'>", '</a>');
$PRFLAN_154a = str_replace($srch,$repl, PRFLAN_154a);
$text .= "
</select>
<div class='field-help'>".$PRFLAN_154a."</div>
".$frm->help($PRFLAN_154a, 'after')."
</td>
</tr>
@ -908,32 +912,32 @@ $text .= "
$text .= "
<tr>
<td><label for='membersonly-enabled'>".PRFLAN_58."</label></td>
<td><label for='membersonly-enabled'>".PRFLAN_58."</label>".$frm->help(PRFLAN_59, 'before')."</td>
<td>";
$memDisp = !vartrue($pref['membersonly_enabled']) ? "e-hideme" : "";
$text .= $frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'],'', '', 'class=e-expandit')."
<div class='field-help'>".PRFLAN_59."</div>
".$frm->help(PRFLAN_59, 'after')."
<div class='e-expandit-container {$memDisp}' style='padding-top:10px'>
<div class='form-group clearfix'>
".
".$frm->help(PRFLAN_266, 'before').
$frm->select('membersonly_redirect',$membersOnlyRedirectOptions,$pref['membersonly_redirect'], array('size'=>'xxlarge'))."
<div class='field-help'>".PRFLAN_266."</div>
".$frm->help(PRFLAN_266, 'after')."
</div>
<div class='form-group clearfix'>".
<div class='form-group clearfix'>".$frm->help(PRFLAN_207, 'before').
$frm->textarea('membersonly_exceptions', $pref['membersonly_exceptions'], 3, 1, 'size=xxlarge&placeholder='.PRFLAN_206)."
<div class='field-help'>".PRFLAN_207."</div></div>
".$frm->help(PRFLAN_207, 'after')."</div>
</div>
</td>
</tr>
<tr>
<td><label for='autologinpostsignup'>".PRFLAN_197."</label></td>
<td><label for='autologinpostsignup'>".PRFLAN_197."</label>".$frm->help(PRFLAN_198, 'before')."</td>
<td>
".$frm->radio_switch('autologinpostsignup', $pref['autologinpostsignup'])."
<div class='smalltext field-help'>".PRFLAN_198."</div>
".$frm->help(PRFLAN_198, 'after')."
</td>
</tr>
@ -957,10 +961,10 @@ $text .= "
</tr>
<tr>
<td><label for='signup-maxip'>".PRFLAN_136."</label></td>
<td><label for='signup-maxip'>".PRFLAN_136."</label>".$frm->help(PRFLAN_78, 'before')."</td>
<td>
".$frm->number('signup_maxip', $pref['signup_maxip'], 3)."
<div class='field-help'>".PRFLAN_78."</div>
".$frm->help(PRFLAN_78, 'after')."
</td>
</tr>
@ -1064,13 +1068,17 @@ $text .= "
</table>
</td></tr>
</td></tr>";
$useCoppaHelp = PRFLAN_46." <a target='_blank' href='http://www.ftc.gov/privacy/coppafaqs.shtm' rel='external'>".PRFLAN_94."</a>";
$text .= "
<tr>
<td><label for='use-coppa'>".PRFLAN_45."</label></td>
<td><label for='use-coppa'>".PRFLAN_45."</label>".$frm->help($useCoppaHelp, 'before')."</td>
<td>
".$frm->radio_switch('use_coppa', $pref['use_coppa'])."
<div class='field-help'>".PRFLAN_46." <a target='_blank' href='http://www.ftc.gov/privacy/coppafaqs.shtm' rel='external'>".PRFLAN_94."</a></div>
".$frm->help($useCoppaHelp, 'after')."
</td>
</tr>";
@ -1095,24 +1103,25 @@ $text .= "
<td>
".$frm->textarea('signup_text_after', $pref['signup_text_after'], 3, 80, array('size'=>'xxlarge'))."
</td>
</tr>
</tr>";
$predefinedloginnameHelp = "<div style='text-align:left'>".PRFLAN_193."<br />".str_replace("[br]","<br /> ",PRFLAN_194)."</div>";
$text .= "
<tr>
<td><label for='predefinedloginname'>".PRFLAN_192.":</label></td>
<td><label for='predefinedloginname'>".PRFLAN_192.":</label>".$frm->help($predefinedloginnameHelp,'before')."</td>
<td>
".$frm->text('predefinedLoginName', $pref['predefinedLoginName'], 50)."
<div class='field-help'><div style='text-align:left'>".PRFLAN_193."<br />".str_replace("[br]","<br /> ",PRFLAN_194)."</div></div>
".$frm->help($predefinedloginnameHelp,'after')."
</td>
</tr>
<tr>
<td><label for='signup-disallow-text'>".CUSTSIG_18."</label></td>
<td><label for='signup-disallow-text'>".CUSTSIG_18."</label>".$frm->help(CUSTSIG_19, 'before')."</td>
<td>
".$frm->tags('signup_disallow_text', $pref['signup_disallow_text'], 500)."
<div class='field-help'>".CUSTSIG_19."</div>
".$frm->help(CUSTSIG_19, 'after')."
</td>
</tr>
@ -1125,10 +1134,10 @@ $text .= "
</tr>
<tr>
<td><label for='old_np'>".PRFLAN_124.":</label></td>
<td><label for='old_np'>".PRFLAN_124.":</label>".$frm->help(PRFLAN_125, 'before')."</td>
<td>
".$frm->radio_switch('old_np', $pref['old_np'])."
<div class='smalltext field-help'>".PRFLAN_125."</div>
".$frm->help(PRFLAN_125, 'after')."
</td>
</tr>
@ -1197,10 +1206,10 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
</colgroup>
<tbody>
<tr>
<td><label for='make-clickable'>".PRFLAN_127.":</label></td>
<td><label for='make-clickable'>".PRFLAN_127.":</label>".$frm->help(PRFLAN_128, 'before')."</td>
<td>
".$frm->radio_switch('make_clickable', $pref['make_clickable'])."
<div class='smalltext field-help'>".PRFLAN_128."</div>
".$frm->help(PRFLAN_128, 'after')."
</td>
</tr>";
@ -1210,32 +1219,35 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
<tr>
<td><label for='link-replace'>".PRFLAN_102."?:</label></td>
<td>
".$frm->help(PRFLAN_103, 'before')."
".$frm->radio_switch('link_replace', $pref['link_replace'],'', '', 'expandit=1')."
<div class='smalltext field-help'>".PRFLAN_103."</div>
".$frm->help(PRFLAN_103, 'after')."
<div class='e-expandit-container {$replaceDisp}'>
".$frm->help(PRFLAN_105, 'before')."
".$frm->text('link_text', $pref['link_text'], 200, 'placeholder='.PRFLAN_104)."
<div class='smalltext field-help'>".PRFLAN_105."</div>".
".$frm->help(PRFLAN_105, 'after')
.$frm->help(PRFLAN_108, 'before').
$frm->text('email_text', $tp->post_toForm($pref['email_text']), 200, 'placeholder='.PRFLAN_107)."
<div class='smalltext field-help'>".PRFLAN_108."</div>
".$frm->help(PRFLAN_108, 'after')."
</div>
</td>
</tr>
<tr >
<td><label for='links-new-window'>".PRFLAN_145."?:</label></td>
<td><label for='links-new-window'>".PRFLAN_145."?:</label>".$frm->help(PRFLAN_146, 'before')."</td>
<td>
".$frm->radio_switch('links_new_window', $pref['links_new_window'])."
<div class='smalltext field-help'>".PRFLAN_146."</div>
".$frm->help(PRFLAN_146, 'after')."
</td>
</tr>
<tr>
<td><label for='profanity-filter'>".PRFLAN_40."</label></td>
<td><label for='profanity-filter'>".PRFLAN_40."</label>".$frm->help(PRFLAN_41, 'before')."</td>
<td>
".$frm->radio_switch('profanity_filter', $pref['profanity_filter'])."
<div class='smalltext field-help'>".PRFLAN_41."</div>
".$frm->help(PRFLAN_41, 'after')."
</td>
</tr>
@ -1246,70 +1258,70 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
</td>
</tr>
<tr>
<td><label for='profanity-words'>".PRFLAN_43.":</label></td>
<td><label for='profanity-words'>".PRFLAN_43.":</label>".$frm->help(PRFLAN_44, 'before')."</td>
<td>
".$frm->tags('profanity_words', $pref['profanity_words'], 250, array('maxItems'=>40))."
<div class='field-help'>".PRFLAN_44."</div>
".$frm->help(PRFLAN_44, 'after')."
</td>
</tr>
<tr>
<td><label for='main-wordwrap'>".PRFLAN_109.":</label></td>
<td><label for='main-wordwrap'>".PRFLAN_109.":</label>".$frm->help(PRFLAN_110, 'before')."</td>
<td>
".$frm->number('main_wordwrap', $pref['main_wordwrap'], 3)."
<div class='smalltext field-help'>".PRFLAN_110."</div>
".$frm->help(PRFLAN_110, 'after')."
</td>
</tr>
<tr>
<td><label for='menu-wordwrap'>".PRFLAN_111.":</label></td>
<td><label for='menu-wordwrap'>".PRFLAN_111.":</label>".$frm->help(PRFLAN_110, 'before')."</td>
<td>
".$frm->number('menu_wordwrap', $pref['menu_wordwrap'], 3)."
<div class='smalltext field-help'>".PRFLAN_110."</div>
".$frm->help(PRFLAN_110, 'after')."
</td>
</tr>
<tr>
<td><label for='post-html'>".PRFLAN_116.":</label></td>
<td><label for='post-html'>".PRFLAN_116.":</label>".$frm->help(PRFLAN_117, 'before')."</td>
<td>
".$e_userclass->uc_dropdown('post_html', $pref['post_html'], 'nobody,public,member,admin,main,classes', "tabindex='".$frm->getNext()."'")."
<div class='smalltext field-help'>".PRFLAN_117."</div>
".$frm->help(PRFLAN_117, 'after')."
</td>
</tr>
<tr>
<td><label for='post-script'>".PRFLAN_215.":</label></td>
<td><label for='post-script'>".PRFLAN_215.":</label>".$frm->help(PRFLAN_216, 'before')."</td>
<td>
".$e_userclass->uc_dropdown('post_script',$pref['post_script'],'nobody,admin,main,classes,no-excludes')."
<div class='smalltext field-help'>".PRFLAN_216."</div>
".$frm->help(PRFLAN_216, 'after')."
</td>
</tr>
<tr>
<td><label for='inline-editing'>".PRFLAN_268.":</label></td>
<td><label for='inline-editing'>".PRFLAN_268.":</label>".$frm->help(PRFLAN_269, 'before')."</td>
<td>
".$frm->userclass('inline_editing',$pref['inline_editing'],'off','nobody,admin,main,classes,no-excludes')."
<div class='smalltext field-help'>".PRFLAN_269."</div>
".$frm->help(PRFLAN_269, 'after')."
</td>
</tr>
<tr>
<td><label for='filter-script'>".PRFLAN_217.":</label></td>
<td><label for='filter-script'>".PRFLAN_217.":</label>".$frm->help(PRFLAN_218, 'before')."</td>
<td>
".$frm->radio_switch('filter_script', varset($pref['filter_script'], 1))."
<div class='smalltext field-help'>".PRFLAN_218."</div>
".$frm->help(PRFLAN_218, 'after')."
</td>
</tr>
<tr>
<td><label for='html-abuse'>".PRFLAN_220.":</label></td>
<td><label for='html-abuse'>".PRFLAN_220.":</label>".$frm->help(PRFLAN_221, 'before')."</td>
<td>
".$frm->radio_switch('html_abuse', varset($pref['html_abuse'], 1))."
<div class='smalltext field-help'>".PRFLAN_221."</div>
".$frm->help(PRFLAN_221, 'after')."
</td>
</tr>
<tr>
<td><label for='wysiwyg'>".PRFLAN_122.":</label></td>
<td><label for='wysiwyg'>".PRFLAN_122.":</label>".$frm->help(PRFLAN_123, 'before')."</td>
<td>
".$frm->radio_switch('wysiwyg', $pref['wysiwyg'])."
<div class='smalltext field-help'>".PRFLAN_123."</div>
".$frm->help(PRFLAN_123, 'after')."
</td>
</tr>
@ -1318,19 +1330,20 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
if(file_exists(e_PLUGIN."geshi/geshi.php"))
{
$usegeshiHelp = str_replace("[link]", "http://qbnz.com/highlighter/", PRFLAN_119);
$text .= "
<tr>
<td><label for='usegeshi'>".PRFLAN_118."?:</label></td>
<td><label for='usegeshi'>".PRFLAN_118."?:</label>".$frm->help($usegeshiHelp, 'before')."</td>
<td>
".$frm->radio_switch('useGeshi', $pref['useGeshi'])."
<div class='smalltext field-help'>".str_replace("[link]", "http://qbnz.com/highlighter/", PRFLAN_119)."</div>
".$frm->help($usegeshiHelp, 'after')."
</td>
</tr>
<tr>
<td><label for='defaultlangeshi'>".PRFLAN_120."?:</label></td>
<td><label for='defaultlangeshi'>".PRFLAN_120."?:</label>".$frm->help(PRFLAN_121, 'before')."</td>
<td>
".$frm->text('defaultLanGeshi', ($pref['defaultLanGeshi'] ? $pref['defaultLanGeshi'] : "php"), 20)."
<div class='smalltext field-help'>".PRFLAN_121."</div>
".$frm->help(PRFLAN_121, 'after')."
</td>
</tr>
";
@ -1349,7 +1362,7 @@ function multi_radio($name, $textsVals, $currentval = '')
foreach($textsVals as $v => $t)
{
$sel = ($v == $currentval) ? " checked='checked'" : "";
$ret .= $gap."<input type='radio' name='{$name}' value='{$v}'{$sel} /> ".$t."";
$ret .= $gap."<input type='radio' name='{$name}' value='{$v}' {$sel} /> ".$t."";
$gap = "&nbsp;&nbsp;";
}
return $ret;
@ -1371,14 +1384,14 @@ $text .= "
$text .="
<tr>
<td><label for='ssl-enabled'>".PRFLAN_60."</label></td>
<td><label for='ssl-enabled'>".PRFLAN_60."</label>".$frm->help(PRFLAN_61, 'before')."</td>
<td>";
if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') // Only allow if an SSL login has been made.
{
$text .= $frm->radio_switch('ssl_enabled', $pref['ssl_enabled']);
$text .= "<div class='field-help'>".PRFLAN_61."</div>";
$text .= $frm->help(PRFLAN_61, 'after');
}
else
{
@ -1398,7 +1411,7 @@ $text .= "
$label = str_replace($srch,$repl,$label);
$text .= "<tr><td><label for='".$key."'>".$label."</label></td><td>";
$text .= "<tr><td><label for='".$key."'>".$label."</label>".$frm->help(PRFLAN_223, 'before')."</td><td>";
if($hasGD)
{
$text .= $frm->radio_switch($key, $pref[$key]);
@ -1409,7 +1422,7 @@ $text .= "
}
$text .= "
<div class='field-help'>".PRFLAN_223."</div>
".$frm->help(PRFLAN_223, 'after')."
</td></tr>\n";
}
@ -1458,10 +1471,10 @@ $text .= "
$text .= "
<tr>
<td><label for='disallowmultilogin'>".PRFLAN_129."</label></td>
<td><label for='disallowmultilogin'>".PRFLAN_129."</label>".$frm->help(PRFLAN_130, 'before')."</td>
<td>
".$frm->radio_switch('disallowMultiLogin', $pref['disallowMultiLogin'], LAN_YES, LAN_NO)."
<div class='smalltext field-help'>".PRFLAN_130."</div>
".$frm->help(PRFLAN_130, 'after')."
</td>
</tr>
@ -1475,16 +1488,17 @@ $text .= "
<tr>
<td><label for='cookie-name'>".PRFLAN_55."</label></td>
<td><label for='cookie-name'>".PRFLAN_55."</label>".$frm->help(PRFLAN_263, 'before')."</td>
<td >".$frm->text('cookie_name', varset($pref['cookie_name']), 20)."
<div class='field-help'>".PRFLAN_263.".</div></td></tr>
".$frm->help(PRFLAN_263, 'after')."
</td>
</tr>
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label></td>
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273, 'before')."</td>
<td>
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 6)."
<div class='smalltext field-help'>".PRFLAN_273."</div>
".$frm->help(PRFLAN_273, 'after')."
</td>
</tr>
";
@ -1499,8 +1513,7 @@ $text .= "
<td><label for='session-save-method'>".PRFLAN_282."</label></td>
<td class='form-inline'>
".$frm->select('session_save_method', [ 'db'=>'Database', 'files'=>'Files'], varset($pref['session_save_method']))."
<!-- <div class='smalltext field-help'>".PRFLAN_273."</div>-->
<!-- <span class='label label-warning'>Experimental</span>-->
</td>
</tr>
";
@ -1529,7 +1542,7 @@ $text .= "
// $text .= $frm->radio_switch('passwordEncoding', varset($pref['passwordEncoding'], 0), PRFLAN_190, PRFLAN_189);
$text .= "
<div class='smalltext field-help'></div>
<div class='field-help'></div>
</td>
</tr>
<tr>";
@ -1537,7 +1550,7 @@ $text .= "
$CHAP_list = array(PRFLAN_180, PRFLAN_181, PRFLAN_182);
$text .= "
<td><label for='password-chap'>".PRFLAN_178."</label></td>
<td><label for='password-chap'>".PRFLAN_178."</label>".$frm->help(PRFLAN_183."<br />".PRFLAN_179, 'before')."</td>
<td>";
$CHAPopt = !empty($pref['ssl_enabled']) || !empty($pref['passwordEncoding']) ? array('disabled'=>1) : null;
@ -1546,8 +1559,7 @@ $text .= "
//TODO - user tracking session name - visible only if Cookie is enabled (JS)
$text .= "
<div class='smalltext field-help'>".PRFLAN_183."<br />".PRFLAN_179."</div>
$text .= $frm->help(PRFLAN_183."<br />".PRFLAN_179, 'after')."
</td>
</tr>
@ -1558,14 +1570,14 @@ $text .= "
</td>
</tr>
<tr>
<td><label for='antiflood-timeout'>".PRFLAN_36."</label></td>
<td><label for='antiflood-timeout'>".PRFLAN_36."</label>".$frm->help(PRFLAN_38, 'before')."</td>
<td>
".$frm->number('antiflood_timeout', $pref['antiflood_timeout'], 3)."
<div class='smalltext field-help'>".PRFLAN_38."</div>
".$frm->help(PRFLAN_38, 'after')."
</td>
</tr>
<tr>
<td><label for='autoban'>".PRFLAN_37."</label></td>
<td><label for='autoban'>".PRFLAN_37."</label>".$frm->help(PRFLAN_91, 'before')."</td>
<td>
".$frm->select_open('autoban');
@ -1586,14 +1598,14 @@ foreach($autoban_list as $ab => $ab_title)
$text .= "
</select>
<div class='field-help'>".PRFLAN_91."</div>
".$frm->help(PRFLAN_91, 'after')."
</td>
</tr>
<tr>
<td><label for='failed-login-limit'>".PRFLAN_231."</label></td>
<td><label for='failed-login-limit'>".PRFLAN_231."</label>".$frm->help(PRFLAN_232, 'before')."</td>
<td>
".$frm->number('failed_login_limit', varset($pref['failed_login_limit'],10), 3, array('max'=>10, 'min'=>0))."
<div class='smalltext field-help'>".PRFLAN_232."</div>
".$frm->help(PRFLAN_232, 'after')."
</td>
</tr>
<tr>
@ -1624,10 +1636,10 @@ $text .= "
</td>
</tr>
<tr>
<td>".PRFLAN_32."</td>
<td>".PRFLAN_32."".$frm->help(PRFLAN_33, 'before')."</td>
<td>
".$frm->radio_switch('anon_post', $pref['anon_post'], LAN_YES, LAN_NO)."
<div class='field-help'>".PRFLAN_33."</div>
".$frm->help(PRFLAN_33, 'after')."
</td>
</tr>
<tr>
@ -1658,13 +1670,13 @@ $text .= "
</tr>
<tr>
<td>".PRFLAN_233."</td>
<td><label>".PRFLAN_233."</label>".$frm->help(PRFLAN_234, 'before')."</td>
<td>
".
$frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes").
"
<div class='field-help'>".PRFLAN_234."</div>
".$frm->help(PRFLAN_234, 'after')."
</td>
</tr>
<tr>
@ -1742,29 +1754,29 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td>".UPLLAN_25."</td>
<td><label>".UPLLAN_25."</label>".$frm->help(UPLLAN_26, 'before')."</td>
<td>".
$frm->radio_switch('upload_enabled', $pref['upload_enabled'])
."
<div class='field-help'>".UPLLAN_26."</div>
".$frm->help(UPLLAN_26, 'after')."
</td>
</tr>
<tr>
<td>".UPLLAN_33."<br />
<td><label>".UPLLAN_33."</label>".$frm->help(UPLLAN_34, 'before')."
</td>
<td>".
$frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], 10)
."
<div class='field-help'>".UPLLAN_34."</div>
".$frm->help(UPLLAN_34, 'after')."
</td>
</tr>
<tr>
<td>".UPLLAN_37."</td>
<td><label>".UPLLAN_37."</label>".$frm->help(UPLLAN_38, 'before')."</td>
<td>".r_userclass("upload_class", $pref['upload_class'],"off","nobody,public,guest,member,admin,classes")."
<div class='field-help'>".UPLLAN_38."</div>
".$frm->help(UPLLAN_38, 'after')."
</td>
</tr>
<tr><td>".PRFLAN_240."</td>
@ -1858,31 +1870,31 @@ if(E107_DEBUG_LEVEL > 0)
</thead>
<tbody>
<tr>
<td>" . PRFLAN_248 . "</td>
<td><label>" . PRFLAN_248 . "</label>".$frm->help( PRFLAN_249 , 'before')."</td>
<td>
" . $frm->radio_switch('e_jslib_nocombine', $pref['e_jslib_nocombine'], LAN_YES, LAN_NO) . "
<div class='smalltext field-help'>" . PRFLAN_249 . "</div>
".$frm->help( PRFLAN_249 , 'after')."
</td>
</tr>
<tr>
<td>" . PRFLAN_250 . "</td>
<td><label>" . PRFLAN_250 ."</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td>
" . $frm->radio_switch('e_jslib_gzip', $pref['e_jslib_gzip'], LAN_YES, LAN_NO) . "
<div class='smalltext field-help'>" . PRFLAN_251 . "</div>
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
<tr>
<td>" . PRFLAN_252 . "</td>
<td><label>" . PRFLAN_252 . "</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td>
" . $frm->radio_switch('e_jslib_nocache', $pref['e_jslib_nocache'], LAN_YES, LAN_NO) . "
<div class='smalltext field-help'>" . PRFLAN_251 . "</div>
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
<tr>
<td>" . PRFLAN_253 . "</td>
<td><label>" . PRFLAN_253 . "</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td>
" . $frm->radio_switch('e_jslib_nobcache', $pref['e_jslib_nobcache'], LAN_YES, LAN_NO) . "
<div class='smalltext field-help'>" . PRFLAN_251 . "</div>
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
";
@ -1952,7 +1964,7 @@ $text .= pref_submit('javascript');
*/
$text .= '<h4 class="caption">' . LAN_LIBRARY_MANAGER_25 . '</h4>';
$text .= '<table width="100%" class="table table-striped" cellpadding="0" cellspacing="0">';
$text .= '<table class="table table-striped">';
$text .= '<thead>';
$text .= '<tr>';
$text .= '<th>' . LAN_LIBRARY_MANAGER_13 . '</th>';
@ -2025,17 +2037,17 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td>".PRFLAN_147.":</td>
<td>".PRFLAN_147.":".$frm->help(PRFLAN_148, 'before')."</td>
<td>
".$frm->radio_switch('developer', $pref['developer'])."
<div class='smalltext field-help'>".PRFLAN_148."</div>
".$frm->help(PRFLAN_148, 'after')."
</td>
</tr>
<tr>
<td>".PRFLAN_196."</td>
<td>".PRFLAN_196."".$frm->help(PRFLAN_196a." <strong>".e_LOG."</strong>", 'before')."</td>
<td>
".$frm->radio_switch('log_page_accesses', $pref['log_page_accesses'])."
<div class='field-help'>".PRFLAN_196a." <strong>".e_LOG."</strong></div>
".$frm->help(PRFLAN_196a." <strong>".e_LOG."</strong>", 'after')."
</td>
</tr>
<tr>

View File

@ -1649,7 +1649,7 @@ class users_admin_ui extends e_admin_ui
<td>".USRLAN_239."</td>
<td>
".$frm->select('sendconfemail', array('0' => USRLAN_240, '1' => USRLAN_241, '2' => USRLAN_242), (int) varset($_POST['sendconfemail'], 0), array('size'=>'xlarge'))."
<div class='field-help'>".USRLAN_181."</div>
".$frm->help(USRLAN_181, 'after')."
</td>
</tr>";

View File

@ -70,6 +70,7 @@ class e_form
private $_inline_token;
public $_snippets = false; // use snippets or not. - experimental, and may be removed - use at own risk.
private $_fontawesome = false;
private $_help_location = 0;
/**
* @var user_class
*/
@ -94,6 +95,27 @@ class e_form
{
$this->_fontawesome = true;
}
$this->_help_location = (int) e107::getPref('admin_helptip_location');
}
/**
* Set the location of where tooltips will be rendered.
* @param $val
*/
public function setHelpLocation($val)
{
$opts = array(
'before' => 1, // icon
'after' => 0, // hover
'none' => -1 // disabled.
);
if(isset($opts[$val]))
{
$this->_help_location = $opts[$val];
}
}
/**
@ -3029,9 +3051,22 @@ class e_form
return "<label$for_id class='e-tip legacy'>{$text}</label>";
}
public function help($text)
public function help($text, $mode)
{
return !empty($text) ? '<div class="field-help">'.$text.'</div>' : '';
if(empty($text)
|| $this->_help_location === -1
|| ($this->_help_location === 0 && $mode === 'before')
|| ($this->_help_location === 1 && $mode === 'after')
)
{
return null;
}
$ret = '';
$ret .= ($mode === 'before') ? '<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i>' : '';
$ret .= '<div class="field-help" data-placement="left">'.defset($text,$text).'</div>';
return $ret;
}
public function select_open($name, $options = array())
@ -7327,7 +7362,7 @@ var_dump($select_options);*/
$hidden_fields = array();
$helpTipLocation = (int) e107::getPref('admin_helptip_location');
$helpTipLocation = $this->_help_location;
$help = '';
@ -7358,7 +7393,7 @@ var_dump($select_options);*/
if($helpTipLocation !== -1) // -1 = help disabled.
{
$help = !empty($att['help']) ? '<div class="field-help" data-placement="left">'.deftrue($att['help'], $att['help']).'</div>' : '';
// $help = !empty($att['help']) ? '<div class="field-help" data-placement="left">'.deftrue($att['help'], $att['help']).'</div>' : '';
}
$valPath = trim(vartrue($att['dataPath'], $key), '/');
@ -7445,9 +7480,10 @@ var_dump($select_options);*/
$leftCell = "<span{$required_class}>".defset(vartrue($att['title']), vartrue($att['title'])). '</span>' .$required.$label;
$leftCell .= (!empty($help) && $helpTipLocation === 1) ? "<i class='admin-ui-help-tip far fa-question-circle'><!-- --></i>".$help : '';
$leftCell .= $this->help(varset($att['help']), 'before');
$rightCell = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId()). ' '.$help;
$rightCell .= (!empty($help) && $helpTipLocation === 0) ? $help : '';
$rightCell .= $this->help(varset($att['help']), 'after');
$att['writeParms'] = $writeParms;
$text .= $this->renderCreateFieldRow($leftCell, $rightCell, $att);

View File

@ -455,11 +455,11 @@ e107::css('inline',"
</tr>
<tr>
<td>".LAN_TYPE."</td>
<td>".LAN_TYPE."".$frm->help(FORLAN_2, 'before')."</td>
<td>
".$frm->radio('prune_type','delete',false, array('label'=>FORLAN_89)).
$frm->radio('prune_type','make_inactive',true, array('label'=>FORLAN_90))."
<div class='field-help'>".FORLAN_2."</div>
".$frm->help(FORLAN_2, 'after')."
</td>
</tr>

View File

@ -567,9 +567,9 @@ class import_main_ui extends e_admin_ui
$text .= "
<tr>
<td>".LAN_CONVERT_38."</td>
<td>".LAN_CONVERT_38."".$frm->help(LAN_CONVERT_39, 'before')."</td>
<td>".$frm->radio_switch('import_delete_existing_data', $_POST['import_delete_existing_data'])."
<div class='field-help'>".LAN_CONVERT_39."</div></td>
".$frm->help(LAN_CONVERT_39, 'after')."</td>
</tr>";
//TODO

View File

@ -412,15 +412,15 @@ class social_ui extends e_admin_ui
$keypref = "xurl[".$k."]";
$text_label = "xurl-".$k."";
$def = "XURL_". strtoupper($k);
$help = LAN_SOCIAL_ADMIN_13." ".$var['label']." ".LAN_SOCIAL_ADMIN_12." (".$def.")";
$opts = array('size'=>'xxlarge','placeholder'=> $var['placeholder']);
$text2 .= "
<tr>
<td><label for='".$text_label."'>".LAN_SOCIAL_ADMIN_11." ".$var['label']." ".LAN_SOCIAL_ADMIN_12."</label></td>
<td><label for='".$text_label."'>".LAN_SOCIAL_ADMIN_11." ".$var['label']." ".LAN_SOCIAL_ADMIN_12."</label>".$frm->help($help, 'before')."</td>
<td>
".$frm->text($keypref, varset($pref['xurl'][$k]), false, $opts)."
<div class='field-help'>".LAN_SOCIAL_ADMIN_13." ".$var['label']." ".LAN_SOCIAL_ADMIN_12." (".$def.")</div>
".$frm->text($keypref, varset($pref['xurl'][$k]), false, $opts).
$frm->help($help, 'after')."
</td>
</tr>
";

View File

@ -234,6 +234,38 @@ class e_formTest extends \Codeception\Test\Unit
}
public function testHelp()
{
// disabled
$this->_frm->setHelpLocation('none');
$result = $this->_frm->help('my tip', 'before');
$this->assertEmpty($result);
$result = $this->_frm->help('my tip', 'after');
$this->assertEmpty($result);
// display after only.
$this->_frm->setHelpLocation('after');
$result = $this->_frm->help('my tip', 'before');
$this->assertEmpty($result);
$result = $this->_frm->help('my tip', 'after');
$this->assertSame('<div class="field-help" data-placement="left">my tip</div>', $result);
// display as icon before field only.
$this->_frm->setHelpLocation('before');
$result = $this->_frm->help('my tip', 'before');
$this->assertSame('<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i><div class="field-help" data-placement="left">my tip</div>', $result);
$result = $this->_frm->help('my tip', 'after');
$this->assertEmpty($result);
$this->_frm->setHelpLocation('after');
}
/*
public function testGetRequiredString()

View File

@ -1583,7 +1583,7 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1; padd
div.admin-left-panel-collapsed .nav-pills > li.active > a { background:none; }
div.admin-left-panel-collapsed .nav-header.sidebar-toggle-panel { display: none; }
div.admin-left-panel .nav-pills > li.active > a > span > i { color: #5bc0de }
div.admin-left-panel .nav-pills > li > a:hover > span > i { color: white }
/*
.admin-left-panel, .admin-right-panel {

View File

@ -1574,6 +1574,7 @@
}
div.admin-left-panel .nav-pills > li > a > span > i { color: rgba(255,255,255,0.5); font-size:16px; opacity: 0; width:0; }
div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1; padding-left: 2px; }
div.admin-left-panel-collapsed .nav-pills > li.active > a { background:none; }
@ -1608,9 +1609,13 @@
}
.form-control.bootstrap-switch span.bootstrap-switch-default { background: rgba(0,0,0,0.1) }
.e-debug { margin-left: 60px; }
.admin-ui-help-tip { color: rgba(0,0,0,0.3) !important; }
.admin-ui-help-tip:hover { color: #5bc0de !important }
@media only screen and (min-width : 768px) {