get('timezone')) { $core_pref->set('timezone', 'GMT'); } $frm = e107::getForm(false, true); //enable inner tabindex counter $emessage = e107::getMessage(); $tp = e107::getParser(); /* RESET DISPLAY NAMES */ if(isset($_POST['submit_resetdisplaynames'])) { e107::getDb()->db_Update('user', 'user_name=user_loginname'); $emessage->add(PRFLAN_157); } //echo '
';
//var_dump($core_pref->getPref());
//echo '
'; /* UPDATE PREFERENCES */ if(isset($_POST['updateprefs'])) { unset($_POST['updateprefs'], $_POST['sitelanguage']); $_POST['cookie_name'] = str_replace(array(" ", "."), "_", $_POST['cookie_name']); $_POST['cookie_name'] = preg_replace("#[^a-zA-Z0-9_]#", "", $_POST['cookie_name']); $_POST['siteurl'] = trim($_POST['siteurl']) ? trim($_POST['siteurl']) : SITEURL; $_POST['siteurl'] = substr($_POST['siteurl'], - 1) == "/" ? $_POST['siteurl'] : $_POST['siteurl']."/"; // If email verification or Email/Password Login Method - email address is required! if (($_POST['user_reg_veri'] == 1 || $_POST['allowEmailLogin'] == 1) && $_POST['disable_emailcheck']) { $_POST['disable_emailcheck'] = 0; $emessage->add(PRFLAN_211, E_MESSAGE_ERROR); } // Table of range checking values - min and max for numerics. Only do the important ones $pref_limits = array('loginname_maxlength' => array('min' => 10, 'max' => 100, 'default' => 30), 'displayname_maxlength' => array('min' => 5, 'max' => 100, 'default' => 15), 'antiflood_timeout' => array('min' => 3, 'max' => 300, 'default' => 10), 'signup_pass_len' => array('min' => 2, 'max' => 100, 'default' => 4) ); $pref['post_html'] = intval($_POST['post_html']); // This ensures the setting is reflected in set text $_POST['membersonly_exceptions'] = explode("\n",$_POST['membersonly_exceptions']); // FIXME - automate - pref model & validation handler $prefChanges = array(); $sessionRegenerate = false; foreach($_POST as $key => $value) { if(isset($pref_limits[$key])) { // Its a numeric value to check if(is_numeric($value)) { if($value < $pref_limits[$key]['min']) { $value = $pref_limits[$key]['min']; $emessage->addWarning(str_replace(array('--FIELD--','--VALUE--'),array($key,$value),PRFLAN_213)); } if($value > $pref_limits[$key]['max']) { $value = $pref_limits[$key]['max']; $emessage->addWarning(str_replace(array('--FIELD--','--VALUE--'),array($key,$value),PRFLAN_212)); } } else { $value = $pref_limits[$key]['default']; } $newValue = $value; } elseif('cookie_name' == $key && $core_pref->get($key) != $value) { // special case if(!preg_match('/^[\w\-]+$/', $value)) { $newValue = e_COOKIE; $emessage->addWarning(PRFLAN_219); } else { $newValue = $value; $sessionRegenerate = true; } } else { $newValue = $tp->toDB($value); } $core_pref->update($key, $newValue); /*if($newValue != $core_pref->get($key)) { // Changed value $core_pref->set($key, $newValue); $prefChanges[$key] = $newValue; }*/ } $core_pref->save(false); // special case, do session cleanup, logout, redirect to login screen if($sessionRegenerate) { // reset cookie cookie($core_pref->get('cookie_name'), $_COOKIE[e_COOKIE], (time() + 3600 * 24 * 30), e_HTTP, e107::getLanguage()->getCookieDomain()); cookie(e_COOKIE, null, null); // regenerate session $s = $_SESSION; e107::getSession()->destroy(); $session = new e_core_session(array('name' => $core_pref->get('cookie_name'))); $_SESSION = $s; } } if (plugInstalled('alt_auth')) { $authlist[] = "e107"; $handle = opendir(e_PLUGIN."alt_auth"); while($file = readdir($handle)) { if(preg_match("/^(.*)_auth\.php/", $file, $match)) { $authlist[] = $match[1]; } } } /* if(isset($message)) { $ns->tablerender("", "
".$message."
"); } if(e_QUERY == "u") { $ns->tablerender("", "
".PRFLAN_106."
"); } */ $handle = opendir(e_ADMIN.'includes/'); while($file = readdir($handle)) { if($file != "." && $file != "..") { $file = str_replace(".php", "", $file); $adminlist[] = $file; } } closedir($handle); $pref['membersonly_exceptions'] = implode("\n",$pref['membersonly_exceptions']); $text = "
".PRFLAN_1."
".PRFLAN_2." ".$frm->text('sitename', $pref['sitename'], 100)."
".PRFLAN_3." ".$frm->text('siteurl', $pref['siteurl'], 150)." ".($pref['siteurl'] == SITEURL ? "" : "
( ".PRFLAN_159.": ".SITEURL." )
")."
".PRFLAN_134." ".$frm->radio('redirectsiteurl', 1, $pref['redirectsiteurl']).$frm->label(LAN_ENABLED, 'redirectsiteurl', 1)."   ".$frm->radio('redirectsiteurl', 0, !$pref['redirectsiteurl']).$frm->label(LAN_DISABLED, 'redirectsiteurl', 0)."
".PRFLAN_135."
".PRFLAN_4." "; $parms = "name=sitebutton"; $parms .= "&path=".e_THEME.$pref['sitetheme']."/images/|".e_IMAGE; $parms .= "&filter=0"; $parms .= "&fullpath=1"; $parms .= "&default=".urlencode($pref['sitebutton']); //$parms .= "&width=128px"; //$parms .= "&height=128px"; $parms .= "&multiple=FALSE"; $parms .= "&label=-- No Image --"; $parms .= "&subdirs=1"; $parms .= "&tabindex=".$frm->getNext(); $text .= "
".$tp->parseTemplate("{IMAGESELECTOR={$parms}&scaction=select}")."
"; // $text .= "
".$frm->imagepicker('sitebutton',$pref['sitebutton'],'-- No Image --')."
"; //TODO make the preview update when image-picker is used. $text .= "
".$tp->parseTemplate("{IMAGESELECTOR={$parms}&scaction=preview}")."
"; $sLogo = siteinfo_shortcodes::sc_logo(); //echo $sLogo; // $frm->imagepicker('sitelogo',$pref['sitelogo'],'_common') $text .= "
".PRFLAN_214." ".$frm->imagepicker('sitelogo',$pref['sitelogo'],'_common')."
".PRFLAN_5." ".$frm->textarea('sitetag', $pref['sitetag'], 3, 59)."
".PRFLAN_6." ".$frm->textarea('sitedescription', $pref['sitedescription'], 6, 59)."
".PRFLAN_7." ".$frm->text('siteadmin', SITEADMIN, 100)."
".PRFLAN_8." ".$frm->text('siteadminemail', SITEADMINEMAIL, 100)."
".PRFLAN_174." ".$frm->text('replyto_name', $pref['replyto_name'], 100)."
".PRFLAN_175."
".PRFLAN_176." ".$frm->text('replyto_email', $pref['replyto_email'], 100)."
".PRFLAN_177."
".PRFLAN_162." ".$frm->textarea('sitecontactinfo', $pref['sitecontactinfo'], 6, 59)."
".PRFLAN_163."
".PRFLAN_168." ".$e_userclass->uc_dropdown('sitecontacts', $pref['sitecontacts'], 'nobody,main,admin,classes', "tabindex='".$frm->getNext()."'")."
".PRFLAN_169."
".PRFLAN_164." ".$frm->radio('contact_emailcopy', 1, $pref['contact_emailcopy'])." ".$frm->label(LAN_ENABLED, 'contact_emailcopy', 1)."   ".$frm->radio('contact_emailcopy', 0, !$pref['contact_emailcopy'])." ".$frm->label(LAN_DISABLED, 'contact_emailcopy', 0)."
".PRFLAN_165."
".PRFLAN_9." ".$frm->textarea('sitedisclaimer', str_replace(array('<', '>', '"'), array('<', '>', '"'), $pref['sitedisclaimer']), 6, 59)."
".pref_submit('main')."
"; $text .= "
".PRFLAN_13." "; if(function_exists("memory_get_usage")) { $text .= " "; } $text .= "
".PRFLAN_14." ".$frm->radio_switch('displaythemeinfo', $pref['displaythemeinfo'])."
".PRFLAN_15." ".$frm->radio_switch('displayrendertime', $pref['displayrendertime'])."
".PRFLAN_16." ".$frm->radio_switch('displaysql', $pref['displaysql'])."
".PRFLAN_137." ".$frm->radio_switch('display_memory_usage', $pref['display_memory_usage'])."
".pref_submit('display')."
"; // Admin Display Areas $text .= "
".PRFLAN_77."
".PRFLAN_95." ".$frm->radio_switch('admin_alerts_ok', $pref['admin_alerts_ok'])."
".PRFLAN_96."
".PRFLAN_97." ".$frm->radio_switch('admin_alerts_uniquemenu', $pref['admin_alerts_uniquemenu'])."
".PRFLAN_98."
".PRFLAN_199." ".$frm->radio_switch('admin_slidedown_subs', $pref['admin_slidedown_subs'])."
".PRFLAN_200."
".PRFLAN_204." ".$frm->radio_switch('admin_separate_plugins', $pref['admin_separate_plugins'])."
".PRFLAN_205."
".pref_submit('admindisp')."
"; // Date options. $ga = new convert(); $date1 = $ga->convert_date(time(), "short"); $date2 = $ga->convert_date(time(), "long"); $date3 = $ga->convert_date(time(), "forum"); $date4 = e107::getDate()->convert(time(),"input"); $text .= "
".PRFLAN_21." "; $def = strtotime('December 21, 2012 3:45pm'); $inputdate = array( // TODO add more formats "%A, %d %B, %Y" => strftime("%A, %d %B, %Y",$def), "%A, %d %b, %Y" => strftime("%A, %d %b, %Y",$def), "%a, %d %B, %Y" => strftime("%a, %d %B, %Y",$def), "%a, %d %b, %Y" => strftime("%a, %d %b, %Y",$def), "%A, %B %d, %Y" => strftime("%A, %B %d, %Y",$def), "%A, %b %d, %Y" => strftime("%A, %b %d, %Y",$def), "%A, %b %d, %y" => strftime("%A, %b %d, %y",$def), "%B %d, %Y" => strftime("%B %d, %Y",$def), "%b %d, %Y" => strftime("%b %d, %Y",$def), "%b %d, %y" => strftime("%b %d, %y",$def), "%d %B, %Y" => strftime("%d %B, %Y",$def), "%d %b, %Y" => strftime("%d %b, %Y",$def), "%d %b, %y" => strftime("%d %b, %y",$def), "%Y-%m-%d" => strftime("%Y-%m-%d",$def), "%d-%m-%Y" => strftime("%d-%m-%Y",$def), "%m/%d/%Y" => strftime("%m/%d/%Y",$def) ); $inputtime = array(); $inputtime["%I:%M %p"] = strftime("%I:%M %p",$def); if(e107::getDate()->supported('P')) { $inputtime["%I:%M %P"] = strftime("%I:%M %P",$def); } if(e107::getDate()->supported('l')) { $inputtime["%l:%M %p"] = strftime("%l:%M %p",$def); $inputtime["%l:%M %P"] = strftime("%l:%M %P",$def); } $inputtime["%H:%M"] = strftime("%H:%M",$def); $inputtime["%H:%M:%S"] = strftime("%H:%M:%S",$def); $text .= "
".PRFLAN_22.": ".$frm->text('shortdate', $pref['shortdate'], 50)."
".PRFLAN_83.": {$date1}
".PRFLAN_23.": ".$frm->text('longdate', $pref['longdate'], 50)."
".PRFLAN_83.": {$date2}
".PRFLAN_24." ".$frm->text('forumdate', $pref['forumdate'], 50)."
".PRFLAN_83.": {$date3}
".PRFLAN_25." ".PRFLAN_93."
Date/Time Input-Field format: ".$frm->selectbox('inputdate',$inputdate, e107::getPref('inputdate')); $text .= $frm->selectbox('inputtime',$inputtime, e107::getPref('inputtime')); $text .= "
".PRFLAN_26." ".$frm->select_open('time_offset', 'class=tbox select time-offset');//use form handler because of the tabindex $toffset = array("-12", "-11", "-10", "-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8", "+9", "+10", "+11", "+12", "+13", "+14", "+15", "+16"); if(! isset($pref['time_offset'])) { $pref['time_offset'] = "0"; } foreach($toffset as $o) { $text .= " ".$frm->option($o, $o, ($o == $pref['time_offset']))." "; } $text .= "
".PRFLAN_27."
".PRFLAN_56.": ".$frm->text('timezone', $pref['timezone'], 50)."
".pref_submit('date')."
"; // =========== Registration Preferences. ================== $text .= "
".PRFLAN_28."
".PRFLAN_29." ".$frm->radio_switch('user_reg', $pref['user_reg'])."
".PRFLAN_30."
".PRFLAN_154." ".$frm->select_open('user_reg_veri'); $veri_list = array(PRFLAN_152,PRFLAN_31,PRFLAN_153); foreach($veri_list as $v => $v_title) { $text .= $frm->option($v_title, $v, ($pref['user_reg_veri'] == $v)); } $text .= "
".PRFLAN_154a."
".PRFLAN_184." ".$frm->select_open('allowEmailLogin'); // $login_list = array(PRFLAN_201,PRFLAN_202,PRFLAN_203); $login_list = array( 2 => PRFLAN_203, 1 => PRFLAN_202, 0 => PRFLAN_201 ); foreach($login_list as $l => $l_title) { $text .= $frm->option($l_title, $l, ($pref['allowEmailLogin'] == $l)); } $text .= "
".PRFLAN_160." ".$frm->radio_switch('signup_remote_emailcheck', $pref['signup_remote_emailcheck'])."
".PRFLAN_167." ".$frm->radio_switch('disable_emailcheck', $pref['disable_emailcheck'])."
".PRFLAN_45." ".$frm->radio_switch('use_coppa', $pref['use_coppa'])."
".PRFLAN_46." ".PRFLAN_94."
".PRFLAN_58." ".$frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'])."
".PRFLAN_59."
".PRFLAN_206." ".$frm->textarea('membersonly_exceptions', $pref['membersonly_exceptions'], 3, 1)."
".PRFLAN_207."
".PRFLAN_197.": ".$frm->radio_switch('autologinpostsignup', $pref['autologinpostsignup'])."
".PRFLAN_198."
".PRFLAN_136." ".$frm->text('signup_maxip', $pref['signup_maxip'], 3)."
".PRFLAN_78."
".pref_submit('registration')."
"; // Single Login / / copied from hybridAuth config.php so it's easy to add more. // Used Below. $social_logins = array ( // openid providers "OpenID" => array ( "enabled" => true ), "Yahoo" => array ( "enabled" => true ), "AOL" => array ( "enabled" => true ), "Google" => array ( "enabled" => true, "keys" => array ( "id" => "", "secret" => "" ), "scope" => "" ), "Facebook" => array ( "enabled" => true, "keys" => array ( "id" => "", "secret" => "" ), // A comma-separated list of permissions you want to request from the user. See the Facebook docs for a full list of available permissions: http://developers.facebook.com/docs/reference/api/permissions. "scope" => "", // The display context to show the authentication page. Options are: page, popup, iframe, touch and wap. Read the Facebook docs for more details: http://developers.facebook.com/docs/reference/dialogs#display. Default: page "display" => "" ), "Twitter" => array ( "enabled" => true, "keys" => array ( "key" => "", "secret" => "" ) ), // windows live "Live" => array ( "enabled" => true, "keys" => array ( "id" => "", "secret" => "" ) ), "MySpace" => array ( "enabled" => true, "keys" => array ( "key" => "", "secret" => "" ) ), "LinkedIn" => array ( "enabled" => true, "keys" => array ( "key" => "", "secret" => "" ) ), "Foursquare" => array ( "enabled" => true, "keys" => array ( "id" => "", "secret" => "" ) ) ); // Key registration $social_external = array( "Facebook" => "https://developers.facebook.com/apps", "Twitter" => "https://dev.twitter.com/apps/new", "Google" => "https://code.google.com/apis/console/", "Live" => "https://manage.dev.live.com/ApplicationOverview.aspx", "LinkedIn" => "https://www.linkedin.com/secure/developer", "Foursquare" => "https://www.foursquare.com/oauth/" ); $text .= "
Social Login Options
Note: This section is not functional at the moment
"; if(!is_array($pref['social_login'])) { $pref['social_login'] = array(); } foreach($social_logins as $prov=>$val) { $label = varset($social_external[$prov]) ? "".$prov."" : $prov; $text .= " "; } $text .= "
Enable Social Logins ".$frm->radio_switch('social_login_active', $pref['social_login_active'])."
".$label." "; foreach($val as $k=>$v) { switch ($k) { case 'enabled': $eopt = array('class'=>'e-expandit'); $text .= $frm->radio_switch('social_login['.$prov.'][enabled]', $pref['social_login'][$prov]['enabled'],'','',$eopt); break; case 'keys': // $cls = vartrue($pref['single_login'][$prov]['keys'][$tk]) ? "class='e-hideme'" : ''; $sty = vartrue($pref['social_login'][$prov]['keys'][$tk]) ? "" : "display:none"; $text .= "
"; foreach($v as $tk=>$idk) { $opt['placeholder'] = $tk; $text .= "
".$frm->text('social_login['.$prov.'][keys]['.$tk.']', $pref['social_login'][$prov]['keys'][$tk],100,$opt); } $text .= "
"; break; case 'scope': $text .= $frm->hidden('social_login['.$prov.'][scope]','email'); break; default: break; } } $text .= "
".pref_submit('sociallogin')."
"; // Signup options ===========================. $text .= "
".PRFLAN_19." "; /* */ $signup_option_names = array( // "signup_option_loginname" => "Login Name", "signup_option_email_confirm" => "Email Confirmation", "signup_option_realname" => CUSTSIG_2, "signup_option_signature" => CUSTSIG_6, "signup_option_image" => CUSTSIG_7, "signup_option_class" => CUSTSIG_17, 'signup_option_customtitle' => CUSTSIG_20, 'signup_option_hideemail' => 'Option to hide email' ); foreach($signup_option_names as $value => $key) { $text .= " "; } $text .= "
".PRFLAN_126." ".$frm->textarea('signup_text', $pref['signup_text'], 3, 1)."
".PRFLAN_140." ".$frm->textarea('signup_text_after', $pref['signup_text_after'], 3, 1)."
".CUSTSIG_16." ".$frm->text('signup_pass_len', $pref['signup_pass_len'], 2)."
".CUSTSIG_18." ".$frm->textarea('signup_disallow_text', $pref['signup_disallow_text'], 3, 1)."
".CUSTSIG_19."
".PRFLAN_155.":
".$e_userclass->uc_dropdown('displayname_class', $pref['displayname_class'], 'nobody,member,admin,classes', "tabindex='".$frm->getNext()."'")."
".$frm->admin_button('submit_resetdisplaynames', PRFLAN_156)."
".PRFLAN_192.": ".$frm->text('predefinedLoginName', $pref['predefinedLoginName'], 50)."
".PRFLAN_193."
".PRFLAN_194."
".PRFLAN_158.": ".$frm->text('displayname_maxlength', $pref['displayname_maxlength'], 3)."
".PRFLAN_172.": ".$frm->text('loginname_maxlength', $pref['loginname_maxlength'], 3)."
".$key." ".$frm->radio($value, 0, !$pref[$value]).$frm->label(CUSTSIG_12, $value, 0)."   ".$frm->radio($value, 1, ($pref[$value] == 1)).$frm->label(CUSTSIG_14, $value, 1)."   ".$frm->radio($value, 2, ($pref[$value] == 2)).$frm->label(CUSTSIG_15, $value, 2)."
".pref_submit('signup')."
"; // Custom Fields. /* text render options */ if(!isset($pref['post_html'])) { $pref['post_html'] = '250'; save_prefs(); } $text .= "
".PRFLAN_101." "; if(file_exists(e_PLUGIN."geshi/geshi.php")) { $text .= " "; } $text .= "
".PRFLAN_127.": ".$frm->radio_switch('make_clickable', $pref['make_clickable'])."
".PRFLAN_128."
".PRFLAN_102."?: ".$frm->radio_switch('link_replace', $pref['link_replace'])."
".PRFLAN_103."
".PRFLAN_145."?: ".$frm->radio_switch('links_new_window', $pref['links_new_window'])."
".PRFLAN_146."
".PRFLAN_104.": ".$frm->text('link_text', $pref['link_text'], 200)."
".PRFLAN_105."
".PRFLAN_107.": ".$frm->text('email_text', $tp->post_toForm($pref['email_text']), 200)."
".PRFLAN_108."
".PRFLAN_109.": ".$frm->text('main_wordwrap', $pref['main_wordwrap'], 3)."
".PRFLAN_110."
".PRFLAN_111.": ".$frm->text('menu_wordwrap', $pref['menu_wordwrap'], 3)."
".PRFLAN_110."
".PRFLAN_116.": ".$e_userclass->uc_dropdown('post_html', $pref['post_html'], 'nobody,public,member,admin,main,classes', "tabindex='".$frm->getNext()."'")."
".PRFLAN_117."
".PRFLAN_215.": ".r_userclass('post_script',$pref['post_script'],'off','nobody,member,admin,main,classes')."
".PRFLAN_216."
".PRFLAN_217.": ".$frm->radio_switch('filter_script', varset($pref['filter_script'], 1))."
".PRFLAN_218."
".PRFLAN_220.": ".$frm->radio_switch('html_abuse', varset($pref['html_abuse'], 1))."
".PRFLAN_221."
".PRFLAN_122.": ".$frm->radio_switch('wysiwyg', $pref['wysiwyg'])."
".PRFLAN_123."
".PRFLAN_124.": ".$frm->radio_switch('old_np', $pref['old_np'])."
".PRFLAN_125."
".PRFLAN_118."?: ".$frm->radio_switch('useGeshi', $pref['useGeshi'])."
".PRFLAN_119."
".PRFLAN_120."?: ".$frm->text('defaultLanGeshi', ($pref['defaultLanGeshi'] ? $pref['defaultLanGeshi'] : "php"), 20)."
".PRFLAN_121."
".pref_submit('textpost')."
"; function multi_radio($name, $textsVals, $currentval = '') { $ret = ''; $gap = ''; foreach($textsVals as $v => $t) { $sel = ($v == $currentval) ? " checked='checked'" : ""; $ret .= $gap." ".$t.""; $gap = "  "; } return $ret; } // Security Options. . $hasGD = extension_loaded("gd"); $text .= "
".PRFLAN_47."
".PRFLAN_60." ".$frm->radio_switch('ssl_enabled', $pref['ssl_enabled'])."
".PRFLAN_61."
".PRFLAN_76.": "; if($hasGD) { $text .= $frm->radio_switch('signcode', $pref['signcode']); } else { $text .= PRFLAN_133; } $text .= "
".PRFLAN_81.": "; if($hasGD) { $text .= $frm->radio_switch('logcode', $pref['logcode']); } else { $text .= PRFLAN_133; } $text .= "
".PRFLAN_138.": "; if($hasGD) { $text .= $frm->radio_switch('fpwcode', $pref['fpwcode']); } else { $text .= PRFLAN_133; } $text .= "
".PRFLAN_92.": ".$frm->radio_switch('user_reg_secureveri', $pref['user_reg_secureveri'])."
".PRFLAN_129.": ".$frm->radio_switch('disallowMultiLogin', $pref['disallowMultiLogin'], LAN_YES, LAN_NO)."
".PRFLAN_130."
".PRFLAN_48.":
".$frm->radio_multi('user_tracking', array('cookie' => PRFLAN_49, 'session' => PRFLAN_50), $pref['user_tracking'])."
".PRFLAN_55.":
".$frm->text('cookie_name', $pref['cookie_name'], 20)."
".PRFLAN_188.": ".$frm->radio_switch('passwordEncoding', varset($pref['passwordEncoding'], 0), PRFLAN_190, PRFLAN_189)."
".PRFLAN_191."
".PRFLAN_178." ".$frm->select_open('password_CHAP'); //TODO - user tracking session name - visible only if Cookie is enabled (JS) $CHAP_list[0] = PRFLAN_180; $CHAP_list[1] = PRFLAN_181; $CHAP_list[2] = PRFLAN_182; foreach($CHAP_list as $ab => $ab_title) { $text .= " ".$frm->option($ab_title, $ab, ($pref['password_CHAP'] == $ab))." "; } $text .= "
".PRFLAN_183."
".PRFLAN_179."
".PRFLAN_40." ".$frm->radio_switch('profanity_filter', $pref['profanity_filter'])."
".PRFLAN_41."
".PRFLAN_42.": ".$frm->text('profanity_replace', $pref['profanity_replace'], 20)."
".PRFLAN_43.": ".$frm->tags('profanity_words', $pref['profanity_words'])."
".PRFLAN_44."
".PRFLAN_35.": ".$frm->radio_switch('antiflood1', $pref['antiflood1'])."
".PRFLAN_36.": ".$frm->text('antiflood_timeout', $pref['antiflood_timeout'], 3)."
".PRFLAN_38."
".PRFLAN_37." ".$frm->select_open('autoban'); $autoban_list = array( PRFLAN_113, PRFLAN_144, PRFLAN_142, PRFLAN_143 ); foreach($autoban_list as $ab => $ab_title) { $sel = ($pref['autoban'] == $ab) ? "selected='selected'" : ""; $text .= " ".$frm->option($ab_title, $ab, ($pref['autoban'] == $ab))." "; } $text .= "
".PRFLAN_91."
".PRFLAN_139.": ".$frm->radio_switch('adminpwordchange', $pref['adminpwordchange'])."
".pref_submit('security')."
"; $text .= "
".PRFLAN_87."
Allow users to post comments: ".$frm->radio_switch('comments_disabled', $pref['comments_disabled'], LAN_NO, LAN_YES,array('reverse'=>1))."
".PRFLAN_32." ".$frm->radio_switch('anon_post', $pref['anon_post'], LAN_YES, LAN_NO)."
".PRFLAN_33."
".PRFLAN_89.": ".$frm->radio_switch('comments_icon', $pref['comments_icon'], LAN_YES, LAN_NO)."
".PRFLAN_88.": ".$frm->radio_switch('nested_comments', $pref['nested_comments'], LAN_YES, LAN_NO)."
".PRFLAN_90.": ".$frm->radio_switch('allowCommentEdit', $pref['allowCommentEdit'], LAN_YES, LAN_NO)."
".PRFLAN_166.": ".$frm->radio_switch('comments_emoticons', $pref['comments_emoticons'], LAN_YES, LAN_NO)."
Moderate Comments made by: ". $frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes"). "
Comments will require manual approval by an admin prior to being visible to other users
Comment Sorting: "; $comment_sort = array( "desc" => "Most recent comments first", //default //TODO LAN 'asc' => "Most recent comments last" ); $text .= $frm->selectbox('comments_sort',$comment_sort, $pref['comments_moderate'])."
".PRFLAN_209."
".PRFLAN_208.": ".$e_userclass->uc_dropdown('email_item_class',varset($pref['email_item_class'],e_UC_MEMBER),'nobody,admin,main,public,member,classes', "tabindex='".$frm->getNext()."'")."
".pref_submit('comments')."
"; // File Uploads include_lan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_upload.php"); $text .= "
File Uploading
".UPLLAN_25." ". $frm->radio_switch('upload_enabled', $pref['upload_enabled'], LAN_YES, LAN_NO) ."
".UPLLAN_26."
".UPLLAN_33."
". $frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], 10) ."
".UPLLAN_34." (upload_max_filesize = ".ini_get('upload_max_filesize').", post_max_size = ".ini_get('post_max_size')." )
".UPLLAN_37." ".r_userclass("upload_class", $pref['upload_class'],"off","nobody,public,guest,member,admin,classes")."
".UPLLAN_38."
".pref_submit('uploads')."
"; // Javascript Control //TODO LANS $text .= "
Javascript Frameworks (for testing purposes only) "; $js_options = array( 'auto' => 'Auto (on-demand)', // load based on dependency 'admin' => 'Admin Area', // Always load in admin 'front' => 'Front-End', // Always load in front-end 'all' => "Both", // Always load in admin and front-end 'none' => 'Disabled' // disabled ); //TODO FIXME // ie. e107 Core Minimum: JS similar to e107 v1.0 should be loaded "e_js.php" (no framwork dependency) // with basic functions like SyncWithServerTime() and expandit(), externalLinks() etc. $js_types = array( array('id' => 'prototype', 'name'=> 'Prototype (local)'), array('id' => 'jquery', 'name'=> 'jQuery (local)'), ); //TODO // separate switch for CDN.. or automatic fall-back. foreach($js_types as $arr) { // $k = $arr['path']; $k = $arr['id']; $name = $arr['name']; $text .= ""; } $text .= "
".$name." ".$frm->radio_multi("e_jslib_core[{$k}]",$js_options,$pref['e_jslib_core'][$k])."
"; $text .= "
Disable scripts consolidation ".$frm->radio_switch('e_jslib_nocombine', $pref['e_jslib_nocombine'], LAN_YES, LAN_NO)."
If disabled, scripts will be loaded in one consolidated file
Enable consolidated scripts zlib compression: ".$frm->radio_switch('e_jslib_gzip', $pref['e_jslib_gzip'], LAN_YES, LAN_NO)."
Used only when script consolidation is enabled
Disable consolidated scripts server cache: ".$frm->radio_switch('e_jslib_nocache', $pref['e_jslib_nocache'], LAN_YES, LAN_NO)."
Used only when script consolidation is enabled
Disable consolidated scripts browser cache: ".$frm->radio_switch('e_jslib_nobcache', $pref['e_jslib_nobcache'], LAN_YES, LAN_NO)."
Used only when script consolidation is enabled
".pref_submit('javascript')."
"; e107::js('inline'," \$\$('#e-jslib-nocombine', '#e-jslib-nocombine-1').invoke('observe', 'change', function(event) { var element = event.findElement('input'), check = !parseInt(element.value); eHandleJsForm(check); }); var eHandleJsForm = function(enable) { var collection = \$w('e-jslib-gzip e-jslib-nocache e-jslib-nobcache'); collection.each(function(id) { var method = enable ? 'enable' : 'disable'; \$\$('#' + id, '#' + id + '-1').invoke(method); }); }; eHandleJsForm(".($pref['e_jslib_nocombine'] ? 'false' : 'true')."); ","prototype"); //Advanced Features $text .= "
".PRFLAN_149." "; $auth_dropdown = ''; if($authlist) { $auth_dropdown = "\n".$frm->select_open('auth_method')."\n"; foreach($authlist as $a) { $auth_dropdown .= $frm->option($a, $a, ($pref['auth_method'] == $a))."\n"; } $auth_dropdown .= "\n"; } else { $auth_dropdown = "".PRFLAN_151; $pref['auth_method'] = ""; } $text .= "
".PRFLAN_147.": ".$frm->radio_switch('developer', $pref['developer'])."
".PRFLAN_148."
".PRFLAN_196." ".$frm->radio_switch('log_page_accesses', $pref['log_page_accesses'])."
".PRFLAN_196a." ".e_LOG_ABS."
".PRFLAN_17." ".$frm->radio_switch('compress_output', $pref['compress_output'])."
".PRFLAN_150." {$auth_dropdown}
".PRFLAN_173." ".$frm->radio_switch('check_updates', $pref['check_updates'])."
".pref_submit('advanced')."
"; // END Advanced Features $text .= "
"; $e107->ns->tablerender(PRFLAN_53, $emessage->render().$text); require_once(e_ADMIN."footer.php"); function pref_submit($post_id = '') { global $frm; if($post_id) $post_id = '-'.$post_id; $text = "
"; // ML /* if(e_MLANG == 1){ //$text .=" $but_typ = array(""); // empty = submit $but_nam = array("updateprefs"); // empty = autobutX with X autoincrement $but_val = array("updateprefs"); // empty = Submit $but_class = array("caption"); // empty = button $butjs = array(""); // empty = "" $buttitle = array(""); // empty = "" $text .= e107ml_adpanel(1,$but_typ,$but_nam,$but_val,$but_class,$butjs,$buttitle); }else{*/ $text .= $frm->admin_button('updateprefs', PRFLAN_52, 'update', '', "id=updateprefs{$post_id}"); // } $text .= "\n
"; // END ML return $text; } function prefs_adminmenu() { $var['core-prefs-main']['text'] = PRFLAN_1; $var['core-prefs-display']['text'] = PRFLAN_13; $var['core-prefs-admindisp']['text'] = PRFLAN_77; $var['core-prefs-date']['text'] = PRFLAN_21; $var['core-prefs-registration']['text'] = PRFLAN_28; $var['core-prefs-signup']['text'] = PRFLAN_19; $var['core-prefs-sociallogin']['text'] = "Social Logins"; $var['core-prefs-textpost']['text'] = PRFLAN_101; $var['core-prefs-security']['text'] = PRFLAN_47; $var['core-prefs-comments']['text'] = PRFLAN_210; $var['core-prefs-uploads']['text'] = "File Uploading"; // TODO LAN $var['core-prefs-javascript']['text'] = "Javascript Framework"; // TODO LAN $var['core-prefs-advanced']['text'] = PRFLAN_149; e_admin_menu(LAN_OPTIONS.'--id--prev_nav', 'core-prefs-main', $var); }