mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Merge branch 'master' of github.com:e107inc/e107
This commit is contained in:
commit
748ffc8f6e
18
class2.php
18
class2.php
@ -718,7 +718,7 @@ define('USER_REGISTRATION', vartrue($pref['user_reg'],false)); // User Registrat
|
||||
define('e_DEVELOPER', $developerMode);
|
||||
unset($developerMode);
|
||||
|
||||
if(is_array($pref['xurl']))
|
||||
if(!empty($pref['xurl']) && is_array($pref['xurl']))
|
||||
{
|
||||
define('XURL_FACEBOOK', vartrue($pref['xurl']['facebook'], false));
|
||||
define('XURL_TWITTER', vartrue($pref['xurl']['twitter'], false));
|
||||
@ -845,7 +845,8 @@ if (!function_exists('checkvalidtheme'))
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
$e107tmp_theme = search_validtheme();
|
||||
|
||||
$e107tmp_theme = 'bootstrap3'; // set to bootstrap3 by default. search_validtheme();
|
||||
define('THEME', e_THEME.$e107tmp_theme.'/');
|
||||
define('THEME_ABS', e_THEME_ABS.$e107tmp_theme.'/');
|
||||
if (ADMIN && strpos(e_SELF, $ADMIN_DIRECTORY) === false)
|
||||
@ -1362,7 +1363,18 @@ function js_location($qry)
|
||||
}
|
||||
|
||||
function check_email($email)
|
||||
{
|
||||
{
|
||||
|
||||
if(empty($email))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(is_numeric(substr($email,-1))) // fix for eCaptcha accidently typed on wrong line.
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(filter_var($email, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
return $email;
|
||||
|
86
contact.php
86
contact.php
@ -14,7 +14,9 @@ require_once("class2.php");
|
||||
//define('e_HANDLER', "e107_handlers/");
|
||||
// security image may be disabled by removing the appropriate shortcodes from the template.
|
||||
$active = varset($pref['contact_visibility'], e_UC_PUBLIC);
|
||||
if(!check_class($active))
|
||||
$contactInfo = trim(SITECONTACTINFO);
|
||||
|
||||
if(!check_class($active) && empty($contactInfo))
|
||||
{
|
||||
e107::getRedirect()->go(e_HTTP."index.php");
|
||||
}
|
||||
@ -24,6 +26,7 @@ $sec_img = new secure_image;
|
||||
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
||||
|
||||
define('PAGE_NAME', LANCONTACT_00);
|
||||
|
||||
require_once(HEADERF);
|
||||
|
||||
@ -52,11 +55,12 @@ if(isset($_POST['send-contactus']))
|
||||
|
||||
$error = "";
|
||||
|
||||
$sender_name = $tp->toEmail($_POST['author_name'],TRUE,'RAWTEXT');
|
||||
$sender = check_email($_POST['email_send']);
|
||||
$subject = $tp->toEmail($_POST['subject'],TRUE,'RAWTEXT');
|
||||
$body = $tp->toEmail($_POST['body'],TRUE,'RAWTEXT');
|
||||
$sender_name = $tp->toEmail($_POST['author_name'], true,'RAWTEXT');
|
||||
$sender = check_email($_POST['email_send']);
|
||||
$subject = $tp->toEmail($_POST['subject'], true,'RAWTEXT');
|
||||
$body = $tp->toEmail($_POST['body'], true,'RAWTEXT');
|
||||
|
||||
$email_copy = !empty($_POST['email_copy']) ? 1 : 0;
|
||||
|
||||
// Check Image-Code
|
||||
if (isset($_POST['rand_num']) && !$sec_img->verify_code($_POST['rand_num'], $_POST['code_verify']))
|
||||
@ -65,25 +69,26 @@ if(isset($_POST['send-contactus']))
|
||||
}
|
||||
|
||||
// Check message body.
|
||||
if(strlen(trim($_POST['body'])) < 15)
|
||||
if(strlen(trim($body)) < 15)
|
||||
{
|
||||
$error .= LANCONTACT_12."\\n";
|
||||
}
|
||||
|
||||
// Check subject line.
|
||||
if(varset($_POST['subject']) && strlen(trim($_POST['subject'])) < 2)
|
||||
if(strlen(trim($subject)) < 2)
|
||||
{
|
||||
$error .= LANCONTACT_13."\\n";
|
||||
}
|
||||
|
||||
if(!strpos(trim($_POST['email_send']),"@"))
|
||||
if(!strpos(trim($sender),"@"))
|
||||
{
|
||||
$error .= LANCONTACT_11."\\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check email address on remote server (if enabled).
|
||||
// Check email address on remote server (if enabled). XXX Problematic!
|
||||
/*
|
||||
if ($pref['signup_remote_emailcheck'] && $error == '')
|
||||
{
|
||||
require_once(e_HANDLER."mail_validation_class.php");
|
||||
@ -100,15 +105,19 @@ if(isset($_POST['send-contactus']))
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
// No errors - so proceed to email the admin and the user (if selected).
|
||||
if(empty($error))
|
||||
{
|
||||
$body .= "\n\nIP:\t".e107::getIPHandler()->getIP(TRUE)."\n";
|
||||
$body .= "<br /><br />
|
||||
<table class='table'>
|
||||
<tr>
|
||||
<td>IP:</td><td>".e107::getIPHandler()->getIP(TRUE)."</td></tr>";
|
||||
|
||||
if (USER)
|
||||
{
|
||||
$body .= "User:\t#".USERID." ".USERNAME."\n";
|
||||
$body .= "<tr><td>User:</td><td>#".USERID." ".USERNAME."</td></tr>";
|
||||
}
|
||||
|
||||
if(empty($_POST['contact_person']) && !empty($pref['sitecontacts'])) // only 1 person, so contact_person not posted.
|
||||
@ -144,6 +153,40 @@ if(isset($_POST['send-contactus']))
|
||||
}
|
||||
|
||||
|
||||
// ----------------------
|
||||
|
||||
$CONTACT_EMAIL = e107::getCoreTemplate('contact','email');
|
||||
|
||||
unset($_POST['contact_person'], $_POST['author_name'], $_POST['email_send'] , $_POST['subject'], $_POST['body'], $_POST['rand_num'], $_POST['code_verify'], $_POST['send-contactus']);
|
||||
|
||||
if(!empty($_POST)) // support for custom fields in contact template.
|
||||
{
|
||||
foreach($_POST as $k=>$v)
|
||||
{
|
||||
$body .= "<tr><td>".$k.":</td><td>".$tp->toEmail($v, true,'RAWTEXT')."</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$body .= "</table>";
|
||||
|
||||
if(!empty($CONTACT_EMAIL['subject']))
|
||||
{
|
||||
$vars = array('CONTACT_SUBJECT'=>$subject,'CONTACT_PERSON'=>$send_to_name);
|
||||
|
||||
if(!empty($_POST)) // support for custom fields in contact template.
|
||||
{
|
||||
foreach($_POST as $k=>$v)
|
||||
{
|
||||
$scKey = strtoupper($k);
|
||||
$vars[$scKey] =$tp->toEmail($v, true,'RAWTEXT');
|
||||
}
|
||||
}
|
||||
|
||||
$subject = $tp->simpleParse($CONTACT_EMAIL['subject'],$vars);
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
|
||||
// Send as default sender to avoid spam issues. Use 'replyto' instead.
|
||||
$eml = array(
|
||||
'subject' => $subject,
|
||||
@ -154,11 +197,12 @@ if(isset($_POST['send-contactus']))
|
||||
'template' => 'default'
|
||||
);
|
||||
|
||||
|
||||
$message = e107::getEmail()->sendEmail($send_to, $send_to_name, $eml, false) ? LANCONTACT_09 : LANCONTACT_10;
|
||||
|
||||
// $message = (sendemail($send_to,"[".SITENAME."] ".$subject, $body,$send_to_name,$sender,$sender_name)) ? LANCONTACT_09 : LANCONTACT_10;
|
||||
|
||||
if(isset($pref['contact_emailcopy']) && $pref['contact_emailcopy'] && $_POST['email_copy'] == 1)
|
||||
if(isset($pref['contact_emailcopy']) && $pref['contact_emailcopy'] && $email_copy == 1)
|
||||
{
|
||||
require_once(e_HANDLER."mail.php");
|
||||
sendemail($sender,"[".SITENAME."] ".$subject, $body,ADMIN,$sender,$sender_name);
|
||||
@ -183,23 +227,35 @@ if(SITECONTACTINFO)
|
||||
$CONTACT_INFO = e107::getCoreTemplate('contact','info');
|
||||
}
|
||||
|
||||
$text = $tp->parseTemplate($CONTACT_INFO, TRUE, vartrue($contact_shortcodes));
|
||||
$text = $tp->parseTemplate($CONTACT_INFO, true, vartrue($contact_shortcodes));
|
||||
$ns -> tablerender(LANCONTACT_01, $text,"contact");
|
||||
}
|
||||
|
||||
if(isset($pref['sitecontacts']) && $pref['sitecontacts'] != 255)
|
||||
|
||||
if(check_class($active) && isset($pref['sitecontacts']) && $pref['sitecontacts'] != e_UC_NOBODY)
|
||||
{
|
||||
$contact_shortcodes = e107::getScBatch('contact');
|
||||
// Wrapper support
|
||||
$contact_shortcodes->wrapper('contact/form');
|
||||
|
||||
$text = $tp->parseTemplate($CONTACT_FORM, TRUE, $contact_shortcodes);
|
||||
$text = $tp->parseTemplate($CONTACT_FORM, true, $contact_shortcodes);
|
||||
|
||||
if(trim($text) != "")
|
||||
{
|
||||
$ns -> tablerender(LANCONTACT_02, $text, "contact");
|
||||
}
|
||||
}
|
||||
elseif($active == e_UC_MEMBER && ($pref['sitecontacts'] != e_UC_NOBODY))
|
||||
{
|
||||
$srch = array("[","]");
|
||||
$repl = array("<a class='alert-link' href='".e_SIGNUP."'>","</a>");
|
||||
$message = LANCONTACT_16; // "You must be [registered] and signed-in to use this form.";
|
||||
|
||||
$ns -> tablerender(LANCONTACT_02, "<div class='alert alert-info'>".str_replace($srch, $repl, $message)."</div>", "contact");
|
||||
}
|
||||
|
||||
|
||||
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
?>
|
@ -77,21 +77,64 @@ class admin_start
|
||||
|
||||
|
||||
private $allowed_types = null;
|
||||
private $refresh = false;
|
||||
|
||||
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->checkPaths();
|
||||
$this->checkTimezone();
|
||||
$this->checkWritable();
|
||||
$this->checkHtmlarea();
|
||||
$this->checkIncompatiblePlugins();
|
||||
$this->checkFileTypes();
|
||||
$this->checkSuspiciousFiles();
|
||||
$this->checkDeprecated();
|
||||
|
||||
|
||||
if($this->refresh == true)
|
||||
{
|
||||
e107::getRedirect()->go(e_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function checkPaths()
|
||||
{
|
||||
$create_dir = array(e_MEDIA,e_SYSTEM,e_CACHE,e_CACHE_CONTENT,e_CACHE_IMAGE, e_CACHE_DB, e_LOG, e_BACKUP, e_CACHE_URL, e_TEMP, e_IMPORT);
|
||||
|
||||
$refresh = false;
|
||||
|
||||
foreach($create_dir as $dr)
|
||||
{
|
||||
if(!is_dir($dr))
|
||||
{
|
||||
if(mkdir($dr, 0755))
|
||||
{
|
||||
$this->refresh = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkTimezone()
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$timezone = e107::pref('core','timezone');
|
||||
|
||||
if(e107::getDate()->isValidTimezone($timezone) == false)
|
||||
{
|
||||
$mes->addWarning("Your timezone setting (".$timezone.") is invalid. It has been reset to UTC. To Modify, please go to Admin -> Preferences -> Date Display Options.", 'default', true);
|
||||
e107::getConfig()->set('timezone','UTC')->save(false,true,false);
|
||||
$this->refresh = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function checkWritable()
|
||||
{
|
||||
@ -153,7 +196,8 @@ class admin_start
|
||||
{
|
||||
$deprecated = array(
|
||||
e_ADMIN."ad_links.php",
|
||||
e_PLUGIN."tinymce4/e_meta.php", e_THEME."bootstrap3/css/bootstrap_dark.css",
|
||||
e_PLUGIN."tinymce4/e_meta.php",
|
||||
e_THEME."bootstrap3/css/bootstrap_dark.css",
|
||||
e_PLUGIN."search_menu/languages/English.php",
|
||||
e_LANGUAGEDIR."English/lan_parser_functions.php",
|
||||
e_HANDLER."np_class.php",
|
||||
|
@ -638,8 +638,8 @@ class admin_log_form_ui extends e_admin_form_ui
|
||||
if(strpos($text,'Array')!==false || strlen($text)>300)
|
||||
{
|
||||
$id = $this->getController()->getListModel()->get('dblog_id');
|
||||
$ret ="<a class='e-expandit' href='#".$id."'>Details</a>";
|
||||
$ret .= "<div class='hide' id='".$id."'>";
|
||||
$ret ="<a class='e-expandit' href='#rem-".$id."'>Details</a>";
|
||||
$ret .= "<div style='display:none' id='rem-".$id."'>";
|
||||
$text = str_replace("<br />","\n",$text);
|
||||
$text = str_replace("\","/",$text);
|
||||
|
||||
|
@ -24,7 +24,7 @@ define('e_CAPTCHA_FONTCOLOR','#F9A533');
|
||||
|
||||
// Required for a clean v1.x -> v2 upgrade.
|
||||
$core = e107::getConfig('core');
|
||||
if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'bootstrap3')
|
||||
if($core->get('admintheme') != 'bootstrap3')
|
||||
{
|
||||
$core->update('admintheme','bootstrap3');
|
||||
$core->update('adminstyle','infopanel');
|
||||
@ -35,7 +35,7 @@ if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'boots
|
||||
}
|
||||
|
||||
// Check Admin-Perms for current language and redirect if necessary.
|
||||
if(!getperms('0') && vartrue($pref['multilanguage']) && !getperms(e_LANGUAGE))
|
||||
if(USER && !getperms('0') && vartrue($pref['multilanguage']) && !getperms(e_LANGUAGE) && empty($_E107['no_language_perm_check']))
|
||||
{
|
||||
$lng = e107::getLanguage();
|
||||
|
||||
@ -127,7 +127,7 @@ else
|
||||
{
|
||||
$admin_log->e_log_event(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".$tp->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING);
|
||||
echo "<script type='text/javascript'>document.location.href='../index.php'</script>\n";
|
||||
// header("location: ../index.php");
|
||||
|
||||
e107::getRedirect()->redirect('admin.php?failed');
|
||||
exit;
|
||||
}
|
||||
@ -232,11 +232,13 @@ else
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
#login-admin div.panel { padding: 0 }
|
||||
|
||||
#login-admin label { display: none; text-align: right }
|
||||
|
||||
|
||||
.admin-submit { text-align: center; padding:20px; }
|
||||
.admin-submit { text-align: center; padding-top:20px; }
|
||||
|
||||
.submit { }
|
||||
|
||||
@ -254,9 +256,9 @@ else
|
||||
|
||||
#userpass {background: url(".e_IMAGE."admin_images/lock_16.png) no-repeat scroll 7px 9px; padding:7px;padding-left:30px; width:80%; max-width:218px; }
|
||||
|
||||
#code-verify { padding: 7px; width: 140px }
|
||||
#code-verify { width: 220px; padding: 7px; margin-left: auto; margin-right: auto; }
|
||||
|
||||
input[disabled] { color: silver; }
|
||||
input[disabled] { color: silver; }
|
||||
button[disabled] span { color: silver; }
|
||||
.title_clean { display:none; }
|
||||
|
||||
@ -292,15 +294,35 @@ class auth
|
||||
// NOTE: this should NOT be a template of the admin-template, however themes may style it using css.
|
||||
|
||||
$class = (e_QUERY == 'failed') ? "class='e-shake'" : "";
|
||||
|
||||
|
||||
|
||||
|
||||
$text = "<form id='admin-login' method='post' action='".e_SELF."' {$incChap} >
|
||||
<div id='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='login' /></div>
|
||||
<div id='login-admin' class='well center'>
|
||||
<div {$class}>
|
||||
<div class='navbar navbar-inner'>
|
||||
<h4>admin area</h4>
|
||||
</div>
|
||||
<div>
|
||||
<div id='login-admin' class='center'>
|
||||
<div>";
|
||||
|
||||
if(e_QUERY == 'failed')
|
||||
{
|
||||
e107::lan('core', 'login');
|
||||
$text .= "<div class='alert alert-danger'>".LAN_LOGIN_21."</div>";
|
||||
$text .= "<script type='text/javascript'>
|
||||
window.setTimeout(function() {
|
||||
$('.alert').fadeTo(500, 0).slideUp(500, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}, 5000);
|
||||
</script>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$text .= "
|
||||
<div class='panel well panel-primary'>
|
||||
<div class='panel-heading'><h3 class='panel-title'>".LAN_HEADER_04."</h3></div>
|
||||
|
||||
<div class='panel-body'>
|
||||
<div class='field'>
|
||||
<label for='username'>".ADLAN_89."</label>
|
||||
<input class='tbox e-tip' type='text' autofocus required='required' name='authname' placeholder='".ADLAN_89."' id='username' size='30' value='' maxlength='".varset($pref['loginname_maxlength'], 30)."' />
|
||||
@ -317,7 +339,7 @@ class auth
|
||||
{
|
||||
$text .= "
|
||||
<div class='field'>
|
||||
<label for='code_verify'>".LAN_ENTER_CODE."</label>"
|
||||
<label for='code-verify'>".LAN_ENTER_CODE."</label>"
|
||||
.$sec_img->renderImage().
|
||||
$sec_img->renderInput()."
|
||||
</div>";
|
||||
@ -334,6 +356,7 @@ class auth
|
||||
$text .= "</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>";
|
||||
|
||||
e107::getRender()->tablerender("", $text, 'admin-login');
|
||||
@ -421,6 +444,7 @@ class auth
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return array("authfail", "reason"=>$reason);
|
||||
|
@ -87,8 +87,8 @@ class banlist_admin extends e_admin_dispatcher
|
||||
|
||||
protected $adminMenu = array(
|
||||
|
||||
'main/list' => array('caption'=> "Blacklist", 'perm' => '4'), //TODO check for LAN.
|
||||
'main/create' => array('caption'=> "Add to Blacklist", 'perm' => '4'),
|
||||
'main/list' => array('caption'=> BANLAN_122, 'perm' => '4'),
|
||||
'main/create' => array('caption'=> BANLAN_123, 'perm' => '4'),
|
||||
'other' => array('divider'=>true),
|
||||
// Use FILTER to view whitelist instead.
|
||||
'white/list' => array('caption'=> BANLAN_52, 'perm' => '4'),
|
||||
@ -96,7 +96,7 @@ class banlist_admin extends e_admin_dispatcher
|
||||
|
||||
'other1' => array('divider'=>true),
|
||||
|
||||
'failed/list' => array('caption'=> 'Failed logins', 'perm'=>'4'),
|
||||
'failed/list' => array('caption'=> ADLAN_146, 'perm'=>'4'),
|
||||
|
||||
'other2' => array('divider'=>true),
|
||||
'main/transfer' => array('caption'=> BANLAN_35, 'perm' => '4'),
|
||||
@ -133,10 +133,10 @@ class banlist_ui extends e_admin_ui
|
||||
'banlist_ip' => array ( 'title' => LAN_IP, 'type' => 'ip', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_bantype' => array ( 'title' => LAN_TYPE, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter'=>true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => 'auto=1&hidden=1&readonly=1', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_banexpires' => array ( 'title' => 'Expires', 'type' => 'method', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_banexpires' => array ( 'title' => BANLAN_124, 'type' => 'method', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_admin' => array ( 'title' => 'Admin', 'type' => 'text', 'data' => 'int', 'noedit'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'banlist_reason' => array ( 'title' => 'Reason', 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => 'constant=1', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_notes' => array ( 'title' => 'Notes', 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_reason' => array ( 'title' => BANLAN_7, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => 'constant=1', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'banlist_notes' => array ( 'title' => BANLAN_19, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'options' => array ( 'title' => LAN_OPTIONS, 'type' => '', 'data' => '', 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ),
|
||||
);
|
||||
|
||||
@ -167,7 +167,7 @@ class banlist_ui extends e_admin_ui
|
||||
$myip = e107::getIPHandler()->getIP(true);
|
||||
$this->fields['banlist_ip']['writeParms']['tdClassRight'] = 'form-inline';
|
||||
$this->fields['banlist_ip']['writeParms']['pre'] = "<div class='input-append'>";
|
||||
$this->fields['banlist_ip']['writeParms']['post'] = "<button class='btn btn-primary' id='useip' data-ip='{$myip}'>Use My IP</button></div>"; // USERIP;
|
||||
$this->fields['banlist_ip']['writeParms']['post'] = "<button class='btn btn-primary' id='useip' data-ip='{$myip}'>".BANLAN_125."</button></div>"; // USERIP;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1643,3 +1643,4 @@ function headerjs()
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
exit;
|
||||
?>
|
@ -31,7 +31,7 @@ e107::coreLan('footer', true);
|
||||
{
|
||||
$_globalLans = e107::pref('core', 'lan_global_list');
|
||||
$_plugins = e107::getPref('plug_installed');
|
||||
if(is_array($_plugins) && count($_plugins) > 0)
|
||||
if(!empty($_plugins) && !empty($_globalLans) && is_array($_plugins) && count($_plugins) > 0)
|
||||
{
|
||||
$_plugins = array_keys($_plugins);
|
||||
|
||||
|
@ -15,7 +15,12 @@ if (!getperms("B"))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_prefs.php');
|
||||
// include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_prefs.php');
|
||||
|
||||
e107::lan('core', 'comment');
|
||||
e107::lan('core', 'prefs', true);
|
||||
|
||||
e107::css('inline', "td.status span.label { display:block; width: 100%; padding: 6px 6px; } ");
|
||||
|
||||
class comments_admin extends e_admin_dispatcher
|
||||
{
|
||||
@ -64,12 +69,12 @@ class comments_admin_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'comment_id' => array('title'=> LAN_ID, 'type' => null, 'width' =>'5%', 'forced'=> TRUE),
|
||||
'comment_blocked' => array('title'=> LAN_STATUS, 'type' => 'method', 'inline'=>false, /*'writeParms' => array("approved","blocked","pending"), */'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'), // Photo
|
||||
'comment_blocked' => array('title'=> LAN_STATUS, 'type' => 'method', 'inline'=>false, /*'writeParms' => array("approved","blocked","pending"), */'data'=> 'int', 'thclass' => 'center', 'class'=>'status center', 'filter' => true, 'batch' => true, 'width' => 'auto'), // Photo
|
||||
|
||||
'comment_type' => array('title'=> LAN_TYPE, 'type' => 'method', 'width' => '10%', 'filter'=>TRUE),
|
||||
|
||||
'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'data'=>'int', 'width' => '5%'),
|
||||
'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name
|
||||
'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'readonly'=>2, 'data'=>'int', 'width' => '5%'),
|
||||
'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'writeParms'=>array('size'=>'xxlarge')), // Display name
|
||||
'comment_comment' => array('title'=> "comment", 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name
|
||||
'comment_author_id' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'data' => 'int', 'width' => 'auto', 'writeParms' => 'nameField=comment_author_name'), // User id
|
||||
'comment_author_name' => array('title'=> "authorName", 'type' => 'user', 'width' => 'auto', 'readParms'=>'idField=comment_author_id&link=1', 'noedit' => true, 'forceSave' => true), // User name
|
||||
@ -173,14 +178,14 @@ class comments_admin_form_ui extends e_admin_form_ui
|
||||
if($mode == 'read')
|
||||
{
|
||||
return e107::getComment()->getTable($curVal);
|
||||
return $curVal.' (custom!)';
|
||||
// return $curVal.' (custom!)';
|
||||
}
|
||||
|
||||
if($mode == 'filter') // Custom Filter List for release_type
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$sql->db_Select_gen('SELECT * FROM #comments GROUP BY comment_type');
|
||||
while($row = $sql->db_Fetch())
|
||||
$sql->gen('SELECT * FROM #comments GROUP BY comment_type');
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$id = $row['comment_type'];
|
||||
$list[$id] = e107::getComment()->getTable($id);
|
||||
@ -201,7 +206,8 @@ class comments_admin_form_ui extends e_admin_form_ui
|
||||
{
|
||||
$frm = e107::getForm();
|
||||
|
||||
$blocked = array("approved", "blocked", "pending");
|
||||
// $blocked = array("approved", "blocked", "pending");
|
||||
$blocked = array(COMLAN_400, COMLAN_401, COMLAN_402);
|
||||
|
||||
if($mode == 'filter' || $mode == 'batch' || $mode == 'inline') // Custom Filter List for release_type
|
||||
{
|
||||
@ -211,7 +217,14 @@ class comments_admin_form_ui extends e_admin_form_ui
|
||||
if($mode == 'read')
|
||||
{
|
||||
// $blocked = array("","blocked","pending");
|
||||
return varset($blocked[$curVal], ''); // $blocked[$curVal];
|
||||
|
||||
$blockedDisp = array(
|
||||
"<span class='label label-success'>".COMLAN_400."</span>",
|
||||
"<span class='label label-danger'>".COMLAN_401."</span>",
|
||||
"<span class='label label-warning'>".COMLAN_402."</span>"
|
||||
);
|
||||
|
||||
return varset($blockedDisp[$curVal], ''); // $blocked[$curVal];
|
||||
}
|
||||
|
||||
if($mode == 'write')
|
||||
|
@ -711,7 +711,10 @@ class page_admin_ui extends e_admin_ui
|
||||
|
||||
function beforeUpdate($newdata,$olddata)
|
||||
{
|
||||
$newdata['menu_name'] = preg_replace('/[^\w-*]/','',$newdata['menu_name']);
|
||||
if(isset($newdata['menu_name']))
|
||||
{
|
||||
$newdata['menu_name'] = preg_replace('/[^\w-*]/','',$newdata['menu_name']);
|
||||
}
|
||||
|
||||
return $newdata;
|
||||
}
|
||||
@ -722,6 +725,11 @@ class page_admin_ui extends e_admin_ui
|
||||
$tp = e107::getParser();
|
||||
$sql = e107::getDb();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
if(!isset($newdata['menu_name']))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$menu_name = $tp->toDB($newdata['menu_name']); // not to be confused with menu-caption.
|
||||
|
||||
|
@ -1311,17 +1311,18 @@ class system_tools
|
||||
* Optimize SQL
|
||||
* @return none
|
||||
*/
|
||||
private function optimizesql($mySQLdefaultdb) //FIXME Use mysql class.
|
||||
private function optimizesql($mySQLdefaultdb)
|
||||
{
|
||||
// global $mes;
|
||||
$result = mysql_list_tables($mySQLdefaultdb);
|
||||
while($row = mysql_fetch_row($result))
|
||||
$mes = e107::getMessage();
|
||||
$tables = e107::getDb()->tables();
|
||||
|
||||
foreach($tables as $table)
|
||||
{
|
||||
mysql_query("OPTIMIZE TABLE ".$row[0]);
|
||||
e107::getDb()->gen("OPTIMIZE TABLE ".$table);
|
||||
}
|
||||
|
||||
// $mes->add(DBLAN_11." $mySQLdefaultdb ".DBLAN_12, E_MESSAGE_SUCCESS);
|
||||
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_7, DBLAN_11." $mySQLdefaultdb ".DBLAN_12);
|
||||
$mes->addSuccess(e107::getParser()->lanVars(DBLAN_11, $mySQLdefaultdb));
|
||||
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_7, $mes->render());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1356,8 +1357,8 @@ class system_tools
|
||||
|
||||
// e107::getConfig($type)->aliases
|
||||
|
||||
e107::getDb()->db_Select_gen("SELECT e107_name FROM #core WHERE e107_name LIKE ('plugin_%') ORDER BY e107_name");
|
||||
while ($row = e107::getDb()->db_Fetch())
|
||||
e107::getDb()->gen("SELECT e107_name FROM #core WHERE e107_name LIKE ('plugin_%') ORDER BY e107_name");
|
||||
while ($row = e107::getDb()->fetch())
|
||||
{
|
||||
$key = str_replace("plugin_","",$row['e107_name']);
|
||||
$selected = (varset($_GET['type'])==$key) ? "selected='selected'" : "";
|
||||
@ -1700,7 +1701,7 @@ function table_list()
|
||||
|
||||
foreach($tables as $e107tab)
|
||||
{
|
||||
$count = e107::getDb()->db_Select_gen("SELECT * FROM #".$e107tab);
|
||||
$count = e107::getDb()->gen("SELECT * FROM #".$e107tab);
|
||||
|
||||
if($count)
|
||||
{
|
||||
@ -1930,8 +1931,8 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
$dbtables = array();
|
||||
|
||||
//get all tables in the db
|
||||
$sql2->db_Select_gen("SHOW TABLES");
|
||||
while($row2 = $sql2->db_Fetch())
|
||||
$sql2->gen("SHOW TABLES");
|
||||
while($row2 = $sql2->fetch())
|
||||
{
|
||||
$dbtables[] = $row2[0];
|
||||
}
|
||||
@ -1951,7 +1952,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
ORDER BY r.rate_table, r.rate_itemid";
|
||||
$data = array('type' => 'rate', 'table' => 'rate_table', 'itemid' => 'rate_itemid', 'id' => 'rate_id');
|
||||
|
||||
if(!$sql->db_Select_gen($query))
|
||||
if(!$sql->gen($query))
|
||||
{
|
||||
$text .= verify_sql_record_displayresult(DBLAN_49, $data['type']);
|
||||
}
|
||||
@ -1963,7 +1964,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
//array which will hold all db tables
|
||||
$dbtables = verify_sql_record_gettables();
|
||||
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
|
||||
$ctype = $data['type'];
|
||||
@ -1977,8 +1978,8 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
if(in_array(MPREFIX.$ctable, $dbtables))
|
||||
{
|
||||
|
||||
$sql3->db_Select_gen("SHOW COLUMNS FROM ".MPREFIX.$ctable);
|
||||
while($row3 = $sql3->db_Fetch())
|
||||
$sql3->gen("SHOW COLUMNS FROM ".MPREFIX.$ctable);
|
||||
while($row3 = $sql3->fetch())
|
||||
{
|
||||
//find the auto_increment field, since that's the most likely key used
|
||||
if($row3['Extra'] == 'auto_increment')
|
||||
@ -2018,7 +2019,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
ORDER BY c.comment_type, c.comment_item_id";
|
||||
$data = array('type' => 'comments', 'table' => 'comment_type', 'itemid' => 'comment_item_id', 'id' => 'comment_id');
|
||||
|
||||
if(!$sql->db_Select_gen($query))
|
||||
if(!$sql->gen($query))
|
||||
{
|
||||
$text .= verify_sql_record_displayresult(DBLAN_49, $data['type']);
|
||||
}
|
||||
@ -2036,7 +2037,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
$cobj = new comment();
|
||||
$e_comment = $cobj->get_e_comment();
|
||||
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
|
||||
$ctype = $data['type'];
|
||||
@ -2101,7 +2102,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
if($installed = $sql2->db_Select("plugin", "*", "plugin_path = '".$var['plugin_path']."' AND plugin_installflag = '1' "))
|
||||
{
|
||||
$qryp = str_replace("{NID}", $citemid, $var['qry']);
|
||||
if(!$sql2->db_Select_gen($qryp))
|
||||
if(!$sql2->gen($qryp))
|
||||
{
|
||||
$err[] = array('type' => $ctable, 'sqlid' => $cid, 'table' => $ctable, 'itemid' => $citemid, 'table_exist' => TRUE);
|
||||
}
|
||||
|
@ -20,25 +20,172 @@ if (!ADMIN) {
|
||||
exit;
|
||||
}
|
||||
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||
e107::lan('core','docs',true);
|
||||
|
||||
define('DOC_PATH', e_DOCS.e_LANGUAGE.'/');
|
||||
define('DOC_PATH_ALT', e_DOCS.'English/');
|
||||
|
||||
e107::css('inline', 'div.qitem { margin-top:20px }
|
||||
div.aitem { padding:10px 15px; }
|
||||
|
||||
');
|
||||
|
||||
class docs_admin extends e_admin_dispatcher
|
||||
{
|
||||
|
||||
protected $modes = array(
|
||||
|
||||
'main' => array(
|
||||
'controller' => 'docs_ui',
|
||||
'path' => null,
|
||||
'ui' => 'docs_form_ui',
|
||||
'uipath' => null
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
|
||||
protected $adminMenu = array();
|
||||
|
||||
protected $adminMenuAliases = array();
|
||||
|
||||
protected $menuTitle = LAN_DOCS;
|
||||
|
||||
protected static $helpList = array();
|
||||
|
||||
public static function getDocs()
|
||||
{
|
||||
return self::$helpList;
|
||||
}
|
||||
|
||||
|
||||
function init()
|
||||
{
|
||||
|
||||
$fl = e107::getFile();
|
||||
|
||||
$helplist_all = $fl->get_files(DOC_PATH_ALT);
|
||||
if(!is_dir(DOC_PATH) || DOC_PATH == DOC_PATH_ALT)
|
||||
{
|
||||
$helplist = $helplist_all;
|
||||
}
|
||||
else
|
||||
{
|
||||
$helplist = $fl->get_files(DOC_PATH);
|
||||
}
|
||||
|
||||
sort($helplist);
|
||||
|
||||
self::$helpList = $helplist;
|
||||
|
||||
foreach($helplist as $key=>$helpdata)
|
||||
{
|
||||
|
||||
$id = 'doc-'.$key;
|
||||
$k = 'main/'.$id;
|
||||
|
||||
$this->adminMenu[$k] = array('caption'=> str_replace("_", " ", $helpdata['fname']), 'perm' => false, 'uri'=>"#".$id );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class docs_ui extends e_admin_ui
|
||||
{
|
||||
|
||||
public function Doc0Page()
|
||||
{
|
||||
$helplist = docs_admin::getDocs();
|
||||
|
||||
$text = '';
|
||||
|
||||
$iconQ = e107::getParser()->toGlyph('fa-question-circle');
|
||||
$iconA = " ";
|
||||
|
||||
foreach($helplist as $key=>$helpdata)
|
||||
{
|
||||
|
||||
$filename = DOC_PATH.$helpdata['fname'];
|
||||
$filename_alt = DOC_PATH_ALT.vartrue($helpdata['fname']);
|
||||
|
||||
if(is_readable($filename))
|
||||
{
|
||||
$tmp = file_get_contents($filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp = file_get_contents($filename_alt);
|
||||
}
|
||||
|
||||
$tmp = preg_replace('/Q\>(.*?)A>/si', "###QSTART###<div class='qitem'>".$iconQ."\\1</div>###QEND###", $tmp);
|
||||
$tmp = preg_replace('/###QEND###(.*?)###QSTART###/si', "<div class='aitem'>".$iconA."\\1</div>", $tmp);
|
||||
$tmp = str_replace(array('###QSTART###', '###QEND###'), array('', "<div class='aitem'>".$iconA), $tmp)."</div>";
|
||||
|
||||
$id = 'doc-'.$key;
|
||||
|
||||
$display = ($key === 0) ? "" : "style='display:none'";
|
||||
|
||||
$text .= "
|
||||
<div class='docs-item' id='{$id}' {$display}>
|
||||
<h4>".LAN_DOCS.SEP.str_replace("_", " ", $helpdata['fname'])."</h4>
|
||||
{$tmp}
|
||||
|
||||
</div>";
|
||||
|
||||
// <div class='gotop'><a href='#docs-list' class='scroll-to'>".LAN_DOCS_GOTOP."</a></div>
|
||||
}
|
||||
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class docs_form_ui extends e_admin_form_ui
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
new docs_admin();
|
||||
|
||||
require_once(e_ADMIN."auth.php");
|
||||
|
||||
$data = e107::getAdminUI()->runPage('raw');
|
||||
|
||||
echo $data[1]; // just to remove the title.
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$e_sub_cat = 'docs';
|
||||
require_once("auth.php");
|
||||
|
||||
require_once (e_HANDLER.'file_class.php');
|
||||
$fl = new e_file();
|
||||
$doc_fpath = e_DOCS.e_LANGUAGE.'/';
|
||||
$doc_fpath_alt = e_DOCS.'English/';
|
||||
|
||||
$helplist_all = $fl->get_files($doc_fpath_alt);
|
||||
if(!is_dir($doc_fpath) || $doc_fpath == $doc_fpath_alt)
|
||||
|
||||
$helplist_all = $fl->get_files(DOC_PATH_ALT);
|
||||
if(!is_dir(DOC_PATH) || DOC_PATH == DOC_PATH_ALT)
|
||||
{
|
||||
$helplist = $helplist_all;
|
||||
}
|
||||
else
|
||||
{
|
||||
$helplist = $fl->get_files($doc_fpath);
|
||||
$helplist = $fl->get_files(DOC_PATH);
|
||||
}
|
||||
|
||||
//Titles in Admin Area are requested by the community
|
||||
@ -46,8 +193,8 @@ define('e_PAGETITLE', LAN_DOCS);
|
||||
|
||||
if (e_QUERY) {
|
||||
$i = intval(e_QUERY) - 1;
|
||||
$filename = $doc_fpath.$helplist[$i]['fname'];
|
||||
$filename_alt = $doc_fpath_alt.$helplist[$i]['fname'];
|
||||
$filename = DOC_PATH.$helplist[$i]['fname'];
|
||||
$filename_alt = DOC_PATH_ALT.$helplist[$i]['fname'];
|
||||
|
||||
if(is_readable($filename))
|
||||
$text = file_get_contents($filename);
|
||||
@ -64,17 +211,17 @@ if (e_QUERY) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* NEW 0.8
|
||||
* Show All
|
||||
*/
|
||||
|
||||
//NEW 0.8
|
||||
// Show All
|
||||
|
||||
|
||||
$text = '';
|
||||
$text_h = '';
|
||||
foreach ($helplist as $key => $helpdata)
|
||||
{
|
||||
$filename = $doc_fpath.$helpdata['fname'];
|
||||
$filename_alt = $doc_fpath_alt.vartrue($$helpdata['fname']);
|
||||
$filename = DOC_PATH.$helpdata['fname'];
|
||||
$filename_alt = DOC_PATH_ALT.vartrue($$helpdata['fname']);
|
||||
|
||||
if(is_readable($filename))
|
||||
$tmp = file_get_contents($filename);
|
||||
@ -99,6 +246,10 @@ foreach ($helplist as $key => $helpdata)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$text_h = "<div id='docs-list'><h4>".LAN_DOCS_SECTIONS."</h4>".$text_h."</div>";
|
||||
$text = $text_h.$text;
|
||||
|
||||
@ -109,4 +260,5 @@ $text .= "
|
||||
|
||||
$ns->tablerender(LAN_DOCS, $text, 'docs');
|
||||
require_once("footer.php");
|
||||
*/
|
||||
?>
|
@ -22,6 +22,8 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||
|
||||
$e_sub_cat = 'emoticon';
|
||||
|
||||
e107::getConfig('emote')->clearPrefCache('emote');
|
||||
|
||||
require_once("auth.php");
|
||||
|
||||
$mes = e107::getMessage();
|
||||
@ -43,6 +45,7 @@ if (isset($_POST['active']))
|
||||
e107::getLog()->add($pref['smiley_activate'] ? 'EMOTE_02' : 'EMOTE_03', $pref['emotepack'], E_LOG_INFORMATIVE, '');
|
||||
save_prefs();
|
||||
$update = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -181,12 +184,12 @@ class emotec
|
||||
<form method='post' action='".e_SELF."#etabTabContainer=emoticon-packages'>
|
||||
<fieldset>
|
||||
<legend>".EMOLAN_13."</legend>
|
||||
<table class='table adminlist'>
|
||||
<table class='table adminlist' style='margin-top:10px'>
|
||||
<colgroup>
|
||||
<col style='width:15%' />
|
||||
<col style='width:50%' />
|
||||
<col style='width:15%' />
|
||||
<col style='width:20%' />
|
||||
<col style='width:10%' />
|
||||
<col style='width:25%' />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -207,8 +210,8 @@ class emotec
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td class='forumheader' style='width: 20%;'>{$pack}</td>
|
||||
<td class='forumheader' style='width: 20%;'>
|
||||
<td class='forumheader'>{$pack}</td>
|
||||
<td class='forumheader'>
|
||||
";
|
||||
|
||||
foreach($emoteArray as $emote)
|
||||
@ -228,24 +231,21 @@ class emotec
|
||||
|
||||
$text .= "
|
||||
</td>
|
||||
<td class='center middle'>".($pref['emotepack'] == $pack ? LAN_ACTIVE : "<button type='submit' name='defPack_".$pack."' value='".EMOLAN_11."'><span>".EMOLAN_11."</span></button>")."</td>
|
||||
<td class='center middle'>".($pref['emotepack'] == $pack ? "<span class='label label-success'>".LAN_ACTIVE."</span>" : "<button class='btn btn-primary' type='submit' name='defPack_".$pack."' value='".EMOLAN_11."'><span>".EMOLAN_11."</span></button>")."</td>
|
||||
<td>";
|
||||
|
||||
|
||||
|
||||
|
||||
$text .= $frm->admin_button('subPack_'.$pack,'edit','submit',LAN_CONFIGURE);
|
||||
$text .= $frm->admin_button('subPack_'.$pack,'edit','default',LAN_CONFIGURE);
|
||||
|
||||
if ($can_scan && ($pack != 'default'))
|
||||
{
|
||||
$text .= "
|
||||
|
||||
<button class='submit' type='submit' name='scanPack_".$pack."'><span>".EMOLAN_26."</span></button>
|
||||
";
|
||||
$text .= $frm->admin_button('scanPack_'.$pack,'active','submit',EMOLAN_26);
|
||||
// $text .= "<button class='btn btn-default submit' type='submit' name='scanPack_".$pack."'><span>".EMOLAN_26."</span></button>";
|
||||
$text .= $frm->admin_button('scanPack_'.$pack,'active','default',EMOLAN_26);
|
||||
}
|
||||
|
||||
$text .= $frm->admin_button('XMLPack_'.$pack,'submit','submit',EMOLAN_28);
|
||||
$text .= $frm->admin_button('XMLPack_'.$pack,'submit','default',EMOLAN_28);
|
||||
$text .= "
|
||||
</td>
|
||||
</tr>
|
||||
@ -292,7 +292,7 @@ class emotec
|
||||
<form method='post' action='".e_SELF."#etabTabContainer=emoticon-packages'>
|
||||
<fieldset id='core-emoticon-configure'>
|
||||
<legend class='e-hideme'>".LAN_EDIT."</legend>
|
||||
<div class='info-bar'><strong>".sprintf(str_replace("[x]", "%u", EMOLAN_31), count($eArray))."</strong></div>
|
||||
<div class='info-bar' style='padding-bottom:10px'>".$tp->lanVars(EMOLAN_31, count($eArray))."</div>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col style='width:20px' />
|
||||
@ -318,11 +318,11 @@ class emotec
|
||||
|
||||
if (!isset($emotecode[$evalue]))
|
||||
{
|
||||
$file_back = '<span class="error"> '.EMOLAN_37.'</span>';
|
||||
$file_back = ' <span class="label label-danger error">'.EMOLAN_37.'</span>';
|
||||
}
|
||||
elseif (!$emotecode[$evalue])
|
||||
{
|
||||
$text_back = '<span class="error"> '.EMOLAN_38.'</span>';
|
||||
$text_back = ' <span class="label label-danger error">'.EMOLAN_38.'</span>';
|
||||
}
|
||||
$text .= "
|
||||
<tr>
|
||||
|
@ -23,7 +23,7 @@ e107::coreLan('eurl', true);
|
||||
// TODO - admin interface support, remove it from globals
|
||||
$e_sub_cat = 'eurl';
|
||||
|
||||
|
||||
e107::css('inline', " span.e-help { cursor: help } ");
|
||||
|
||||
class eurl_admin extends e_admin_dispatcher
|
||||
{
|
||||
@ -832,7 +832,15 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
|
||||
$text = '';
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
$text .= "<tr>
|
||||
<th>Module</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>";
|
||||
|
||||
$lng = e107::getLanguage();
|
||||
|
||||
foreach ($modules as $module => $obj)
|
||||
{
|
||||
$cfg = $obj->config->config();
|
||||
@ -840,21 +848,33 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
|
||||
if($module == 'index')
|
||||
{
|
||||
$text .= "
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>
|
||||
".LAN_EURL_CORE_INDEX."
|
||||
</td>
|
||||
<td>
|
||||
".LAN_EURL_CORE_INDEX_INFO."
|
||||
</td>
|
||||
<td>
|
||||
".LAN_EURL_FORM_HELP_EXAMPLE.":<br /><strong>".e107::getUrl()->create('/', '', array('full' => 1))."</strong>
|
||||
<table class='table table-striped table-bordered' style='margin-bottom:0'>
|
||||
<colgroup>
|
||||
<col style='width:20%' />
|
||||
<col style='width:40%' />
|
||||
<col style='width:40%' />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
".LAN_EURL_CORE_INDEX_INFO."
|
||||
</td>
|
||||
<td>
|
||||
".e107::getUrl()->create('/', '', array('full' => 1))."
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$help = array();
|
||||
$admin = $obj->config->admin();
|
||||
$lan = $lanDef[0];
|
||||
@ -873,37 +893,94 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
<td>
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
// default language
|
||||
$text .= $this->text('eurl_aliases['.$lanDef[0].']['.$module.']', $defVal).' ['.$lanDef[1].']'.$this->help(LAN_EURL_FORM_HELP_DEFAULT);
|
||||
$help[] = '['.$lanDef[1].'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
// default language
|
||||
$text .= "<table class='table table-striped table-bordered' style='margin-bottom:0'>
|
||||
<colgroup>
|
||||
<col style='width:20%' />
|
||||
<col style='width:40%' />
|
||||
<col style='width:40%' />
|
||||
</colgroup>";
|
||||
|
||||
$text .= "<tr>
|
||||
<th>".ADLAN_132."</th>
|
||||
<th>".LAN_EURL_NAME_ALIASES."</th>
|
||||
<th>".LAN_EURL_FORM_HELP_EXAMPLE."</th>
|
||||
</tr>";
|
||||
|
||||
$text .= "<tr>";
|
||||
$text .= "<td>".$lanDef[1]."</td>";
|
||||
$text .= "<td class='form-inline'>";
|
||||
$text .= $this->text('eurl_aliases['.$lanDef[0].']['.$module.']', $defVal, 255, 'size=xlarge');
|
||||
// $text .= ' ['.$lanDef[1].']';
|
||||
$text .= "</td><td>";
|
||||
$text .= $this->help(LAN_EURL_FORM_HELP_DEFAULT);
|
||||
|
||||
$text .= "</td>";
|
||||
// $help[] = '['.$lanDef[1].'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
$text .= "</tr>";
|
||||
|
||||
if(e107::getUrl()->router()->isMainModule($module))
|
||||
{
|
||||
$help = " <span class='e-tip e-help' title=\"".LAN_EURL_CORE_MAIN."\">".$tp->toGlyph('fa-home')."</span>";
|
||||
//$readonly = 1; // may be used later.
|
||||
$readonly = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$help = '';
|
||||
$readonly=0;
|
||||
}
|
||||
|
||||
if($lans)
|
||||
{
|
||||
|
||||
foreach ($lans as $code => $lan)
|
||||
{
|
||||
|
||||
$url = e107::getUrl()->create($module, '', array('lan' => $code, 'full' => 1, 'encode' => 0));
|
||||
$defVal = isset($currentAliases[$code]) && in_array($module, $currentAliases[$code]) ? array_search($module, $currentAliases[$code]) : $module;
|
||||
$text .= "<div class='spacer'><!-- --></div>";
|
||||
$text .= $this->text('eurl_aliases['.$code.']['.$module.']', $defVal).' ['.$lan.']'.$this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
$help[] = '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
$defVal = isset($currentAliases[$code]) && in_array($module, $currentAliases[$code]) ? array_search($module, $currentAliases[$code]) : $module;
|
||||
|
||||
|
||||
// $help .= '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
$text .= "<tr>";
|
||||
$text .= "<td>".$lan."</td>";
|
||||
$text .= "<td class='form-inline'>". $this->text('eurl_aliases['.$code.']['.$module.']', $defVal, 255, array('size' => 'xlarge', 'readonly'=>$readonly));
|
||||
$text .= $help;
|
||||
$text .= "</td>";
|
||||
$text .= "<td>";
|
||||
|
||||
// $text .= $this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
// $text .= $this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
$url = $lng->subdomainUrl($lan,$url);
|
||||
$text .= $url;
|
||||
$text .= "</td>";
|
||||
// $text .= "<td>".
|
||||
|
||||
// $text .= '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
// $text .= "</td>";
|
||||
$text .= "</tr>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$text .= "</table>
|
||||
</td></tr>";
|
||||
|
||||
|
||||
|
||||
if(e107::getUrl()->router()->isMainModule($module))
|
||||
{
|
||||
$help = array(LAN_EURL_CORE_MAIN);
|
||||
}
|
||||
|
||||
$text .= "
|
||||
/*$text .= "
|
||||
</td>
|
||||
<td>
|
||||
".implode("<div class='spacer'><!-- --></div>", $help)."
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
";*/
|
||||
|
||||
// $text .= "</tr>";
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
@ -75,10 +75,10 @@ function loadJSAddons()
|
||||
//e107::css('core', 'chosen/chosen.css', 'jquery');
|
||||
//e107::js('core', 'chosen/chosen.jquery.min.js', 'jquery', 2);
|
||||
|
||||
e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
|
||||
// e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2); // loaded in form-handler.
|
||||
|
||||
// e107::css('core', 'bootstrap-tag/bootstrap-tag.css', 'jquery');
|
||||
e107::js('core', 'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
|
||||
// e107::js('core', 'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
|
||||
|
||||
|
||||
// e107::js("core", "tags/jquery.tagit.js","jquery",3);
|
||||
@ -182,7 +182,7 @@ else // XHTML
|
||||
echo "<meta name=\"viewport\" content=\"width=device-width; initial-scale=1; maximum-scale=1\" />\n"; // Works better for iOS but still has some issues.
|
||||
// echo (defined("VIEWPORT")) ? "<meta name=\"viewport\" content=\"".VIEWPORT."\" />\n" : "";
|
||||
|
||||
echo "<title>".(defined("e_PAGETITLE") ? e_PAGETITLE." - " : (defined("PAGE_NAME") ? PAGE_NAME." - " : "")).LAN_head_4." :: ".SITENAME."</title>\n";
|
||||
echo "<title>".(defined("e_PAGETITLE") ? e_PAGETITLE." - " : (defined("PAGE_NAME") ? PAGE_NAME." - " : "")).LAN_HEADER_04." :: ".SITENAME."</title>\n";
|
||||
|
||||
// print_a(get_included_files());
|
||||
//
|
||||
|
@ -1585,6 +1585,12 @@ class media_admin_ui extends e_admin_ui
|
||||
if(vartrue($_POST['upload_remote_url']))
|
||||
{
|
||||
$fileName = basename($_POST['upload_url']);
|
||||
|
||||
if(strpos($fileName,'?')!==false)
|
||||
{
|
||||
list($fileName,$bla) = explode("?", $fileName);
|
||||
}
|
||||
|
||||
if(!$fl->getRemoteFile($_POST['upload_url'], $fileName, 'import'))
|
||||
{
|
||||
$mes->addError("There was a problem grabbing the file");
|
||||
@ -1870,6 +1876,12 @@ class media_admin_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
|
||||
e107::css('inline', '
|
||||
span.avatar-label { width:100%; display:block; padding:5px; margin-bottom:5px }
|
||||
div.avatar-container { margin-bottom:5px; max-height:350px }
|
||||
|
||||
');
|
||||
|
||||
$sql = e107::getDb();
|
||||
$frm = e107::getForm();
|
||||
$tp = e107::getParser();
|
||||
@ -1899,14 +1911,14 @@ class media_admin_ui extends e_admin_ui
|
||||
foreach($tmp as $val)
|
||||
{
|
||||
$id = $val['user_id'];
|
||||
$imageUsed[$id] = $val['user_image'];
|
||||
$imageUsed[$id] = str_replace("-upload-","", $val['user_image']);
|
||||
}
|
||||
|
||||
$userImages = array_flip($imageUsed);
|
||||
|
||||
$text = $frm->open('core-image-avatars');
|
||||
|
||||
$text .= "<fieldset id='core-iamge-show-avatars'>";
|
||||
$text .= "<div id='core-image-show-avatars' class='row'>";
|
||||
|
||||
$count = 0;
|
||||
while (list($key, $image_name) = each($dirlist))
|
||||
@ -1929,8 +1941,14 @@ class media_admin_ui extends e_admin_ui
|
||||
*/
|
||||
|
||||
// :
|
||||
// $fileName = basename($image_name);
|
||||
|
||||
|
||||
$fileName = basename($image_name);
|
||||
$users = (in_array($fileName,$imageUsed)) ? "<span class='badge badge-warning' style='margin-bottom:5px'>Image in use</span>" : '<span class="badge" style="margin-bottom:5px">Not in use</span>';
|
||||
|
||||
|
||||
|
||||
$users = (in_array($fileName,$imageUsed)) ? "<span class='label label-warning avatar-label'>Image in use</span>" : '<span class="label label-default avatar-label" >Not in use</span>';
|
||||
|
||||
//directory?
|
||||
if(is_dir(e_MEDIA."avatars/".$image_name))
|
||||
@ -1953,25 +1971,26 @@ class media_admin_ui extends e_admin_ui
|
||||
//Friendly UI - click text to select a form element
|
||||
|
||||
// Resized on-the-fly - avatar-size no longer an issue.
|
||||
$attr = "aw=".$pref['im_width']."&ah=".$pref['im_height'];
|
||||
// $attr = "aw=".$pref['im_width']."&ah=".$pref['im_height'];
|
||||
$attr = "aw=200&ah=200";
|
||||
$img_path = $tp->thumbUrl(e_MEDIA_ABS."avatars/".$image_name,$attr);
|
||||
|
||||
$type = dirname($image_name);
|
||||
|
||||
if($prevType != $type)
|
||||
{
|
||||
$text .= "<div class='clearfix'></div>
|
||||
<h5 >".$type."</h5>";
|
||||
$text .= "<div class='col-md-12 clearfix'></div>
|
||||
<h4 class='clearfix col-md-12' >".$type."</h4>";
|
||||
}
|
||||
|
||||
|
||||
$for = $frm->name2id('multiaction-'.$image_name);
|
||||
|
||||
$img_src = "<label for='".$for."' >
|
||||
$img_src = "
|
||||
<div class='thumbnail'>
|
||||
<img src='".$img_path."' alt='{$image_name}' title='".IMALAN_66.": {$image_name}' />
|
||||
<label for='".$for."' ><img class='img-responsive' src='".$img_path."' alt='{$image_name}' title='".IMALAN_66.": {$image_name}' /></label>
|
||||
</div>
|
||||
</label>";
|
||||
";
|
||||
|
||||
$prevType = $type;
|
||||
|
||||
@ -1983,12 +2002,12 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
|
||||
$text .= "
|
||||
<div class='buttons-bar image-box f-left center autocheck' style='margin:5px; width: ".(intval($pref['im_width'])+40)."px; height: ".(intval($pref['im_height'])+100)."px;'>
|
||||
<div class='col-md-2 col-sm-4 center autocheck avatar-container' >
|
||||
<div class='well'>
|
||||
<div class='image-users'>{$users}</div>
|
||||
<div class='image-preview'>{$img_src}</div>
|
||||
<div class='image-delete'>
|
||||
".$frm->checkbox('multiaction[]', intval($userImages[$fileName])."#{$image_pre}{$image_name}", false, array('id' => false, 'disabled' => $disabled))."
|
||||
".$frm->checkbox('multiaction[]', intval($userImages[$fileName])."#{$image_pre}{$image_name}", false, array('id' => $for, 'disabled' => $disabled))."
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -1997,9 +2016,10 @@ class media_admin_ui extends e_admin_ui
|
||||
$count++;
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<div class='spacer clear'>
|
||||
<div class='buttons-bar'>
|
||||
$text .= "</div>
|
||||
|
||||
<div class='col-md-12 spacer clearfix'>
|
||||
<div class='row buttons-bar'>
|
||||
<input type='hidden' name='show_avatars' value='1' />
|
||||
".$frm->admin_button('e_check_all', LAN_CHECKALL, 'action')."
|
||||
".$frm->admin_button('e_uncheck_all', LAN_UNCHECKALL, 'action')."
|
||||
@ -2008,7 +2028,8 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
";
|
||||
// $frm->admin_button('submit_cancel_show', IMALAN_68, 'cancel')
|
||||
|
@ -376,7 +376,7 @@ class adminstyle_infopanel
|
||||
|
||||
$panelOnline = "
|
||||
|
||||
<table class='table table-condensed table-striped' style='width:96%;margin-left:auto;margin-right:auto'>
|
||||
<table class='table table-condensed table-striped' >
|
||||
<colgroup>
|
||||
<col style='width: 10%' />
|
||||
<col style='width: 25%' />
|
||||
|
@ -312,7 +312,7 @@ class lancheck
|
||||
|
||||
private $thirdPartyPlugins = true;
|
||||
|
||||
|
||||
private $deprecatedFiles = array('lan_download.php', 'lan_parser_functions.php', 'lan_prefs.php', 'admin/lan_download.php', 'admin/lan_modcomment.php');
|
||||
|
||||
|
||||
function __construct()
|
||||
@ -475,7 +475,7 @@ class lancheck
|
||||
if($status['error']==FALSE)
|
||||
{
|
||||
$text = $status['message']."<br />";
|
||||
$text .= share($status['file']);
|
||||
$text .= $this->share($status['file']);
|
||||
$mes->addSuccess($text);
|
||||
//$ns->tablerender(LAN_CREATED, $text );
|
||||
}
|
||||
@ -491,6 +491,73 @@ class lancheck
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Share Language File
|
||||
* @param object $newfile
|
||||
* Usage of e107 is granted to you provided that this function is not modified or removed in any way.
|
||||
* @return
|
||||
*/
|
||||
private function share($newfile)
|
||||
{
|
||||
global $pref;
|
||||
|
||||
if(!$newfile || E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
global $tp;
|
||||
$full_link = $tp->createConstants($newfile);
|
||||
|
||||
$email_message = "<br />Site: <a href='".SITEURL."'>".SITENAME."</a>
|
||||
<br />User: ".USERNAME."\n
|
||||
<br />Email: ".USEREMAIL."\n
|
||||
<br />Language: ".$_POST['language']."\n
|
||||
<br />IP:".USERIP."
|
||||
<br />...would like to contribute the following language pack for e107. (see attached)<br />:
|
||||
|
||||
|
||||
<br />Missing Files: ".$_SESSION['lancheck'][$_POST['language']]['file']."
|
||||
<br />Bom Errors : ".$_SESSION['lancheck'][$_POST['language']]['bom']."
|
||||
<br />UTF Errors : ".$_SESSION['lancheck'][$_POST['language']]['utf']."
|
||||
<br />Definition Errors : ".$_SESSION['lancheck'][$_POST['language']]['def']."
|
||||
<br />Total Errors: ".$_SESSION['lancheck'][$_POST['language']]['total']."
|
||||
<br />
|
||||
<br />XML file: ".$_SESSION['lancheck'][$_POST['language']]['xml'];
|
||||
|
||||
|
||||
|
||||
require_once(e_HANDLER."mail.php");
|
||||
|
||||
$send_to = (!$_POST['contribute_pack']) ? "languagepacks@e107inc.org" : "certifiedpack@e107inc.org";
|
||||
$to_name = "e107 Inc.";
|
||||
$Cc = "";
|
||||
$Bcc = "";
|
||||
$returnpath='';
|
||||
$returnreceipt='';
|
||||
$inline ="";
|
||||
|
||||
$subject = (!$_POST['contribute_pack']) ? "[0.7 LanguagePack] " : "[0.7 Certified LanguagePack] ";
|
||||
$subject .= basename($newfile);
|
||||
|
||||
if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline))
|
||||
{
|
||||
$text = "<div style='padding:40px'>";
|
||||
$text .= defined('LANG_LAN_EML') ? "<b>".LANG_LAN_EML."</b>" : "<b>There was a problem sending the language-pack. Please email your verified language pack to:</b>";
|
||||
$text .= " <a href='mailto:".$send_to."?subject=".$subject."'>".$send_to."</a>";
|
||||
$text .= "</div>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
elseif($_POST['contribute_pack'])
|
||||
{
|
||||
return "<div style='padding:40px'>Pack Sent to e107 Inc. A confirmation email will be sent to ".$pref['siteadminemail']." once it is received.<br />Please also make sure that email coming from ".$send_to." is not blocked by your spam filter.</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $language
|
||||
@ -610,14 +677,18 @@ class lancheck
|
||||
|
||||
$archive = new PclZip($newfile);
|
||||
|
||||
$core = $this->getFilePaths(e_LANGUAGEDIR.$language."/", $language,'', 0);
|
||||
$core_admin = $this->getFilePaths(e_BASE.$LANGUAGES_DIRECTORY.$language."/admin/", $language,'', 2);
|
||||
$core = $this->getFilePaths(e_LANGUAGEDIR.$language."/", $language,''); // includes admin area.
|
||||
// $core_admin = $this->getFilePaths(e_BASE.$LANGUAGES_DIRECTORY.$language."/admin/", $language,'');
|
||||
$core_admin = array();
|
||||
$plugs = $this->getFilePaths(e_BASE.$PLUGINS_DIRECTORY, $language, $this->core_plugins); // standardized path.
|
||||
$theme = $this->getFilePaths(e_BASE.$THEMES_DIRECTORY, $language, $this->core_themes);
|
||||
$docs = $this->getFilePaths(e_BASE.$HELP_DIRECTORY,$language);
|
||||
$handlers = $this->getFilePaths(e_BASE.$HANDLERS_DIRECTORY,$language); // standardized path.
|
||||
|
||||
$file = array_merge($core,$core_admin, $plugs, $theme, $docs, $handlers);
|
||||
|
||||
$file = array_unique($file);
|
||||
|
||||
$data = implode(",", $file);
|
||||
|
||||
if ($archive->create($data,PCLZIP_OPT_REMOVE_PATH,e_BASE) == 0)
|
||||
@ -668,19 +739,21 @@ class lancheck
|
||||
* @param string $filter
|
||||
* @return array|bool
|
||||
*/
|
||||
private function getFilePaths($path, $language)
|
||||
private function getFilePaths($path, $language, $restrict=array())
|
||||
{
|
||||
$fl = e107::getFile();
|
||||
|
||||
if ($lanlist = $fl->get_files($path, "", "standard", 4))
|
||||
if ($lanlist = $fl->get_files($path, "", "standard", 4)) // (\.php|\.xml)$
|
||||
{
|
||||
sort($lanlist);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$pzip = array();
|
||||
foreach ($lanlist as $p)
|
||||
{
|
||||
@ -691,6 +764,30 @@ class lancheck
|
||||
$pzip[] = $fullpath;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!empty($restrict)) // strip the list according to inclusion list.
|
||||
{
|
||||
$newlist = array();
|
||||
foreach($pzip as $k=>$p)
|
||||
{
|
||||
foreach($restrict as $accept)
|
||||
{
|
||||
if(strpos($p, $accept)!==false)
|
||||
{
|
||||
|
||||
$newlist[] = $p;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$pzip = $newlist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $pzip;
|
||||
}
|
||||
|
||||
@ -782,7 +879,7 @@ class lancheck
|
||||
$text .= "<a href='".e_REQUEST_URI."&sub=verify&lan=".$language."' class='btn btn-primary' >".LAN_CHECK_2."</a>";
|
||||
|
||||
$text .= "
|
||||
<input type='submit' name='ziplang[{$language}]' value=\"".LANG_LAN_23."\" class='button' onclick=\"this.value = '".$lan_pleasewait."'\" /></td>
|
||||
<input type='submit' name='ziplang[{$language}]' value=\"".LANG_LAN_23."\" class='btn btn-default' onclick=\"this.value = '".$lan_pleasewait."'\" /></td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
@ -1098,10 +1195,11 @@ class lancheck
|
||||
$diz .= "| e107 website content management system ".$lan." Language File\n";
|
||||
$diz .= "| Released under the terms and conditions of the\n";
|
||||
$diz .= "| GNU General Public License (http://gnu.org).\n";
|
||||
$diz .= "| Last Modified: ".date("Y/m/d H:i:s")."\n";
|
||||
$diz .= "|\n";
|
||||
$diz .= "| ".chr(36)."URL: $writeit ".chr(36)."\n";
|
||||
$diz .= "| ".chr(36)."Revision: 1.0 ".chr(36)."\n";
|
||||
$diz .= "| ".chr(36)."Id: ".date("Y/m/d H:i:s")." ".chr(36)."\n";
|
||||
// $diz .= "| ".chr(36)."URL: $writeit ".chr(36)."\n";
|
||||
// $diz .= "| ".chr(36)."Revision: 1.0 ".chr(36)."\n";
|
||||
// $diz .= "| ".chr(36)."Id: ".date("Y/m/d H:i:s")." ".chr(36)."\n";
|
||||
$diz .= "| ".chr(36)."Author: ".USERNAME." ".chr(36)."\n";
|
||||
$diz .= "+---------------------------------------------------------------+\n";
|
||||
$diz .= "*".chr(47)."\n\n";
|
||||
@ -1335,17 +1433,17 @@ class lancheck
|
||||
$error[] = $def. ": Missing [ and/or ] character(s)";
|
||||
}
|
||||
|
||||
if((strpos($eng_line,"--LINK--")!==FALSE && strpos($trans_line,"--LINK--")==FALSE))
|
||||
if((strpos($eng_line,"--LINK--")!==false && strpos($trans_line,"--LINK--")===false))
|
||||
{
|
||||
$error[] = $def. ": Missing --LINK--";
|
||||
}
|
||||
|
||||
if((strpos($eng_line,"e107.org")!==FALSE && strpos($trans_line,"e107.org")==FALSE))
|
||||
if((strpos($eng_line,"e107.org")!==false && strpos($trans_line,"e107.org")===false))
|
||||
{
|
||||
$error[] = $def. ": Missing e107.org URL";
|
||||
}
|
||||
|
||||
if((strpos($eng_line,"e107coders.org")!==FALSE && strpos($trans_line,"e107coders.org")==FALSE))
|
||||
if((strpos($eng_line,"e107coders.org")!==FALSE && strpos($trans_line,"e107coders.org")===false))
|
||||
{
|
||||
$error[] = $def. ": Missing e107coders.org URL";
|
||||
}
|
||||
@ -1436,13 +1534,27 @@ class lancheck
|
||||
|
||||
|
||||
$fl = e107::getFile();
|
||||
$tp = e107::getParser();
|
||||
|
||||
$ret = array();
|
||||
|
||||
if($lang_array = $fl->get_files($comp_dir, ".php$","standard",$depth)){
|
||||
sort($lang_array);
|
||||
}
|
||||
|
||||
|
||||
foreach($lang_array as $k=> $f)
|
||||
{
|
||||
$path = str_replace(e_LANGUAGEDIR.e_LANGUAGE."/", "", $f['path'].$f['fname']);
|
||||
|
||||
if(in_array($path, $this->deprecatedFiles))
|
||||
{
|
||||
unset($lang_array[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(strpos($comp_dir,e_LANGUAGEDIR) !== false)
|
||||
{
|
||||
$regexp = "#.php#";
|
||||
@ -1518,7 +1630,10 @@ class lancheck
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return $ret;
|
||||
|
||||
}
|
||||
@ -1625,7 +1740,17 @@ class lancheck
|
||||
|
||||
// $text .= "<input class='btn btn-primary' type='button' style='width:60px' name='but_$i' value=\"".LAN_EDIT."\" onclick=\"window.location='".e_SELF."?f=".$comp_dir."/languages/".$lnk."&lan=".$target_lan."&mode={$mode}'\" /> ";
|
||||
|
||||
$text .= "<a class='btn btn-primary' style='width:60px' href'".e_REQUEST_URI."&f=".$comp_dir."/languages/".$lnk."&lan=".$target_lan."&type={$mode}'>".LAN_EDIT."</a> ";
|
||||
$parms = $_GET;
|
||||
$parms['sub'] = 'edit';
|
||||
$parms['file'] = $comp_dir."/languages/".$lnk;
|
||||
$parms['lan'] = $this->transLanguage;
|
||||
$parms['iframe'] = 1;
|
||||
$parms['type'] = $mode;
|
||||
|
||||
$editUrl = e_REQUEST_SELF."?".http_build_query($parms,'&');
|
||||
|
||||
$text .= "<a href='".$editUrl."' class='e-modal btn btn-primary' data-modal-caption='".str_replace("../","",$comp_dir)."' style='width:60px' >".LAN_EDIT."</a> "; // href='".e_REQUEST_URI."&f=".$comp_dir."/languages/".$lnk."&lan=".$target_lan."&type={$mode}'
|
||||
// <a href='".$editUrl."' data-modal-caption='".$subpath."' class='e-modal btn btn-primary' type='button' style='width:60px'>".LAN_EDIT."</a>";
|
||||
|
||||
|
||||
$text .="</td></tr>";
|
||||
|
@ -792,73 +792,6 @@ if (isset($_POST['create_tables']) && $_POST['language'])
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Share Language File
|
||||
* @param object $newfile
|
||||
* Usage of e107 is granted to you provided that this function is not modified or removed in any way.
|
||||
* @return
|
||||
*/
|
||||
function share($newfile)
|
||||
{
|
||||
global $pref;
|
||||
|
||||
if(!$newfile || E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
global $tp;
|
||||
$full_link = $tp->createConstants($newfile);
|
||||
|
||||
$email_message = "<br />Site: <a href='".SITEURL."'>".SITENAME."</a>
|
||||
<br />User: ".USERNAME."\n
|
||||
<br />Email: ".USEREMAIL."\n
|
||||
<br />Language: ".$_POST['language']."\n
|
||||
<br />IP:".USERIP."
|
||||
<br />...would like to contribute the following language pack for e107. (see attached)<br />:
|
||||
|
||||
|
||||
<br />Missing Files: ".$_SESSION['lancheck'][$_POST['language']]['file']."
|
||||
<br />Bom Errors : ".$_SESSION['lancheck'][$_POST['language']]['bom']."
|
||||
<br />UTF Errors : ".$_SESSION['lancheck'][$_POST['language']]['utf']."
|
||||
<br />Definition Errors : ".$_SESSION['lancheck'][$_POST['language']]['def']."
|
||||
<br />Total Errors: ".$_SESSION['lancheck'][$_POST['language']]['total']."
|
||||
<br />
|
||||
<br />XML file: ".$_SESSION['lancheck'][$_POST['language']]['xml'];
|
||||
|
||||
|
||||
|
||||
require_once(e_HANDLER."mail.php");
|
||||
|
||||
$send_to = (!$_POST['contribute_pack']) ? "languagepacks@e107inc.org" : "certifiedpack@e107inc.org";
|
||||
$to_name = "e107 Inc.";
|
||||
$Cc = "";
|
||||
$Bcc = "";
|
||||
$returnpath='';
|
||||
$returnreceipt='';
|
||||
$inline ="";
|
||||
|
||||
$subject = (!$_POST['contribute_pack']) ? "[0.7 LanguagePack] " : "[0.7 Certified LanguagePack] ";
|
||||
$subject .= basename($newfile);
|
||||
|
||||
if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline))
|
||||
{
|
||||
$text = "<div style='padding:40px'>";
|
||||
$text .= defined('LANG_LAN_EML') ? "<b>".LANG_LAN_EML."</b>" : "<b>There was a problem sending the language-pack. Please email your verified language pack to:</b>";
|
||||
$text .= " <a href='mailto:".$send_to."?subject=".$subject."'>".$send_to."</a>";
|
||||
$text .= "</div>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
elseif($_POST['contribute_pack'])
|
||||
{
|
||||
return "<div style='padding:40px'>Pack Sent to e107 Inc. A confirmation email will be sent to ".$pref['siteadminemail']." once it is received.<br />Please also make sure that email coming from ".$send_to." is not blocked by your spam filter.</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1249,7 +1249,7 @@ if(e_IFRAME) //<-- Check config and delete buttons if modifying
|
||||
|
||||
//e107::js('core','bootstrap/js/bootstrap.min.js');
|
||||
//e107::css('core','bootstrap/css/bootstrap.min.css');
|
||||
e107::css('url','{e_THEME}/bootstrap/admin_style.css');
|
||||
e107::css('url','{e_THEME}/bootstrap3/admin_style.css');
|
||||
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ class news_admin_ui extends e_admin_ui
|
||||
'news_extended' => array('title' => "", 'type' => null, 'tab'=>0, 'nolist'=>true, 'writeParms'=>'nolabel=1','data'=>'str', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
|
||||
'news_meta_keywords' => array('title' => LAN_KEYWORDS, 'type' => 'tags', 'tab'=>1, 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
'news_meta_description' => array('title' => LAN_DESCRIPTION,'type' => 'textarea', 'tab'=>1, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
'news_meta_description' => array('title' => LAN_DESCRIPTION,'type' => 'textarea', 'tab'=>1, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'writeParms'=>array('size'=>'xxlarge')),
|
||||
'news_sef' => array('title' => LAN_SEFURL, 'type' => 'text', 'tab'=>1, 'writeParms'=>'size=xxlarge', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
'news_ping' => array('title' => LAN_PING, 'type' => 'checkbox', 'tab'=>1, 'data'=>false, 'writeParms'=>'value=0', 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
|
||||
@ -404,16 +404,16 @@ class news_admin_ui extends e_admin_ui
|
||||
'news_class' => array('title' => LAN_VISIBILITY, 'type' => 'userclasses','tab'=>2, 'inline'=>true, 'width' => 'auto', 'thclass' => '', 'class' => null, 'batch'=>true, 'filter'=>true),
|
||||
'news_render_type' => array('title' => LAN_TEMPLATE, 'type' => 'dropdown', 'tab'=>0, 'data'=> 'str', 'inline'=>false, 'width' => 'auto', 'thclass' => 'left', 'class' => 'left', 'nosort' => false, 'batch'=>true, 'filter'=>true),
|
||||
'news_sticky' => array('title' => LAN_NEWS_28, 'type' => 'boolean', 'tab'=>2, 'data' => 'int' , 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false, 'batch'=>true, 'filter'=>true),
|
||||
'news_allow_comments' => array('title' => LAN_COMMENTS, 'type' => 'boolean', 'tab'=>2, 'writeParms'=>'inverse=1', 'data' => 'int', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false,'batch'=>true, 'filter'=>true,'readParms'=>'reverse=1','writeParms'=>'inverse=1'),
|
||||
'news_allow_comments' => array('title' => LAN_COMMENTS, 'type' => 'boolean', 'tab'=>2, 'writeParms'=>'inverse=1', 'data' => 'int', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false,'batch'=>true, 'filter'=>true,'readParms'=>'reverse=1'),
|
||||
'news_comment_total' => array('title' => LAN_NEWS_60, 'type' => 'number', 'tab'=>2, 'noedit'=>true, 'width' => '10%', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
// admin_news_notify
|
||||
'news_email_notify' => array('title' => "Email notification", 'type' => 'checkbox', 'tab'=>2, 'data'=>false, 'writeParms'=>array('show'=>1), 'help'=>'Trigger an email notification when you submit this form.'),
|
||||
'news_email_notify' => array('title' => "Email notification", 'type' => 'checkbox', 'tab'=>2, 'data'=>false, 'writeParms'=>array('show'=>1, 'tdClassRight'=>'form-inline'), 'help'=>'Trigger an email notification when you submit this form.'),
|
||||
'submitted_id' => array('title' => LAN_NEWS_68, 'type' => 'hidden', 'tab'=>2, 'data'=>false, 'writeParms'=>'show=0'),
|
||||
'options' => array('title' => LAN_OPTIONS, 'type' => null, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center', 'nosort' => true, 'forced' => TRUE)
|
||||
|
||||
);
|
||||
|
||||
protected $fieldpref = array('checkboxes','news_id', 'news_thumbnail', 'news_title', 'news_datestamp', 'news_category', 'options');
|
||||
protected $fieldpref = array('checkboxes','news_id', 'news_thumbnail', 'news_title', 'news_datestamp', 'news_category', 'news_class', 'options');
|
||||
|
||||
/* //TODO
|
||||
protected $prefs = array(
|
||||
@ -470,12 +470,12 @@ class news_admin_ui extends e_admin_ui
|
||||
$new_data['news_thumbnail'] = $this->processThumbs($new_data['news_thumbnail']);
|
||||
}
|
||||
|
||||
if(empty($new_data['news_datestamp']))
|
||||
if(isset($new_data['news_datestamp']) && empty($new_data['news_datestamp']))
|
||||
{
|
||||
$new_data['news_datestamp'] = time();
|
||||
}
|
||||
|
||||
if(empty($new_data['news_sef']) && !empty($new_data['news_title']))
|
||||
if(isset($new_data['news_sef']) && empty($new_data['news_sef']) && !empty($new_data['news_title']))
|
||||
{
|
||||
$new_data['news_sef'] = eHelper::title2sef($new_data['news_title']);
|
||||
}
|
||||
|
@ -788,12 +788,13 @@ class pluginManager{
|
||||
e107::getLog()->add('PLUGMAN_03', $logInfo, E_LOG_INFORMATIVE, '');
|
||||
}
|
||||
|
||||
if($_POST['delete_files'])
|
||||
if(!empty($_POST['delete_files']) && ($plug['plugin_installflag'] == true))
|
||||
{
|
||||
include_once(e_HANDLER.'file_class.php');
|
||||
$fi = new e_file;
|
||||
$result = $fi->rmtree(e_PLUGIN.$eplug_folder);
|
||||
$text .= ($result ? '<br />'.EPL_ADLAN_86.e_PLUGIN.$eplug_folder : '<br />'.EPL_ADLAN_87.'<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32);
|
||||
if(!empty($eplug_folder))
|
||||
{
|
||||
$result = e107::getFile()->rmtree(e_PLUGIN.$eplug_folder);
|
||||
$text .= ($result ? '<br />'.EPL_ADLAN_86.e_PLUGIN.$eplug_folder : '<br />'.EPL_ADLAN_87.'<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ $core_pref = e107::getConfig();
|
||||
|
||||
if(!$core_pref->get('timezone'))
|
||||
{
|
||||
$core_pref->set('timezone', 'GMT');
|
||||
$core_pref->set('timezone', 'UTC');
|
||||
}
|
||||
|
||||
$frm = e107::getForm(false, true); //enable inner tabindex counter
|
||||
@ -601,10 +601,10 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='contact_visibility'>Contact Page Visibility</label></td>
|
||||
<td><label for='contact_visibility'>Contact Form Visibility</label></td>
|
||||
<td>
|
||||
".$e_userclass->uc_dropdown('contact_visibility', varset( $pref['contact_visibility'],e_UC_PUBLIC), null, "tabindex='".$frm->getNext()."'")."
|
||||
<div class='smalltext field-help'>Contact information and/or form will only be visible to this userclass group.</div>
|
||||
<div class='smalltext field-help'>Contact form will only be visible to this userclass group.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -844,545 +844,7 @@ foreach($toffset as $o)
|
||||
|
||||
|
||||
|
||||
$timeZones = array(
|
||||
"Africa/Abidjan",
|
||||
"Africa/Accra",
|
||||
"Africa/Addis_Ababa",
|
||||
"Africa/Algiers",
|
||||
"Africa/Asmara",
|
||||
"Africa/Asmera",
|
||||
"Africa/Bamako",
|
||||
"Africa/Bangui",
|
||||
"Africa/Banjul",
|
||||
"Africa/Bissau",
|
||||
"Africa/Blantyre",
|
||||
"Africa/Brazzaville",
|
||||
"Africa/Bujumbura",
|
||||
"Africa/Cairo",
|
||||
"Africa/Casablanca",
|
||||
"Africa/Ceuta",
|
||||
"Africa/Conakry",
|
||||
"Africa/Dakar",
|
||||
"Africa/Dar_es_Salaam",
|
||||
"Africa/Djibouti",
|
||||
"Africa/Douala",
|
||||
"Africa/El_Aaiun",
|
||||
"Africa/Freetown",
|
||||
"Africa/Gaborone",
|
||||
"Africa/Harare",
|
||||
"Africa/Johannesburg",
|
||||
"Africa/Juba",
|
||||
"Africa/Kampala",
|
||||
"Africa/Khartoum",
|
||||
"Africa/Kigali",
|
||||
"Africa/Kinshasa",
|
||||
"Africa/Lagos",
|
||||
"Africa/Libreville",
|
||||
"Africa/Lome",
|
||||
"Africa/Luanda",
|
||||
"Africa/Lubumbashi",
|
||||
"Africa/Lusaka",
|
||||
"Africa/Malabo",
|
||||
"Africa/Maputo",
|
||||
"Africa/Maseru",
|
||||
"Africa/Mbabane",
|
||||
"Africa/Mogadishu",
|
||||
"Africa/Monrovia",
|
||||
"Africa/Nairobi",
|
||||
"Africa/Ndjamena",
|
||||
"Africa/Niamey",
|
||||
"Africa/Nouakchott",
|
||||
"Africa/Ouagadougou",
|
||||
"Africa/Porto-Novo",
|
||||
"Africa/Sao_Tome",
|
||||
"Africa/Timbuktu",
|
||||
"Africa/Tripoli",
|
||||
"Africa/Tunis",
|
||||
"Africa/Windhoek",
|
||||
"America/Adak",
|
||||
"America/Anchorage",
|
||||
"America/Anguilla",
|
||||
"America/Antigua",
|
||||
"America/Araguaina",
|
||||
"America/Argentina/Buenos_Aires",
|
||||
"America/Argentina/Catamarca",
|
||||
"America/Argentina/ComodRivadavia",
|
||||
"America/Argentina/Cordoba",
|
||||
"America/Argentina/Jujuy",
|
||||
"America/Argentina/La_Rioja",
|
||||
"America/Argentina/Mendoza",
|
||||
"America/Argentina/Rio_Gallegos",
|
||||
"America/Argentina/Salta",
|
||||
"America/Argentina/San_Juan",
|
||||
"America/Argentina/San_Luis",
|
||||
"America/Argentina/Tucuman",
|
||||
"America/Argentina/Ushuaia",
|
||||
"America/Aruba",
|
||||
"America/Asuncion",
|
||||
"America/Atikokan",
|
||||
"America/Atka",
|
||||
"America/Bahia",
|
||||
"America/Bahia_Banderas",
|
||||
"America/Barbados",
|
||||
"America/Belem",
|
||||
"America/Belize",
|
||||
"America/Blanc-Sablon",
|
||||
"America/Boa_Vista",
|
||||
"America/Bogota",
|
||||
"America/Boise",
|
||||
"America/Buenos_Aires",
|
||||
"America/Cambridge_Bay",
|
||||
"America/Campo_Grande",
|
||||
"America/Cancun",
|
||||
"America/Caracas",
|
||||
"America/Catamarca",
|
||||
"America/Cayenne",
|
||||
"America/Cayman",
|
||||
"America/Chicago",
|
||||
"America/Chihuahua",
|
||||
"America/Coral_Harbour",
|
||||
"America/Cordoba",
|
||||
"America/Costa_Rica",
|
||||
"America/Creston",
|
||||
"America/Cuiaba",
|
||||
"America/Curacao",
|
||||
"America/Danmarkshavn",
|
||||
"America/Dawson",
|
||||
"America/Dawson_Creek",
|
||||
"America/Denver",
|
||||
"America/Detroit",
|
||||
"America/Dominica",
|
||||
"America/Edmonton",
|
||||
"America/Eirunepe",
|
||||
"America/El_Salvador",
|
||||
"America/Ensenada",
|
||||
"America/Fort_Wayne",
|
||||
"America/Fortaleza",
|
||||
"America/Glace_Bay",
|
||||
"America/Godthab",
|
||||
"America/Goose_Bay",
|
||||
"America/Grand_Turk",
|
||||
"America/Grenada",
|
||||
"America/Guadeloupe",
|
||||
"America/Guatemala",
|
||||
"America/Guayaquil",
|
||||
"America/Guyana",
|
||||
"America/Halifax",
|
||||
"America/Havana",
|
||||
"America/Hermosillo",
|
||||
"America/Indiana/Indianapolis",
|
||||
"America/Indiana/Knox",
|
||||
"America/Indiana/Marengo",
|
||||
"America/Indiana/Petersburg",
|
||||
"America/Indiana/Tell_City",
|
||||
"America/Indiana/Vevay",
|
||||
"America/Indiana/Vincennes",
|
||||
"America/Indiana/Winamac",
|
||||
"America/Indianapolis",
|
||||
"America/Inuvik",
|
||||
"America/Iqaluit",
|
||||
"America/Jamaica",
|
||||
"America/Jujuy",
|
||||
"America/Juneau",
|
||||
"America/Kentucky/Louisville",
|
||||
"America/Kentucky/Monticello",
|
||||
"America/Knox_IN",
|
||||
"America/Kralendijk",
|
||||
"America/La_Paz",
|
||||
"America/Lima",
|
||||
"America/Los_Angeles",
|
||||
"America/Louisville",
|
||||
"America/Lower_Princes",
|
||||
"America/Maceio",
|
||||
"America/Managua",
|
||||
"America/Manaus",
|
||||
"America/Marigot",
|
||||
"America/Martinique",
|
||||
"America/Matamoros",
|
||||
"America/Mazatlan",
|
||||
"America/Mendoza",
|
||||
"America/Menominee",
|
||||
"America/Merida",
|
||||
"America/Metlakatla",
|
||||
"America/Mexico_City",
|
||||
"America/Miquelon",
|
||||
"America/Moncton",
|
||||
"America/Monterrey",
|
||||
"America/Montevideo",
|
||||
"America/Montreal",
|
||||
"America/Montserrat",
|
||||
"America/Nassau",
|
||||
"America/New_York",
|
||||
"America/Nipigon",
|
||||
"America/Nome",
|
||||
"America/Noronha",
|
||||
"America/North_Dakota/Beulah",
|
||||
"America/North_Dakota/Center",
|
||||
"America/North_Dakota/New_Salem",
|
||||
"America/Ojinaga",
|
||||
"America/Panama",
|
||||
"America/Pangnirtung",
|
||||
"America/Paramaribo",
|
||||
"America/Phoenix",
|
||||
"America/Port-au-Prince",
|
||||
"America/Port_of_Spain",
|
||||
"America/Porto_Acre",
|
||||
"America/Porto_Velho",
|
||||
"America/Puerto_Rico",
|
||||
"America/Rainy_River",
|
||||
"America/Rankin_Inlet",
|
||||
"America/Recife",
|
||||
"America/Regina",
|
||||
"America/Resolute",
|
||||
"America/Rio_Branco",
|
||||
"America/Rosario",
|
||||
"America/Santa_Isabel",
|
||||
"America/Santarem",
|
||||
"America/Santiago",
|
||||
"America/Santo_Domingo",
|
||||
"America/Sao_Paulo",
|
||||
"America/Scoresbysund",
|
||||
"America/Shiprock",
|
||||
"America/Sitka",
|
||||
"America/St_Barthelemy",
|
||||
"America/St_Johns",
|
||||
"America/St_Kitts",
|
||||
"America/St_Lucia",
|
||||
"America/St_Thomas",
|
||||
"America/St_Vincent",
|
||||
"America/Swift_Current",
|
||||
"America/Tegucigalpa",
|
||||
"America/Thule",
|
||||
"America/Thunder_Bay",
|
||||
"America/Tijuana",
|
||||
"America/Toronto",
|
||||
"America/Tortola",
|
||||
"America/Vancouver",
|
||||
"America/Virgin",
|
||||
"America/Whitehorse",
|
||||
"America/Winnipeg",
|
||||
"America/Yakutat",
|
||||
"America/Yellowknife",
|
||||
"Antarctica/Casey",
|
||||
"Antarctica/Davis",
|
||||
"Antarctica/DumontDUrville",
|
||||
"Antarctica/Macquarie",
|
||||
"Antarctica/Mawson",
|
||||
"Antarctica/McMurdo",
|
||||
"Antarctica/Palmer",
|
||||
"Antarctica/Rothera",
|
||||
"Antarctica/South_Pole",
|
||||
"Antarctica/Syowa",
|
||||
"Antarctica/Vostok",
|
||||
"Arctic/Longyearbyen",
|
||||
"Asia/Aden",
|
||||
"Asia/Almaty",
|
||||
"Asia/Amman",
|
||||
"Asia/Anadyr",
|
||||
"Asia/Aqtau",
|
||||
"Asia/Aqtobe",
|
||||
"Asia/Ashgabat",
|
||||
"Asia/Ashkhabad",
|
||||
"Asia/Baghdad",
|
||||
"Asia/Bahrain",
|
||||
"Asia/Baku",
|
||||
"Asia/Bangkok",
|
||||
"Asia/Beirut",
|
||||
"Asia/Bishkek",
|
||||
"Asia/Brunei",
|
||||
"Asia/Calcutta",
|
||||
"Asia/Choibalsan",
|
||||
"Asia/Chongqing",
|
||||
"Asia/Chungking",
|
||||
"Asia/Colombo",
|
||||
"Asia/Dacca",
|
||||
"Asia/Damascus",
|
||||
"Asia/Dhaka",
|
||||
"Asia/Dili",
|
||||
"Asia/Dubai",
|
||||
"Asia/Dushanbe",
|
||||
"Asia/Gaza",
|
||||
"Asia/Harbin",
|
||||
"Asia/Hebron",
|
||||
"Asia/Ho_Chi_Minh",
|
||||
"Asia/Hong_Kong",
|
||||
"Asia/Hovd",
|
||||
"Asia/Irkutsk",
|
||||
"Asia/Istanbul",
|
||||
"Asia/Jakarta",
|
||||
"Asia/Jayapura",
|
||||
"Asia/Jerusalem",
|
||||
"Asia/Kabul",
|
||||
"Asia/Kamchatka",
|
||||
"Asia/Karachi",
|
||||
"Asia/Kashgar",
|
||||
"Asia/Kathmandu",
|
||||
"Asia/Katmandu",
|
||||
"Asia/Kolkata",
|
||||
"Asia/Krasnoyarsk",
|
||||
"Asia/Kuala_Lumpur",
|
||||
"Asia/Kuching",
|
||||
"Asia/Kuwait",
|
||||
"Asia/Macao",
|
||||
"Asia/Macau",
|
||||
"Asia/Magadan",
|
||||
"Asia/Makassar",
|
||||
"Asia/Manila",
|
||||
"Asia/Muscat",
|
||||
"Asia/Nicosia",
|
||||
"Asia/Novokuznetsk",
|
||||
"Asia/Novosibirsk",
|
||||
"Asia/Omsk",
|
||||
"Asia/Oral",
|
||||
"Asia/Phnom_Penh",
|
||||
"Asia/Pontianak",
|
||||
"Asia/Pyongyang",
|
||||
"Asia/Qatar",
|
||||
"Asia/Qyzylorda",
|
||||
"Asia/Rangoon",
|
||||
"Asia/Riyadh",
|
||||
"Asia/Saigon",
|
||||
"Asia/Sakhalin",
|
||||
"Asia/Samarkand",
|
||||
"Asia/Seoul",
|
||||
"Asia/Shanghai",
|
||||
"Asia/Singapore",
|
||||
"Asia/Taipei",
|
||||
"Asia/Tashkent",
|
||||
"Asia/Tbilisi",
|
||||
"Asia/Tehran",
|
||||
"Asia/Tel_Aviv",
|
||||
"Asia/Thimbu",
|
||||
"Asia/Thimphu",
|
||||
"Asia/Tokyo",
|
||||
"Asia/Ujung_Pandang",
|
||||
"Asia/Ulaanbaatar",
|
||||
"Asia/Ulan_Bator",
|
||||
"Asia/Urumqi",
|
||||
"Asia/Vientiane",
|
||||
"Asia/Vladivostok",
|
||||
"Asia/Yakutsk",
|
||||
"Asia/Yekaterinburg",
|
||||
"Asia/Yerevan",
|
||||
"Atlantic/Azores",
|
||||
"Atlantic/Bermuda",
|
||||
"Atlantic/Canary",
|
||||
"Atlantic/Cape_Verde",
|
||||
"Atlantic/Faeroe",
|
||||
"Atlantic/Faroe",
|
||||
"Atlantic/Jan_Mayen",
|
||||
"Atlantic/Madeira",
|
||||
"Atlantic/Reykjavik",
|
||||
"Atlantic/South_Georgia",
|
||||
"Atlantic/St_Helena",
|
||||
"Atlantic/Stanley",
|
||||
"Australia/ACT",
|
||||
"Australia/Adelaide",
|
||||
"Australia/Brisbane",
|
||||
"Australia/Broken_Hill",
|
||||
"Australia/Canberra",
|
||||
"Australia/Currie",
|
||||
"Australia/Darwin",
|
||||
"Australia/Eucla",
|
||||
"Australia/Hobart",
|
||||
"Australia/LHI",
|
||||
"Australia/Lindeman",
|
||||
"Australia/Lord_Howe",
|
||||
"Australia/Melbourne",
|
||||
"Australia/NSW",
|
||||
"Australia/North",
|
||||
"Australia/Perth",
|
||||
"Australia/Queensland",
|
||||
"Australia/South",
|
||||
"Australia/Sydney",
|
||||
"Australia/Tasmania",
|
||||
"Australia/Victoria",
|
||||
"Australia/West",
|
||||
"Australia/Yancowinna",
|
||||
"Brazil/Acre",
|
||||
"Brazil/DeNoronha",
|
||||
"Brazil/East",
|
||||
"Brazil/West",
|
||||
"CET",
|
||||
"CST6CDT",
|
||||
"Canada/Atlantic",
|
||||
"Canada/Central",
|
||||
"Canada/East-Saskatchewan",
|
||||
"Canada/Eastern",
|
||||
"Canada/Mountain",
|
||||
"Canada/Newfoundland",
|
||||
"Canada/Pacific",
|
||||
"Canada/Saskatchewan",
|
||||
"Canada/Yukon",
|
||||
"Chile/Continental",
|
||||
"Chile/EasterIsland",
|
||||
"Cuba",
|
||||
"EET",
|
||||
"EST",
|
||||
"EST5EDT",
|
||||
"Egypt",
|
||||
"Eire",
|
||||
"Europe/Amsterdam",
|
||||
"Europe/Andorra",
|
||||
"Europe/Athens",
|
||||
"Europe/Belfast",
|
||||
"Europe/Belgrade",
|
||||
"Europe/Berlin",
|
||||
"Europe/Bratislava",
|
||||
"Europe/Brussels",
|
||||
"Europe/Bucharest",
|
||||
"Europe/Budapest",
|
||||
"Europe/Chisinau",
|
||||
"Europe/Copenhagen",
|
||||
"Europe/Dublin",
|
||||
"Europe/Gibraltar",
|
||||
"Europe/Guernsey",
|
||||
"Europe/Helsinki",
|
||||
"Europe/Isle_of_Man",
|
||||
"Europe/Istanbul",
|
||||
"Europe/Jersey",
|
||||
"Europe/Kaliningrad",
|
||||
"Europe/Kiev",
|
||||
"Europe/Lisbon",
|
||||
"Europe/Ljubljana",
|
||||
"Europe/London",
|
||||
"Europe/Luxembourg",
|
||||
"Europe/Madrid",
|
||||
"Europe/Malta",
|
||||
"Europe/Mariehamn",
|
||||
"Europe/Minsk",
|
||||
"Europe/Monaco",
|
||||
"Europe/Moscow",
|
||||
"Europe/Nicosia",
|
||||
"Europe/Oslo",
|
||||
"Europe/Paris",
|
||||
"Europe/Podgorica",
|
||||
"Europe/Prague",
|
||||
"Europe/Riga",
|
||||
"Europe/Rome",
|
||||
"Europe/Samara",
|
||||
"Europe/San_Marino",
|
||||
"Europe/Sarajevo",
|
||||
"Europe/Simferopol",
|
||||
"Europe/Skopje",
|
||||
"Europe/Sofia",
|
||||
"Europe/Stockholm",
|
||||
"Europe/Tallinn",
|
||||
"Europe/Tirane",
|
||||
"Europe/Tiraspol",
|
||||
"Europe/Uzhgorod",
|
||||
"Europe/Vaduz",
|
||||
"Europe/Vatican",
|
||||
"Europe/Vienna",
|
||||
"Europe/Vilnius",
|
||||
"Europe/Volgograd",
|
||||
"Europe/Warsaw",
|
||||
"Europe/Zagreb",
|
||||
"Europe/Zaporozhye",
|
||||
"Europe/Zurich",
|
||||
"Factory",
|
||||
"GB",
|
||||
"GB-Eire",
|
||||
"GMT",
|
||||
"Greenwich",
|
||||
"HST",
|
||||
"Hongkong",
|
||||
"Iceland",
|
||||
"Indian/Antananarivo",
|
||||
"Indian/Chagos",
|
||||
"Indian/Christmas",
|
||||
"Indian/Cocos",
|
||||
"Indian/Comoro",
|
||||
"Indian/Kerguelen",
|
||||
"Indian/Mahe",
|
||||
"Indian/Maldives",
|
||||
"Indian/Mauritius",
|
||||
"Indian/Mayotte",
|
||||
"Indian/Reunion",
|
||||
"Iran",
|
||||
"Israel",
|
||||
"Jamaica",
|
||||
"Japan",
|
||||
"Kwajalein",
|
||||
"Libya",
|
||||
"MET",
|
||||
"MST",
|
||||
"MST7MDT",
|
||||
"Mexico/BajaNorte",
|
||||
"Mexico/BajaSur",
|
||||
"Mexico/General",
|
||||
"NZ",
|
||||
"NZ-CHAT",
|
||||
"Navajo",
|
||||
"PRC",
|
||||
"PST8PDT",
|
||||
"Pacific/Apia",
|
||||
"Pacific/Auckland",
|
||||
"Pacific/Chatham",
|
||||
"Pacific/Chuuk",
|
||||
"Pacific/Easter",
|
||||
"Pacific/Efate",
|
||||
"Pacific/Enderbury",
|
||||
"Pacific/Fakaofo",
|
||||
"Pacific/Fiji",
|
||||
"Pacific/Funafuti",
|
||||
"Pacific/Galapagos",
|
||||
"Pacific/Gambier",
|
||||
"Pacific/Guadalcanal",
|
||||
"Pacific/Guam",
|
||||
"Pacific/Honolulu",
|
||||
"Pacific/Johnston",
|
||||
"Pacific/Kiritimati",
|
||||
"Pacific/Kosrae",
|
||||
"Pacific/Kwajalein",
|
||||
"Pacific/Majuro",
|
||||
"Pacific/Marquesas",
|
||||
"Pacific/Midway",
|
||||
"Pacific/Nauru",
|
||||
"Pacific/Niue",
|
||||
"Pacific/Norfolk",
|
||||
"Pacific/Noumea",
|
||||
"Pacific/Pago_Pago",
|
||||
"Pacific/Palau",
|
||||
"Pacific/Pitcairn",
|
||||
"Pacific/Pohnpei",
|
||||
"Pacific/Ponape",
|
||||
"Pacific/Port_Moresby",
|
||||
"Pacific/Rarotonga",
|
||||
"Pacific/Saipan",
|
||||
"Pacific/Samoa",
|
||||
"Pacific/Tahiti",
|
||||
"Pacific/Tarawa",
|
||||
"Pacific/Tongatapu",
|
||||
"Pacific/Truk",
|
||||
"Pacific/Wake",
|
||||
"Pacific/Wallis",
|
||||
"Pacific/Yap",
|
||||
"Poland",
|
||||
"Portugal",
|
||||
"ROC",
|
||||
"ROK",
|
||||
"Singapore",
|
||||
"Turkey",
|
||||
"UCT" ,
|
||||
"US/Alaska",
|
||||
"US/Aleutian",
|
||||
"US/Arizona",
|
||||
"US/Central",
|
||||
"US/East-Indiana",
|
||||
"US/Eastern",
|
||||
"US/Hawaii",
|
||||
"US/Indiana-Starke",
|
||||
"US/Michigan",
|
||||
"US/Mountain",
|
||||
"US/Pacific",
|
||||
"US/Pacific-New",
|
||||
"US/Samoa",
|
||||
"UTC",
|
||||
"Universal",
|
||||
"W-SU",
|
||||
"WET",
|
||||
"Zulu");
|
||||
$timeZones = timezone_identifiers_list();
|
||||
|
||||
|
||||
|
||||
@ -1469,14 +931,22 @@ $text .= "
|
||||
$text .= "
|
||||
</select></td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
/*
|
||||
// Highly problematic.
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><label for='signup-remote-emailcheck'>".PRFLAN_160."</label></td>
|
||||
<td>
|
||||
".$frm->radio_switch('signup_remote_emailcheck', $pref['signup_remote_emailcheck'])."
|
||||
</td>
|
||||
</tr>
|
||||
</tr>";
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$text .= "
|
||||
|
||||
<tr>
|
||||
<td><label for='membersonly-enabled'>".PRFLAN_58."</label></td>
|
||||
|
@ -48,8 +48,8 @@ $update_debug = TRUE; // TRUE gives extra messages in places
|
||||
if (defined('TEST_UPDATE')) $update_debug = TRUE;
|
||||
|
||||
|
||||
if (!defined('LAN_UPDATE_8')) { define('LAN_UPDATE_8', ''); }
|
||||
if (!defined('LAN_UPDATE_9')) { define('LAN_UPDATE_9', ''); }
|
||||
//if (!defined('LAN_UPDATE_8')) { define('LAN_UPDATE_8', ''); }
|
||||
//if (!defined('LAN_UPDATE_9')) { define('LAN_UPDATE_9', ''); }
|
||||
|
||||
|
||||
// Determine which installed plugins have an update file - save the path and the installed version in an array
|
||||
@ -127,9 +127,12 @@ if (!$dont_check_update)
|
||||
$dbupdate['test_code'] = 'Test update routine';
|
||||
}
|
||||
|
||||
// set 'master' to true to prevent other upgrades from running before it is complete.
|
||||
$dbupdate['706_to_800'] = array('master'=>true, 'title'=>LAN_UPDATE_8.' 1.x '.LAN_UPDATE_9.' 2.0','message'=> LAN_UPDATE_29);
|
||||
$dbupdate['core_prefs'] = array('master'=>true, 'title'=>LAN_UPDATE_13); // Prefs check
|
||||
// set 'master' to true to prevent other upgrades from running before it is complete.
|
||||
|
||||
$LAN_UPDATE_4 = deftrue('LAN_UPDATE_4',"Update from [x] to [y]"); // in case language-pack hasn't been upgraded.
|
||||
|
||||
$dbupdate['706_to_800'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('1.x','2.0')), 'message'=> LAN_UPDATE_29);
|
||||
$dbupdate['core_prefs'] = array('master'=>true, 'title'=> LAN_UPDATE_13); // Prefs check
|
||||
// $dbupdate['70x_to_706'] = LAN_UPDATE_8.' .70x '.LAN_UPDATE_9.' .706';
|
||||
} // End if (!$dont_check_update)
|
||||
|
||||
@ -176,7 +179,9 @@ class e107Update
|
||||
function updateCore($func='')
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
// foreach($this->core as $func => $data)
|
||||
// {
|
||||
if(function_exists('update_'.$func)) // Legacy Method.
|
||||
@ -187,7 +192,8 @@ class e107Update
|
||||
{
|
||||
if(function_exists("update_".$func))
|
||||
{
|
||||
$message = LAN_UPDATE_7." ".$func;
|
||||
// $message = LAN_UPDATE_7." ".$func;
|
||||
$message = $tp->lanVars(LAN_UPDATE_7, $this->core[$func]['title']);
|
||||
$error = call_user_func("update_".$func, "do");
|
||||
|
||||
if($error != '')
|
||||
@ -254,6 +260,8 @@ class e107Update
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$text = "";
|
||||
|
||||
|
||||
|
||||
foreach($this->core as $func => $data)
|
||||
{
|
||||
@ -437,7 +445,8 @@ function update_core_prefs($type='')
|
||||
if ($k && !array_key_exists($k,$pref))
|
||||
{
|
||||
if ($just_check) return update_needed('Missing pref: '.$k);
|
||||
$pref[$k] = $v;
|
||||
// $pref[$k] = $v;
|
||||
e107::getConfig()->set($k,$v);
|
||||
$admin_log->logMessage($k.' => '.$v, E_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
|
||||
$do_save = TRUE;
|
||||
}
|
||||
@ -445,7 +454,7 @@ function update_core_prefs($type='')
|
||||
if ($do_save)
|
||||
{
|
||||
//save_prefs();
|
||||
e107::getConfig('core')->setPref($pref)->save();
|
||||
e107::getConfig('core')->save(false,true);
|
||||
$admin_log->logMessage(LAN_UPDATE_14.$e107info['e107_version'], E_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
|
||||
$admin_log->flushMessages('UPDATE_03',E_LOG_INFORMATIVE);
|
||||
//e107::getLog()->add('UPDATE_03',LAN_UPDATE_14.$e107info['e107_version'].'[!br!]'.implode(', ',$accum),E_LOG_INFORMATIVE,''); // Log result of actual update
|
||||
@ -497,10 +506,14 @@ function update_706_to_800($type='')
|
||||
e107::getCache()->clearAll('db');
|
||||
e107::getCache()->clearAll('system');
|
||||
|
||||
e107::getMessage()->setUnique();
|
||||
|
||||
// List of unwanted $pref values which can go
|
||||
$obs_prefs = array('frontpage_type','rss_feeds', 'log_lvcount', 'zone', 'upload_allowedfiletype', 'real', 'forum_user_customtitle',
|
||||
'utf-compatmode','frontpage_method','standards_mode','image_owner','im_quality', 'signup_option_timezone',
|
||||
'modules', 'plug_sc', 'plug_bb', 'plug_status', 'plug_latest', 'subnews_hide_news', 'upload_storagetype'
|
||||
'modules', 'plug_sc', 'plug_bb', 'plug_status', 'plug_latest', 'subnews_hide_news', 'upload_storagetype',
|
||||
'signup_remote_emailcheck'
|
||||
|
||||
);
|
||||
|
||||
// List of DB tables not required (includes a few from 0.6xx)
|
||||
@ -515,15 +528,7 @@ function update_706_to_800($type='')
|
||||
$serialized_prefs = array("'emote'", "'menu_pref'", "'search_prefs'", "'emote_default'", "'pm_prefs'");
|
||||
|
||||
|
||||
$create_dir = array(e_MEDIA,e_SYSTEM,e_CACHE,e_CACHE_CONTENT,e_CACHE_IMAGE, e_CACHE_DB, e_LOG, e_BACKUP, e_CACHE_URL, e_TEMP, e_IMPORT);
|
||||
|
||||
foreach($create_dir as $dr)
|
||||
{
|
||||
if(!is_dir($dr))
|
||||
{
|
||||
mkdir($dr, 0755);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// List of changed DB tables (defined in core_sql.php)
|
||||
// No Longer required. - automatically checked against core_sql.php.
|
||||
@ -599,7 +604,7 @@ function update_706_to_800($type='')
|
||||
$do_save = FALSE; // Set TRUE to update prefs when update complete
|
||||
$updateMessages = array(); // Used to log actions for the admin log - TODO: will go once all converted to new class
|
||||
|
||||
$just_check = $type == 'do' ? FALSE : TRUE; // TRUE if we're just seeing whether an update is needed
|
||||
$just_check = ($type == 'do') ? FALSE : TRUE; // TRUE if we're just seeing whether an update is needed
|
||||
|
||||
// if (!$just_check)
|
||||
// {
|
||||
@ -622,14 +627,7 @@ function update_706_to_800($type='')
|
||||
|
||||
$statusTexts = array(E_MESSAGE_SUCCESS => 'Success', E_MESSAGE_ERROR => 'Fail', E_MESSAGE_INFO => 'Info');
|
||||
|
||||
if (isset($pref['forum_user_customtitle']) && !isset($pref['signup_option_customtitle']))
|
||||
{
|
||||
if ($just_check) return update_needed('pref: forum_user_customtitle needs to be renamed');
|
||||
$pref['signup_option_customtitle'] = $pref['forum_user_customtitle'];
|
||||
unset($pref['forum_user_customtitle']);
|
||||
$log->logMessage(LAN_UPDATE_20.'customtitle', E_MESSAGE_SUCCESS);
|
||||
$do_save = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if($pref['admintheme'] == 'bootstrap')//TODO Force an admin theme update or not?
|
||||
{
|
||||
@ -646,7 +644,7 @@ function update_706_to_800($type='')
|
||||
$serialz_qry .= "AND e107_name IN (".implode(",",$serialized_prefs).") ";
|
||||
if(e107::getDb()->select("core", "*", $serialz_qry))
|
||||
{
|
||||
if ($just_check) return update_needed('Convert serialized core prefs');
|
||||
if($just_check) return update_needed('Convert serialized core prefs');
|
||||
while ($row = e107::getDb()->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$status = e107::getDb('sql2')->update('core',"e107_value=\"".convert_serialized($row['e107_value'])."\" WHERE e107_name='".$row['e107_name']."'") ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||
@ -886,6 +884,10 @@ function update_706_to_800($type='')
|
||||
$pref['frontpage'] = array(e_UC_PUBLIC => $fpdef);
|
||||
// $_pdateMessages[] = LAN_UPDATE_38; //FIXME
|
||||
$log->logMessage(LAN_UPDATE_20."frontpage",E_MESSAGE_DEBUG);
|
||||
|
||||
e107::getConfig()->add('frontpage_force', $pref['frontpage_force']);
|
||||
e107::getConfig()->add('frontpage', $pref['frontpage']);
|
||||
unset($pref['frontpage_force'], $pref['frontpage']);
|
||||
$do_save = TRUE;
|
||||
}
|
||||
|
||||
@ -933,153 +935,15 @@ function update_706_to_800($type='')
|
||||
}
|
||||
|
||||
|
||||
if($sql->isTable('forum_t') && $sql->isEmpty('forum') && $sql->isEmpty('forum_t'))
|
||||
{
|
||||
if ($just_check) return update_needed('Empty forum tables need to be removed.');
|
||||
$obs_tables[] = 'forum_t';
|
||||
$obs_tables[] = 'forum';
|
||||
|
||||
}
|
||||
|
||||
// New tables required (list at top. Definitions in core_sql.php)
|
||||
// ALL DEPRECATED by db_verify class.. see below.
|
||||
/*
|
||||
foreach ($new_tables as $nt)
|
||||
{
|
||||
if (!$sql->isTable($nt))
|
||||
{
|
||||
if ($just_check) return update_needed('Add table: '.$nt);
|
||||
// Get the definition
|
||||
$defs = $db_parser->get_table_def($nt,e_ADMIN.'sql/core_sql.php');
|
||||
if (count($defs)) // **** Add in table here
|
||||
{
|
||||
$status = $sql->gen('CREATE TABLE `'.MPREFIX.$defs[0][1].'` ('.$defs[0][2].') TYPE='.$defs[0][3]) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||
// $updateMessages[] = LAN_UPDATE_45.$defs[0][1];
|
||||
$log->logMessage(LAN_UPDATE_27.$defs[0][1], $status);
|
||||
// catch_error($sql);
|
||||
}
|
||||
else
|
||||
{ // error parsing defs file
|
||||
$log->logMessage(LAN_UPDATE_46.$defs[0][1], E_MESSAGE_ERROR);
|
||||
}
|
||||
unset($defs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Tables whose definition needs changing significantly
|
||||
$debugLevel = E107_DBG_SQLDETAILS;
|
||||
|
||||
foreach ($changed_tables as $ct)
|
||||
{
|
||||
$req_defs = $db_parser->get_table_def($ct,e_ADMIN."sql/core_sql.php");
|
||||
$req_fields = $db_parser->parse_field_defs($req_defs[0][2]); // Required definitions
|
||||
if ($debugLevel)
|
||||
{
|
||||
$log->logMessage("Required table structure: <br />".$db_parser->make_field_list($req_fields), E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
if ((($actual_defs = $db_parser->get_current_table($ct)) === FALSE) || !is_array($actual_defs)) // Adds current default prefix
|
||||
{
|
||||
$log->logMessage("Couldn't get table structure: ".$ct, E_MESSAGE_DEBUG);
|
||||
}
|
||||
else
|
||||
{
|
||||
// echo $db_parser->make_table_list($actual_defs);
|
||||
$actual_fields = $db_parser->parse_field_defs($actual_defs[0][2]);
|
||||
if ($debugLevel)
|
||||
{
|
||||
$log->logMessage("Actual table structure: <br />".$db_parser->make_field_list($actual_fields), E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
$diffs = $db_parser->compare_field_lists($req_fields,$actual_fields);
|
||||
if (count($diffs[0]))
|
||||
{ // Changes needed
|
||||
if ($just_check) return update_needed("Field changes rqd; table: ".$ct);
|
||||
|
||||
// Do the changes here
|
||||
if ($debugLevel)
|
||||
{
|
||||
$log->logMessage("List of changes found:<br />".$db_parser->make_changes_list($diffs), E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
$qry = 'ALTER TABLE '.MPREFIX.$ct.' '.implode(', ',$diffs[1]);
|
||||
|
||||
if ($debugLevel)
|
||||
{
|
||||
$log->logMessage("Update Query used: ".$qry, E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
$status = $sql->gen($qry) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||
$log->logMessage(LAN_UPDATE_21.$ct, $status);
|
||||
catch_error($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Plugin tables whose definition needs changing significantly
|
||||
foreach ($pluginChangedTables as $plugName => $plugList)
|
||||
{
|
||||
if (e107::isInstalled($plugName))
|
||||
{
|
||||
$ttc = explode(',',$plugList);
|
||||
foreach ($ttc as $ct)
|
||||
{
|
||||
$sqlDefs = e_PLUGIN.$plugName.'/'.str_replace('_menu','',$plugName).'_sql.php'; // Filename containing definitions
|
||||
// echo "Looking at file: {$sqlDefs}, table {$ct}<br />";
|
||||
$req_defs = $db_parser->get_table_def($ct,$sqlDefs);
|
||||
if (!is_array($req_defs))
|
||||
{
|
||||
echo "Couldn't get definitions from file {$sqlDefs}<br />";
|
||||
continue;
|
||||
}
|
||||
$req_fields = $db_parser->parse_field_defs($req_defs[0][2]); // Required definitions
|
||||
if (E107_DBG_SQLDETAILS)
|
||||
{
|
||||
$message = "Required plugin table structure: <br />".$db_parser->make_field_list($req_fields);
|
||||
|
||||
$log->logMessage($message, E_MESSAGE_DEBUG);
|
||||
|
||||
}
|
||||
|
||||
if ((($actual_defs = $db_parser->get_current_table($ct)) === FALSE) || !is_array($actual_defs)) // Adds current default prefix
|
||||
{
|
||||
// echo "Couldn't get table structure: {$ct}<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
// echo $db_parser->make_table_list($actual_defs);
|
||||
$actual_fields = $db_parser->parse_field_defs($actual_defs[0][2]);
|
||||
if (E107_DBG_SQLDETAILS)
|
||||
{
|
||||
$message= "Actual table structure: <br />".$db_parser->make_field_list($actual_fields);
|
||||
$log->logMessage($message, E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
$diffs = $db_parser->compare_field_lists($req_fields,$actual_fields);
|
||||
if (count($diffs[0]))
|
||||
{ // Changes needed
|
||||
if (E107_DBG_SQLDETAILS)
|
||||
{
|
||||
$message = "List of changes found:<br />".$db_parser->make_changes_list($diffs);
|
||||
$log->logMessage($message, E_MESSAGE_DEBUG);
|
||||
}
|
||||
if ($just_check) return update_needed("Field changes rqd; plugin table: ".$ct);
|
||||
// Do the changes here
|
||||
$qry = 'ALTER TABLE '.MPREFIX.$ct.' '.implode(', ',$diffs[1]);
|
||||
if (E107_DBG_SQLDETAILS)
|
||||
{
|
||||
$message = "Update Query used: ".$qry."<br />";
|
||||
$log->logMessage($message, E_MESSAGE_DEBUG);
|
||||
}
|
||||
$sql->gen($qry);
|
||||
$updateMessages[] = LAN_UPDATE_51.$ct;
|
||||
$log->logMessage(LAN_UPDATE_51.$ct, E_MESSAGE_SUCCESS);
|
||||
catch_error($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Obsolete tables (list at top)
|
||||
$sql->mySQLtableList = false; // clear the cached table list.
|
||||
foreach ($obs_tables as $ot)
|
||||
@ -1132,7 +996,8 @@ function update_706_to_800($type='')
|
||||
{
|
||||
if ($just_check) return update_needed('Remove obsolete prefs');
|
||||
unset($pref[$p]);
|
||||
$do_save = TRUE;
|
||||
e107::getConfig()->remove($p);
|
||||
$do_save = true;
|
||||
$log->addDebug('Removed obsolete pref: '.$p);
|
||||
// $accum[] = $p;
|
||||
}
|
||||
@ -1140,6 +1005,8 @@ function update_706_to_800($type='')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* -------------- Upgrade Entire Table Structure - Multi-Language Supported ----------------- */
|
||||
// ONLY ever add fields, never deletes.
|
||||
|
||||
@ -1163,6 +1030,7 @@ function update_706_to_800($type='')
|
||||
if ($just_check)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
// $mes->addDebug(print_a($dbv->errors,true));
|
||||
$log->addDebug(print_a($dbv->errors,true));
|
||||
return update_needed("Database Tables require updating.");
|
||||
}
|
||||
@ -1185,12 +1053,17 @@ function update_706_to_800($type='')
|
||||
return update_needed("Pages/Menus Table requires updating.");
|
||||
}
|
||||
|
||||
if($sql->update('page',"menu_name = page_theme, menu_title = page_title, menu_text = page_text, menu_template='default', page_title = '', page_text = '' WHERE page_theme !='' AND menu_title = '' AND menu_text = '' "))
|
||||
if($sql->update('page',"menu_name = page_theme, menu_title = page_title, menu_text = page_text, menu_template='default', page_title = '', page_text = '' WHERE page_theme !='' AND menu_title = '' AND menu_text IS NULL "))
|
||||
{
|
||||
$sql->gen("ALTER TABLE `#page` DROP page_theme ");
|
||||
$mes = e107::getMessage();
|
||||
$log->addDebug("Successfully updated pages/menus table to new format. ");
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->addDebug("FAILED to update pages/menus table to new format. ");
|
||||
//$sql->gen("ALTER TABLE `#page` DROP page_theme ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1253,16 +1126,25 @@ function update_706_to_800($type='')
|
||||
$message = str_replace('--COUNT--',$nt_changed,LAN_UPDATE_20);
|
||||
$log->logMessage($message, $status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (isset($pref['forum_user_customtitle']) && !isset($pref['signup_option_customtitle']))
|
||||
{
|
||||
if ($just_check) return update_needed('pref: forum_user_customtitle needs to be renamed');
|
||||
// $pref['signup_option_customtitle'] = $pref['forum_user_customtitle'];
|
||||
e107::getConfig()->add('signup_option_customtitle', $pref['forum_user_customtitle']);
|
||||
e107::getConfig()->remove('forum_user_customtitle');
|
||||
|
||||
$log->logMessage(LAN_UPDATE_20.'customtitle', E_MESSAGE_SUCCESS);
|
||||
$do_save = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// --------------- Saved emails - copy across
|
||||
|
||||
if (!$just_check && $sql->db_Select('generic', '*', "gen_type='massmail'"))
|
||||
if (!$just_check && $sql->select('generic', '*', "gen_type='massmail'"))
|
||||
{
|
||||
if ($just_check) return update_needed('Copy across saved emails');
|
||||
require_once(e_HANDLER.'mail_manager_class.php');
|
||||
@ -1296,10 +1178,13 @@ function update_706_to_800($type='')
|
||||
{
|
||||
if ($just_check) return update_needed('Legacy shortcode conversion');
|
||||
// Reset, legacy and new shortcode list will be generated in plugin update routine
|
||||
$pref['shortcode_legacy_list'] = array();
|
||||
$pref['shortcode_list'] = array();
|
||||
save_prefs();
|
||||
|
||||
// $pref['shortcode_legacy_list'] = array();
|
||||
// $pref['shortcode_list'] = array();
|
||||
|
||||
e107::getConfig()->add('shortcode_legacy_list', array());
|
||||
e107::getConfig()->set('shortcode_list', array());
|
||||
e107::getConfig()->save(false,true,false);
|
||||
|
||||
$ep = e107::getPlugin();
|
||||
$ep->update_plugins_table($mode); // scan for e_xxx changes and save to plugin table.
|
||||
$ep->save_addon_prefs($mode); // generate global e_xxx_list prefs from plugin table.
|
||||
@ -1532,10 +1417,10 @@ function update_706_to_800($type='')
|
||||
// $publicFilter = array(1);
|
||||
$public_files = $fl->get_files(e_FILE.'public','',$publicFilter);
|
||||
|
||||
if((count($dl_files) || count($public_files)) && !$sql->gen("SELECT * FROM `#core_media` WHERE `media_category` = 'download_file' "))
|
||||
if((count($dl_files) || count($public_files)) && !$sql->gen("SELECT * FROM `#core_media` WHERE `media_category` = 'download_file' OR `media_category` = '_common_file' "))
|
||||
{
|
||||
if ($just_check) return update_needed('Import '.count($dl_files).' Download File(s) and '.count($public_files).' Public File(s) into Media Manager');
|
||||
|
||||
|
||||
if($sql->gen("SELECT download_url FROM `#download` "))
|
||||
{
|
||||
$allowed_types = array();
|
||||
@ -1559,9 +1444,23 @@ function update_706_to_800($type='')
|
||||
$allowed_types = array('zip','gz','pdf');
|
||||
}
|
||||
|
||||
$fmask = '[a-zA-z0-9_-]+\.('.implode('|',$allowed_types).')$';
|
||||
$fmask = '[a-zA-Z0-9_.-]+\.('.implode('|',$allowed_types).')$';
|
||||
|
||||
$med->import('download_file',e_DOWNLOAD, $fmask);
|
||||
$med->import('_common_file',e_FILE.'public', $fmask);
|
||||
|
||||
// add found Public file-types.
|
||||
foreach($public_files as $v)
|
||||
{
|
||||
$ext = strrchr($v['fname'], ".");
|
||||
$suffix = ltrim($ext,".");
|
||||
if(!isset($allowed_types[$suffix]))
|
||||
{
|
||||
$allowed_types[$suffix] = $suffix;
|
||||
}
|
||||
}
|
||||
|
||||
$publicFmask = '[a-zA-Z0-9_.-]+\.('.implode('|',$allowed_types).')$';
|
||||
$med->import('_common_file', e_FILE.'public', $publicFmask);
|
||||
}
|
||||
|
||||
|
||||
@ -1656,11 +1555,9 @@ function update_706_to_800($type='')
|
||||
if ($do_save)
|
||||
{
|
||||
// save_prefs();
|
||||
e107::getConfig()->setPref($pref)->save(false,true,true);
|
||||
$log->logMessage(LAN_UPDATE_50);
|
||||
e107::getConfig()->setPref($pref)->save(false,true,false);
|
||||
// $log->logMessage(LAN_UPDATE_50);
|
||||
// $log->logMessage(implode(', ', $accum), E_MESSAGE_NODISPLAY);
|
||||
|
||||
|
||||
//$updateMessages[] = LAN_UPDATE_50.implode(', ',$accum); // Note for admin log
|
||||
}
|
||||
|
||||
@ -1675,7 +1572,7 @@ function update_706_to_800($type='')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1864,16 +1761,12 @@ function copy_user_timezone()
|
||||
|
||||
function update_needed($message='')
|
||||
{
|
||||
global $ns, $update_debug;
|
||||
|
||||
$emessage = e107::getMessage();
|
||||
|
||||
// if ($update_debug) $emessage->add("Update: ".$message, E_MESSAGE_DEBUG);
|
||||
if(E107_DEBUG_LEVEL)
|
||||
{
|
||||
$tmp = debug_backtrace();
|
||||
//$ns->tablerender("", "<div style='text-align:center'>Update required in ".basename(__FILE__)." on line ".$tmp[0]['line']."</div>");
|
||||
$emessage->add("Update required in ".basename(__FILE__)." on line ".$tmp[0]['line']." (".$message.")", E_MESSAGE_DEBUG);
|
||||
e107::getMessage()->add("Update required in ".basename(__FILE__)." on line ".$tmp[0]['line']." (".$message.")", E_MESSAGE_DEBUG);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -27,6 +27,11 @@ e107::coreLan('date');
|
||||
// "ranks" - getperms('4|U3')
|
||||
// "default" - getperms('4|U1|U0')
|
||||
|
||||
e107::css('inline', "
|
||||
|
||||
.label-status { width:100%; display:block; padding-bottom:5px; padding-top:5px }
|
||||
");
|
||||
|
||||
class users_admin extends e_admin_dispatcher
|
||||
{
|
||||
protected $modes = array(
|
||||
@ -85,7 +90,7 @@ class users_admin extends e_admin_dispatcher
|
||||
|
||||
// $('#user-action-indicator-'+user).html('<i class="fa fa-cog"></i>'); //
|
||||
|
||||
$(".user-action").click(function(e){
|
||||
$(document).on('click', ".user-action", function(e){
|
||||
// e.stopPropagation();
|
||||
|
||||
var action = $(this).attr('data-action-type');
|
||||
@ -2358,10 +2363,10 @@ class users_admin_form_ui extends e_admin_form_ui
|
||||
function user_ban($curval,$mode)
|
||||
{
|
||||
$bo = array(
|
||||
'<span class="label label-success">Active</span>',
|
||||
"<span class='label label-important label-danger'>".LAN_BANNED."</span>",
|
||||
"<span class='label label-default'>".LAN_NOTVERIFIED."</span>",
|
||||
"<span class='label label-info'>".LAN_BOUNCED."</span>"
|
||||
'<span class="label label-success label-status">Active</span>',
|
||||
"<span class='label label-important label-danger label-status'>".LAN_BANNED."</span>",
|
||||
"<span class='label label-default label-status'>".LAN_NOTVERIFIED."</span>",
|
||||
"<span class='label label-info label-status'>".LAN_BOUNCED."</span>"
|
||||
);
|
||||
|
||||
if($mode == 'filter' || $mode == 'batch')
|
||||
|
60
e107_core/bbcodes/bb_alert.php
Normal file
60
e107_core/bbcodes/bb_alert.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* DIV block bbcode
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// This is a generic and 'responsive' video bbcode. Handles Youtube and eventually html5 video tags.
|
||||
|
||||
class bb_alert extends e_bb_base
|
||||
{
|
||||
/**
|
||||
* Called prior to save
|
||||
* Re-assemble the bbcode
|
||||
*/
|
||||
function toDB($code_text, $parm)
|
||||
{
|
||||
if(!empty($parm))
|
||||
{
|
||||
$ins = '='.$parm;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ins = '';
|
||||
}
|
||||
|
||||
return '[alert'.$ins.']'.$code_text.'[/alert]';
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap Alert container.
|
||||
* @param $code_text :
|
||||
*/
|
||||
function toHTML($code_text, $parm='')
|
||||
{
|
||||
|
||||
if(!empty($parm))
|
||||
{
|
||||
$style = "alert alert-".$parm;
|
||||
}
|
||||
else
|
||||
{
|
||||
$style = "alert alert-info";
|
||||
}
|
||||
|
||||
return "<div class='".$style."'>".$code_text."</div>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -477,7 +477,13 @@ class admin_shortcodes
|
||||
}
|
||||
|
||||
|
||||
$configs = e107::getAddonConfig('e_dashboard','latest');
|
||||
$configs = e107::getAddonConfig('e_dashboard',null, 'latest');
|
||||
|
||||
if(!is_array($configs))
|
||||
{
|
||||
$configs = array();
|
||||
}
|
||||
|
||||
$allconfigs = array_merge($oldconfigs,$configs);
|
||||
|
||||
$allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly.
|
||||
@ -583,11 +589,11 @@ class admin_shortcodes
|
||||
$str = str_replace('.', '', ADMINPERMS);
|
||||
if (ADMINPERMS == '0')
|
||||
{
|
||||
return '<b>'.ADLAN_48.':</b> '.ADMINNAME.' ('.ADLAN_49.') '.( defined('e_DBLANGUAGE') ? '<b>'.LAN_head_5.'</b>: '.e_DBLANGUAGE : '' );
|
||||
return '<b>'.ADLAN_48.':</b> '.ADMINNAME.' ('.ADLAN_49.') '.( defined('e_DBLANGUAGE') ? '<b>'.LAN_HEADER_05.'</b>: '.e_DBLANGUAGE : '' );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '<b>'.ADLAN_48.':</b> '.ADMINNAME.' '.( defined('e_DBLANGUAGE') ? '<b>'.LAN_head_5.'</b>: '.e_DBLANGUAGE : '' );
|
||||
return '<b>'.ADLAN_48.':</b> '.ADMINNAME.' '.( defined('e_DBLANGUAGE') ? '<b>'.LAN_HEADER_05.'</b>: '.e_DBLANGUAGE : '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -774,11 +780,11 @@ class admin_shortcodes
|
||||
ob_start();
|
||||
if(!FILE_UPLOADS)
|
||||
{
|
||||
echo message_handler('ADMIN_MESSAGE', LAN_head_2, __LINE__, __FILE__);
|
||||
echo message_handler('ADMIN_MESSAGE', LAN_HEADER_02, __LINE__, __FILE__);
|
||||
}
|
||||
/*
|
||||
if(OPEN_BASEDIR){
|
||||
echo message_handler('ADMIN_MESSAGE', LAN_head_3, __LINE__, __FILE__);
|
||||
echo message_handler('ADMIN_MESSAGE', LAN_HEADER_03, __LINE__, __FILE__);
|
||||
}
|
||||
*/
|
||||
$message_text = ob_get_contents();
|
||||
@ -874,7 +880,7 @@ class admin_shortcodes
|
||||
$e107_var['lout']['link']=e_ADMIN_ABS.'admin.php?logout';
|
||||
|
||||
$text = e_admin_menu('', '', $e107_var);
|
||||
return $ns->tablerender(LAN_head_1, $text, array('id' => 'admin_nav', 'style' => 'button_menu'), TRUE);
|
||||
return $ns->tablerender(LAN_HEADER_01, $text, array('id' => 'admin_nav', 'style' => 'button_menu'), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -934,7 +940,7 @@ class admin_shortcodes
|
||||
}
|
||||
}
|
||||
|
||||
$caption = LAN_head_6;
|
||||
$caption = LAN_HEADER_06;
|
||||
if ($i>0 && $pref['admin_alerts_uniquemenu'] == 1)
|
||||
{
|
||||
$ns -> tablerender($caption, $text);
|
||||
@ -1151,7 +1157,7 @@ class admin_shortcodes
|
||||
|
||||
// New in v2.x
|
||||
// $configs = e107::getAddonConfig('e_status');
|
||||
$configs = e107::getAddonConfig('e_dashboard','status');
|
||||
$configs = e107::getAddonConfig('e_dashboard',null, 'status');
|
||||
|
||||
if(!is_array($configs))
|
||||
{
|
||||
@ -1382,7 +1388,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
return e107::getNav()->admin('', '', $menu_vars, $$tmpl, FALSE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// MAIN LINK
|
||||
if($parm != 'no-main')
|
||||
@ -1479,7 +1485,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
if(varset($plug_vars['adminLinks']['link']))
|
||||
{
|
||||
|
||||
if($row['plugin_category'] == 'menu' || !vartrue($plug_vars['adminLinks']['link'][0]['@attributes']['url']))
|
||||
if(!empty($row['plugin_category']) && $row['plugin_category'] == 'menu' || !vartrue($plug_vars['adminLinks']['link'][0]['@attributes']['url']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1505,7 +1511,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
$tmp[$id]['perm'] = 'P'.$row['plugin_id'];
|
||||
$tmp[$id]['sub_class'] = '';
|
||||
$tmp[$id]['sort'] = 2;
|
||||
$tmp[$id]['category'] = $row['plugin_category'];
|
||||
$tmp[$id]['category'] = varset($row['plugin_category']);
|
||||
|
||||
if($pref['admin_slidedown_subs'] && vartrue($plug_vars['adminLinks']['link']) )
|
||||
{
|
||||
@ -1564,14 +1570,18 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
|
||||
foreach($tmp as $pg)
|
||||
{
|
||||
$id = $convert[$pg['category']][1];
|
||||
$menu_vars[$id]['sub'][] = $pg;
|
||||
if(!empty($pg['category']))
|
||||
{
|
||||
$id = $convert[$pg['category']][1];
|
||||
$menu_vars[$id]['sub'][] = $pg;
|
||||
}
|
||||
}
|
||||
|
||||
unset($menu_vars['plugMenu']);
|
||||
|
||||
|
||||
// Clean up - remove empty main sections
|
||||
foreach ($menu_vars as $_m => $_d)
|
||||
foreach ($menu_vars as $_m => $_d)
|
||||
{
|
||||
if(!isset($_d['sub']) || empty($_d['sub']))
|
||||
{
|
||||
@ -1740,6 +1750,8 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sort($languages);
|
||||
|
||||
if(count($languages) > 1)
|
||||
{
|
||||
|
@ -90,7 +90,9 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
function sc_contact_name($parm='')
|
||||
{
|
||||
return "<input type='text' style='max-width:99%' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['author_name'])."\" />";
|
||||
$userName = deftrue('USERNAME');
|
||||
|
||||
return "<input type='text' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['author_name'],$userName)."\" />";
|
||||
|
||||
}
|
||||
|
||||
@ -98,14 +100,17 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
function sc_contact_email($parm='')
|
||||
{
|
||||
return "<input type='email' style='max-width:99%' id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox form-control' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
$userEmail = deftrue('USEREMAIL');
|
||||
$disabled = (!empty($userEmail)) ? 'readonly' : ''; // don't allow change from a verified email address.
|
||||
|
||||
return "<input type='email' ".$disabled." id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox form-control' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_contact_subject($parm='')
|
||||
{
|
||||
return "<input type='text' style='max-width:99%' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
|
||||
return "<input type='text' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +125,7 @@ class contact_shortcodes extends e_shortcode
|
||||
$size = 'input-xxlarge';
|
||||
}
|
||||
|
||||
return "<textarea cols='{$cols}' style='max-width:99%' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
}
|
||||
|
||||
|
||||
|
@ -214,6 +214,37 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_news_category_icon($parm=null)
|
||||
{
|
||||
return $this->sc_newscaticon($parm);
|
||||
}
|
||||
|
||||
|
||||
function sc_news_category_name($parm=null)
|
||||
{
|
||||
return $this->sc_newscategory($parm);
|
||||
}
|
||||
|
||||
|
||||
function sc_news_category_sef($parm=null)
|
||||
{
|
||||
if(!empty($this->news_item['category_sef']))
|
||||
{
|
||||
return strtolower(str_replace(" ","", $this->news_item['category_sef']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function sc_news_category_description($parm=null)
|
||||
{
|
||||
if(!empty($this->news_item['category_meta_description']))
|
||||
{
|
||||
return e107::getParser()->toHTML($this->news_item['category_meta_description'], false ,'BODY');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_newscategory($parm=null)
|
||||
{
|
||||
$category_name = e107::getParser()->toHTML($this->news_item['category_name'], FALSE ,'defs');
|
||||
@ -828,7 +859,8 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
return e107::getForm()->renderRelated($array, $this->news_item['news_meta_keywords'], array('news'=>$this->news_item['news_id']));
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_newsmetadiz()
|
||||
{
|
||||
return e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
|
||||
|
@ -267,12 +267,14 @@ class cpage_shortcodes extends e_shortcode
|
||||
|
||||
$buttonText = (empty($this->var['menu_button_text'])) ? LAN_READ_MORE : $this->var['menu_button_text'];
|
||||
$buttonUrl = (empty($this->var['menu_button_url'])) ? $url : $tp->replaceConstants($this->var['menu_button_url']);
|
||||
|
||||
$buttonTarget = (empty($this->var['menu_button_target'])) ? '' : ' target="'.$this->var['menu_button_target'].'" '; //TODO add pref to admin area.
|
||||
|
||||
$text = vartrue($options['text'], $buttonText);
|
||||
$size = vartrue($options['size'], "");
|
||||
|
||||
$inc = ($size) ? " btn-".$size : "";
|
||||
|
||||
return '<a class="cpage btn btn-primary btn-cpage'.$inc.'" href="'.$buttonUrl.'">'.$text.'</a>';
|
||||
return '<a class="cpage btn btn-primary btn-cpage'.$inc.'" href="'.$buttonUrl.'" '.$buttonTarget.'>'.$text.'</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +283,12 @@ class cpage_shortcodes extends e_shortcode
|
||||
$tp = e107::getParser();
|
||||
//
|
||||
return $tp->toHTML($this->var['menu_title'], true, 'TITLE');
|
||||
}
|
||||
}
|
||||
|
||||
function sc_cmenuname($parm='')
|
||||
{
|
||||
return $this->var['menu_name'];
|
||||
}
|
||||
|
||||
|
||||
function sc_cmenubody($parm='')
|
||||
|
@ -276,7 +276,7 @@ class signup_shortcodes extends e_shortcode
|
||||
$options['title'] = LAN_SIGNUP_108; // Must be a valid email address.
|
||||
|
||||
$text = e107::getForm()->email('email',vartrue($_POST['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 alert-warning' style='display:none; padding:10px' data-hint='Did you mean <b>[x]</b>?'><!-- --></div>";
|
||||
$text .= "<input type='text' name='email2' value='' style='display:none' />"; // spam-trap.
|
||||
return $text;
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ class user_shortcodes extends e_shortcode
|
||||
|
||||
function sc_user_form_submit($parm)
|
||||
{
|
||||
return "<input class='btn btn-default button' type='submit' name='submit' value='".LAN_USER_47."' />";
|
||||
return "<input class='btn btn-default button' type='submit' name='submit' value='".LAN_GO."' />";
|
||||
}
|
||||
|
||||
|
||||
|
@ -303,7 +303,7 @@ CREATE TABLE news (
|
||||
news_title varchar(255) NOT NULL default '',
|
||||
news_sef varchar(200) NOT NULL default '',
|
||||
news_body longtext NOT NULL,
|
||||
news_extended text NOT NULL,
|
||||
news_extended longtext NOT NULL,
|
||||
news_meta_keywords varchar(255) NOT NULL default '',
|
||||
news_meta_description text NOT NULL,
|
||||
news_datestamp int(10) unsigned NOT NULL default '0',
|
||||
|
@ -60,41 +60,44 @@ $CONTACT_TEMPLATE['menu'] = '
|
||||
// In this case (see contact.php) e107::getScBatch('contact')->wrapper('contact/form')
|
||||
// Only one Option is used - WRAPPER > SC_STYLE
|
||||
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<tr><td>".LAN_ENTER_CODE."<br />{---}";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<tr><td>{---}".LANCONTACT_07."</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<tr><td>".LANCONTACT_14."<br />{---}</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<div class='control-group form-group'><label>".LAN_ENTER_CODE."</label> {---}";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<div class='control-group form-group'>{---}".LANCONTACT_07."</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<div class='control-group form-group'><label>".LANCONTACT_14."</label>{---}</div>";
|
||||
|
||||
//FIXME Upgrade to bootstrap3 non-table format for phone/tablet compatibility.
|
||||
$CONTACT_TEMPLATE['form'] = "
|
||||
<form action='".e_SELF."' method='post' id='contactForm' >
|
||||
<table class='table'>
|
||||
|
||||
{CONTACT_PERSON}
|
||||
<tr><td>".LANCONTACT_03."<br />
|
||||
{CONTACT_NAME}
|
||||
</td></tr>
|
||||
<tr><td>".LANCONTACT_04."<br />
|
||||
{CONTACT_EMAIL}
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
".LANCONTACT_05."<br />
|
||||
{CONTACT_SUBJECT}
|
||||
</td></tr>
|
||||
{CONTACT_EMAIL_COPY}
|
||||
<tr><td>
|
||||
".LANCONTACT_06."<br />
|
||||
{CONTACT_BODY}
|
||||
</td></tr>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_03."</label>
|
||||
{CONTACT_NAME}
|
||||
</div>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_04."</label>
|
||||
{CONTACT_EMAIL}
|
||||
</div>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_05."</label>
|
||||
{CONTACT_SUBJECT}
|
||||
</div>
|
||||
|
||||
{CONTACT_EMAIL_COPY}
|
||||
|
||||
<div class='control-group form-group'><label>".LANCONTACT_06."</label>
|
||||
{CONTACT_BODY}
|
||||
</div>
|
||||
|
||||
{CONTACT_IMAGECODE}
|
||||
{CONTACT_IMAGECODE_INPUT}
|
||||
<tr><td>
|
||||
|
||||
<div class='form-group'>
|
||||
{CONTACT_SUBMIT_BUTTON}
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>";
|
||||
|
||||
|
||||
|
||||
// Customize the email subject
|
||||
// Variables: CONTACT_SUBJECT and CONTACT_PERSON as well as any custom fields set in the form. )
|
||||
$CONTACT_TEMPLATE['email']['subject'] = "{CONTACT_SUBJECT}";
|
||||
|
||||
|
||||
|
||||
?>
|
@ -114,6 +114,26 @@ $EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHT
|
||||
h4.sitename a { text-decoration:none }
|
||||
a.siteurl { font-size: 14px }
|
||||
a { color: #428BCA }
|
||||
|
||||
/* Bootstrap */
|
||||
table.table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width:100%;
|
||||
}
|
||||
.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th {
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
|
||||
border: 1px solid #DDD;
|
||||
}
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 8px;
|
||||
line-height: 1.42857;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #DDD;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -277,11 +277,11 @@ if (isset($footer_js) && is_array($footer_js))
|
||||
}
|
||||
}
|
||||
|
||||
// Load e_footer.php files.
|
||||
if (is_array($pref['e_footer_list']))
|
||||
// Load e_footer.php files.
|
||||
if (!empty($pref['e_footer_list']) && is_array($pref['e_footer_list']))
|
||||
{
|
||||
ob_start();
|
||||
|
||||
//ob_start(); // sometimes raw HTML needs to be added at the bottom of every page. eg. <noscript> etc. so allow 'echo' in e_footer files. (but not e_header)
|
||||
|
||||
foreach($pref['e_footer_list'] as $val)
|
||||
{
|
||||
$fname = e_PLUGIN.$val."/e_footer.php"; // Do not place inside a function - BC $pref required. .
|
||||
@ -290,11 +290,12 @@ if (is_array($pref['e_footer_list']))
|
||||
{
|
||||
|
||||
$ret = ($e107_debug || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$e_footer_ouput = ob_get_contents(); // Don't use.
|
||||
ob_end_clean();
|
||||
// $e_footer_ouput = ob_get_contents(); // Don't use.
|
||||
// ob_end_clean();
|
||||
unset($ret);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ $sc_style['USER_FORUM_LINK']['post'] = "</td></tr>";
|
||||
$sc_style['USER_UPDATE_LINK']['pre'] = "<tr><td colspan='2' class='forumheader3 center'>";
|
||||
$sc_style['USER_UPDATE_LINK']['post'] = "</td></tr>";
|
||||
|
||||
$sc_style['USER_RATING']['pre'] = "<tr><td colspan='2' class='forumheader3'><div class='f-left'>".LAN_USER_61."</div><div class='f-right'>";
|
||||
$sc_style['USER_RATING']['pre'] = "<tr><td colspan='2' class='forumheader3'><div class='f-left'>".LAN_RATING."</div><div class='f-right'>";
|
||||
$sc_style['USER_RATING']['post'] = "</div></td></tr>";
|
||||
|
||||
$sc_style['USER_LOGINNAME']['pre'] = " : ";
|
||||
|
@ -211,7 +211,6 @@
|
||||
<core name="signup_option_realname">0</core>
|
||||
<core name="signup_option_signature">0</core>
|
||||
<core name="signup_pass_len">6</core>
|
||||
<core name="signup_remote_emailcheck">0</core>
|
||||
<core name="signup_text"></core>
|
||||
<core name="signup_text_after"></core>
|
||||
<core name="siteadmin">admin</core>
|
||||
@ -265,7 +264,7 @@ City, State, Country
|
||||
<core name="themecss">canvas.css</core>
|
||||
<core name="thumbnail_quality">75</core>
|
||||
<core name="time_offset">0</core>
|
||||
<core name="timezone">GMT</core>
|
||||
<core name="timezone">UTC</core>
|
||||
<core name="track_online">1</core>
|
||||
<core name="ue_upgrade">1</core>
|
||||
<core name="upload_class">255</core>
|
||||
|
@ -3,7 +3,7 @@ Q> What are these user-classes I keep seeing? What are they for?
|
||||
A> User classes restrict access to certain areas or functions of your site. If you define a class and then add certain users to it, you can choose to make things visible to only the users in that class.
|
||||
For example, there is a class already created by default when you install e107 called PRIVATEFORUM. Adding users to this class then creating a forum under that class will make only the users in that class able to access that forum. You can restrict other areas and functions by class, like news items, links, downloads, etc.
|
||||
Q> What does the 'class parent' field do?
|
||||
A> In 0.8, you can set a 'class hierarchy', where users in a certain class also have the rights of the parent class. If you don't want this, just set the parent to 'Everyone'
|
||||
A> In 2.x, you can set a 'class hierarchy', where users in a certain class also have the rights of the parent class. If you don't want this, just set the parent to 'Everyone'
|
||||
Q> I want new users to start with membership of certain classes.
|
||||
A> You can now set initial class membership through the 'Userclass' menu. You can also determine whether this membership is in force immediately they sign up, or whether it is added when their membership is verified.
|
||||
|
||||
|
@ -636,7 +636,7 @@ class e_admin_log
|
||||
*/
|
||||
public function addDebug($text, $message = true, $session = false)
|
||||
{
|
||||
return $this->logMessage($text, ($message ? E_MESSAGE_DEBUG : LOG_MESSAGE_NODISPLAY), E_MESSAGE_NOTICE, $session);
|
||||
return $this->logMessage($text, ($message ? E_MESSAGE_DEBUG : LOG_MESSAGE_NODISPLAY), E_MESSAGE_DEBUG, $session);
|
||||
}
|
||||
|
||||
|
||||
@ -658,7 +658,7 @@ class e_admin_log
|
||||
* Add an array to the log queue
|
||||
* @param $array
|
||||
* @param $oldArray (optional) - when included, only the changes between the arrays is saved.
|
||||
* @param $type (optional) default: LOG_MESSAGE_NODISPLAY. or E_MESSAGE_WARNING, E_MESSAGE_NOTICE, E_MESSAGE_SUCCESS
|
||||
* @param $type (optional) default: LOG_MESSAGE_NODISPLAY. or E_MESSAGE_WARNING, E_MESSAGE_DEBUG, E_MESSAGE_SUCCESS
|
||||
*/
|
||||
public function addArray($array, $oldArray= null, $type = LOG_MESSAGE_NODISPLAY , $session = false)
|
||||
{
|
||||
|
@ -1035,6 +1035,12 @@ class e_admin_dispatcher
|
||||
{
|
||||
define('e_ADMIN_UI', true);
|
||||
}
|
||||
|
||||
if(!empty($_GET['iframe']))
|
||||
{
|
||||
define('e_IFRAME', true);
|
||||
}
|
||||
|
||||
require_once(e_ADMIN.'boot.php');
|
||||
|
||||
if(null === $request || !is_object($request))
|
||||
@ -1473,7 +1479,7 @@ class e_admin_dispatcher
|
||||
foreach($this->adminMenu as $key => $val)
|
||||
{
|
||||
|
||||
if(!empty($val['perm']) && !getperms($val['perm']))
|
||||
if(isset($val['perm']) && $val['perm']!=='' && !getperms($val['perm']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1563,7 +1569,7 @@ class e_admin_dispatcher
|
||||
|
||||
|
||||
if(empty($var)) return '';
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
if(!$selected) $selected = $request->getMode().'/'.$request->getAction();
|
||||
$selected = vartrue($this->adminMenuAliases[$selected], $selected);
|
||||
@ -5902,7 +5908,10 @@ class e_admin_form_ui extends e_form
|
||||
".$filter_pre."
|
||||
<div class='row-fluid'>
|
||||
<div class='left form-inline span8 col-md-8' >
|
||||
".$this->text('searchquery', $current_query[0], 50, $input_options)."<i class='fa fa-search searchquery'></i>
|
||||
<span class='form-group has-feedback has-feedback-left'>
|
||||
".$this->text('searchquery', $current_query[0], 50, $input_options)."
|
||||
<i class='fa fa-search searchquery form-control-feedback form-control-feedback-left'></i>
|
||||
<span>
|
||||
".$this->select_open('filter_options', array('class' => 'form-control e-tip tbox select filter', 'id' => false, 'title'=>'Filter the results below'))."
|
||||
".$this->option(LAN_FILTER_LABEL_DISPLAYALL, '')."
|
||||
".$this->option(LAN_FILTER_LABEL_CLEAR, '___reset___')."
|
||||
@ -6425,7 +6434,8 @@ class e_admin_form_ui extends e_form
|
||||
public function getElementId()
|
||||
{
|
||||
$controller = $this->getController();
|
||||
return str_replace('_', '-', ($controller->getPluginName() == 'core' ? 'core-'.$controller->getTableName() : 'plugin-'.$controller->getPluginName()));
|
||||
$name = str_replace('_', '-', ($controller->getPluginName() == 'core' ? 'core-'.$controller->getTableName() : 'plugin-'.$controller->getPluginName()));
|
||||
return e107::getForm()->name2id($name); // prevent invalid ids.
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4296,6 +4296,67 @@ class eHelper
|
||||
*/
|
||||
public static function title2sef($title, $type = null)
|
||||
{
|
||||
$char_map = array(
|
||||
// Latin
|
||||
'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'AE', 'Ç' => 'C',
|
||||
'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I',
|
||||
'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ő' => 'O',
|
||||
'Ø' => 'O', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', 'Ý' => 'Y', 'Þ' => 'TH',
|
||||
'ß' => 'ss',
|
||||
'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', 'å' => 'a', 'æ' => 'ae', 'ç' => 'c',
|
||||
'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i',
|
||||
'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o',
|
||||
'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th',
|
||||
'ÿ' => 'y',
|
||||
// Latin symbols
|
||||
'©' => '(c)',
|
||||
// Greek
|
||||
'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8',
|
||||
'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P',
|
||||
'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W',
|
||||
'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I',
|
||||
'Ϋ' => 'Y',
|
||||
'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',
|
||||
'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p',
|
||||
'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w',
|
||||
'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
|
||||
'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',
|
||||
// Turkish
|
||||
'Ş' => 'S', 'İ' => 'I', 'Ç' => 'C', 'Ü' => 'U', 'Ö' => 'O', 'Ğ' => 'G',
|
||||
'ş' => 's', 'ı' => 'i', 'ç' => 'c', 'ü' => 'u', 'ö' => 'o', 'ğ' => 'g',
|
||||
// Russian
|
||||
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh',
|
||||
'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
|
||||
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',
|
||||
'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu',
|
||||
'Я' => 'Ya',
|
||||
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh',
|
||||
'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
|
||||
'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c',
|
||||
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu',
|
||||
'я' => 'ya',
|
||||
// Ukrainian
|
||||
'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G',
|
||||
'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g',
|
||||
// Czech
|
||||
'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', 'Ů' => 'U',
|
||||
'Ž' => 'Z',
|
||||
'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u',
|
||||
'ž' => 'z',
|
||||
// Polish
|
||||
'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'o', 'Ś' => 'S', 'Ź' => 'Z',
|
||||
'Ż' => 'Z',
|
||||
'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z',
|
||||
'ż' => 'z',
|
||||
// Latvian
|
||||
'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N',
|
||||
'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z',
|
||||
'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',
|
||||
'š' => 's', 'ū' => 'u', 'ž' => 'z'
|
||||
);
|
||||
|
||||
$title = str_replace(array_keys($char_map), $char_map, $title);
|
||||
|
||||
$title = str_replace(array("&",",","(",")"),'',$title);
|
||||
$title = preg_replace('/[^\w\d\pL\s.]/u', '', strip_tags(e107::getParser()->toHTML($title, TRUE)));
|
||||
$title = trim(preg_replace('/[\s]+/', ' ', str_replace('_', ' ', $title)));
|
||||
|
@ -37,6 +37,7 @@ class e_bbcode
|
||||
$pref = e107::getPref();
|
||||
|
||||
$this->core_bb = array(
|
||||
'alert',
|
||||
'blockquote', 'img', 'i', 'u', 'center',
|
||||
'_br', 'color', 'size', 'code',
|
||||
'flash', 'link', 'email',
|
||||
|
@ -885,5 +885,18 @@ class convert
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if TimeZone is valid
|
||||
* @param $timezone
|
||||
* @return bool
|
||||
*/
|
||||
function isValidTimezone($timezone)
|
||||
{
|
||||
return in_array($timezone, timezone_identifiers_list());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
@ -873,9 +873,7 @@ class db_verify
|
||||
function getSqlData($tbl,$language='')
|
||||
{
|
||||
|
||||
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$prefix = MPREFIX;
|
||||
|
||||
if($language)
|
||||
@ -890,6 +888,13 @@ class db_verify
|
||||
}
|
||||
|
||||
$sql = e107::getDb();
|
||||
|
||||
if(!$sql->isTable($tbl))
|
||||
{
|
||||
$mes->addDebug('Missing table on db-verify: '.$tbl);
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql->gen('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
// mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
$qry = 'SHOW CREATE TABLE `' . $prefix . $tbl . "`";
|
||||
|
@ -407,8 +407,10 @@ class e107
|
||||
// override all
|
||||
$this->e107_dirs = array_merge($this->defaultDirs($override), $override);
|
||||
|
||||
// TODO add e_MEDIA_BASE, e_SYSTEM_BASE (free of site path constants);
|
||||
|
||||
// Required for e_MEDIA_BASE, e_SYSTEM_BASE (free of site path constants);
|
||||
$this->e107_dirs['MEDIA_BASE_DIRECTORY'] = $this->e107_dirs['MEDIA_DIRECTORY'];
|
||||
$this->e107_dirs['SYSTEM_BASE_DIRECTORY'] = $this->e107_dirs['SYSTEM_DIRECTORY'];
|
||||
|
||||
if(strpos($this->e107_dirs['MEDIA_DIRECTORY'],$this->site_path) === false)
|
||||
{
|
||||
$this->e107_dirs['MEDIA_DIRECTORY'] .= $this->site_path."/"; // multisite support.
|
||||
@ -2183,17 +2185,30 @@ class e107
|
||||
list($templateId, $templateKey) = explode('/', $templateId, 2);
|
||||
|
||||
$wrapperRegPath = 'templates/wrapper/'.$templateId;
|
||||
|
||||
$wrapper = self::getRegistry($wrapperRegPath);
|
||||
|
||||
if(empty($wrapper) || !is_array($wrapper)) $wrapper = array();
|
||||
|
||||
if($templateKey) $wrapper = (isset($wrapper[$templateKey]) ? $wrapper[$templateKey] : array());
|
||||
|
||||
|
||||
if(strpos($templateKey,'/')!==false) // quick fix support for 3 keys eg. news/view/item
|
||||
{
|
||||
list($templateKey,$templateKey2) = explode("/", $templateKey, 2);
|
||||
if($templateKey && $templateKey2)
|
||||
{
|
||||
$wrapper = (isset($wrapper[$templateKey][$templateKey2]) ? $wrapper[$templateKey][$templateKey2] : array());
|
||||
}
|
||||
}
|
||||
else // support for 2 keys. eg. contact/form
|
||||
{
|
||||
if($templateKey) $wrapper = (isset($wrapper[$templateKey]) ? $wrapper[$templateKey] : array());
|
||||
}
|
||||
|
||||
if(null !== $scName)
|
||||
{
|
||||
$scName = strtoupper($scName);
|
||||
return isset($wrapper[$scName]) ? $wrapper[$scName] : '';
|
||||
}
|
||||
|
||||
|
||||
return $wrapper;
|
||||
}
|
||||
|
||||
@ -3332,6 +3347,7 @@ class e107
|
||||
define('e_HELP', $this->get_override_rel('HELP'));
|
||||
|
||||
define('e_MEDIA', $this->get_override_rel('MEDIA'));
|
||||
define('e_MEDIA_BASE', $this->get_override_rel('MEDIA_BASE'));
|
||||
define('e_MEDIA_FILE', $this->get_override_rel('MEDIA_FILES'));
|
||||
define('e_MEDIA_VIDEO', $this->get_override_rel('MEDIA_VIDEOS'));
|
||||
define('e_MEDIA_IMAGE', $this->get_override_rel('MEDIA_IMAGES'));
|
||||
@ -3343,6 +3359,7 @@ class e107
|
||||
|
||||
define('e_CORE', $this->get_override_rel('CORE'));
|
||||
define('e_SYSTEM', $this->get_override_rel('SYSTEM'));
|
||||
define('e_SYSTEM_BASE', $this->get_override_rel('SYSTEM_BASE'));
|
||||
|
||||
define('e_WEB', $this->get_override_rel('WEB'));
|
||||
define('e_WEB_JS', $this->get_override_rel('WEB_JS'));
|
||||
|
@ -1971,8 +1971,8 @@ class e_parse extends e_parser
|
||||
|
||||
$text = $this->toEmail($text);
|
||||
|
||||
$search = array("&#039;", "&#036;", "'", "$", e_BASE, "href='request.php");
|
||||
$replace = array("'", '$', "'", '$', SITEURL, "href='".SITEURL."request.php" );
|
||||
$search = array("&#039;", "&#036;", "'", "$", e_BASE, "href='request.php","<!-- bbcode-html-start -->","<!-- bbcode-html-end -->");
|
||||
$replace = array("'", '$', "'", '$', SITEURL, "href='".SITEURL."request.php", '', '' );
|
||||
$text = str_replace($search, $replace, $text);
|
||||
|
||||
// Fix any left-over '&'
|
||||
@ -3271,8 +3271,13 @@ class e_parser
|
||||
*/
|
||||
function toVideo($file, $parm=array())
|
||||
{
|
||||
if(empty($file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
list($id,$type) = explode(".",$file,2);
|
||||
|
||||
|
||||
$thumb = vartrue($parm['thumb']);
|
||||
|
||||
|
||||
@ -3285,15 +3290,25 @@ class e_parser
|
||||
$key = substr($k,8);
|
||||
$ytpref[$key] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
unset($ytpref['bbcode_responsive']); // do not include in embed code.
|
||||
|
||||
if(!empty($ytpref['cc_load_policy']))
|
||||
{
|
||||
$ytpref['cc_lang_pref'] = e_LAN; // switch captions with chosen user language.
|
||||
}
|
||||
|
||||
$ytqry = http_build_query($ytpref);
|
||||
|
||||
|
||||
$defClass = (deftrue('BOOTSTRAP')) ? "embed-responsive embed-responsive-16by9" : "video-responsive"; // levacy backup.
|
||||
|
||||
|
||||
if($type == 'youtube')
|
||||
{
|
||||
// $thumbSrc = "https://i1.ytimg.com/vi/".$id."/0.jpg";
|
||||
$thumbSrc = "http://i1.ytimg.com/vi/".$id."/mqdefault.jpg";
|
||||
$video = '<iframe width="560" height="315" src="//www.youtube.com/embed/'.$id.'?'.$ytqry.'" style="background-size: 100%;background-image: url('.$thumbSrc.');border:0px" allowfullscreen></iframe>';
|
||||
$video = '<iframe class="embed-responsive-item" width="560" height="315" src="//www.youtube.com/embed/'.$id.'?'.$ytqry.'" style="background-size: 100%;background-image: url('.$thumbSrc.');border:0px" allowfullscreen></iframe>';
|
||||
|
||||
|
||||
if($thumb == 'tag')
|
||||
@ -3321,13 +3336,15 @@ class e_parser
|
||||
{
|
||||
return $thumbSrc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($thumb == 'video')
|
||||
{
|
||||
return '<div class="video-responsive video-thumbnail thumbnail">'.$video.'</div>';
|
||||
return '<div class="'.$defClass.' video-thumbnail thumbnail">'.$video.'</div>';
|
||||
}
|
||||
|
||||
return '<div class="video-responsive '.vartrue($parm['class']).'">'.$video.'</div>';
|
||||
return '<div class="'.$defClass.' '.vartrue($parm['class']).'">'.$video.'</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -3347,7 +3364,7 @@ class e_parser
|
||||
}
|
||||
|
||||
$video = '<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list='.$id.'" style="border:0" allowfullscreen></iframe>';
|
||||
return '<div class="video-responsive '.vartrue($parm['class']).'">'.$video.'</div>';
|
||||
return '<div class="'.$defClass.' '.vartrue($parm['class']).'">'.$video.'</div>';
|
||||
}
|
||||
|
||||
if($type == 'mp4') //TODO FIXME
|
||||
@ -3994,14 +4011,15 @@ class e_emotefilter {
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
|
||||
if(!$pref['emotepack'])
|
||||
if(empty($pref['emotepack']))
|
||||
{
|
||||
$pref['emotepack'] = "default";
|
||||
save_prefs();
|
||||
e107::getConfig('emote')->clearPrefCache('emote');
|
||||
e107::getConfig('core')->set('emotepack','default')->save(false,true,false);
|
||||
}
|
||||
|
||||
|
||||
$this->emotes = e107::getConfig("emote")->getPref();
|
||||
|
||||
|
||||
if(!vartrue($this->emotes))
|
||||
{
|
||||
return;
|
||||
@ -4056,12 +4074,14 @@ class e_emotefilter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function filterEmotes($text)
|
||||
{
|
||||
$text = str_replace($this->search, $this->replace, $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
function filterEmotesRev($text)
|
||||
{
|
||||
|
@ -1197,7 +1197,19 @@ class e_form
|
||||
$options['pattern'] = vartrue($options['pattern'],'[\S]{4,}');
|
||||
$options['required'] = varset($options['required'], 1);
|
||||
$options['class'] = vartrue($options['class'],'e-password');
|
||||
|
||||
|
||||
|
||||
e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
|
||||
|
||||
e107::js('footer-inline', '
|
||||
$(".e-password").pwdMeter({
|
||||
minLength: 6,
|
||||
displayGeneratePassword: true,
|
||||
generatePassText: "Generate",
|
||||
randomPassLength: 12
|
||||
});
|
||||
');
|
||||
|
||||
if(deftrue('BOOTSTRAP') == 3)
|
||||
{
|
||||
$options['class'] .= ' form-control';
|
||||
@ -1334,7 +1346,7 @@ class e_form
|
||||
}
|
||||
elseif(!vartrue($options['noresize']))
|
||||
{
|
||||
$options['class'] = (isset($options['class']) && $options['class']) ? $options['class'].' e-autoheight' : 'tbox span7 e-autoheight';
|
||||
$options['class'] = (isset($options['class']) && $options['class']) ? $options['class'].' e-autoheight' : 'tbox col-md-7 span7 e-autoheight';
|
||||
}
|
||||
|
||||
$options = $this->format_options('textarea', $name, $options);
|
||||
@ -2331,7 +2343,8 @@ class e_form
|
||||
case 'filter e-hide-if-js': // FIXME hide-js shouldn't be here.
|
||||
$options['class'] .= 'btn-primary';
|
||||
break;
|
||||
|
||||
|
||||
case 'default':
|
||||
default:
|
||||
$options['class'] .= 'btn-default';
|
||||
break;
|
||||
@ -2905,7 +2918,7 @@ class e_form
|
||||
|
||||
if(count($list))
|
||||
{
|
||||
return "<div class='e-related clearfix'><hr><h4>Related</h4><ul class='e-related'>".implode("\n",$list)."</ul></div>"; //XXX Tablerender?
|
||||
return "<div class='e-related clearfix'><hr><h4>".defset('LAN_RELATED', 'Related')."</h4><ul class='e-related'>".implode("\n",$list)."</ul></div>"; //XXX Tablerender?
|
||||
}
|
||||
|
||||
}
|
||||
@ -3152,7 +3165,7 @@ class e_form
|
||||
{
|
||||
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
|
||||
$from = intval(vartrue($_GET['from'],0));
|
||||
$value .= "<a class='e-sort sort-trigger btn btn-default' style='cursor:move' data-target='".e_SELF."?mode={$mode}&action=sort&ajax_used=1&from={$from}' title='Re-order'>".ADMIN_SORT_ICON."</a> ";
|
||||
$value .= "<a class='e-sort sort-trigger btn btn-default' style='cursor:move' data-target='".e_SELF."?mode={$mode}&action=sort&ajax_used=1&from={$from}' title='".LAN_RE_ORDER."'>".ADMIN_SORT_ICON."</a> ";
|
||||
}
|
||||
|
||||
$cls = false;
|
||||
@ -4749,7 +4762,7 @@ class e_form
|
||||
$key = $att['field'];
|
||||
}
|
||||
|
||||
if($key == 'checkboxes' || $key == 'options' || ($att['type'] === null))
|
||||
if($key == 'checkboxes' || $key == 'options' || ($att['type'] === null) || ($att['type'] === false))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ class e_jsmanager
|
||||
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"
|
||||
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js",
|
||||
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
|
||||
"http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"
|
||||
// "http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"
|
||||
"https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"
|
||||
// ,
|
||||
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js",
|
||||
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css",
|
||||
@ -240,26 +241,15 @@ class e_jsmanager
|
||||
|
||||
if($this->isInAdmin()) // Include jquery-ui in the admin-area only - Jquery-UI to eventually be removed from e107 completely if possible.
|
||||
{
|
||||
$this->_libraries['jquery'] = array(
|
||||
"https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js",
|
||||
"https://cdn.jsdelivr.net/jquery.ui/1.11.4/jquery-ui.min.js",
|
||||
"https://cdn.jsdelivr.net/jquery.ui/1.11.4/themes/smoothness/jquery-ui.min.css"
|
||||
);
|
||||
|
||||
if(e107::getPref('admintheme')=='bootstrap3') // Bootstrap 3 admin area.
|
||||
{
|
||||
$this->_libraries['jquery'] = array(
|
||||
"http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js",
|
||||
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js",
|
||||
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css",
|
||||
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js",
|
||||
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css",
|
||||
);
|
||||
}
|
||||
else // Bootstrap 2 admin area.
|
||||
{
|
||||
$this->_libraries['jquery'] = array(
|
||||
"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js",
|
||||
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js",
|
||||
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css",
|
||||
);
|
||||
}
|
||||
|
||||
// "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js",
|
||||
// "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css",
|
||||
//https://cdn.jsdelivr.net/jquery.ui/1.11.4/jquery-ui.min.css
|
||||
}
|
||||
|
||||
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true') // Test with Local JS Framework files.
|
||||
|
@ -278,17 +278,27 @@ class language{
|
||||
}
|
||||
|
||||
global $pref;
|
||||
|
||||
|
||||
if(!$lang)
|
||||
{
|
||||
return (ADMIN_AREA && vartrue($pref['adminlanguage'])) ? $pref['adminlanguage'] : $pref['sitelanguage'];
|
||||
}
|
||||
|
||||
|
||||
if(strpos($lang,"debug")!==false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if($lang == 'E_SITELANGUAGE') // allows for overriding language using a scripted 'define' before class2.php is loaded.
|
||||
{
|
||||
$lang = $pref['sitelanguage'];
|
||||
}
|
||||
|
||||
if($lang == 'E_ADMINLANGUAGE')
|
||||
{
|
||||
$lang = $pref['adminlanguage'];
|
||||
}
|
||||
|
||||
if(strlen($lang)== 2)
|
||||
{
|
||||
$iso = $lang;
|
||||
@ -379,10 +389,12 @@ class language{
|
||||
|
||||
/**
|
||||
* Return a list of Installed Language Packs
|
||||
*
|
||||
* @param str $type - English or Native.
|
||||
* @example type = english: array(0=>'English', 1=>'French' ...)
|
||||
* @example type = native: array('English'=>'English', 'French'=>'Francais'...)
|
||||
* @return array
|
||||
*/
|
||||
function installed()
|
||||
function installed($type='english')
|
||||
{
|
||||
if(null == $this->lanlist)
|
||||
{
|
||||
@ -402,6 +414,19 @@ class language{
|
||||
|
||||
$this->lanlist = array_intersect($lanlist,$this->list);
|
||||
}
|
||||
|
||||
if($type == 'native')
|
||||
{
|
||||
$natList = array();
|
||||
foreach($this->lanlist as $lang)
|
||||
{
|
||||
$natList[$lang] = $this->toNative($lang);
|
||||
}
|
||||
|
||||
natsort($natList);
|
||||
|
||||
return $natList;
|
||||
}
|
||||
|
||||
return $this->lanlist;
|
||||
}
|
||||
@ -453,12 +478,13 @@ class language{
|
||||
|
||||
/**
|
||||
* Detect a Language Change
|
||||
* 0. Parked Domain eg. http://mylanguagedomain.com
|
||||
* 1. Parked subDomain eg. http://es.mydomain.com (Preferred for SEO)
|
||||
* 2. e_MENU Query eg. /index.php?[es]
|
||||
* 3. $_GET['elan'] eg. /index.php?elan=es
|
||||
* 4. $_POST['sitelanguage'] eg. <input type='hidden' name='sitelanguage' value='Spanish' />
|
||||
* 5. $GLOBALS['elan'] eg. <?php $GLOBALS['elan']='es' (deprecated)
|
||||
* 1. Scripted Definition eg. define('e_PAGE_LANGUAGE', 'English');
|
||||
* 2. Parked Domain eg. http://mylanguagedomain.com
|
||||
* 3. Parked subDomain eg. http://es.mydomain.com (Preferred for SEO)
|
||||
* 4. e_MENU Query eg. /index.php?[es]
|
||||
* 5. $_GET['elan'] eg. /index.php?elan=es
|
||||
* 6. $_POST['sitelanguage'] eg. <input type='hidden' name='sitelanguage' value='Spanish' />
|
||||
* 7. $GLOBALS['elan'] eg. <?php $GLOBALS['elan']='es' (deprecated)
|
||||
*
|
||||
* @param boolean $force force detection, don't use cached value
|
||||
*/
|
||||
@ -470,7 +496,11 @@ class language{
|
||||
if(false !== $this->detect && !$force) return $this->detect;
|
||||
$this->_cookie_domain = '';
|
||||
|
||||
if(vartrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== false))
|
||||
if(defined('e_PAGE_LANGUAGE') && ($detect_language = $this->isValid(e_PAGE_LANGUAGE))) // page specific override.
|
||||
{
|
||||
// Do nothing as $detect_language is set.
|
||||
}
|
||||
elseif(vartrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== false))
|
||||
{
|
||||
$detect_language = (e_SUBDOMAIN) ? $this->isValid(e_SUBDOMAIN) : $pref['sitelanguage'];
|
||||
// Done in session handler now, based on MULTILANG_SUBDOMAIN value
|
||||
@ -666,16 +696,19 @@ class language{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function bcDefs()
|
||||
/**
|
||||
* Define Legacy LAN constants based on a supplied array.
|
||||
* @param null $bcList
|
||||
*/
|
||||
public function bcDefs($bcList = null)
|
||||
{
|
||||
|
||||
$bcList = array(
|
||||
'LAN_180' => 'LAN_SEARCH'
|
||||
|
||||
);
|
||||
|
||||
if(empty($bcList))
|
||||
{
|
||||
$bcList = array(
|
||||
'LAN_180' => 'LAN_SEARCH'
|
||||
);
|
||||
}
|
||||
|
||||
foreach($bcList as $old => $new)
|
||||
{
|
||||
|
@ -233,11 +233,11 @@ class userlogin
|
||||
$user_email = $this->userData['user_email'];
|
||||
|
||||
/* restrict more than one person logging in using same us/pw */
|
||||
if($pref['disallowMultiLogin'])
|
||||
if(!empty($pref['disallowMultiLogin']) && !empty($user_id))
|
||||
{
|
||||
if($sql->db_Select("online", "online_ip", "online_user_id='".$user_id.".".$user_name."'"))
|
||||
if($sql->select("online", "online_ip", "online_user_id='".$user_id.".".$user_name."'"))
|
||||
{
|
||||
return $this->invalidLogin($username,LOGIN_MULTIPLE,$user_id);
|
||||
return $this->invalidLogin($username, LOGIN_MULTIPLE, $user_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -823,6 +823,7 @@ class e107Email extends PHPMailer
|
||||
// $eml['body'] = ($tp->toEmail($tmpl['header']). str_replace('{BODY}', $eml['body'], $tmpl['body']). $tp->toEmail($tmpl['footer']));
|
||||
}
|
||||
|
||||
$this->Subject = str_replace("'", "'", $this->Subject);
|
||||
|
||||
// Perform Override from template.
|
||||
foreach($this->overrides as $k=>$v)
|
||||
|
@ -50,7 +50,7 @@ class e_media
|
||||
* @param string $fmask [optional] filetypes eg. .jpg|.gif IMAGES is the default mask.
|
||||
* @return e_media
|
||||
*/
|
||||
public function import($cat='',$epath,$fmask='',$options=array())
|
||||
public function import($cat='', $epath, $fmask='', $options=array())
|
||||
{
|
||||
if(!vartrue($cat)){ return $this;}
|
||||
|
||||
@ -61,6 +61,7 @@ class e_media
|
||||
|
||||
if(!is_readable($epath))
|
||||
{
|
||||
e107::getMessage()->addDebug("Unable to import: ".$epath);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -70,11 +71,13 @@ class e_media
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$fl->setFileInfo('all');
|
||||
if(!$fmask)
|
||||
|
||||
if(empty($fmask))
|
||||
{
|
||||
$fmask = '[a-zA-z0-9_-]+\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF)$';
|
||||
}
|
||||
$img_array = $fl->get_files($epath,$fmask,'',2);
|
||||
|
||||
$img_array = $fl->get_files($epath, $fmask,'',2);
|
||||
|
||||
if(!count($img_array))
|
||||
{
|
||||
@ -1377,6 +1380,11 @@ class e_media
|
||||
$pref = e107::getPref();
|
||||
$tp = e107::getParser();
|
||||
|
||||
if(empty($src))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(is_string($opts))
|
||||
{
|
||||
parse_str($opts,$opts);
|
||||
@ -1411,9 +1419,8 @@ class e_media
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$error = $e->getMessage();
|
||||
echo $error;
|
||||
e107::getMessage()->addDebug($error);
|
||||
$error = array('thumbnailer'=> $e->getMessage(), 'src'=>$src, 'dest'=>$dest, 'savePath'=>$destFilePath, 'backtrace'=>'e_media::resizeImage');;
|
||||
e107::getMessage()->addDebug(print_a($error,true));
|
||||
e107::getLog()->add("RESIZE ERROR",$error,E_LOG_INFORMATIVE,'RESIZE');
|
||||
return false;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class e_menu
|
||||
}
|
||||
|
||||
// print_a($eMenuArea);
|
||||
if(varset($_SERVER['E_DEV_MENU']) == 'true') // New in v2.x
|
||||
if(varset($_SERVER['E_DEV_MENU']) == 'true') // New in v2.x Experimental
|
||||
{
|
||||
$layouts = e107::getPref('menu_layouts');
|
||||
if(!is_array($layouts))
|
||||
@ -76,7 +76,7 @@ class e_menu
|
||||
$eMenuArea = $this->getData(THEME_LAYOUT);
|
||||
//print_a($eMenuArea);
|
||||
}
|
||||
else // the old v1.x way.
|
||||
else // standard DB 'table' method.
|
||||
{
|
||||
$eMenuArea = $this->getDataLegacy();
|
||||
}
|
||||
@ -188,7 +188,7 @@ class e_menu
|
||||
|
||||
/**
|
||||
* @DEPRECATED
|
||||
* Legacy Function to retrieve Menu data from tables. - ie. the old v1.x method.
|
||||
* Legacy Function to retrieve Menu data from tables.
|
||||
*/
|
||||
private function getDataLegacy()
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ class eMessage
|
||||
* @param string $mstack message stack which should have only unique message values
|
||||
* @return eMessage
|
||||
*/
|
||||
public function setUnique($mstack)
|
||||
public function setUnique($mstack='default')
|
||||
{
|
||||
if(!in_array($mstack, $this->_unique))
|
||||
{
|
||||
@ -990,8 +990,8 @@ function show_emessage($mode, $message, $line = 0, $file = "") {
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Error</title>
|
||||
<link rel="stylesheet" media="all" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" media="all" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" media="all" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" media="all" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" media="all" type="text/css" href="/e107_web/css/e107.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
@ -1904,6 +1904,30 @@ class e_db_mysql
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if a database table is empty or not.
|
||||
* @param $table
|
||||
* @return bool
|
||||
*/
|
||||
function isEmpty($table)
|
||||
{
|
||||
if(empty($table))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $this->gen("SELECT NULL FROM `#".$table."` LIMIT 1");
|
||||
|
||||
if($result === 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Populate mySQLtableList and mySQLtableListLanguage
|
||||
|
@ -374,9 +374,10 @@ class news {
|
||||
|
||||
// Retrieve batch sc object, set required vars
|
||||
$sc = e107::getScBatch('news')
|
||||
->wrapper('news/view/item')
|
||||
->setScVar('news_item', $news)
|
||||
->setScVar('param', $param);
|
||||
|
||||
|
||||
$text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc);
|
||||
|
||||
if ($mode == 'return')
|
||||
|
@ -331,7 +331,7 @@ class notify
|
||||
|
||||
function notify_flood($data)
|
||||
{
|
||||
$this->send('flood', NT_LAN_FL_1, NT_LAN_FL_2.': '.e107::getIPHandler()->ipDecode($data));
|
||||
$this->send('flood', NT_LAN_FL_1, NT_LAN_FL_2.': '.e107::getIPHandler()->ipDecode($data, TRUE));
|
||||
}
|
||||
|
||||
function notify_subnews($data)
|
||||
|
@ -188,7 +188,8 @@ class e107plugin
|
||||
/**
|
||||
* Returns an array containing details of all plugins in the plugin table - should normally use e107plugin::update_plugins_table() first to
|
||||
* make sure the table is up to date. (Primarily called from plugin manager to get lists of installed and uninstalled plugins.
|
||||
* @return array plugin details
|
||||
* @param string $path
|
||||
* @return int
|
||||
*/
|
||||
function getId($path)
|
||||
{
|
||||
@ -1355,17 +1356,17 @@ class e107plugin
|
||||
|
||||
/**
|
||||
* Install routine for XML file
|
||||
* @param object $id (the number of the plugin in the DB) or the path to the plugin folder. eg. 'forum'
|
||||
* @param object $function install|upgrade|uninstall|refresh (adds things that are missing, but doesn't change any existing settings)
|
||||
* @param object $options [optional] an array of possible options - ATM used only for uninstall:
|
||||
* @param mixed $id (the number of the plugin in the DB) or the path to the plugin folder. eg. 'forum'
|
||||
* @param string $function install|upgrade|uninstall|refresh (adds things that are missing, but doesn't change any existing settings)
|
||||
* @param array $options [optional] an array of possible options - ATM used only for uninstall:
|
||||
* 'delete_userclasses' - to delete userclasses created
|
||||
* 'delete_tables' - to delete DB tables
|
||||
* 'delete_xfields' - to delete extended fields
|
||||
* 'delete_ipool' - to delete icon pool entry
|
||||
* + any defined in <pluginname>_setup.php in the uninstall_options() method.
|
||||
* @return TBD
|
||||
* @return void
|
||||
*/
|
||||
function install_plugin_xml($id, $function = '', $options = FALSE)
|
||||
function install_plugin_xml($id, $function = '', $options = null)
|
||||
{
|
||||
|
||||
$pref = e107::getPref();
|
||||
@ -1376,21 +1377,21 @@ class e107plugin
|
||||
$error = array(); // Array of error messages
|
||||
$canContinue = TRUE; // Clear flag if must abort part way through
|
||||
|
||||
if(is_string($id)) // Plugin Path.
|
||||
{
|
||||
$id = $this->getId($id);
|
||||
$plug = $this->getinfo($id); // Get plugin info from DB
|
||||
}
|
||||
elseif(is_array($id))
|
||||
if(is_array($id)) // plugin info array
|
||||
{
|
||||
$plug = $id;
|
||||
$id = $plug['plugin_id'];
|
||||
$id = (int) $plug['plugin_id'];
|
||||
}
|
||||
else
|
||||
elseif(is_numeric($id)) // plugin database id
|
||||
{
|
||||
$id = (int) $id;
|
||||
$plug = $this->getinfo($id); // Get plugin info from DB
|
||||
}
|
||||
else // Plugin Path.
|
||||
{
|
||||
$id = $this->getId($id);
|
||||
$plug = $this->getinfo($id); // Get plugin info from DB
|
||||
}
|
||||
|
||||
$this->current_plug = $plug;
|
||||
|
||||
@ -2371,7 +2372,7 @@ class e107plugin
|
||||
|
||||
if ($mode != "core") // Do only one core pref save during install/uninstall etc.
|
||||
{
|
||||
$config->save();
|
||||
$config->save(true, false, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -2839,7 +2840,7 @@ class e107plugin
|
||||
}
|
||||
}
|
||||
|
||||
$core->save(FALSE);
|
||||
$core->save(FALSE, false, false);
|
||||
|
||||
if ($this->manage_icons())
|
||||
{
|
||||
|
@ -807,9 +807,19 @@ final class e_core_pref extends e_pref
|
||||
*/
|
||||
function __construct($alias, $load = true)
|
||||
{
|
||||
|
||||
|
||||
$pref_alias = $alias;
|
||||
|
||||
if($alias == 'emote')
|
||||
{
|
||||
$pack = e107::pref('core','emotepack');
|
||||
$this->aliases['emote'] = 'emote_'.$pack;
|
||||
}
|
||||
|
||||
$pref_id = $this->getConfigId($alias);
|
||||
|
||||
|
||||
if(!$pref_id)
|
||||
{
|
||||
$pref_id = $pref_alias = '';
|
||||
@ -832,6 +842,8 @@ final class e_core_pref extends e_pref
|
||||
{
|
||||
$this->load();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -928,7 +940,7 @@ class e_plugin_pref extends e_pref
|
||||
$ret = false;
|
||||
if($this->plugin_id)
|
||||
{
|
||||
$ret = e107::getDb($this->plugin_id)->db_Delete('core', "e107_name='{$this->plugin_id}'");
|
||||
$ret = e107::getDb($this->plugin_id)->delete('core', "e107_name='{$this->plugin_id}'");
|
||||
$this->destroy();
|
||||
}
|
||||
return $ret;
|
||||
@ -982,11 +994,11 @@ class prefs
|
||||
$Args .= ($Args ? " OR e107_name='{$v}'" : "e107_name='{$v}'");
|
||||
}
|
||||
}
|
||||
if (!$sql->db_Select('core', '*', $Args, 'default'))
|
||||
if (!$sql->select('core', '*', $Args, 'default'))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
while ($row = $sql->db_Fetch())
|
||||
while ($row = $sql->fetch())
|
||||
{
|
||||
$this->prefVals['core'][$row['e107_name']] = $row['e107_value'];
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$comments_title = ADLAN_24;
|
||||
$comments_title = LAN_PLUGIN_DOWNLOAD_NAME;
|
||||
$comments_type_id = '2';
|
||||
$comments_return['download'] = "d.download_id, d.download_name";
|
||||
$comments_table['download'] = "LEFT JOIN #download AS d ON c.comment_type=2 AND d.download_id = c.comment_item_id";
|
||||
|
@ -756,11 +756,14 @@ class e_parse_shortcode
|
||||
// Do it only once per parsing cylcle and not on every doCode() loop - performance
|
||||
if(method_exists($this->addedCodes, 'wrapper'))
|
||||
{
|
||||
// $cname = get_class($this->addedCodes);
|
||||
|
||||
$tmpWrap = e107::templateWrapper($this->addedCodes->wrapper());
|
||||
if(!empty($tmpWrap)) // FIX for #3 above.
|
||||
{
|
||||
$this->wrappers = array_merge($this->wrappers,$tmpWrap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -782,7 +785,8 @@ class e_parse_shortcode
|
||||
}
|
||||
elseif (is_array($extraCodes)) // Array value contains the contents of a .sc file which is then parsed. ie. return " whatever ";
|
||||
{
|
||||
$this->addedCodes = &$extraCodes;
|
||||
$this->addedCodes = &$extraCodes;
|
||||
|
||||
/*
|
||||
foreach ($extraCodes as $sc => $code)
|
||||
{
|
||||
@ -792,6 +796,8 @@ class e_parse_shortcode
|
||||
|
||||
// print_a($this);
|
||||
}
|
||||
|
||||
|
||||
$ret = preg_replace_callback('#\{(\S[^\x02]*?\S)\}#', array(&$this, 'doCode'), $text);
|
||||
$this->parseSCFiles = $saveParseSCFiles; // Restore previous value
|
||||
$this->addedCodes = $saveCodes;
|
||||
@ -822,6 +828,7 @@ class e_parse_shortcode
|
||||
global $pref, $e107cache, $menu_pref, $parm, $sql;
|
||||
|
||||
$parmArray = false;
|
||||
$fullShortcodeKey = null;
|
||||
|
||||
if ($this->eVars)
|
||||
{
|
||||
@ -837,6 +844,7 @@ class e_parse_shortcode
|
||||
|
||||
if(preg_match('/^([A-Z_]*):(.*)/', $matches[1], $newMatch))
|
||||
{
|
||||
$fullShortcodeKey = $newMatch[0];
|
||||
$code = $newMatch[1];
|
||||
$parmStr = trim($newMatch[2]);
|
||||
$debugParm = $parmStr;
|
||||
@ -966,7 +974,7 @@ class e_parse_shortcode
|
||||
// via e107::getScBatch(name)->setParserVars($eVars);
|
||||
// $this->callScFunc($_class, 'setParserVars', $this->eVars);
|
||||
$wrapper = $this->callScFunc($_class, 'wrapper', null);
|
||||
|
||||
|
||||
$ret = $this->callScFuncA($_class, $_method, array($parm, $sc_mode));
|
||||
|
||||
/*if (method_exists($this->scClasses[$_class], $_method))
|
||||
@ -1079,13 +1087,21 @@ class e_parse_shortcode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($ret) && ($ret != '' || is_numeric($ret)))
|
||||
{
|
||||
// Wrapper support - see contact_template.php
|
||||
if(isset($this->wrappers[$code]) && !empty($this->wrappers[$code]))
|
||||
if(isset($this->wrappers[$code]) && !empty($this->wrappers[$code])) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE']
|
||||
{
|
||||
list($pre, $post) = explode("{---}", $this->wrappers[$code], 2);
|
||||
$ret = $pre.$ret.$post;
|
||||
|
||||
}
|
||||
elseif(!empty($fullShortcodeKey) && !empty($this->wrappers[$fullShortcodeKey]) ) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1']
|
||||
{
|
||||
list($pre, $post) = explode("{---}", $this->wrappers[$fullShortcodeKey], 2);
|
||||
$ret = $pre.$ret.$post;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1147,12 +1163,24 @@ class e_parse_shortcode
|
||||
{
|
||||
$other = $this->debug_legacy;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($this->wrappers[$code]))
|
||||
{
|
||||
$other['wrapper'] = $this->wrappers[$code];
|
||||
}
|
||||
elseif(!empty($this->wrappers[$fullShortcodeKey]) )
|
||||
{
|
||||
$other['wrapper'] = $this->wrappers[$fullShortcodeKey];
|
||||
}
|
||||
|
||||
|
||||
$info = (isset($this->registered_codes[$code])) ? print_a($this->registered_codes[$code],true) : print_a($other,true);
|
||||
|
||||
$tmp = isset($debugParm) ? $debugParm : $parm;
|
||||
|
||||
$db_debug->logCode(2, $code, $tmp, $info);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1278,7 +1306,7 @@ class e_shortcode
|
||||
|
||||
if(false === $id) $id = null;
|
||||
$this->wrapper = $id;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -790,7 +790,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
|
||||
$array_functions = array(
|
||||
0 => array(e_ADMIN_ABS.'administrator.php', ADLAN_8, ADLAN_9, '3', 2, E_16_ADMIN, E_32_ADMIN),
|
||||
1 => array(e_ADMIN_ABS.'updateadmin.php', ADLAN_10, ADLAN_11, '', 2, E_16_ADPASS, E_32_ADPASS),
|
||||
1 => array(e_ADMIN_ABS.'updateadmin.php', ADLAN_10, ADLAN_11, false, 2, E_16_ADPASS, E_32_ADPASS),
|
||||
2 => array(e_ADMIN_ABS.'banlist.php', ADLAN_34, ADLAN_35, '4', 2, E_16_BANLIST, E_32_BANLIST),
|
||||
4 => array(e_ADMIN_ABS.'cache.php', ADLAN_74, ADLAN_75, 'C', 1, E_16_CACHE, E_32_CACHE),
|
||||
5 => array(e_ADMIN_ABS.'cpage.php', ADLAN_42, ADLAN_43, '5|J', 3, E_16_CUST, E_32_CUST),
|
||||
@ -968,8 +968,8 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!in_array($plugin_path, $pref['lan_global_list']))
|
||||
|
||||
if(!empty($pref['lan_global_list']) && !in_array($plugin_path, $pref['lan_global_list']))
|
||||
{
|
||||
e107::loadLanFiles($plugin_path, 'admin');
|
||||
}
|
||||
|
@ -533,6 +533,48 @@ function file_upload($uploaddir, $avatar = FALSE, $fileinfo = "", $overwrite = "
|
||||
// VETTING AND UTILITY ROUTINES
|
||||
//====================================================================
|
||||
|
||||
/**
|
||||
* Get image (string) mime type
|
||||
* or when extended - array [(string) mime-type, (array) associated extensions)].
|
||||
* A much faster way to retrieve mimes than getimagesize()
|
||||
*
|
||||
* @param $filename
|
||||
* @param bool|false $extended
|
||||
* @return array|string|false
|
||||
*/
|
||||
function get_image_mime($filename, $extended = false)
|
||||
{
|
||||
// mime types as returned from image_type_to_mime_type()
|
||||
// and associated file extensions
|
||||
$imageExtensions = array(
|
||||
'image/gif' => array('gif'),
|
||||
'image/jpeg' => array('jpg'),
|
||||
'image/png' => array('png'),
|
||||
'application/x-shockwave-flash' => array('swf', 'swc'),
|
||||
'image/psd' => array('psd'),
|
||||
'image/bmp' => array('bmp'),
|
||||
'image/tiff' => array('tiff'),
|
||||
'application/octet-stream' => array('jpc', 'jpx', 'jb2'),
|
||||
'image/jp2' => array('jp2'),
|
||||
'image/iff' => array('iff'),
|
||||
'image/vnd.wap.wbmp' => array('wbmp'),
|
||||
'image/xbm' => array('xbm'),
|
||||
'image/vnd.microsoft.icon' => array('ico')
|
||||
);
|
||||
|
||||
$ret = image_type_to_mime_type(exif_imagetype($filename));
|
||||
|
||||
if($extended)
|
||||
{
|
||||
return array(
|
||||
$ret,
|
||||
$ret && isset($imageExtensions[$ret]) ? $imageExtensions[$ret]: array()
|
||||
);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check uploaded file to try and identify dodgy content.
|
||||
@ -549,7 +591,7 @@ function file_upload($uploaddir, $avatar = FALSE, $fileinfo = "", $overwrite = "
|
||||
* 2 - can't read file contents
|
||||
* 3 - illegal file contents (usually '<?php')
|
||||
* 4 - not an image file
|
||||
* 5 - bad image parameters
|
||||
* 5 - bad image parameters - REMOVED
|
||||
* 6 - not in supplementary list
|
||||
* 7 - suspicious file contents
|
||||
* 8 - unknown file type
|
||||
@ -604,11 +646,25 @@ function vet_file($filename, $target_name, $allowed_filetypes = '', $unknown = F
|
||||
case 'jpeg':
|
||||
case 'pjpeg':
|
||||
case 'bmp':
|
||||
$ret = getimagesize($filename);
|
||||
if (!is_array($ret))
|
||||
return 4; // getimagesize didn't like something
|
||||
if (($ret[0] == 0) || ($ret[1] == 0))
|
||||
return 5; // Zero size picture or bad file format
|
||||
case 'swf':
|
||||
case 'swc':
|
||||
case 'psd':
|
||||
case 'tiff':
|
||||
case 'jpc': // http://fileinfo.com/extension/jpc
|
||||
case 'jpx': // http://fileinfo.com/extension/jpx
|
||||
case 'jb2': // http://fileinfo.com/extension/jb2
|
||||
case 'jp2': // http://fileinfo.com/extension/jp2
|
||||
case 'iff':
|
||||
case 'wbmp':
|
||||
case 'xbm':
|
||||
case 'ico':
|
||||
$ret = get_image_mime($filename);
|
||||
if ($ret === false)
|
||||
{
|
||||
return 4; // exif_imagetype didn't recognize the image mime
|
||||
}
|
||||
// getimagesize() is extremely slow + it can't handle all required media!!! Abandon this check!
|
||||
// return 5; // Zero size picture or bad file format
|
||||
break;
|
||||
|
||||
case 'zip':
|
||||
@ -621,7 +677,6 @@ function vet_file($filename, $target_name, $allowed_filetypes = '', $unknown = F
|
||||
case '7z':
|
||||
case 'csv':
|
||||
case 'wmv':
|
||||
case 'swf':
|
||||
case 'flv': //Flash stream
|
||||
case 'f4v': //Flash stream
|
||||
case 'mov': //media
|
||||
|
@ -116,7 +116,7 @@ class e107_user_extended
|
||||
|
||||
if($sql->select('user_extended_struct', '*', "user_extended_struct_text != '_system_' ORDER BY user_extended_struct_order ASC"))
|
||||
{
|
||||
while($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
while($row = $sql->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
if ($row['user_extended_struct_type'] == 0)
|
||||
{ // Its a category
|
||||
@ -543,15 +543,15 @@ class e107_user_extended
|
||||
{
|
||||
extract($name);
|
||||
}
|
||||
|
||||
if(!is_numeric($type))
|
||||
|
||||
if(!is_numeric($type))
|
||||
{
|
||||
$type = $this->typeArray[$type];
|
||||
}
|
||||
|
||||
if($this->user_extended_field_exist($name))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$this->user_extended_reserved($name))
|
||||
@ -559,7 +559,11 @@ class e107_user_extended
|
||||
$field_info = $this->user_extended_type_text($type, $default);
|
||||
|
||||
// wrong type
|
||||
if(false === $field_info) return false;
|
||||
if(false === $field_info)
|
||||
{
|
||||
e107::getMessage()->addDebug("\$field_info is false ".__METHOD__);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($order === '' && $field_info)
|
||||
{
|
||||
@ -577,9 +581,31 @@ class e107_user_extended
|
||||
{
|
||||
$sql->gen('ALTER TABLE #user_extended ADD user_'.$tp -> toDB($name, true).' '.$field_info);
|
||||
}
|
||||
|
||||
$sql->insert('user_extended_struct',"null,'".$tp -> toDB($name, true)."','".$tp -> toDB($text, true)."','".intval($type)."','".$tp -> toDB($parms, true)."','".$tp -> toDB($values, true)."', '".$tp -> toDB($default, true)."', '".intval($read)."', '".intval($write)."', '".intval($required)."', '0', '".intval($applicable)."', '".intval($order)."', '".intval($parent)."'");
|
||||
|
||||
|
||||
/* TODO
|
||||
$extStructInsert = array(
|
||||
'user_extended_struct_id' => '_NULL_',
|
||||
'user_extended_struct_name' => '',
|
||||
'user_extended_struct_text' => '',
|
||||
'user_extended_struct_type' => '',
|
||||
'user_extended_struct_parms' => '',
|
||||
'user_extended_struct_values' => '',
|
||||
'user_extended_struct_default' => '',
|
||||
'user_extended_struct_read' => '',
|
||||
'user_extended_struct_write' => '',
|
||||
'user_extended_struct_required' => '',
|
||||
'user_extended_struct_signup' => '',
|
||||
'user_extended_struct_applicable' => '',
|
||||
'user_extended_struct_order' => '',
|
||||
'user_extended_struct_parent' => ''
|
||||
|
||||
);
|
||||
|
||||
*/
|
||||
|
||||
$rest = $sql->insert('user_extended_struct',"null,'".$tp -> toDB($name, true)."','".$tp -> toDB($text, true)."','".intval($type)."','".$tp -> toDB($parms, true)."','".$tp -> toDB($values, true)."', '".$tp -> toDB($default, true)."', '".intval($read)."', '".intval($write)."', '".intval($required)."', '0', '".intval($applicable)."', '".intval($order)."', '".intval($parent)."'");
|
||||
|
||||
|
||||
if ($this->user_extended_field_exist($name))
|
||||
{
|
||||
return TRUE;
|
||||
|
@ -92,13 +92,13 @@ class UserHandler
|
||||
'user_loginname' => array('niceName'=> LAN_USER_02, 'fieldType' => 'string', 'vetMethod' => '1', 'vetParam' => '', 'srcName' => 'loginname', 'stripTags' => TRUE, 'stripChars' => '#[^a-z0-9_\.]#i', 'minLength' => 2, 'maxLength' => varset($pref['loginname_maxlength'],30)), // User name
|
||||
'user_login' => array('niceName'=> LAN_USER_03, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'realname', 'dbClean' => 'toDB'), // Real name (no real vetting)
|
||||
'user_customtitle' => array('niceName'=> LAN_USER_04, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'customtitle', 'dbClean' => 'toDB', 'enablePref' => 'signup_option_customtitle'), // No real vetting
|
||||
'user_password' => array('niceName'=> LAN_USER_05, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'password1', 'dataType' => 2, 'minLength' => varset($pref['signup_pass_len'],1)),
|
||||
'user_password' => array('niceName'=> LAN_PASSWORD, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'password1', 'dataType' => 2, 'minLength' => varset($pref['signup_pass_len'],1)),
|
||||
'user_sess' => array('niceName'=> LAN_USER_06, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'stripChars' => "#\"|'|(|)#", 'dbClean' => 'image', 'imagePath' => e_AVATAR_UPLOAD, 'maxHeight' => varset($pref['im_height'], 100), 'maxWidth' => varset($pref['im_width'], 120)), // Photo
|
||||
'user_image' => array('niceName'=> LAN_USER_07, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'image', 'stripChars' => "#\"|'|(|)#", 'dbClean' => 'avatar'), //, 'maxHeight' => varset($pref['im_height'], 100), 'maxWidth' => varset($pref['im_width'], 120) resized on-the-fly // Avatar
|
||||
'user_email' => array('niceName'=> LAN_USER_08, 'fieldType' => 'string', 'vetMethod' => '1,3', 'vetParam' => '', 'fieldOptional' => varset($pref['disable_emailcheck'],0), 'srcName' => 'email', 'dbClean' => 'toDB'),
|
||||
'user_email' => array('niceName'=> LAN_EMAIL, 'fieldType' => 'string', 'vetMethod' => '1,3', 'vetParam' => '', 'fieldOptional' => varset($pref['disable_emailcheck'],0), 'srcName' => 'email', 'dbClean' => 'toDB'),
|
||||
'user_signature' => array('niceName'=> LAN_USER_09, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'signature', 'dbClean' => 'toDB'),
|
||||
'user_hideemail' => array('niceName'=> LAN_USER_10, 'fieldType' => 'int', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'hideemail', 'dbClean' => 'intval'),
|
||||
'user_xup' => array('niceName'=> LAN_USER_11, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'user_xup', 'dbClean' => 'toDB'),
|
||||
'user_xup' => array('niceName'=> "XUP File", 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'user_xup', 'dbClean' => 'toDB'),
|
||||
'user_class' => array('niceName'=> LAN_USER_12, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'class', 'dataType' => '1')
|
||||
);
|
||||
|
||||
|
@ -69,8 +69,8 @@ class e_user_model extends e_admin_model
|
||||
protected $_validation_rules = array(
|
||||
'user_name' => array('string', '1', 'LAN_USER_01', 'LAN_USER_HELP_01'), // TODO - regex
|
||||
'user_loginname' => array('string', '1', 'LAN_USER_02', 'LAN_USER_HELP_02'), // TODO - regex
|
||||
'user_password' => array('compare', '5', 'LAN_USER_05', 'LAN_USER_HELP_05'), // TODO - pref - modify it somewhere below - prepare_rules()?
|
||||
'user_email' => array('email', '', 'LAN_USER_08', 'LAN_USER_HELP_08'),
|
||||
'user_password' => array('compare', '5', 'LAN_PASSWORD', 'LAN_USER_HELP_05'), // TODO - pref - modify it somewhere below - prepare_rules()?
|
||||
'user_email' => array('email', '', 'LAN_EMAIL', 'LAN_USER_HELP_08'),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -146,15 +146,15 @@ class user_class
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sql_r->db_Select('userclass_classes', '*', 'ORDER BY userclass_parent', 'nowhere'); // The order statement should give a consistent return
|
||||
|
||||
while ($row = $this->sql_r->db_Fetch(MYSQL_ASSOC))
|
||||
if($this->sql_r->field('userclass_classes','userclass_parent') && $this->sql_r->select('userclass_classes', '*', 'ORDER BY userclass_parent', 'nowhere')) // The order statement should give a consistent return
|
||||
{
|
||||
$this->class_tree[$row['userclass_id']] = $row;
|
||||
$this->class_tree[$row['userclass_id']]['class_children'] = array(); // Create the child array in case needed
|
||||
while ($row = $this->sql_r->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$this->class_tree[$row['userclass_id']] = $row;
|
||||
$this->class_tree[$row['userclass_id']]['class_children'] = array(); // Create the child array in case needed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add in any fixed classes that aren't already defined (they historically didn't have a DB entry, although now its facilitated (and necessary for tree structure)
|
||||
foreach ($this->fixed_classes as $c => $d)
|
||||
{
|
||||
|
@ -1144,7 +1144,7 @@ class validatorClass
|
||||
{
|
||||
$img = e_AVATAR_UPLOAD.str_replace('-upload-', '', $value); // Its a user-uploaded image
|
||||
}
|
||||
elseif (strpos($avName, '/') !== FALSE)
|
||||
elseif (strpos($value, '//') !== false)
|
||||
{
|
||||
$img = $value; // Its a remote image
|
||||
}
|
||||
@ -1281,7 +1281,8 @@ class validatorClass
|
||||
}
|
||||
break;
|
||||
case 3 : // Check email address against remote server
|
||||
if (vartrue($pref['signup_remote_emailcheck']))
|
||||
|
||||
/* if (vartrue($pref['signup_remote_emailcheck']))
|
||||
{
|
||||
require_once(e_HANDLER."mail_validation_class.php");
|
||||
list($adminuser,$adminhost) = split ("@", SITEADMINEMAIL);
|
||||
@ -1296,6 +1297,7 @@ class validatorClass
|
||||
$errMsg = ERR_INVALID_EMAIL;
|
||||
}
|
||||
}
|
||||
*/
|
||||
break;
|
||||
default :
|
||||
echo 'Invalid vetMethod: '.$options['vetMethod'].'<br />'; // Really a debug aid - should never get here
|
||||
|
@ -112,7 +112,8 @@ define("LAN_TITLE", "Title");
|
||||
define("LAN_USER", "User");
|
||||
define("LAN_EMAIL","Email address");
|
||||
define("LAN_WROTE", "wrote"); // as in John wrote.." ";
|
||||
define("LAN_SEARCH", "Search");
|
||||
define("LAN_RE_ORDER", "Re-order");
|
||||
define("LAN_RELATED", "Related");
|
||||
|
||||
define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name
|
||||
define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password
|
||||
|
@ -125,5 +125,9 @@ define("BANLAN_119", "Indicates an import error - previously imported bans");
|
||||
|
||||
define("BANLAN_120", "Whitelist entry");
|
||||
define("BANLAN_121", "Blacklist entry");
|
||||
define("BANLAN_122", "Blacklist");
|
||||
define("BANLAN_123", "Add to Blacklist");
|
||||
define("BANLAN_124", "Expires"); // not ban_lan_34
|
||||
define("BANLAN_125", "Use my IP");
|
||||
|
||||
?>
|
@ -17,8 +17,8 @@ define("DBLAN_7", "Optimize SQL database");
|
||||
define("DBLAN_8", "Select to backup your core settings");
|
||||
define("DBLAN_9", "Backup core");
|
||||
define("DBLAN_10", "Database Utilities");
|
||||
define("DBLAN_11", "MySQL database");
|
||||
define("DBLAN_12", "optimized");
|
||||
define("DBLAN_11", "MySQL database [x] optimized");
|
||||
//define("DBLAN_12", "optimized");
|
||||
// define("DBLAN_13", "Back");
|
||||
// define("DBLAN_14", "Done");
|
||||
define("DBLAN_15", "Select to check for any available db updates");
|
||||
|
@ -6,15 +6,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
define("LAN_UPDATE_2", "Action");
|
||||
define("LAN_UPDATE_3", "Not Needed");
|
||||
|
||||
// define("LAN_UPDATE_5", "Update available");
|
||||
define("LAN_UPDATE_7", "Executed");
|
||||
define("LAN_UPDATE_8", "Update from");
|
||||
define("LAN_UPDATE_9", "to");
|
||||
//define("LAN_UPDATE_10", "Available Updates");
|
||||
//define("LAN_UPDATE_11", ".617 to .7 Update Continued");
|
||||
define("LAN_UPDATE_4", "Update from [x] to [y]");
|
||||
define("LAN_UPDATE_7", "Executed [x]");
|
||||
define("LAN_UPDATE_12", "One of your tables contains duplicate entries.");
|
||||
define("LAN_UPDATE_13", "Add additional/missing core settings");
|
||||
define("LAN_UPDATE_14", "Start version: ");
|
||||
@ -59,4 +58,11 @@ define("LAN_UPDATE_57", "Before continuing, please manually delete the following
|
||||
define("LAN_UPDATE_CAPTION_PLUGIN", "Plugin Updates"); // Unused
|
||||
define("LAN_UPDATE_CAPTION_CORE", "Core Updates"); // Unused
|
||||
|
||||
// define("LAN_UPDATE_5", "Update available");
|
||||
// define("LAN_UPDATE_8", "Update from");
|
||||
// define("LAN_UPDATE_9", "to");
|
||||
//define("LAN_UPDATE_10", "Available Updates");
|
||||
//define("LAN_UPDATE_11", ".617 to .7 Update Continued");
|
||||
|
||||
|
||||
?>
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* Copyright (C) 2008-2015 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Admin Language File
|
||||
*
|
||||
*/
|
||||
|
||||
define("LAN_head_1", "Admin Navigation");
|
||||
define("LAN_head_2", "Your server does not allow HTTP file uploads so it will not be possible for your users to upload avatars/files etc. To rectify this set file_uploads to On in your php.ini and restart your server. If you don't have access to your php.ini contact your hosts.");
|
||||
define("LAN_head_3", "Your server is running with a basedir restriction in effect. This disallows usage of any file outside of your home directory and as such could affect certain scripts such as the filemanager.");
|
||||
define("LAN_head_4", "Admin Area");
|
||||
define("LAN_head_5", "language displayed in admin area");
|
||||
define("LAN_head_6", "Plugins info");
|
||||
define("LAN_HEADER_01", "Admin Navigation");
|
||||
define("LAN_HEADER_02", "Your server does not allow HTTP file uploads so it will not be possible for your users to upload avatars/files etc. To rectify this set file_uploads to On in your php.ini and restart your server. If you don't have access to your php.ini contact your hosts.");
|
||||
define("LAN_HEADER_03", "Your server is running with a basedir restriction in effect. This disallows usage of any file outside of your home directory and as such could affect certain scripts such as the filemanager.");
|
||||
define("LAN_HEADER_04", "Admin Area");
|
||||
define("LAN_HEADER_05", "language displayed in admin area");
|
||||
define("LAN_HEADER_06", "Plugins info");
|
||||
|
||||
?>
|
||||
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Admin Language File
|
||||
*
|
||||
*/
|
||||
|
||||
define("MDCLAN_1", "Moderated.");
|
||||
define("MDCLAN_2", "No comments for this item");
|
||||
define("MDCLAN_3", "Member");
|
||||
define("MDCLAN_4", "Guest");
|
||||
define("MDCLAN_5", "unblock");
|
||||
define("MDCLAN_6", "block");
|
||||
|
||||
define("MDCLAN_8", "Moderate Comments");
|
||||
define("MDCLAN_9", "Warning! Deleting Parent comments will also delete all replies!");
|
||||
|
||||
//define("MDCLAN_10", "options");//LAN_OPTIONS
|
||||
define("MDCLAN_11", "comment");
|
||||
define("MDCLAN_12", "comments");
|
||||
define("MDCLAN_13", "blocked");
|
||||
define("MDCLAN_14", "lock comments");
|
||||
define("MDCLAN_15", "open");
|
||||
define("MDCLAN_16", "locked");
|
||||
|
||||
?>
|
@ -63,6 +63,11 @@ define("COMLAN_335", "Approved");
|
||||
define("COMLAN_336", "Please write something first.");
|
||||
define("COMLAN_337", "Updated successfully.");
|
||||
|
||||
define("COMLAN_400", "approved");
|
||||
define("COMLAN_401", "blocked");
|
||||
define("COMLAN_402", "pending");
|
||||
|
||||
|
||||
define("COMLAN_TYPE_1", "news");
|
||||
define("COMLAN_TYPE_2", "download");
|
||||
define("COMLAN_TYPE_3", "faq");
|
||||
|
@ -14,7 +14,8 @@
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
define('PAGE_NAME', 'Contact Us');
|
||||
|
||||
define('LANCONTACT_00', 'Contact Us');
|
||||
define("LANCONTACT_01", "Contact Details");
|
||||
define("LANCONTACT_02", "Contact Form");
|
||||
define("LANCONTACT_03", "Enter your name:");
|
||||
@ -31,4 +32,6 @@ define("LANCONTACT_13", "Please include a subject.");
|
||||
|
||||
define("LANCONTACT_14", "Send message to:");
|
||||
define("LANCONTACT_15", "Incorrect code entered");
|
||||
define("LANCONTACT_16", "You must be [registered] and signed-in to use this form.");
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ define("LAN_ERROR_24", " was unsuccessful.");
|
||||
define("LAN_ERROR_25", "[1]: Unable to read core settings from database - Core settings exist but cannot be unserialized. Attempting to restore core backup ...");
|
||||
define("LAN_ERROR_26", "[2]: Unable to read core settings from database - non-existent core settings.");
|
||||
define("LAN_ERROR_27", "[3]: Core settings saved - backup made active.");
|
||||
define("LAN_ERROR_28", "[4]: No core backup found. Check that your database has valid content. If not, please run the <a href='".e_FILE_ABS."resetcore/resetcore.php'>Reset_Core</a> utility to rebuild your core settings. <br />After rebuilding your core please save a backup from the admin/sql screen.");
|
||||
define("LAN_ERROR_28", "[4]: No core backup found. Check that your database has valid content. ");
|
||||
define("LAN_ERROR_29", "[5]: Field(s) have been left blank. Please resubmit the form and fill in the required fields.");
|
||||
define("LAN_ERROR_30", "[6]: Unable to form a valid connection to mySQL. Please check that your e107_config.php contains the correct information.");
|
||||
define("LAN_ERROR_31", "[7]: mySQL is running but database [x] couldn't be connected to.<br />Please check it exists and that your configuration file contains the correct information.");
|
||||
|
@ -69,13 +69,13 @@ define("LANINS_044", "Successfully created database.");
|
||||
define("LANINS_045", "Please click on the button to proceed to next stage.");
|
||||
define("LANINS_046", "5");
|
||||
define("LANINS_047", "Administrator Details");
|
||||
// define("LANINS_048", "Go Back To Last Step");
|
||||
define("LANINS_048", "EXIF extension");
|
||||
define("LANINS_049", "The two passwords you entered are not the same. Please go back and try again.");
|
||||
define("LANINS_050", "XML Extension");
|
||||
define("LANINS_051", "Installed");
|
||||
define("LANINS_052", "Not Installed");
|
||||
define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [link=http://php.net/manual/en/ref.xml.php]php.net[/link] before continuing");
|
||||
// define("LANINS_054", " before continuing");
|
||||
define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [x] before continuing");
|
||||
define("LANINS_054", "e107 v2.x requires the PHP EXIF Extension to be installed. Please contact your host or read the information at [x] before continuing");
|
||||
define("LANINS_055", "Install Confirmation");
|
||||
define("LANINS_056", "6");
|
||||
define("LANINS_057", " e107 now has all the information it needs to complete the installation.
|
||||
@ -90,22 +90,6 @@ Please ensure the file [b]core_sql.php[/b] exists in the [b]/e107_core/sql[/b] d
|
||||
define("LANINS_061", "e107 was unable to create all of the required database tables.
|
||||
Please clear the database and rectify any problems before trying again.");
|
||||
|
||||
define("LANINS_062", "[b]Welcome to your new website![/b]
|
||||
e107 has installed successfully and is now ready to accept content.
|
||||
|
||||
Your administration section is [link=e107_admin/admin.php]located here[/link], click to go there now. You will have to login using the name and password you entered during the installation process.
|
||||
|
||||
[b]Support[/b]
|
||||
e107 Homepage: [link=http://e107.org]http://e107.org[/link], you will find the FAQ and documentation here.
|
||||
Forums: [link=http://e107.org/e107_plugins/forum/forum.php]http://e107.org/e107_plugins/forum/forum.php[/link]
|
||||
Plugin Developer Community: [link=http://www.e107coders.org]http://e107coders.org[/link]
|
||||
|
||||
[b]Downloads[/b]
|
||||
Plugins: [link=http://plugins.e107.org]http://plugins.e107.org[/link]
|
||||
Themes: [link=http://themes.e107.org]http://themes.e107.org[/link]
|
||||
|
||||
Thank you for trying e107, we hope it fulfils your website needs.
|
||||
(You can delete this message from your admin section.)");
|
||||
|
||||
// define("LANINS_063", "Welcome to e107");
|
||||
|
||||
@ -138,7 +122,7 @@ define("LANINS_083", "MySQL Reported Error:");
|
||||
define("LANINS_084", "The installer could not establish a connection to the database");
|
||||
define("LANINS_085", "The installer could not select database:");
|
||||
|
||||
define("LANINS_086", "Admin Username, Admin Password and Admin Email are [b]required[/b] fields. Please return to the last page and ensure the information is correctly entered.");
|
||||
define("LANINS_086", "Admin Username, Admin Password and Admin Email are required fields. Please return to the last page and ensure the information is correctly entered.");
|
||||
|
||||
// define("LANINS_087", "Misc");
|
||||
// define("LANINS_088", "Home");
|
||||
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_prefs.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define("LAN_PREF_1", "e107 Powered Website");
|
||||
define("LAN_PREF_2", "e107 Website System");
|
||||
define("LAN_PREF_3", "This site is powered by <a href="http://e107.org/" rel="external">e107</a>, which is released under the terms of the <a href="http://www.gnu.org/" rel="external">GNU</a> GPL License.");
|
||||
define("LAN_PREF_4", "censored");
|
||||
define("LAN_PREF_5", "Forums");
|
||||
|
||||
?>
|
@ -2,17 +2,12 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2015 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Language file - User signup
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_signup.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
define("PAGE_NAME", "Register");
|
||||
|
||||
@ -51,7 +46,7 @@ define("LAN_SIGNUP_9", "Unable to proceed.");
|
||||
//define("LAN_SIGNUP_10", "Yes");
|
||||
define("LAN_SIGNUP_11", ".");
|
||||
define("LAN_SIGNUP_12", "please keep your username and password written down in a safe place as if lost they cannot be retrieved.");
|
||||
define("LAN_SIGNUP_13", "You can now log in from the Login box, or from <a href='".e_BASE."login.php'>here</a>.");
|
||||
define("LAN_SIGNUP_13", "You can now log in from the Login box, or from [here].");
|
||||
define("LAN_SIGNUP_14", "here");
|
||||
define("LAN_SIGNUP_15", "Please contact the main site admin");
|
||||
define("LAN_SIGNUP_16", "if you require assistance.");
|
||||
@ -122,7 +117,7 @@ define("LAN_SIGNUP_81", "Username: "); // LAN_9
|
||||
define("LAN_SIGNUP_82", "the name that you use to login"); // LAN_10
|
||||
define("LAN_SIGNUP_83", "Password: "); // LAN_17
|
||||
define("LAN_SIGNUP_84", "Re-type Password: "); // LAN_111
|
||||
define("LAN_SIGNUP_85", "Usernames and passwords are <b>case-sensitive</b>."); // LAN_400
|
||||
define("LAN_SIGNUP_85", "Usernames and passwords are case-sensitive."); // LAN_400
|
||||
//define("LAN_SIGNUP_86", "Email Address: "); // LAN_112 = LAN_USER_60
|
||||
//define("LAN_SIGNUP_87", "Hide email address?: "); // LAN_113 = LAN_USER_83
|
||||
//define("LAN_SIGNUP_88", "This will prevent your email address from being displayed on site"); // LAN_114
|
||||
@ -157,24 +152,5 @@ define("LAN_SIGNUP_110", "Your full name");
|
||||
define("LAN_SIGNUP_111", "Enter a URL to your image or choose an existing avatar.");
|
||||
define("LAN_SIGNUP_112", "You are currently logged in as Main Admin.");
|
||||
|
||||
// BC for v1.x template
|
||||
// //TODO Move into signup.php and use existing definition. eg. define("LAN_7", LAN_SIGNUP_89);
|
||||
define("LAN_7", "Display Name: ");
|
||||
define("LAN_8", "the name that will be displayed on site");
|
||||
define("LAN_9", "Username: ");
|
||||
define("LAN_10", "the name that you use to login");
|
||||
define("LAN_17", "Password: ");
|
||||
define("LAN_109", "This site complies with The Children's Online Privacy Protection Act of 1998 (COPPA) and as such cannot accept registrations from users under the age of 13 without a written permission document from their parent or guardian. For more information you can read the legislation");
|
||||
define("LAN_111", "Re-type Password: ");
|
||||
define("LAN_112", "Email Address: ");
|
||||
define("LAN_113", "Hide email address?: ");
|
||||
define("LAN_120", "Signature: ");
|
||||
define("LAN_121", "Avatar: ");
|
||||
define("LAN_122", "Timezone:");
|
||||
define("LAN_123", "Register");
|
||||
define("LAN_308", "Real Name: ");
|
||||
define("LAN_309", "Please enter your details below.");
|
||||
define("LAN_400", "Usernames and passwords are <b>case-sensitive</b>.");
|
||||
define("LAN_410", "Enter code visible in the image");
|
||||
|
||||
?>
|
@ -74,8 +74,8 @@ define("LAN_USER_43", "delete photo"); // LAN_413
|
||||
define("LAN_USER_44", "Miscellaneous"); // LAN_410
|
||||
define("LAN_USER_45", "DESC"); // LAN_420
|
||||
define("LAN_USER_46", "ASC"); // LAN_421
|
||||
define("LAN_USER_47", "Go"); // LAN_422
|
||||
define("LAN_USER_48", "Error"); // LAN_20
|
||||
// define("LAN_USER_47", "Go"); // LAN_422
|
||||
// define("LAN_USER_48", "Error"); // LAN_20
|
||||
define("LAN_USER_49", "There is no information for that user as they are not registered at"); // LAN_137
|
||||
define("LAN_USER_50", "Member Profile"); // LAN_402
|
||||
define("LAN_USER_51", "That is not a valid user."); // LAN_400
|
||||
@ -117,7 +117,7 @@ define("LAN_USER_86", "Maximum avatar size is --WIDTH-- x --HEIGHT-- pixels");
|
||||
|
||||
|
||||
// Error messages for when user data is missing. Done this way so that other code can override the default messages
|
||||
// FIXME - do we need this?
|
||||
|
||||
// - [Berckoff] Used in validator_class for error handling, maybe moved to a more suitable place?
|
||||
if (!defined("USER_ERR_01")) { define("USER_ERR_01","Missing value"); }
|
||||
if (!defined("USER_ERR_02")) { define("USER_ERR_02","Unexpected value"); }
|
||||
@ -143,21 +143,6 @@ if (!defined("USER_ERR_21")) { define("USER_ERR_21","Image too high"); }
|
||||
if (!defined("USER_ERR_22")) { define("USER_ERR_22","Unspecified error"); }
|
||||
if (!defined("USER_ERR_23")) { define("USER_ERR_23","Disallowed value (exact match)"); }
|
||||
|
||||
// BC for v1.x template
|
||||
define("LAN_112", "Email Address");
|
||||
define("LAN_138", "Registered members: ");
|
||||
define("LAN_139", "Order: ");
|
||||
define("LAN_142", "Member");
|
||||
define("LAN_145", "Joined");
|
||||
define("LAN_146", "Visits to site since registration");
|
||||
define("LAN_147", "Chatbox posts");
|
||||
define("LAN_148", "Comments posted");
|
||||
define("LAN_149", "Forum posts");
|
||||
define("LAN_308", "Real Name");
|
||||
define("LAN_403", "Site Stats");
|
||||
define("LAN_404", "Last visit");
|
||||
//define("LAN_406", "Rating");//LAN_RATING
|
||||
define("LAN_419", "Show");
|
||||
define("LAN_425", "Send Private Message");
|
||||
|
||||
|
||||
?>
|
@ -112,6 +112,7 @@ define("LAN_USET_42", "Mismatch on validation key");
|
||||
define("LAN_USET_43", "Error updating user data");
|
||||
|
||||
// BC for v1.x template
|
||||
//TODO Move to usersettings.php with bcDefs() method.
|
||||
define("LAN_7", "Display Name: ");
|
||||
define("LAN_8", "the name displayed on site");
|
||||
define("LAN_9", "Username: ");
|
||||
|
@ -36,7 +36,7 @@ class auth_login extends alt_auth_base
|
||||
public $Available = FALSE; // Flag indicates whether DB connection available
|
||||
private $filter; // Filter for eDirectory search
|
||||
private $copyAttribs; // Any attributes which are to be copied on successful login
|
||||
private $copyMethods; // Methods which are to be used to copy attributes
|
||||
public $copyMethods; // Methods which are to be used to copy attributes
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ $contact_shortcodes = e107::getScBatch('contact');
|
||||
$text = $tp->parseTemplate($head. $template . $foot, true, $contact_shortcodes);
|
||||
|
||||
|
||||
$ns->tablerender("Contact Us", $text, 'contact-menu');
|
||||
$ns->tablerender(LANCONTACT_00, $text, 'contact-menu');
|
||||
|
||||
|
||||
?>
|
@ -2031,7 +2031,7 @@ $columnInfo = array(
|
||||
$order_options = array(
|
||||
"download_id" => "Id No.",
|
||||
"download_datestamp" => LAN_DATE,
|
||||
"download_requested" => ADLAN_24,
|
||||
"download_requested" => LAN_PLUGIN_DOWNLOAD_NAME,
|
||||
"download_name" => DOWLAN_59,
|
||||
"download_author" => DOWLAN_15
|
||||
);
|
||||
|
@ -64,7 +64,7 @@ define("LAN_dl_51", "Reporting download: ");
|
||||
//define("LAN_dl_52", "Guest");//LAN_GUEST
|
||||
define("LAN_dl_53", "Click to view download");
|
||||
define("LAN_dl_54", "An administrator will be made aware of this download, please leave a message if you feel it necessary.");
|
||||
define("LAN_dl_55", "<b>Do not</b> use this form to contact the admin for any other reason.");
|
||||
define("LAN_dl_55", "Do not use this form to contact the admin for any other reason.");
|
||||
// define("LAN_dl_56", "Report broken download"); already defined above.
|
||||
define("LAN_dl_57", "reported by");
|
||||
define("LAN_dl_58", "The following download has been reported as broken from site");
|
||||
@ -93,6 +93,6 @@ define("LAN_dl_75", "no image available ");
|
||||
//define("LAN_dl_76", "Go to page"); //FIXME Use Generic
|
||||
define("LAN_dl_77", "Downloads"); // Intentional duplicate - some languages need it to be different. This is for number of downloads
|
||||
|
||||
define('LAN_dl_78', "That download has been disabled or discontinued. Please check in the [link=--LINK--]downloads area[/link] for a more recent version.");
|
||||
define('LAN_dl_78', "That download has been disabled or discontinued. Please check in the [downloads area] for a more recent version.");
|
||||
|
||||
?>
|
||||
|
@ -138,10 +138,13 @@ if ($type == "file")
|
||||
|
||||
if (check_class($row['download_category_class']) && check_class($row['download_class']))
|
||||
{
|
||||
if ($row['download_active'] == 0)
|
||||
{ // Inactive download - don't allow
|
||||
if ($row['download_active'] == 0) // Inactive download - don't allow
|
||||
{
|
||||
require_once(HEADERF);
|
||||
$ns->tablerender(LAN_ERROR, "<div style='text-align:center'>".str_replace('--LINK--',e_HTTP.'download.php',LAN_dl_78).'</div>');
|
||||
$search = array("[","]");
|
||||
$replace = array("<a href='".e_HTTP."download.php'>", "</a>");
|
||||
|
||||
$ns->tablerender(LAN_ERROR, "<div class='alert alert-warning' style='text-align:center'>".str_replace($search, $replace, LAN_dl_78).'</div>');
|
||||
require_once(FOOTERF);
|
||||
exit();
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
//TODO add checks so that it's only loaded when needed.
|
||||
e107::css('core','camera/css/camera.css','jquery');
|
||||
//TODO add checks so that it's only loaded when needed.
|
||||
|
||||
if(USER_AREA)
|
||||
{
|
||||
e107::css('core','camera/css/camera.css','jquery');
|
||||
}
|
||||
?>
|
@ -2,6 +2,7 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
e107::lan('forum', "front", true);
|
||||
// e107::lan('forum', 'English_front');
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,8 @@ if (!defined('e107_INIT')) { exit; }
|
||||
// Usage: sublink_type[x]['title'].
|
||||
// x should be the same as the plugin folder.
|
||||
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php'); // FIXME needs changing after forum lan rewrite
|
||||
e107::lan('forum', "admin", true);
|
||||
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php'); // FIXME needs changing after forum lan rewrite
|
||||
|
||||
$sublink_type['forum']['title'] = FORLAN_155; // "News Categories"; // FIXME needs changing after forum lan rewrite
|
||||
$sublink_type['forum']['table'] = 'forum';
|
||||
|
@ -101,7 +101,7 @@ class list_forum
|
||||
$LASTPOST = "";
|
||||
if($lp_name)
|
||||
{
|
||||
$LASTPOST = "<a href='".e_BASE."user.php?id.{$thread_lastuser}'>$lp_name</a>";
|
||||
$LASTPOST = "<a href='".e_HTTP."user.php ?id.{$thread_lastuser}'>$lp_name</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -130,7 +130,7 @@ class list_forum
|
||||
$lnk = ($parent_id ? $thread_id.".post" : $thread_id);
|
||||
|
||||
$record['heading'] = "<a href='".$path."forum_viewtopic.php?$lnk'>".$rowheading."</a>";
|
||||
$record['author'] = ($this->parent->settings['author'] ? ($thread_anon ? $thread_user : "<a href='".e_BASE."user.php?id.$thread_user'>$user_name</a>") : "");
|
||||
$record['author'] = ($this->parent->settings['author'] ? ($thread_anon ? $thread_user : "<a href='".e_HTTP."user.php ?id.$thread_user'>$user_name</a>") : "");
|
||||
$record['category'] = ($this->parent->settings['category'] ? "<a href='".$path."forum_viewforum.php?$forum_id'>$forum_name</a>" : "");
|
||||
$record['date'] = ($this->parent->settings['date'] ? $this->parent->getListDate($thread_datestamp) : "");
|
||||
$record['icon'] = $bullet;
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/'.e_LANGUAGE.'_search.php');
|
||||
e107::lan('forum', "search", true);
|
||||
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/'.e_LANGUAGE.'_search.php');
|
||||
|
||||
$search_info[] = array(
|
||||
'sfile' => e_PLUGIN.'forum/search/search_parser.php',
|
||||
|
@ -23,7 +23,7 @@ if (!$e107->isInstalled('forum'))
|
||||
header('Location: '.SITEURL);
|
||||
exit;
|
||||
}
|
||||
|
||||
e107::lan('forum', "front", true);
|
||||
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); // using English_front.php now
|
||||
|
||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||
@ -79,7 +79,7 @@ $rules_text = forum_rules('check');
|
||||
$fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_FORUM_0010."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_FORUM_0011."</a>";
|
||||
if(USER)
|
||||
{
|
||||
$fVars->USERINFO .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_FORUM_0012."</a> | <a href='".e_BASE."usersettings.php'>".LAN_FORUM_0013."</a> | <a href='".e_BASE."user.php?id.".USERID."'>".LAN_FORUM_0014."</a>";
|
||||
$fVars->USERINFO .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_FORUM_0012."</a> | <a href='".e_BASE."usersettings.php'>".LAN_FORUM_0013."</a> | <a href='".e_HTTP."user.php ?id.".USERID."'>".LAN_FORUM_0014."</a>";
|
||||
if($forum->prefs->get('attach') && (check_class($pref['upload_class']) || getperms('0')))
|
||||
{
|
||||
$fVars->USERINFO .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".LAN_FORUM_0015."</a>";
|
||||
@ -126,7 +126,7 @@ if(!defined('e_TRACKING_DISABLED'))
|
||||
{
|
||||
list($oid, $oname) = explode(".", $uinfo, 2);
|
||||
$c ++;
|
||||
$fVars->USERLIST .= "<a href='".e_BASE."user.php?id.$oid'>$oname</a>".($c == MEMBERS_ONLINE ? "." :", ");
|
||||
$fVars->USERLIST .= "<a href='".e_HTTP."user.php ?id.$oid'>$oname</a>".($c == MEMBERS_ONLINE ? "." :", ");
|
||||
}
|
||||
}
|
||||
$fVars->USERLIST .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_FORUM_0037."</a> ".LAN_FORUM_0038;
|
||||
@ -231,7 +231,7 @@ if (USER && vartrue($forum->prefs->get('track')) && e_QUERY != 'track')
|
||||
|
||||
$fVars->FORUMINFO =
|
||||
str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")
|
||||
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_BASE."user.php?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
|
||||
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_HTTP."user.php ?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
|
||||
|
||||
if (!isset($FORUM_MAIN_START))
|
||||
{
|
||||
|
@ -17,8 +17,10 @@ if (!getperms('P'))
|
||||
}
|
||||
|
||||
|
||||
e107::includeLan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/English_admin.php');
|
||||
e107::lan('forum','', 'front');
|
||||
e107::lan('forum', 'admin');
|
||||
e107::lan('forum','front', true);
|
||||
//e107::includeLan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/English_admin.php');
|
||||
//e107::lan('forum','', 'front');
|
||||
|
||||
$legacy = false;
|
||||
|
||||
@ -2507,7 +2509,7 @@ class forumAdmin
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".FORLAN_171.":</td>
|
||||
<td><a href='".e_PLUGIN."forum/forum_viewtopic.php?".$row['gen_intdata'].".post' rel='external'>#".$row['gen_intdata']."</a></td>
|
||||
<td><a href='".e_PLUGIN_ABS."forum/forum_viewtopic.php?".$row['gen_intdata'].".post' rel='external'>#".$row['gen_intdata']."</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".FORLAN_173.":</td>
|
||||
@ -2515,7 +2517,7 @@ class forumAdmin
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".FORLAN_174.":</td>
|
||||
<td><a href='".e_BASE."user.php?id.".$user['user_id']."'>".$user['user_name']."</a>
|
||||
<td><a href='".e107::getUrl()->create('user/profile/view', $user)."'>".$user['user_name']."</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -22,7 +22,8 @@ $tp = e107::getParser();
|
||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||
$forum = new e107forum;
|
||||
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_conf.php');
|
||||
e107::lan('forum', 'admin');
|
||||
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_conf.php');
|
||||
|
||||
$e_sub_cat = 'forum';
|
||||
|
||||
|
@ -31,7 +31,8 @@ if (!$e107->isInstalled('forum'))
|
||||
exit;
|
||||
}
|
||||
|
||||
e107::lan('forum','English_front');
|
||||
//e107::lan('forum','English_front');
|
||||
e107::lan('forum', "front", true);
|
||||
e107::css('forum','forum.css');
|
||||
|
||||
|
||||
|
@ -64,23 +64,39 @@ class forum_setup
|
||||
{
|
||||
e107::getDb()->gen("ALTER TABLE `#forum_thread` DROP `thread_sef` ");
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function upgrade_pre($var)
|
||||
{
|
||||
//Redirect upgrade to customized upgrade routine
|
||||
|
||||
e107::getRedirect()->redirect(e_PLUGIN_ABS.'forum/forum_update.php');
|
||||
|
||||
$sql = e107::getDb();
|
||||
|
||||
if(!$sql->isTable('forum_t')) // no table, so run a default plugin install procedure.
|
||||
{
|
||||
return false;
|
||||
// e107::getSingleton('e107plugin')->refresh('forum');
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::getRedirect()->go(e_PLUGIN_ABS.'forum/forum_update.php'); //Redirect upgrade to customized upgrade routine
|
||||
}
|
||||
|
||||
//header('Location: '.e_PLUGIN.'forum/forum_update.php');
|
||||
}
|
||||
|
||||
// After Automatic Upgrade Routine has completed.. run this. ;-)
|
||||
function upgrade_post($var)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$mes->addSuccess("Migration is required. Please click 'Continue'.<br /><a class='btn btn-primary' href='".e_PLUGIN."forum/forum_update.php'>Continue</a>");
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
if($sql->isEmpty('forum_thread') === true && $sql->isTable('forum_t') && $sql->isEmpty('forum_t') === false)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$mes->addSuccess("Migration is required. Please click 'Continue'.<br /><a class='btn btn-primary' href='".e_PLUGIN."forum/forum_update.php'>Continue</a>");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,9 @@ class forumStats
|
||||
|
||||
function __construct()
|
||||
{
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
|
||||
e107::lan('forum','front');
|
||||
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
|
||||
//e107::lan('forum','front');
|
||||
e107::lan('forum', "front", true);
|
||||
e107::css('forum', 'forum.css');
|
||||
}
|
||||
|
||||
@ -263,7 +264,7 @@ class forumStats
|
||||
{
|
||||
if($ma['user_name'])
|
||||
{
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>{$ma['user_name']}</a>"; //TODO SEf Url .
|
||||
$uinfo = "<a href='".e_HTTP."user.php ?id.{$ma['user_id']}'>{$ma['user_name']}</a>"; //TODO SEf Url .
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -309,7 +310,7 @@ class forumStats
|
||||
{
|
||||
if($ma['user_name'])
|
||||
{
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>".$ma['user_name']."</a>"; //TODO SEf Url .
|
||||
$uinfo = "<a href='".e_HTTP."user.php ?id.{$ma['user_id']}'>".$ma['user_name']."</a>"; //TODO SEf Url .
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -359,7 +360,7 @@ class forumStats
|
||||
//TODO SEf Url .
|
||||
$text_3 .= "<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.".$ma['user_id']."'>".$ma['user_name']."</a></td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e107::getUrl()->create('user/profile/view', $ma)."'>".$ma['user_name']."</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%;' class='forumheader3'>".$this->showBar($percentage)."
|
||||
@ -397,7 +398,7 @@ class forumStats
|
||||
|
||||
$text_4 .= "<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.$user_id'>$user_name</a></td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e107::getUrl()->create('user/profile/view', $ma)."'>$user_name</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".$this->showBar($percentage)."</td>
|
||||
@ -431,7 +432,7 @@ class forumStats
|
||||
$text_5 .= "
|
||||
<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.$user_id'>$user_name</a></td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e107::getUrl()->create('user/profile/view', $ma)."'>$user_name</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".$this->showBar($percentage)."</td>
|
||||
|
@ -250,15 +250,17 @@ function step3()
|
||||
|
||||
|
||||
$fieldList = array(
|
||||
'plugin_forum_posts' => EUF_INTEGER,
|
||||
'plugin_forum_viewed' => EUF_TEXTAREA
|
||||
'plugin_forum_posts' => 'integer',
|
||||
'plugin_forum_viewed' => 'radio'
|
||||
);
|
||||
|
||||
$failed = false;
|
||||
$ext = e107::getUserExt();
|
||||
|
||||
foreach ($fieldList as $fieldName => $fieldType)
|
||||
{
|
||||
|
||||
$result = e107::getUserExt()->user_extended_add_system($fieldName, $fieldType);
|
||||
$result = $ext->user_extended_add_system($fieldName, $fieldType);
|
||||
|
||||
if ($result === true)
|
||||
{
|
||||
@ -267,6 +269,7 @@ function step3()
|
||||
else
|
||||
{
|
||||
$mes -> addError('Creating extended user field user_' . $fieldName);
|
||||
$mes->addDebug(print_a($result,true));
|
||||
$failed = true;
|
||||
}
|
||||
}
|
||||
@ -550,7 +553,7 @@ function renderProgress($caption, $step)
|
||||
<div class="row-fluid">
|
||||
<div class="span9 well">
|
||||
<div class="progress progress-success progress-striped active" id="progressouter">
|
||||
<div class="bar" id="progress"></div>
|
||||
<div class="progress-bar bar" role="progressbar" id="progress"></div>
|
||||
</div>
|
||||
|
||||
<a id="'.$thisStep.'" data-loading-text="Please wait..." data-progress="' . e_SELF . '" data-progress-target="progress" data-progress-mode="'.$step.'" data-progress-show="'.$nextStep.'" data-progress-hide="'.$thisStep.'" class="btn btn-primary e-progress" >'.$caption.'</a>
|
||||
@ -1355,12 +1358,11 @@ class forumUpgrade
|
||||
|
||||
function setNewVersion()
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
$sql = e107::getDb();
|
||||
|
||||
$sql -> update('plugin', "plugin_version = '{$this->newVersion}' WHERE plugin_name='Forum'");
|
||||
$pref['plug_installed']['forum'] = $this -> newVersion;
|
||||
save_prefs();
|
||||
e107::getConfig()->setPref('plug_installed/forum', $this->newVersion)->save(false,true,false);
|
||||
|
||||
return "Forum Version updated to version: {$this->newVersion} <br />";
|
||||
}
|
||||
|
||||
@ -1740,14 +1742,17 @@ function forum_update_adminmenu()
|
||||
$var[14]['text'] = 'Reset';
|
||||
$var[14]['link'] = e_SELF . "?reset";
|
||||
|
||||
$var[15]['text'] = 'Reset to 6';
|
||||
$var[15]['link'] = e_SELF . "?step=6&reset=6";
|
||||
$var[15]['text'] = 'Reset to 3';
|
||||
$var[15]['link'] = e_SELF . "?step=3&reset=3";
|
||||
|
||||
$var[16]['text'] = 'Reset to 7';
|
||||
$var[16]['link'] = e_SELF . "?step=7&reset=7";
|
||||
$var[16]['text'] = 'Reset to 6';
|
||||
$var[16]['link'] = e_SELF . "?step=6&reset=6";
|
||||
|
||||
$var[17]['text'] = 'Reset to 7';
|
||||
$var[17]['link'] = e_SELF . "?step=7&reset=7";
|
||||
|
||||
$var[17]['text'] = 'Reset to 10';
|
||||
$var[17]['link'] = e_SELF . "?step=10&reset=10";
|
||||
$var[18]['text'] = 'Reset to 10';
|
||||
$var[18]['link'] = e_SELF . "?step=10&reset=10";
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ if (!$e107->isInstalled('forum'))
|
||||
header('Location: '.SITEURL);
|
||||
exit;
|
||||
}
|
||||
e107::lan('forum', "front", true);
|
||||
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php'); // now uses English_front.php
|
||||
define('NAVIGATION_ACTIVE','forum');
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user