diff --git a/class2.php b/class2.php index 13a94df84..b2c7248f3 100644 --- a/class2.php +++ b/class2.php @@ -823,6 +823,7 @@ if (!function_exists('checkvalidtheme')) { // arg1 = theme to check //global $ADMIN_DIRECTORY, $tp, $e107; + global $sql; $e107 = e107::getInstance(); $tp = e107::getParser(); $ADMIN_DIRECTORY = $e107->getFolder('admin'); @@ -846,15 +847,27 @@ if (!function_exists('checkvalidtheme')) define('PREVIEWTHEMENAME', $themeArray[$id]); define('THEME', e_THEME.$themeArray[$id].'/'); define('THEME_ABS', e_THEME_ABS.$themeArray[$id].'/'); - + + $legacy = (file_exists( e_THEME_ABS.$themeArray[$id].'/theme.xml') === false); + + define('THEME_LEGACY',$legacy); return; } + + $sql->db_Mark_time("Theme Check"); + if (@fopen(e_THEME.$theme_check.'/theme.php', 'r')) + // if (is_readable(e_THEME.$theme_check.'/theme.php')) { define('THEME', e_THEME.$theme_check.'/'); define('THEME_ABS', e_THEME_ABS.$theme_check.'/'); + + $legacy = (file_exists(e_THEME.$theme_check.'/theme.xml') === false); + + define('THEME_LEGACY',$legacy); + $e107->site_theme = $theme_check; } else @@ -889,6 +902,8 @@ if (!function_exists('checkvalidtheme')) } } + $sql->db_Mark_time("Theme Check End"); + $themes_dir = $e107->getFolder('themes'); $e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/"; } @@ -916,6 +931,8 @@ if (!class_exists('e107table', false)) private $adminThemeClass = ''; public $frontend = null; private $uniqueId = null; + private $content = array(); + private $contentTypes = array('header','footer','text','title','image', 'list'); function __construct() @@ -944,6 +961,23 @@ if (!class_exists('e107table', false)) } + /** + * Set Advanced Menu content (beyond just $caption and $text) + * @param string $type header|footer|text|title|image + * @param string $val + */ + public function setContent($type, $val) + { + if(!in_array($type,$this->contentTypes)) + { + return false; + } + + $this->content[$type] = (string) $val; + } + + + /** * @param $caption string caption text * @param $text string @@ -1017,17 +1051,27 @@ if (!class_exists('e107table', false)) { $thm = new $this->themeClass(); } + + $options = $this->content; + + $options['uniqueId'] = $this->uniqueId; + $options['menuArea'] = $this->eMenuArea; + $options['menuCount'] = $this->eMenuCount; + $options['menuTotal'] = varset($this->eMenuTotal[$this->eMenuArea]); + $options['setStyle'] = $this->eSetStyle; + if(is_object(vartrue($thm))) { - $thm->tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle)); + $thm->tablestyle($caption, $text, $mode, $options); } else { - tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle)); + tablestyle($caption, $text, $mode, $options); } $this->uniqueId = null; + $this->content = array(); } @@ -1869,6 +1913,7 @@ function init_session() define('USERIMAGE', $user->get('user_image')); define('USERPHOTO', $user->get('user_sess')); define('USERJOINED', $user->get('user_join')); + define('USERCURRENTVISIT', $user->get('user_currentvisit')); define('USERVISITS', $user->get('user_visits')); define('USERSIGNATURE', $user->get('user_signature')); diff --git a/e107_admin/admin.php b/e107_admin/admin.php index ca4fb2a44..09003add2 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -303,7 +303,7 @@ class admin_start $lans = array('x'=>$link, 'y'=>LAN_PLUGIN); $message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans); - $message .= " ".$tp->toGlyph('fa-cloud-download').""; + $message .= " ".$tp->toGlyph('fa-arrow-circle-o-down').""; e107::getMessage()->addInfo($message); @@ -350,7 +350,7 @@ class admin_start $caption = LAN_DOWNLOAD.": ".$versions[$folder]['name']." ".$versions[$folder]['version']; $message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans); - $message .= " ".$tp->toGlyph('fa-cloud-download').""; + $message .= " ".$tp->toGlyph('fa-arrow-circle-o-down').""; e107::getMessage()->addInfo($message); @@ -507,7 +507,7 @@ class admin_start $frm = e107::getForm(); $text = $frm->open('deprecatedFiles', 'post'); - $text .= "The following old files can be safely deleted from your system: "; + $text .= ADLAN_186; $text .= ""; $text .= $frm->button('delete-deprecated',LAN_DELETE,'delete'); @@ -568,7 +568,7 @@ class admin_start if (count($this->allowed_types) == 0) { $this->allowed_types = array('zip' => 1, 'gz' => 1, 'jpg' => 1, 'png' => 1, 'gif' => 1, 'pdf'=>1); - $mes->addInfo("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types))); + $mes->addDebug("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types))); } } @@ -759,4 +759,4 @@ function log_request() require_once("footer.php"); -?> \ No newline at end of file +?> diff --git a/e107_admin/comment.php b/e107_admin/comment.php index 5e415b471..101a6cb08 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -46,7 +46,7 @@ class comments_admin extends e_admin_dispatcher 'main/edit' => 'main/list' ); - protected $menuTitle = 'Comments'; + protected $menuTitle = LAN_COMMENTMAN; } class comments_admin_ui extends e_admin_ui @@ -73,15 +73,15 @@ class comments_admin_ui extends e_admin_ui 'comment_type' => array('title'=> LAN_TYPE, 'type' => 'method', 'width' => '10%', 'filter'=>TRUE), - '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' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'size=xxlarge'), // Display name + 'comment_item_id' => array('title'=> LAN_ITEM." ".LAN_ID, 'type' => 'text', 'readonly'=>2, 'data'=>'int', 'width' => '5%'), + 'comment_subject' => array('title'=> LAN_SUBJECT, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'writeParms'=>array('size'=>'xxlarge')), // Display name + 'comment_comment' => array('title'=> LAN_COMMENTS, 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'size=xxlarge'), // 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' => 'text', 'width' => 'auto', 'readParms'=>'idField=comment_author_id&link=1', 'noedit' => true, 'forceSave' => true), // User name - 'u.user_name' => array('title'=> "System user", 'type' => 'user', 'width' => 'auto', 'readParms'=>'idField=comment_author_id&link=1', 'noedit' => true), // User name + 'comment_author_name' => array('title'=> LAN_USER, 'type' => 'text', 'width' => 'auto', 'readParms'=>'idField=comment_author_id&link=1', 'noedit' => true, 'forceSave' => true), // User name + 'u.user_name' => array('title'=> LAN_SYSTEM_USER, 'type' => 'user', 'width' => 'auto', 'readParms'=>'idField=comment_author_id&link=1', 'noedit' => true), // User name 'comment_datestamp' => array('title'=> LAN_DATESTAMP, 'type' => 'datestamp', 'width' => 'auto'), // User date 'comment_ip' => array('title'=> LAN_IP, 'type' => 'ip', 'width' => '10%', 'thclass' => 'center' ), // Real name (no real vetting) - 'comment_lock' => array('title'=> "Lock", 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'), + 'comment_lock' => array('title'=> LAN_LOCK, 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center') ); //required (but should be optional) - default column user prefs @@ -91,7 +91,7 @@ class comments_admin_ui extends e_admin_ui // optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName); protected $prefs = array( - 'comments_engine' => array('title'=>"Engine", 'type'=>'dropdown', 'writeParms'=>array()), + 'comments_engine' => array('title'=>LAN_ENGINE, 'type'=>'dropdown', 'writeParms'=>array()), 'comments_disabled' => array('title'=>PRFLAN_161, 'type'=>'boolean', 'writeParms'=>'inverse=1'), // Same as 'writeParms'=>'reverse=1&enabled=LAN_DISABLED&disabled=LAN_ENABLED' 'anon_post' => array('title'=>PRFLAN_32, 'type'=>'boolean'), 'comments_icon' => array('title'=>PRFLAN_89, 'type'=>'boolean'), @@ -108,7 +108,7 @@ class comments_admin_ui extends e_admin_ui if($engine != 'e107') // Hide all other prefs. { $this->prefs = array( - 'comments_engine' => array('title'=>"Engine", 'type'=>'dropdown', 'writeParms'=>array()), + 'comments_engine' => array('title'=>LAN_ENGINE, 'type'=>'dropdown', 'writeParms'=>array()), 'comments_disabled' => array('title'=>PRFLAN_161, 'type'=>'boolean', 'writeParms'=>'inverse=1'), ); @@ -312,4 +312,4 @@ else -?> \ No newline at end of file +?> diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 116d6e02e..4d8066a06 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -134,7 +134,7 @@ class page_admin_form_ui extends e_admin_form_ui // BOOKS & CHAPTERS class page_chapters_ui extends e_admin_ui { - protected $pluginTitle = 'Page'; + protected $pluginTitle = CUSLAN_59; protected $pluginName = 'core'; protected $table = "page_chapters"; protected $pid = "chapter_id"; @@ -808,4 +808,4 @@ require_once(e_ADMIN.'footer.php'); -?> \ No newline at end of file +?> diff --git a/e107_admin/cron.php b/e107_admin/cron.php index d8bc114de..b21be360b 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -69,7 +69,7 @@ class cron_admin_ui extends e_admin_ui 'cron_tab' => array('title'=> LAN_CRON_3, 'type' => 'method', 'width' => 'auto'), // Display name 'cron_lastrun' => array('title'=> LAN_CRON_4, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2), 'cron_active' => array('title'=> LAN_ACTIVE, 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'), - 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center') + 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'right') ); @@ -566,13 +566,22 @@ class cron_admin_form_ui extends e_admin_form_ui // Override the default Options field. function options($parms, $value, $id, $attributes) { - + $att = $attributes; if($attributes['mode'] == 'read') { - $text = "
"; - $text .= $this->renderValue('options',$value,'',$id); + $func = $this->getController()->getFieldVar('cron_function'); + // + if(substr($func,0,7) === '_system') + { + $att['readParms'] = array('disabled'=>'disabled'); + } + + $text = "
"; + $text .= $this->renderValue('options',$value,$att,$id); $text .= $this->submit_image('cron_execute['.$id.']', 1, 'execute', LAN_RUN); $text .= "
"; + + return $text; } } diff --git a/e107_admin/links.php b/e107_admin/links.php index 39f73220c..07f062d0f 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -2,14 +2,12 @@ /* * e107 website system * - * Copyright (C) 2008-2012 e107 Inc (e107.org) + * Copyright (C) 2008-2017 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * Site navigation administration * - * $URL$ - * $Id$ */ /** @@ -77,13 +75,13 @@ class links_admin_ui extends e_admin_ui public $sublink_data = null; protected $fields = array( - 'checkboxes' => array('title'=> '', 'width' => '3%','forced' => true, 'thclass' => 'center first','class' => 'center first'), - 'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass' => 'center', 'class'=>'center', 'writeParms'=>'glyphs=1'), - 'link_id' => array('title'=> LAN_ID, 'type'=>'method','readParms'=>'','noedit'=>TRUE), - 'link_name' => array('title'=> LCLAN_15, 'width'=>'auto','type'=>'text', 'inline'=>true, 'required' =>false, 'validate' => false), // not required as only an icon may be used. - 'link_category' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto'), - - 'link_parent' => array('title'=> LCLAN_104, 'type' => 'method', 'data'=>'int', 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first'), + 'checkboxes' => array('title'=> '', 'width' => '3%', 'forced' => true, 'thclass'=>'center first', 'class'=>'center first'), + 'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass'=>'center', 'class'=>'center', 'writeParms'=>'glyphs=1'), + 'link_id' => array('title'=> LAN_ID, 'type'=>'method', 'readParms'=>'', 'noedit'=>TRUE), + 'link_name' => array('title'=> LAN_NAME, 'type'=>'text', 'inline'=>true, 'required'=>false, 'validate'=>false, 'width'=>'auto'), // not required as only an icon may be used. + 'link_category' => array('title'=> LAN_TEMPLATE, 'type'=>'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width'=>'auto'), + + 'link_parent' => array('title'=> LAN_PARENT, 'type' => 'method', 'data'=>'int', 'width'=>'auto', 'batch'=>true, 'filter'=>true, 'thclass'=>'left first'), 'link_url' => array('title'=> LAN_URL, 'width'=>'auto', 'type'=>'method', 'inline'=>true, 'required'=>true,'validate' => true, 'writeParms'=>'size=xxlarge'), 'link_sefurl' => array('title'=> LAN_SEFURL, 'type' => 'method', 'inline'=>false, 'width' => 'auto', 'help'=>LCLAN_107), 'link_class' => array('title'=> LAN_USERCLASS, 'type' => 'userclass','inline'=>true, 'writeParms' => 'classlist=public,guest,nobody,member,classes,admin,main', 'batch'=>true, 'filter'=>true, 'width' => 'auto'), diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 1d5e78cb9..639ae5cd7 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -16,15 +16,18 @@ if(isset($_GET['configure'])) define("USER_AREA", true); //Switch to desired layout define('THEME_LAYOUT', $_GET['configure']); - define('e_DEBUG', false); - define('E107_DEBUG_LEVEL', 0); - if(function_exists('xdebug_disable')) - { - xdebug_disable(); - } - @ini_set('display_errors', 0); - error_reporting(0); + if(empty($_GET['debug'])) + { + define('e_DEBUG', false); + define('E107_DEBUG_LEVEL', 0); + if(function_exists('xdebug_disable')) + { + xdebug_disable(); + } + @ini_set('display_errors', 0); + error_reporting(0); + } define('e_MENUMANAGER_ACTIVE', true); } @@ -39,9 +42,9 @@ require_once("../class2.php"); if(e_MENUMANAGER_ACTIVE === false ) { - if(e_DEBUG_MENUMANAGER === true) + if(!deftrue("e_DEBUG_MENUMANAGER")) { - e107::css('inline', ' + e107::getJs()->inlineCSS(' body { overflow:hidden } @@ -73,7 +76,7 @@ if(e_MENUMANAGER_ACTIVE === false ) } - e107::css('inline'," + e107::getJs()->inlineCSS(" .menu-manager-items { padding-right:15px} .menu-manager-items div.item { padding:5px; margin:5px 0; border:1px solid rgba(255,255,255,0.3); border-radius:3px; cursor: move } @@ -108,7 +111,7 @@ if(e_MENUMANAGER_ACTIVE === false ) @media all and (min-height: 1000px) { - .menu-selector { height:550px } + .menu-selector { height:500px } } @media all and (max-height: 800px) { @@ -210,9 +213,9 @@ $JSMODAL = <<footerInline( $JSMODAL ); - e107::js('inline', " + e107::getJs()->footerInline(" $(function() { // Visibility/Instance Options etc. @@ -303,7 +306,7 @@ TEMPL; "); - e107::css('inline'," .column { width:100%; padding-bottom: 100px; } + e107::getJs()->inlineCSS(" .column { width:100%; padding-bottom: 100px; } #core-menumanager-main th {color: silver; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:14px; font-weight: bold; line-height:24px; background-color:#2F2F2F } @@ -523,7 +526,7 @@ TEMPL; // e107::js('footer',"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"); // e107::css('url', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css"); - e107::js('footer-inline',' + e107::getJs()->footerInline(' $(function() { // post the form back to this script. @@ -626,7 +629,7 @@ TEMPL; else { - +/* e107::js('footer-inline', " @@ -667,7 +670,7 @@ else "); - +*/ @@ -701,7 +704,7 @@ if($_SERVER['E_DEV_MENU'] == 'true') function e_help() { - if(e_DEBUG_MENUMANAGER !== true) + if(deftrue("e_DEBUG_MENUMANAGER")) { return null; } @@ -709,19 +712,7 @@ if($_SERVER['E_DEV_MENU'] == 'true') return e_menu_layout::menuSelector(); - - - - - - - - - - - - - +/* $text = '
"; - return array('caption'=>MENLAN_57,'text'=>$text); + return array('caption'=>MENLAN_57,'text'=>$text);*/ } //} diff --git a/e107_admin/meta.php b/e107_admin/meta.php index 25c53a9f8..1b5a5ea61 100644 --- a/e107_admin/meta.php +++ b/e107_admin/meta.php @@ -94,12 +94,12 @@ $text = " ".LAN_COPYRIGHT." - + ".LAN_AUTHOR." - + diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index bcd48fa7d..614d8bab2 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -857,6 +857,7 @@ class news_admin_ui extends e_admin_ui $temp['news_default_template'] = preg_replace('#[^\w\pL\-]#u', '', $_POST['news_default_template']); $temp['news_list_limit'] = intval($_POST['news_list_limit']); $temp['news_list_templates'] = e107::getParser()->toDB($_POST['news_list_templates']); + $temp['news_cache_timeout'] = intval($_POST['news_cache_timeout']); e107::getConfig()->updatePref($temp); @@ -1141,7 +1142,20 @@ class news_admin_ui extends e_admin_ui ".$frm->textarea('news_ping_services', $pingVal, 4, 100, $pingOpt)."
".LAN_NEWS_89."
".LAN_NEWS_90."
- + "; + + // TODO LAN + $tab1 .= " + + News Cache Timeout + + ".$frm->number('news_cache_timeout',varset($pref['news_cache_timeout'],0), 6)." +
Time in minutes. Applies only when system cache is enabled.
+ + "; + + + $tab1 .= " ".NWSLAN_86." diff --git a/e107_admin/phpinfo.php b/e107_admin/phpinfo.php index 97685cf9d..b8326c945 100644 --- a/e107_admin/phpinfo.php +++ b/e107_admin/phpinfo.php @@ -60,10 +60,12 @@ $security_risks = array( $mes->addWarning("".$risk.": ".$diz); } } - + + $sessionSaveMethod = ini_get('session.save_handler'); + if($sessionSavePath = ini_get('session.save_path')) { - if(!is_writable($sessionSavePath)) + if(!is_writable($sessionSavePath) && $sessionSaveMethod === 'files') { $mes->addError("session.save_path is not writable! That can cause major issues with your site."); } diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index fd65999c6..d9fe161de 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -1827,10 +1827,10 @@ $text .= ''; $text .= '' . LAN_LIBRARY_MANAGER_13 . ''; $text .= '' . LAN_LIBRARY_MANAGER_21 . ''; $text .= '' . LAN_LIBRARY_MANAGER_29 . ''; -$text .= '' . LAN_LIBRARY_MANAGER_14 . ''; -$text .= '' . LAN_LIBRARY_MANAGER_18 . ''; -$text .= '' . LAN_LIBRARY_MANAGER_19 . ''; -$text .= ''; +$text .= '' . LAN_VERSION . ''; +$text .= '' . LAN_STATUS . ''; +$text .= '' . LAN_MESSAGE . ''; +$text .= '' . LAN_MOREINFO . ''; $text .= ''; $text .= ''; $text .= ''; @@ -1864,7 +1864,7 @@ foreach($libraries as $machineName => $library) if(empty($libraries)) { $text .= ''; - $text .= '' . LAN_LIBRARY_MANAGER_26 . ''; + $text .= '' . LAN_NOT_FOUND . ''; $text .= ''; } @@ -2049,7 +2049,7 @@ function libraryGetHomepage($details) $href = $details['vendor_url']; $title = $details['name']; - return '' . LAN_LIBRARY_MANAGER_15 . ''; + return '' . LAN_WEBSITE . ''; } /** @@ -2065,7 +2065,7 @@ function libraryGetDownload($details) $href = $details['download_url']; $title = $details['name']; - return '' . LAN_LIBRARY_MANAGER_16 . ''; + return '' . LAN_DOWNLOAD . ''; } /** @@ -2074,18 +2074,18 @@ function libraryGetDownload($details) function libraryGetProvider($details) { $text = 'e107'; - $provider = LAN_LIBRARY_MANAGER_24; + $provider = LAN_CORE; if(varset($details['plugin'], false) == true) { $text = $details['plugin']; - $provider = LAN_LIBRARY_MANAGER_22; + $provider = LAN_PLUGIN; } if(varset($details['theme'], false) == true) { $text = $details['theme']; - $provider = LAN_LIBRARY_MANAGER_23; + $provider = LAN_THEME; } return '' . $provider . ''; diff --git a/e107_admin/updateadmin.php b/e107_admin/updateadmin.php index ef9b96bca..108a5e397 100644 --- a/e107_admin/updateadmin.php +++ b/e107_admin/updateadmin.php @@ -36,10 +36,13 @@ if (isset($_POST['update_settings'])) $userData['data']['user_password'] = $sql->escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE); unset($_POST['a_password']); unset($_POST['a_password2']); + if (vartrue($pref['allowEmailLogin'])) { + $new_pass = e107::getParser()->filter($_POST['a_password']); + $user_prefs = e107::getArrayStorage()->unserialize($currentUser['user_prefs']); - $user_prefs['email_password'] = $userMethods->HashPassword($new_pass, $email); + $user_prefs['email_password'] = $userMethods->HashPassword($new_pass, USEREMAIL); $userData['data']['user_prefs'] = e107::getArrayStorage()->serialize($user_prefs); } diff --git a/e107_admin/userclass2.php b/e107_admin/userclass2.php index d81d704ff..02daedf4c 100644 --- a/e107_admin/userclass2.php +++ b/e107_admin/userclass2.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2015 e107 Inc (e107.org) + * Copyright (C) 2008-2017 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -93,13 +93,13 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); protected $fields = array( 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), 'userclass_id' => array('title'=> LAN_ID, 'type' =>'hidden', 'data'=>'int', 'width' => '5%', 'thclass' => 'left'), - 'userclass_icon' => array('title'=> UCSLAN_68, 'type' => 'icon', 'tab'=>0, 'data'=>'str', 'width' => '5%', 'thclass' => 'left', 'class' => 'center'), - 'userclass_name' => array('title'=> UCSLAN_12, 'type' => 'text', 'tab'=>0,'data'=>'str', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'), - 'userclass_description' => array('title'=> UCSLAN_13, 'type' => 'text', 'tab'=>0,'data'=>'str', 'inline'=>true,'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('size'=>'xxlarge')), - 'userclass_type' => array('title'=> UCSLAN_79, 'type' => 'dropdown', 'tab'=>0,'data'=>'int', 'width' => '10%', 'thclass' => 'left', 'class'=>'left' ), - 'userclass_editclass' => array('title'=> UCSLAN_24, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('classlist'=>'nobody,public,main,admin,classes,matchclass,member, no-excludes')), - 'userclass_visibility' => array('title'=> UCSLAN_34, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_parent' => array('title'=> UCSLAN_35, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('classlist'=>'main,admin,nobody,public,classes,matchclass,member, no-excludes')), + 'userclass_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'tab'=>0, 'data'=>'str', 'width' => '5%', 'thclass' => 'left', 'class' => 'center'), + 'userclass_name' => array('title'=> LAN_NAME, 'type' => 'text', 'tab'=>0,'data'=>'str', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'), + 'userclass_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'text', 'tab'=>0,'data'=>'str', 'inline'=>true,'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('size'=>'xxlarge')), + 'userclass_type' => array('title'=> LAN_TYPE, 'type' => 'dropdown', 'tab'=>0,'data'=>'int', 'width' => '10%', 'thclass' => 'left', 'class'=>'left' ), + 'userclass_editclass' => array('title'=> LAN_MANAGER, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('classlist'=>'nobody,public,main,admin,classes,matchclass,member, no-excludes')), + 'userclass_visibility' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_parent' => array('title'=> LAN_PARENT, 'type' => 'userclass', 'tab'=>0,'data'=>'int', 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>array('classlist'=>'main,admin,nobody,public,classes,matchclass,member, no-excludes')), 'userclass_perms' => array('title'=> "Perms", 'type' => 'hidden', 'tab'=>0,'data'=>'str', 'width' => 'auto', 'thclass' => 'left'), 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'width' => '10%', 'thclass' => 'center last', 'forced'=>TRUE, 'class'=>'right', 'readParms' => array('deleteClass' => e_UC_NOBODY)) @@ -212,7 +212,7 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); $frm = e107::getForm(); - $mes->addWarning(UCSLAN_52."
".UCSLAN_53); + $mes->addWarning(LAN_OPTIONS."

".UCSLAN_53); $text = "

".LAN_PREFS."

@@ -376,7 +376,7 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); } else { - $text .= UCSLAN_44; + $text .= LAN_NONE; } @@ -391,7 +391,7 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); ".$frm->select('init_class_stage', $initClassStages, $sel_stage)."".UCSLAN_46." -
". $frm->admin_button('set_initial_classes','no-value','create',LAN_UPDATE)."
"; +
". $frm->admin_button('set_initial_classes','no-value','create',LAN_UPDATE)."
"; } else { @@ -680,7 +680,7 @@ if (isset($_POST['set_initial_classes'])) } else { - $message = UCSLAN_42; + $message = LAN_NOCHANGE_NOTSAVED; } } */ @@ -718,7 +718,7 @@ if (isset($_POST['etrigger_delete']) && !empty($_POST['etrigger_delete'])) // unset($pref['frontpage'][$class_id]); // (Should work with both 0.7 and 0.8 front page methods) // save_prefs(); } - $emessage->add(UCSLAN_3, E_MESSAGE_SUCCESS); + $emessage->add(LAN_DELETED, E_MESSAGE_SUCCESS); } else { @@ -794,8 +794,8 @@ if (isset($_POST['createclass'])) // Add or edit $e_userclass->save_edited_class($class_record); userclass2_adminlog('03',"ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")"); $do_tree = TRUE; - //$message .= UCSLAN_5; - $emessage->add(UCSLAN_5, E_MESSAGE_SUCCESS); + //$message .= LAN_UPDATED.': '.LAN_USERCLASS; + $emessage->add(LAN_UPDATED.': '.LAN_USERCLASS, E_MESSAGE_SUCCESS); } else { // Creating new class @@ -815,8 +815,8 @@ if (isset($_POST['createclass'])) // Add or edit $e_userclass->add_new_class($class_record); userclass2_adminlog("01","ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")"); $do_tree = TRUE; - //$message .= UCSLAN_6; - $emessage->add(UCSLAN_6, E_MESSAGE_SUCCESS); + //$message .= LAN_UPDATED.': '.LAN_USERCLASS; + $emessage->add(LAN_UPDATED.': '.LAN_USERCLASS, E_MESSAGE_SUCCESS); } } else @@ -940,7 +940,7 @@ switch ($action) $text .= " - ".UCSLAN_12." + ".LAN_NAME." "; if ($fullEdit) { @@ -954,7 +954,7 @@ switch ($action) - ".UCSLAN_13." + ".LAN_DESCRIPTION."
".UCSLAN_31."
"; @@ -962,7 +962,7 @@ switch ($action) // Userclass icon $text .= " - ".UCSLAN_68." + ".LAN_ICON." ".$frm->iconpicker('userclass_icon', $userclass_icon, LAN_SELECT)."
".UCSLAN_69."
@@ -970,7 +970,7 @@ switch ($action) $text .= " - ".UCSLAN_79." + ".LAN_TYPE." "; $classTypes = array(UC_TYPE_STD => UCSLAN_80, UC_TYPE_GROUP => UCSLAN_81); if ($fullEdit) @@ -992,7 +992,7 @@ switch ($action) // Who can manage class $text .= " - ".UCSLAN_24." + ".LAN_MANAGER." "; $text .= "'; $text .= "
".UCSLAN_32."
@@ -1012,7 +1012,7 @@ switch ($action) $text .= " - ".UCSLAN_34." + ".LAN_VISIBILITY." "; $text .= "'; $text .= "
".UCSLAN_33."
@@ -1021,7 +1021,7 @@ switch ($action) $text .= " - ".UCSLAN_35." + ".LAN_PARENT." "; $text .= "'; // .r_userclass("userclass_parent", $userclass_parent, "off", "admin,classes,matchclass,public,member"). @@ -1035,9 +1035,9 @@ switch ($action) if($params == 'edit') { - $text .= $frm->admin_button('createclass', UCSLAN_14, 'create'); + $text .= $frm->admin_button('createclass', LAN_UPDATE, 'create'); $text .= $frm->admin_button('updatecancel', LAN_CANCEL, 'cancel'); - // $text .= ""; + // $text .= ""; // $text .= "  "; $text .= " @@ -1045,9 +1045,9 @@ if($params == 'edit') } else { - $text .= $frm->admin_button('createclass', UCSLAN_15, 'create'); + $text .= $frm->admin_button('createclass', LAN_CREATE, 'create'); $text .= $frm->admin_button('updatecancel', LAN_CANCEL, 'cancel'); - // $text .= " + // $text .= " //   "; $text .= " "; @@ -1097,7 +1097,7 @@ unset($title); } else { - $text .= UCSLAN_44; + $text .= LAN_NONE; } @@ -1133,7 +1133,7 @@ unset($title); case 'debug' : // if (!check_class(e_UC_MAINADMIN)) break; // Let ordinary admins see this if they know enough to specify the URL $text .= $e_userclass->show_graphical_tree(TRUE); // Print with debug options - $ns->tablerender(UCSLAN_21, $text); + $ns->tablerender(LAN_SETTINGS, $text); $text = ""; @@ -1148,7 +1148,7 @@ unset($title); "; } $text .= "
Class rights for first 20 users in database
User IDDisp NameRaw classesInherited classesEditable classes
"; - $ns->tablerender(UCSLAN_21, $text); + $ns->tablerender(LAN_SETTINGS, $text); break; // End of 'debug' @@ -1201,7 +1201,7 @@ unset($title); $mes = e107::getMessage(); - $mes->addWarning(UCSLAN_52."
".UCSLAN_53); + $mes->addWarning(LAN_OPTIONS."
".UCSLAN_53); $text = " @@ -1460,14 +1460,14 @@ class uclass_manager $this->fieldpref = (varset($user_pref['admin_userclass_columns'])) ? $user_pref['admin_userclass_columns'] : array("userclass_id","userclass_name","userclass_description"); $this->fields = array( - 'userclass_icon' => array('title'=> UCSLAN_68, 'type' => 'icon', 'width' => '5%', 'thclass' => 'center', 'class' => 'center'), + 'userclass_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'center', 'class' => 'center'), 'userclass_id' => array('title'=> LAN_ID, 'type' => 'int', 'width' => '5%', 'thclass' => 'left'), - 'userclass_name' => array('title'=> UCSLAN_12, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_description' => array('title'=> UCSLAN_13, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_editclass' => array('title'=> UCSLAN_24, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_parent' => array('title'=> UCSLAN_35, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_visibility' => array('title'=> UCSLAN_34, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), - 'userclass_type' => array('title'=> UCSLAN_79, 'type' => 'method', 'width' => '10%', 'thclass' => 'left', 'class'=>'left' ), + 'userclass_name' => array('title'=> LAN_NAME, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_editclass' => array('title'=> LAN_MANAGER, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_parent' => array('title'=> LAN_PARENT, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_visibility' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'thclass' => 'left'), + 'userclass_type' => array('title'=> LAN_TYPE, 'type' => 'method', 'width' => '10%', 'thclass' => 'left', 'class'=>'left' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'thclass' => 'center last', 'forced'=>TRUE, 'class'=>'right', 'readParms' => array('deleteClass' => e_UC_NOBODY)) ); @@ -1491,14 +1491,14 @@ class uclass_manager if (!$total = $sql->db_Select('userclass_classes', '*')) { $text = ""; - $mes->add(UCSLAN_7, E_MESSAGE_INFO); + $mes->add(LAN_NO_RECORDS_FOUND, E_MESSAGE_INFO); } else { $text = "
- ".UCSLAN_5." + ".LAN_UPDATED.': '.LAN_USERCLASS."
". $frm->colGroup($this->fields,$this->fieldpref). $frm->thead($this->fields,$this->fieldpref). diff --git a/e107_admin/users.php b/e107_admin/users.php index 93253a5f2..5846bb195 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -1,9 +1,8 @@ getName().",\n\n".UCSLAN_4." ".SITENAME."\n( ".SITEURL." )\n\n".UCSLAN_5.": \n\n".$messaccess."\n".UCSLAN_10."\n".SITEADMIN; + $message = USRLAN_256." ".$sysuser->getName().",\n\n".UCSLAN_4." ".SITENAME."\n( ".SITEURL." )\n\n".UCSLAN_5.": \n\n".$messaccess."\n".UCSLAN_10."\n".SITEADMIN; // $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","User class change",str_replace("\n","
",$message),FALSE,LOG_TO_ROLLING); $options['mail_subject'] = UCSLAN_2; @@ -1075,9 +1074,9 @@ class users_admin_ui extends e_admin_ui $text .= "
".$frm->hidden('userid', $userid)." - ".$frm->checkbox_label(UCSLAN_8.'  ', 'notifyuser', 1)." - ".$frm->admin_button('etrigger_updateclass', UCSLAN_7, 'update')." - ".$frm->admin_button('etrigger_back', 'Back', 'cancel')." + ".$frm->checkbox_label(USRLAN_255.'  ', 'notifyuser', 1)." + ".$frm->admin_button('etrigger_updateclass', LAN_NO_RECORDS_FOUND, 'update')." + ".$frm->admin_button('etrigger_back', LAN_BACK, 'cancel')."
diff --git a/e107_admin/users_extended.php b/e107_admin/users_extended.php index afbffbb5f..a08d2691d 100755 --- a/e107_admin/users_extended.php +++ b/e107_admin/users_extended.php @@ -540,7 +540,7 @@ e107::js('footer-inline', js()); } else { - $mes->addDebug("User Extended Column deleted from table"); + $mes->addSuccess("User Extended Column deleted from table"); //TODO LAN } } @@ -596,7 +596,7 @@ e107::js('footer-inline', js()); // do something } - function addPageActivate() + private function addPageActivate() { $ue = e107::getUserExt(); $tp = e107::getParser(); @@ -636,7 +636,35 @@ e107::js('footer-inline', js()); } + private function addPageDeactivate() + { + $tp = e107::getParser(); + $sql = e107::getDb(); + $ue = e107::getUserExt(); + + $ret = ""; + foreach(array_keys($_POST['deactivate']) as $f) + { + $f = $tp->filter($f); + + if($ue->user_extended_remove($f, $f)) + { + $ret .= EXTLAN_68." $f ".EXTLAN_72."
"; + if(is_readable(e_CORE."sql/extended_".$f.".php")) + { + $ret .= ($sql->gen("DROP TABLE ".MPREFIX."user_extended_".$f)) ? LAN_DELETED." user_extended_".$f."
" : LAN_DELETED_FAILED." user_extended_".$f."
"; + } + } + else + { + $ret .= EXTLAN_70." $f ".EXTLAN_73."
"; + } + } + e107::getLog()->add('EUF_12',implode(', ',$_POST['deactivate']),E_LOG_INFORMATIVE,''); + e107::getMessage()->addSuccess($ret); + return $ret; + } @@ -647,6 +675,7 @@ e107::js('footer-inline', js()); $ue = e107::getUserExt(); $this->addPageActivate(); + $this->addPageDeactivate(); // Get list of current extended fields diff --git a/e107_admin/wmessage.php b/e107_admin/wmessage.php index 02917e02e..612e8b441 100644 --- a/e107_admin/wmessage.php +++ b/e107_admin/wmessage.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2013 e107 Inc (e107.org) + * Copyright (C) 2008-2017 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -74,15 +74,15 @@ class generic_ui extends e_admin_ui protected $listOrder = 'gen_id DESC'; - protected $fields = array ( - 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), - 'gen_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'gen_type' => array ( 'title' => LAN_TYPE, 'type' => 'hidden', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'default=wmessage', 'class' => 'left', 'thclass' => 'left', ), + protected $fields = array ( + 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), + 'gen_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'gen_type' => array ( 'title' => LAN_TYPE, 'type' => 'hidden', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'default=wmessage', 'class' => 'left', 'thclass' => 'left', ), 'gen_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'hidden', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'gen_user_id' => array ( 'title' => LAN_ID, 'type' => 'hidden', 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'gen_ip' => array ( 'title' => WMLAN_10, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => 'size=xxlarge', 'class' => 'left', 'thclass' => 'left', ), - 'gen_intdata' => array ( 'title' => LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'gen_chardata' => array ( 'title' => WMLAN_04, 'type' => 'bbarea', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), + 'gen_user_id' => array ( 'title' => LAN_AUTHOR, 'type' => 'hidden', 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'gen_ip' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => 'size=xxlarge', 'class' => 'left', 'thclass' => 'left', ), + 'gen_intdata' => array ( 'title' => LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'gen_chardata' => array ( 'title' => LAN_MESSAGE, 'type' => 'bbarea', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), 'options' => array ( 'title' => LAN_OPTIONS, 'type' => null, 'data' => null, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ), ); @@ -90,7 +90,7 @@ class generic_ui extends e_admin_ui protected $prefs = array( - 'wm_enclose' => array('title'=> WMLAN_05, 'type'=>'radio', 'data' => 'int','help'=> WMLAN_06, 'writeParms'=>array('optArray'=>array(0=> LAN_DISABLED, 1=> LAN_ENABLED, 2=> "Enclosed with Carousel"))), + 'wm_enclose' => array('title'=> WMLAN_05, 'type'=>'radio', 'data' => 'int','help'=> WMLAN_06, 'writeParms'=>array('optArray'=>array(0=> LAN_DISABLED, 1=> LAN_ENABLED, 2=> WMLAN_11))), ); @@ -306,7 +306,7 @@ if ($action == "main" || $action == "") - + @@ -360,7 +360,7 @@ if ($action == "create" || $action == "edit") - + - + @@ -182,7 +182,7 @@ $sc_style['SIGNUP_PASSWORD2']['post'] = ""; $sc_style['SIGNUP_USERCLASS_SUBSCRIBE']['pre'] = " - + "; diff --git a/e107_core/xml/default_install.xml b/e107_core/xml/default_install.xml index db058e7e3..f77d3877c 100644 --- a/e107_core/xml/default_install.xml +++ b/e107_core/xml/default_install.xml @@ -98,6 +98,7 @@ 'rss_menu', )]]> + 'news', 'page' => 'page', diff --git a/e107_handlers/comment_class.php b/e107_handlers/comment_class.php index 3f8fc01c8..c4cb75263 100644 --- a/e107_handlers/comment_class.php +++ b/e107_handlers/comment_class.php @@ -1087,6 +1087,10 @@ class comment echo $text; } } + elseif($return === 'html') + { + return $ns->tablerender(null, $text, 'comment', true); + } else { $ret['comment'] = $text; diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index 6af73d89b..3874c4c4e 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -605,7 +605,7 @@ class e107_db_debug { $inc = array( 'BOOTSTRAP','HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET', 'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET', - 'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER' + 'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT', 'THEME_LEGACY','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER' ); $userCon = get_defined_constants(true); diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 2d3a4c5de..64a77c9f9 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3536,7 +3536,7 @@ class e_parser public function toGlyph($text, $space=" ") { - if(!deftrue('BOOTSTRAP') || empty($text)) + if(empty($text)) { return false; } @@ -3654,19 +3654,20 @@ class e_parser $height = ($tp->thumbHeight !== 0) ? $tp->thumbHeight : ""; $linkStart = ''; $linkEnd = ''; - - if(!isset($userData['user_image']) && USERID) + + if($userData === null && USERID) { $userData = array(); $userData['user_id'] = USERID; $userData['user_image'] = USERIMAGE; - $userData['user_name'] = USERNAME; + $userData['user_name'] = USERNAME; + $userData['user_currentvisit'] = USERCURRENTVISIT; } - + $image = (!empty($userData['user_image'])) ? varset($userData['user_image']) : null; - - $genericImg = $tp->thumbUrl(e_IMAGE."generic/blank_avatar.jpg","w=".$width."&h=".$height,true); + + $genericImg = $tp->thumbUrl(e_IMAGE."generic/blank_avatar.jpg","w=".$width."&h=".$height,true); if (!empty($image)) { @@ -3714,8 +3715,10 @@ class e_parser $heightInsert = empty($height) ? '' : "height='".$height."'"; $id = (!empty($options['id'])) ? "id='".$options['id']."' " : ""; + $classOnline = (!empty($userData['user_currentvisit']) && intval($userData['user_currentvisit']) > (time() - 300)) ? " user-avatar-online" : ''; + $text = $linkStart; - $text .= "\"".$title."\""; + $text .= "\"".$title."\""; $text .= $linkEnd; // return $img; return $text; diff --git a/e107_handlers/event_class.php b/e107_handlers/event_class.php index c81b3d48a..6ea97a8fe 100644 --- a/e107_handlers/event_class.php +++ b/e107_handlers/event_class.php @@ -29,7 +29,8 @@ class e107_event 'fileupload' => 'user_file_upload', 'newspost' => 'admin_news_created', 'newsupd' => 'admin_news_updated', - 'newsdel' => 'admin_news_deleted' + 'newsdel' => 'admin_news_deleted', + 'userdatachanged' => 'user_profile_edit' ); @@ -84,7 +85,8 @@ class e107_event 'user_xup_signup' => 'User social signup', 'user_ban_flood' => NS_LAN_2, 'user_ban_failed_login' => 'IP banned for multiple failed login attempts', - 'user_profile_display' => "User views profile" + 'user_profile_display' => "User views profile", + 'user_profile_edit' => "User edits profile" ), diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index f9da99543..e68c38d06 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -915,7 +915,7 @@ class e_form } // $ret = "".$label.""; // using colorXXXbox. - $ret = "".$label.""; // using bootstrap. + $ret = "".$label.""; // using bootstrap. // $footer = "
Save
"; @@ -982,13 +982,13 @@ class e_form if($localonly == true) { $text = ""; - $text .= "Click on the avatar to change it"; // TODO LAN + $text .= "Click on the avatar to change it"; } else { $text = ""; $text .= ""; - $text .= ""; //TODO Common LAN. + $text .= ""; } $avFiles = e107::getFile()->get_files(e_AVATAR_DEFAULT,".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG"); @@ -1005,7 +1005,7 @@ class e_form if(count($avFiles) > 0) { - $text .= "
OR
"; + $text .= "
".LAN_EFORM_003."
"; $count = 1; } } @@ -1014,7 +1014,7 @@ class e_form foreach($avFiles as $fi) { $img_path = $tp->thumbUrl(e_AVATAR_DEFAULT.$fi['fname']); - $text .= "\n "; + $text .= "\n "; $count++; @@ -1024,11 +1024,14 @@ class e_form if($count == 0) { $text .= "
"; - $text .= "
No Avatars Available
"; //TODO LAN + $text .= "
".LAN_EFORM_005."
"; if(ADMIN) { - $text .= "
Admin-Only Notice: The folder ".e_AVATAR_DEFAULT." is empty. Upload some default avatars images to this folder for users to choose avatars from.
"; //TODO LAN + $EAVATAR = "".e_AVATAR_DEFAULT.""; + $text .= "
"; + $text .= e107::getParser()->lanVars(LAN_EFORM_006, array('x'=>$EAVATAR)); + $text .= "
"; } $text .= "
"; @@ -1457,7 +1460,7 @@ e107::getDebug()->log($sc_parameters); if(empty($users)) { - return "Unavailable"; + return LAN_UNAVAILABLE; } $opt = array(); @@ -1842,7 +1845,7 @@ e107::getDebug()->log($sc_parameters); $text .= " "; - $loading = vartrue($options['loading'],'Please wait...'); + $loading = vartrue($options['loading'],LAN_LOADING); $buttonId = $target.'-start'; @@ -2534,7 +2537,7 @@ e107::getDebug()->log($sc_parameters); $tp = e107::getParser(); $text = ' - '.$this->text($name, $searchVal,20,'class=search-query&placeholder=Search…').' + '.$this->text($name, $searchVal,20,'class=search-query&placeholder='.LAN_SEARCH.'…').' '; @@ -2817,7 +2820,7 @@ e107::getDebug()->log($sc_parameters); $text = '
- '.($label ? $label : 'No Label Provided').' + '.($label ? $label : LAN_NO_LABEL_PROVIDED).'
".LAN_ID."".WMLAN_02."".LAN_MESSAGE." ".LAN_VISIBILITY." ".LAN_OPTIONS."
".$frm->text('wm_caption', $tp->toForm(vartrue($row['gen_ip'])), 80)."
".WMLAN_04."".LAN_MESSAGE." "; $text .= $frm->bbarea('data',$row['gen_chardata']); @@ -473,4 +473,4 @@ function welcome_adminlog($msg_num='00', $id=0, $woffle='') } */ -?> \ No newline at end of file +?> diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index dc566ab39..99eb011bd 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -491,14 +491,14 @@ class admin_shortcodes $allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly. - $text = "
    "; + $text = ""; @@ -1199,15 +1199,15 @@ class admin_shortcodes $allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly. - $text = "
      "; + $text = ""; diff --git a/e107_core/shortcodes/single/email_item.sc b/e107_core/shortcodes/single/email_item.sc index ed82b8f13..71226d57d 100644 --- a/e107_core/shortcodes/single/email_item.sc +++ b/e107_core/shortcodes/single/email_item.sc @@ -15,12 +15,12 @@ if(deftrue('BOOTSTRAP')) elseif (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL)) { $icon = THEME_ABS."images/".ICONMAIL; - $img = "{$parms[0]}"; + $img = "{$parms[0]}"; } else { $icon = e_IMAGE_ABS."generic/email.png"; - $img = "{$parms[0]}"; + $img = "{$parms[0]}"; } // message^source^other_parms diff --git a/e107_core/shortcodes/single/print_item.sc b/e107_core/shortcodes/single/print_item.sc index 80f03ad6b..de2ea7697 100644 --- a/e107_core/shortcodes/single/print_item.sc +++ b/e107_core/shortcodes/single/print_item.sc @@ -10,12 +10,12 @@ if(deftrue('BOOTSTRAP')) elseif (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT)) { $icon = THEME_ABS."images/".ICONPRINT; - $img = "{$parms[0]}"; + $img = "{$parms[0]}"; } else { $icon = e_IMAGE_ABS."generic/printer.png"; - $img = "{$parms[0]}"; + $img = "{$parms[0]}"; } diff --git a/e107_core/shortcodes/single/user_avatar.php b/e107_core/shortcodes/single/user_avatar.php index 47ed230a4..2165429ef 100644 --- a/e107_core/shortcodes/single/user_avatar.php +++ b/e107_core/shortcodes/single/user_avatar.php @@ -2,20 +2,36 @@ // $Id$ function user_avatar_shortcode($parm=null) { - if(!empty($parm) && is_string($parm)) + $data = null; + + if(!empty($parm)) { - $data = array('user_image'=>$parm); - } - elseif(!empty($parm) && is_array($parm)) - { - $data = $parm; - } - else - { - $data = null; + if(is_numeric($parm)) + { + $id = intval($parm); + $data = e107::user($id); + $parm = null; + } + if(is_string($parm)) + { + $data = array('user_image'=>$parm); + } + elseif(is_array($parm)) + { + if(isset($parm['user_image'])) + { + $data = $parm; + } + else + { + $data = null; + } + + } } - return e107::getParser()->toAvatar($data, $data); + + return e107::getParser()->toAvatar($data, $parm); /* global $loop_uid; diff --git a/e107_core/templates/signup_template.php b/e107_core/templates/signup_template.php index 78b34cfa1..dd4687697 100755 --- a/e107_core/templates/signup_template.php +++ b/e107_core/templates/signup_template.php @@ -89,8 +89,8 @@ if(!defined($SIGNUP_EXTENDED_USER_FIELDS)) $SIGNUP_EXTENDED_USER_FIELDS = "
- {EXTENDED_USER_FIELD_TEXT} - {EXTENDED_USER_FIELD_REQUIRED} + {EXTENDED_USER_FIELD_EDIT} @@ -152,7 +152,7 @@ $sc_style['SIGNUP_LOGINNAME']['post'] = " $sc_style['SIGNUP_HIDE_EMAIL']['pre'] = "
".LAN_USER_83." "; $sc_style['SIGNUP_HIDE_EMAIL']['post'] = "
".LAN_SIGNUP_113." "; $sc_style['SIGNUP_USERCLASS_SUBSCRIBE']['post'] = "
"; @@ -1608,7 +1610,7 @@ class themeHandler $previewPath = e_BASE."index.php?themepreview.".$theme['id']; } - $thumbnail = ""; + $thumbnail = ""; if($_GET['mode'] == 'online') @@ -2345,8 +2347,8 @@ class themeHandler if($core->save()) { - $mes->addDebug(MENLAN_31.": ".$deflayout); - $mes->addDebug(MENLAN_56.": ".print_a($customPages,true)); + $mes->addDebug("Default Layout: ".$deflayout); + $mes->addDebug("Custom Pages: ".print_a($customPages,true)); $med = e107::getMedia(); $med->import('_common_image', e_THEME.$name, "^.*?logo.*?(\.png|\.jpeg|\.jpg|\.JPG|\.GIF|\.PNG)$"); diff --git a/e107_handlers/userclass_class.php b/e107_handlers/userclass_class.php index b73471a84..b18ab31b4 100644 --- a/e107_handlers/userclass_class.php +++ b/e107_handlers/userclass_class.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2013 e107 Inc (e107.org) + * Copyright (C) 2008-2017 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -1509,7 +1509,7 @@ class user_class_admin extends user_class if ($this->class_tree[$listnum]['userclass_type'] == UC_TYPE_GROUP) { - $name_line .= ''.$this->class_tree[$listnum]['userclass_name'].' '.UCSLAN_84; // Highlight groups + $name_line .= ''.$this->class_tree[$listnum]['userclass_name'].' ('.UCSLAN_81.').'; // Highlight groups } else { diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php index e493d06f6..6320d6f13 100644 --- a/e107_languages/English/English.php +++ b/e107_languages/English/English.php @@ -114,6 +114,7 @@ define("LAN_FILES","Files"); define("LAN_SIZE", "Size"); define("LAN_VERSION", "Version"); define("LAN_DOWNLOAD", "Download"); +define("LAN_WEBSITE", "Website"); define("LAN_COMMENTS", "Comments"); define("LAN_LOCATION", "Location"); define("LAN_NO_RECORDS_FOUND","No Records Found"); @@ -121,6 +122,7 @@ define("LAN_RATING", "Rating"); define("LAN_IMAGE","Image"); define("LAN_ABOUT", "About"); define("LAN_TITLE", "Title"); +define("LAN_MESSAGE", "Message"); define("LAN_USER", "User"); define("LAN_EMAIL","Email address"); define("LAN_WROTE", "wrote"); // as in John wrote.." "; diff --git a/e107_languages/English/admin/help/menus.php b/e107_languages/English/admin/help/menus.php index 1a5f35a90..da1348d44 100644 --- a/e107_languages/English/admin/help/menus.php +++ b/e107_languages/English/admin/help/menus.php @@ -16,7 +16,7 @@ if (!getperms("2")) exit; } -if(e_DEBUG_MENUMANAGER === true) +if(!deftrue("e_DEBUG_MENUMANAGER")) { return; } diff --git a/e107_languages/English/admin/help/wmessage.php b/e107_languages/English/admin/help/wmessage.php index 8e8bc649f..36723b7d1 100644 --- a/e107_languages/English/admin/help/wmessage.php +++ b/e107_languages/English/admin/help/wmessage.php @@ -2,19 +2,14 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2017 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * - * - * - * $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/wmessage.php,v $ - * $Revision$ - * $Date$ - * $Author$ */ if (!defined('e107_INIT')) { exit; } -$text = "This page allows you to set a message that will appear at the top of your front page all the time it's activated. You can set a different message for guests, registered/logged-in members and administrators."; -$ns -> tablerender("WMessage Help", $text); +$text = WMLAN_13 ; +$ns -> tablerender( WMLAN_12, $text); + diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 0dd68a477..653349e0b 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -197,6 +197,7 @@ define("ADLAN_170", "These stats are for demonstration purposes only."); define("ADLAN_171", "Install Site Stats Plugin"); define("ADLAN_185", "Toggle Sidebar"); +define("ADLAN_186", "The following old files can be safely deleted from your system:"); // define("ADLAN_CL_1", "Settings"); define("ADLAN_CL_2", "Users"); @@ -238,6 +239,7 @@ Below is the list of files that could potentially be malicious:"); define("LAN_CREATE","Create"); define("LAN_MANAGE","Manage"); define("LAN_UPDATE","Update"); +define("LAN_INSTALLED","Installed");//TODO elsewhere define("LAN_LAST_UPDATED","Last Updated"); define("LAN_UPDATE_AVAILABLE","Update Available"); define("LAN_ADD", "Add"); @@ -295,6 +297,7 @@ define("LAN_PLUGIN","Plugin"); define("LAN_PLUGIN_FOLDER","Plugin Folder"); define("LAN_THEMES","Themes"); define("LAN_THEME","Theme"); +define("LAN_CORE","Core"); define("LAN_LATEST_e107_NEWS","Latest e107 News"); define("LAN_WEBSITE_STATUS","Website Status"); define("LAN_STATS","Stats"); @@ -359,7 +362,7 @@ define("LAN_UNCHECKALL", "Uncheck All"); define("LAN_DELCHECKED", "Delete Checked"); define("LAN_USERCLASS", "Userclass"); - +define("LAN_MANAGER", "Manager"); define("LAN_HELP", "Help"); define("LAN_CUSTOM", "Custom"); @@ -385,6 +388,7 @@ define("LAN_ID", "ID"); define("LAN_VISIBILITY", "Visibility"); define("LAN_VISIBLE_TO", "Visible To"); +define("LAN_PARENT", "Parent"); define("LAN_ICON", "Icon"); define("LAN_LOADING", "Loading..."); @@ -402,7 +406,7 @@ define("LAN_TEMPLATES","Templates"); define("LAN_CATEGORIES", "Categories"); define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode."); define("LAN_COPYRIGHT", "Copyright"); -define("LAN_MANAGER", "Manage Permissions"); +define("LAN_MANAGEPERMS", "Manage Permissions"); define("LAN_PING", "Ping"); define("LAN_START", "Start"); define("LAN_END", "End"); @@ -486,24 +490,29 @@ define("LAN_PERSONALIZE_MENUS", "Personalize Menus"); define("LAN_LATEST_COMMENTS", "Latest Comments"); define("LAN_COMMENTS_ALLOWED", "Comments Allowed"); define("LAN_PERSONALIZE", "Personalize"); -define("LAN_SELECT_COLUMNS_TO_DISPLAY", "Select columns to display"); -define("LAN_DISPLAY_COLUMNS", "Display Columns"); +//define("LAN_SELECT_COLUMNS_TO_DISPLAY", "Select columns to display"); // Moved to lan_form_handler.php +//define("LAN_DISPLAY_COLUMNS", "Display Columns"); // Moved to lan_form_handler.php define("LAN_SETTINGS_NOT_SAVED_NO_CHANGES_MADE", "Settings not saved as no changes were made."); define("LAN_DASHBOARD_LAYOUT", "Dashboard Layout"); -define("LAN_AFTER_SUBMIT", "After submit:"); +//define("LAN_AFTER_SUBMIT", "After submit:"); // Moved to lan_form_handler.php define("LAN_UNAVAILABLE", "Unavailable"); -define("LAN_READY_UP_FOLDER_FIELDS", "Ready to use upload form fields, optional - file list view"); +//define("LAN_READY_UP_FOLDER_FIELDS", "Ready to use upload form fields, optional - file list view"); // Not used only debug define("LAN_NO_LABEL_PROVIDED", "No Label Provided"); define("LAN_NOT_FOUND", "Not Found!"); -define("LAN_QUICK_VIEW", "Quick View"); -define("LAN_GO_TO_USER_PROFILE", "Go to user profile"); -define("LAN_MULTI_LANGUAGE_FIELD", "Multi-language field"); -define("LAN_GO_TO_LIST", "go to list"); -define("LAN_CREATE_ANOTHER", "create another"); -define("LAN_EDIT_CURRENT", "edit current"); +//define("LAN_QUICK_VIEW", "Quick View"); // Moved to lan_form_handler.php +//define("LAN_GO_TO_USER_PROFILE", "Go to user profile"); // Moved to lan_form_handler.php +//define("LAN_MULTI_LANGUAGE_FIELD", "Multi-language field"); // Moved to lan_form_handler.php +//define("LAN_GO_TO_LIST", "go to list"); // Moved to lan_form_handler.php +//define("LAN_CREATE_ANOTHER", "create another"); // Moved to lan_form_handler.php +//define("LAN_EDIT_CURRENT", "edit current"); // Moved to lan_form_handler.php define("LAN_MAINTENANCE", "Maintenance"); define("LAN_RETURN_TO_FRONT_PANEL", "Return to Front Panel"); define("LAN_CHANGE_LANGUAGE", "Change Language"); define("LAN_NEWER_VERSION_OF_X", "A newer version of the [x] [y] is available for download."); // x= Name y = Theme | Plugin +define("LAN_SUBJECT", "Subject"); +define("LAN_ITEM", "Item"); +define("LAN_LOCK", "Lock"); +define("LAN_SYSTEM_USER", "System user"); +define("LAN_ENGINE", "Engine"); diff --git a/e107_languages/English/admin/lan_links.php b/e107_languages/English/admin/lan_links.php index ceaaf2b90..10c2502c9 100644 --- a/e107_languages/English/admin/lan_links.php +++ b/e107_languages/English/admin/lan_links.php @@ -1,10 +1,14 @@ \ No newline at end of file +?> diff --git a/e107_languages/English/admin/lan_userclass2.php b/e107_languages/English/admin/lan_userclass2.php index 92b94c8a9..9401dab04 100644 --- a/e107_languages/English/admin/lan_userclass2.php +++ b/e107_languages/English/admin/lan_userclass2.php @@ -1,108 +1,112 @@ If the top of the tree is 'Everyone', permissions increase as you go down the tree"); define("UCSLAN_37", "You must enter a name for the class"); define("UCSLAN_38", "Initial User Class"); define("UCSLAN_39", "No classes which can be set"); define("UCSLAN_40", "Set initial classes"); define("UCSLAN_41", "Settings updated"); -define("UCSLAN_42", "Nothing changed - not updated"); +//define("UCSLAN_42", "Nothing changed - not updated");//LAN_NOCHANGE_NOTSAVED define("UCSLAN_43", "Existing classes: "); -define("UCSLAN_44", "None"); +//define("UCSLAN_44", "None");//LAN_NONE define("UCSLAN_45", "Point at which classes set:"); define("UCSLAN_46", "(ignored if no verification)"); define("UCSLAN_47", "Initial Signup"); define("UCSLAN_48", "Verification by email or admin"); define("UCSLAN_49", "These classes are set for any newly signed up user - either immediately, or once their site membership has been verified"); -define("UCSLAN_50", "Options/Setup"); -define("UCSLAN_51", "User Class Functions"); -define("UCSLAN_52", "Setup Options"); -define("UCSLAN_53", "Caution! Only use these options if you understand what they do"); +//define("UCSLAN_50", "Options/Setup");//NOT USED +//define("UCSLAN_51", "User Class Functions");//NOT USED +//define("UCSLAN_52", "Setup Options");//LAN_OPTIONS +define("UCSLAN_53", "Caution! Only use these options when requested by support."); define("UCSLAN_54", "Set a default user hierarchy"); define("UCSLAN_55", "Clear the user hierarchy"); define("UCSLAN_56", "(this sets a 'flat' user class structure)"); define("UCSLAN_57", "(the hierarchy can be modified later)"); define("UCSLAN_58", "Execute"); -define("UCSLAN_59", "Enable admin logging of user class edits"); -define("UCSLAN_60", "User Class Configuration options"); -define("UCSLAN_61", "User class setup"); +//define("UCSLAN_59", "Enable admin logging of user class edits");//NOT USED +//define("UCSLAN_60", "User Class Configuration options");//NOT USED +//define("UCSLAN_61", "User class setup");//NOT USED define("UCSLAN_62", "Create default class tree: "); define("UCSLAN_63", "That class name already exists - please choose another"); define("UCSLAN_64", "completed"); define("UCSLAN_65", "Flatten user class hierarchy: "); -define("UCSLAN_66", "Confirm flatten user class hierarchy"); -define("UCSLAN_67", "Confirm set default user class hierarchy"); -define("UCSLAN_68", "Class Icon"); +//define("UCSLAN_66", "Confirm flatten user class hierarchy"); +//define("UCSLAN_67", "Confirm set default user class hierarchy"); +//define("UCSLAN_68", "Class Icon");//LAN_ICON define("UCSLAN_69", "Optional icon associated with class - directory "); define("UCSLAN_70", "Rebuilding class hierarchy: "); define("UCSLAN_71", "User Class Maintenance"); define("UCSLAN_72", "Rebuild class hierarchy "); define("UCSLAN_73", "(This may be required if database corruption occurs)"); + +//userclass_class.php define("UCSLAN_74", "Administrators and Moderators"); define("UCSLAN_75", "Registered and logged in members"); define("UCSLAN_76", "Site Administrators"); -define("UCSLAN_77", "Main site Administrators"); +define("UCSLAN_77", "Main Site Administrators"); define("UCSLAN_78", "Moderators for Forums and other areas"); -define("UCSLAN_79", "Class Type"); + +//define("UCSLAN_79", "Class Type"); define("UCSLAN_80", "Standard"); define("UCSLAN_81", "Group"); define("UCSLAN_82", "A group brings together a number of individual classes"); define("UCSLAN_83", "Classes in group"); -define("UCSLAN_84", " (Group)"); +//define("UCSLAN_84", " (Group)");//UCSLAN_81 define("UCSLAN_85", "You have assigned all available classes; please reassign one which is not in use"); define("UCSLAN_86", "Some settings not allowed for admin classes - they have been set to defaults. "); define("UCSLAN_87", "Recently joined users"); define("UCSLAN_88", "Identified search bots"); define("UCSLAN_89", "Checked classes are members of the group"); define("UCSLAN_90", "You can't edit certain system user classes!"); -define("UCSLAN_91", ""); +//define("UCSLAN_91", "");//NOT USED -define("UCSLAN_UPDATE", "Update"); +//define("UCSLAN_UPDATE", "Update");//NOT USED ... LAN_UPDATE ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_users.php b/e107_languages/English/admin/lan_users.php index 9d9d493d1..664a38b30 100644 --- a/e107_languages/English/admin/lan_users.php +++ b/e107_languages/English/admin/lan_users.php @@ -2,16 +2,12 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2017 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 admin * - * $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_users.php,v $ - * $Revision$ - * $Date$ - * $Author$ * */ define("USRLAN_1", "Options Saved."); @@ -279,16 +275,18 @@ define("USRLAN_251", "Leave blank for no change"); define("USRLAN_252", "Resend account activation email to unactivated users."); define("USRLAN_253", "Older than"); define("USRLAN_254", "Reset all passwords"); +define("USRLAN_255", "Notify User"); +define("USRLAN_256", "Dear"); -// These need review - there are duplicates above - they come from admin/lan_userclass.php. +// These need review - there are duplicates above - they come from admin/lan_userclass.php and are unconsistent with userclass defines. TODO LANS define("UCSLAN_1", "Sending notification email to"); define("UCSLAN_2", "Updated Privileges"); -define("UCSLAN_3", "Dear"); +//define("UCSLAN_3", "Dear");//USRLAN_256 define("UCSLAN_4", "Your privileges have been updated at"); define("UCSLAN_5", "You now have access to the following area(s)"); define("UCSLAN_6", "Set class for user"); define("UCSLAN_7", "Set Classes"); -define("UCSLAN_8", "Notify User"); +//define("UCSLAN_8", "Notify User");//incorrect//USRLAN_255 define("UCSLAN_9", "Classes Updated."); define("UCSLAN_10", "Regards,"); define("UCSLAN_11", "Class membership for user ID --UID-- changed to --CLASSES--"); diff --git a/e107_languages/English/admin/lan_wmessage.php b/e107_languages/English/admin/lan_wmessage.php index db277f53f..a161a9fb1 100644 --- a/e107_languages/English/admin/lan_wmessage.php +++ b/e107_languages/English/admin/lan_wmessage.php @@ -1,14 +1,13 @@ \ No newline at end of file +define("WMLAN_11","Enclosed with Carousel"); +define("WMLAN_12","Welcome Message Help"); +define("WMLAN_13","This page allows you to set a message that will appear at the top of your front page all the time it's activated. You can set a different message for guests, registered/logged-in members and administrators."); + +?> diff --git a/e107_languages/English/lan_form_handler.php b/e107_languages/English/lan_form_handler.php index d9124a5b0..05be8335d 100644 --- a/e107_languages/English/lan_form_handler.php +++ b/e107_languages/English/lan_form_handler.php @@ -9,4 +9,19 @@ */ -define("LAN_EFORM_001", ""); \ No newline at end of file +define("LAN_EFORM_001", "Click on the avatar to change it"); +define("LAN_EFORM_002", "Choose Avatar"); +define("LAN_EFORM_003", "OR"); +define("LAN_EFORM_004", "Choose this avatar"); +define("LAN_EFORM_005", "No Avatars Available"); +define("LAN_EFORM_006", "Admin-Only Notice: The folder [x] is empty. Upload some default avatars images to this folder for users to choose avatars from."); +define("LAN_EFORM_007", "Media Manager"); +define("LAN_EFORM_008", "Select columns to display"); +define("LAN_EFORM_009", "Display Columns"); +define("LAN_EFORM_010", "Quick View"); +define("LAN_EFORM_011", "Go to user profile"); +define("LAN_EFORM_012", "Multi-language field"); +define("LAN_EFORM_013", "go to list"); +define("LAN_EFORM_014", "create another"); +define("LAN_EFORM_015", "edit current"); +define("LAN_EFORM_016", "After submit:"); diff --git a/e107_languages/English/lan_library_manager.php b/e107_languages/English/lan_library_manager.php index c54a00b2e..549cda2a9 100644 --- a/e107_languages/English/lan_library_manager.php +++ b/e107_languages/English/lan_library_manager.php @@ -1,38 +1,42 @@ \ No newline at end of file +?> diff --git a/e107_languages/English/lan_sitelinks.php b/e107_languages/English/lan_sitelinks.php index 4493167ac..fdfd654fb 100644 --- a/e107_languages/English/lan_sitelinks.php +++ b/e107_languages/English/lan_sitelinks.php @@ -1,15 +1,16 @@ \ No newline at end of file +define("LAN_SITELINKS_183", "Main Menu"); +//define("LAN_SITELINKS_502", "Admin Area");//NOT USED + +?> diff --git a/e107_plugins/banner/banner_setup.php b/e107_plugins/banner/banner_setup.php index 6cff3c0ac..1193057af 100644 --- a/e107_plugins/banner/banner_setup.php +++ b/e107_plugins/banner/banner_setup.php @@ -30,7 +30,7 @@ class banner_setup 'banner_clientlogin' => '', 'banner_clientpassword' => '', 'banner_image' => '{e_PLUGIN}banner/images/banner1.png', - 'banner_clickurl' => 'http://e107.org', + 'banner_clickurl' => 'https://e107.org', 'banner_impurchased' => '0', 'banner_startdate' => '0', 'banner_enddate' => '0', @@ -38,7 +38,7 @@ class banner_setup 'banner_clicks' => '0', 'banner_impressions' => '0', 'banner_ip' => '', - 'banner_description' => 'Learn more about e107 CMS.', + 'banner_description' => '', 'banner_campaign' => 'e107promo' ); diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index 2daaec3b2..b5558b3a7 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -44,6 +44,7 @@ if (!e107::isInstalled('download')) $dl = new download(); + if(!defined("e_PAGETITLE")) {define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME);} if(!defined("USER_WIDTH") && !deftrue('BOOTSTRAP')) { define("USER_WIDTH","width:100%"); } @@ -51,7 +52,7 @@ if (!e107::isInstalled('download')) if(deftrue('BOOTSTRAP')) { - define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : e_IMAGE."generic/download.png")); + define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : 'icon-download.glyph')); define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : 'icon-star.glyph')); } else @@ -101,4 +102,4 @@ if (!e107::isInstalled('download')) exit ; -?> \ No newline at end of file +?> diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 6ccb5d8c4..ba259c375 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -211,7 +211,7 @@ class download if ($dlcat->down_count == 0) { - return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, "
".LAN_NO_RECORDS_FOUND."
",'download-categories',true); + return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, "
":"")."style='text-align:center'>".LAN_NO_RECORDS_FOUND."
",'download-categories',true); } $download_cat_table_string = ""; @@ -419,6 +419,7 @@ class download { $template = e107::getTemplate('download','download'); + $DOWNLOAD_LIST_CAPTION = $template['list']['caption']; $DOWNLOAD_LIST_TABLE_START = $template['list']['start']; $DOWNLOAD_LIST_TABLE = $template['list']['item']; $DOWNLOAD_LIST_TABLE_END = $template['list']['end']; @@ -578,6 +579,8 @@ class download if($filetotal) { + $caption = varset($DOWNLOAD_LIST_CAPTION) ? $tp->parseTemplate($DOWNLOAD_LIST_CAPTION, TRUE, $sc) : LAN_PLUGIN_DOWNLOAD_NAME; + // Only show list if some files in it $dl_text .= $tp->parseTemplate($DOWNLOAD_LIST_TABLE_START, TRUE, $sc); @@ -610,8 +613,8 @@ class download } $dl_text .= $tp->parseTemplate($this->templateFooter, TRUE, $sc); - - $text .= $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, $dl_text, 'download-list', true); + + $text .= $ns->tablerender($caption, $dl_text, 'download-list', true); } if(!isset($DOWNLOAD_LIST_NEXTPREV)) @@ -1011,4 +1014,4 @@ function sort_download_mirror_order($a, $b) } return ($a[1] < $b[1]) ? -1 : 1; } -?> \ No newline at end of file +?> diff --git a/e107_plugins/download/templates/download_template.php b/e107_plugins/download/templates/download_template.php index 62d8b5111..151e71237 100644 --- a/e107_plugins/download/templates/download_template.php +++ b/e107_plugins/download/templates/download_template.php @@ -524,6 +524,8 @@ $DOWNLOAD_TEMPLATE['view']['nextprev'] = ' // ##### ------------------------------------------------------------------------------------------ +//$DOWNLOAD_TEMPLATE['list']['caption'] = "Test custom caption"; + $DOWNLOAD_TEMPLATE['list']['start'] = "
@@ -655,4 +657,4 @@ $DOWNLOAD_TEMPLATE['footer'] = ''; -?> \ No newline at end of file +?> diff --git a/e107_plugins/featurebox/includes/item.php b/e107_plugins/featurebox/includes/item.php index ddcd84e2a..2d6b2b35a 100644 --- a/e107_plugins/featurebox/includes/item.php +++ b/e107_plugins/featurebox/includes/item.php @@ -48,7 +48,11 @@ class plugin_featurebox_item extends e_model */ public function sc_featurebox_title($parm = '') { - parse_str($parm, $parm); + if(!empty($parm) && is_string($parm)) + { + parse_str($parm, $parm); + } + $tp = e107::getParser(); if(isset($parm['alt'])) { diff --git a/e107_plugins/forum/e_event.php b/e107_plugins/forum/e_event.php new file mode 100644 index 000000000..62214d691 --- /dev/null +++ b/e107_plugins/forum/e_event.php @@ -0,0 +1,60 @@ + "login", + 'function' => "forum_eventlogin" + ); + + $event[] = array( + 'name' => "user_forum_post_created", + 'function' => "forum_eventnewpost" + ); + return $event; + + } + + + function forum_eventlogin($data) // Clear user_plugin_forum_viewed on user LOGIN + { + $myfile = fopen("newfile.txt", "a") or die("Unable to open file!"); + $txt = "login (".USERID.")\n"; + fwrite($myfile, $txt); + fwrite($myfile, print_r($data,true)); + fclose($myfile); + echo('hola'); + print_a($data); + e107::getDb()->update('user_extended', "user_plugin_forum_viewed = NULL WHERE user_extended_id = ".$data[user_id]); + + } + + function forum_eventnewpost($data) // Remove thread id from user_plugin_forum_viewed when a new reply is posted + { + //e107::getDb()->update('user_extended', "user_plugin_forum_viewed = REPLACE(user_plugin_forum_viewed, '{$data[post_thread]}', '0') WHERE user_extended_id != ".$data[post_user]); + e107::getDb()->update('user_extended', "user_plugin_forum_viewed = TRIM(BOTH ',' FROM REPLACE(CONCAT(',', user_plugin_forum_viewed, ','), ',".$data[post_thread].",', ',')) WHERE FIND_IN_SET('".$data[post_thread]."', user_plugin_forum_viewed) AND user_extended_id != ".$data[post_user]); + + } + + + + +} //end class + diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index e5fc95adc..eaa10e65c 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -309,28 +309,33 @@ str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_top + if(empty($FORUM_TEMPLATE)) { // include(e_PLUGIN.'forum/templates/forum_template.php'); // Override with theme template - if (file_exists(THEME.'forum_template.php')) //v1.x fallback. + if(THEME_LEGACY !== true) //v2.x + { + $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers. + } + elseif (file_exists(THEME.'forum_template.php')) //v1.x fallback. { include(e_PLUGIN.'forum/templates/forum_template.php'); include_once(THEME.'forum_template.php'); } elseif(file_exists(THEME.'templates/forum/forum_template.php')) { - $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); + // $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); require_once(THEME.'templates/forum/forum_template.php'); } - else //v2.x + else { - $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers. + require_once(e_PLUGIN.'forum/templates/forum_template.php'); } } -if(is_array($FORUM_TEMPLATE)) // new v2.x format. +if(is_array($FORUM_TEMPLATE) && THEME_LEGACY !== true) // new v2.x format. { if(varset($FORUM_TEMPLATE['main-start'])) // correction of previous v2.x setup. diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 29669b155..93b2a8367 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -131,7 +131,7 @@ $forumInfo = $forum->forumGet($forumId); if (empty($FORUM_VIEW_START)) { - if(deftrue('BOOTSTRAP')) + if(THEME_LEGACY !== true) { $FORUM_VIEWFORUM_TEMPLATE = e107::getTemplate('forum','forum_viewforum'); } @@ -141,11 +141,11 @@ if (empty($FORUM_VIEW_START)) { require_once(THEME.'templates/forum/forum_viewforum_template.php'); } - elseif (file_exists(THEME.'forum_viewforum_template.php')) + elseif (file_exists(THEME.'forum_viewforum_template.php')) //v1.x { require_once(THEME.'forum_viewforum_template.php'); } - elseif (file_exists(THEME.'forum_template.php')) + elseif (file_exists(THEME.'forum_template.php')) //v1.x { require_once(THEME.'forum_template.php'); } @@ -160,7 +160,7 @@ if (empty($FORUM_VIEW_START)) } -if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // New v2.x bootstrap Template. +if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && THEME_LEGACY !== true) // New v2.x bootstrap Template. { $FORUM_VIEW_CAPTION = $FORUM_VIEWFORUM_TEMPLATE['caption']; diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 450746ee3..05ca2f9c8 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -205,7 +205,7 @@ if(file_exists(THEME.'forum_design.php')) // legacy file // New in v2.x -if(deftrue('BOOTSTRAP',false)) +if(THEME_LEGACY !== true) { $FORUM_VIEWTOPIC_TEMPLATE = e107::getTemplate('forum','forum_viewtopic'); @@ -220,7 +220,7 @@ if(deftrue('BOOTSTRAP',false)) } else { - if (!vartrue($FORUMSTART)) + if (empty($FORUMSTART)) { if(file_exists(THEME.'forum_viewtopic_template.php')) { @@ -606,7 +606,7 @@ if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->thread else { $ret = array('lastpost'=>$thread->threadInfo['thread_lastpost'], 'lastvisit'=>USERLV, 'thread'=>$thread->threadId, 'viewed'=>$threadsViewed); - $mes->addDebug(print_a($ret,true)); + e107::getDebug()->log($ret); unset($ret); } diff --git a/e107_plugins/forum/newforumposts_menu.php b/e107_plugins/forum/newforumposts_menu.php index c5f27d746..8fa1a1bbd 100755 --- a/e107_plugins/forum/newforumposts_menu.php +++ b/e107_plugins/forum/newforumposts_menu.php @@ -45,7 +45,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) $qry = " SELECT p.post_user, p.post_id, p.post_datestamp, p.post_user_anon, p.post_entry, - t.thread_id, t.thread_datestamp, t.thread_name, u.user_name, f.forum_sef + t.thread_id, t.thread_datestamp, t.thread_name, u.user_id, u.user_name, u.user_image, u.user_currentvisit, f.forum_sef FROM `#forum_post` as p LEFT JOIN `#forum_thread` AS t ON t.thread_id = p.post_thread @@ -67,14 +67,19 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) $pref = e107::getPref(); $qry = $this->getQuery(); + $ns = e107::getRender(); + $list = null; + $text = null; + if($results = $sql->gen($qry)) { - $text = "
    "; + $list = "
      "; while($row = $sql->fetch()) { + $datestamp = $tp->toDate($row['post_datestamp'], 'relative'); $id = $row['thread_id']; $topic = ($row['thread_datestamp'] == $row['post_datestamp'] ? '' : 'Re:'); @@ -116,22 +121,32 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) )); - $text .= "
    • "; + $list .= "
    • "; + + $list .= ""; + + $list .= "
      "; if (!empty($this->menuPref['title'])) { - $text .= "{$topic}
      {$post}
      ".LAN_FORUM_MENU_001." {$poster} {$datestamp}"; + $list .= "

      {$topic}

      {$post}
      ".LAN_FORUM_MENU_001." {$poster} {$datestamp}"; } else { - $text .= "".LAN_FORUM_MENU_001." {$poster} {$datestamp}
      {$post}
      "; + $list .= "".LAN_FORUM_MENU_001." {$poster} {$datestamp}
      {$post}
      "; } - $text .= "
    • "; + $list .= "
"; + + } - $text .= ""; + $list .= ""; + + $text = $list; } else { @@ -150,7 +165,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) // e107::debug('menuPref', $this->menuPref); - e107::getRender()->tablerender($caption, $text, 'nfp_menu'); + $ns->tablerender($caption, $text, 'nfp_menu'); } diff --git a/e107_plugins/forum/templates/forum_icons_template.php b/e107_plugins/forum/templates/forum_icons_template.php index e0d4d5769..3033e7fcd 100644 --- a/e107_plugins/forum/templates/forum_icons_template.php +++ b/e107_plugins/forum/templates/forum_icons_template.php @@ -65,7 +65,7 @@ define('IMAGE_untrack', ''.LAN_FORU
 
 // User info
 define('IMAGE_website', '<img src='); -define('IMAGE_email', ''.LAN_FORUM_2044.''); +define('IMAGE_email', ''.LAN_FORUM_2044.''); define('IMAGE_profile', ''.LAN_FORUM_4007.''); // action diff --git a/e107_plugins/forum/templates/forum_template.php b/e107_plugins/forum/templates/forum_template.php index 33661636f..67f9e6b47 100644 --- a/e107_plugins/forum/templates/forum_template.php +++ b/e107_plugins/forum/templates/forum_template.php @@ -27,7 +27,7 @@ if (!isset($FORUM_MAIN_FORUM)) { $SC_WRAPPER['LASTPOST:type=date'] = "{---}
"; $SC_WRAPPER['LASTPOST:type=url'] = " ".IMAGE_post2.""; - $FORUM_MAIN_FORUM = "
\n\n\n\n\n\n"; + $FORUM_MAIN_FORUM = "\n\n\n\n\n\n"; } if (!isset($FORUM_MAIN_END)) { diff --git a/e107_plugins/forum/templates/forum_viewforum_template.php b/e107_plugins/forum/templates/forum_viewforum_template.php index 51485e21e..a5f7cfae7 100644 --- a/e107_plugins/forum/templates/forum_viewforum_template.php +++ b/e107_plugins/forum/templates/forum_viewforum_template.php @@ -70,7 +70,7 @@ if(empty($FORUM_VIEW_START_CONTAINER)) "; } - +// XXX These templates should remain unchanged. if (empty($FORUM_VIEW_FORUM)) { $SC_WRAPPER['LASTPOST:type=date'] = "{---}
"; $SC_WRAPPER['LASTPOST:type=url'] = " ".IMAGE_post2.""; @@ -91,7 +91,7 @@ if (empty($FORUM_VIEW_FORUM)) {
- + "; } diff --git a/e107_plugins/list_new/list_class.php b/e107_plugins/list_new/list_class.php index d78f89800..f23c436fd 100644 --- a/e107_plugins/list_new/list_class.php +++ b/e107_plugins/list_new/list_class.php @@ -604,11 +604,11 @@ class listclass global $qs; $lvisit = defined('USERLV') ? USERLV : time() + 1000; // Set default value - if(vartrue($qs[0]) == "new") + if(!empty($qs[0]) && $qs[0] === "new") { - if(vartrue($this->list_pref['new_page_timelapse'])) + if(!empty($this->list_pref['new_page_timelapse'])) { - if(vartrue($this->list_pref['new_page_timelapse_days']) && is_numeric($this->list_pref['new_page_timelapse_days'])) + if(!empty($this->list_pref['new_page_timelapse_days']) && is_numeric($this->list_pref['new_page_timelapse_days'])) { $days = $this->list_pref['new_page_timelapse_days']; } diff --git a/e107_plugins/news/news.php b/e107_plugins/news/news.php index ded79cd37..cd7a4970c 100644 --- a/e107_plugins/news/news.php +++ b/e107_plugins/news/news.php @@ -33,6 +33,7 @@ class news_front private $text = null; private $pref = array(); private $debugInfo = array(); + private $cacheRefreshTime = false; // private $interval = 1; function __construct() @@ -44,6 +45,7 @@ class news_front $this->pref = e107::getPref(); + $this->cacheRefreshTime = vartrue($this->pref['news_cache_timeout'],false); // $this->interval = $this->pref['newsposts']-$this>pref['newsposts_archive']; require_once(e_HANDLER."news_class.php"); @@ -258,9 +260,9 @@ class news_front echo "

News Debug Info

"; echo "action: ".$this->action." "; echo "
subaction: ".$this->subAction." "; - echo "
route ".$this->route." "; + echo "
route: ".$this->route." "; echo "
e_QUERY: ".e_QUERY." "; - + echo "
CacheTimeout: ".$this->cacheRefreshTime." "; echo "
_GET: ".print_r($_GET,true); foreach($this->debugInfo as $key=>$val) @@ -520,9 +522,9 @@ class news_front $this->addDebug("checkCache", 'true'); $e107cache->setMD5(null); - $cache_data = $e107cache->retrieve($cacheString); - $cache_title = $e107cache->retrieve($cacheString."_title"); - $cache_diz = $e107cache->retrieve($cacheString."_diz"); + $cache_data = $e107cache->retrieve($cacheString, $this->cacheRefreshTime); + $cache_title = $e107cache->retrieve($cacheString."_title", $this->cacheRefreshTime); + $cache_diz = $e107cache->retrieve($cacheString."_diz", $this->cacheRefreshTime); $etitle = ($cache_title != "e_PAGETITLE") ? $cache_title : ""; $ediz = ($cache_diz != "META_DESCRIPTION") ? $cache_diz : ""; @@ -1033,13 +1035,14 @@ class news_front { global $comment_edit_query; //FIXME - kill me $comment_edit_query = 'comment.news.'.$news['news_id']; - $comments = e107::getComment()->compose_comment('news', 'comment', $news['news_id'], null, $news['news_title'], false, true); + $text = e107::getComment()->compose_comment('news', 'comment', $news['news_id'], null, $news['news_title'], false, 'html'); - if(!empty($comments)) + if(!empty($text)) { - $text = $comments['comment_form'] . $comments['comment'] .$comments['moderate']; - return e107::getRender()->tablerender($comments['caption'], $text,'comment', true); + // $text = $comments['comment_form'] . $comments['comment'] .$comments['moderate']; + return $text; + // return e107::getRender()->tablerender($comments['caption'], $text,'comment', true); } } diff --git a/e107_plugins/news/news_carousel.css b/e107_plugins/news/news_carousel.css index ba949f41b..ef2905246 100644 --- a/e107_plugins/news/news_carousel.css +++ b/e107_plugins/news/news_carousel.css @@ -7,6 +7,7 @@ #news-carousel-images { margin-top:20px; padding-right:0; height:350px } } +#news-carousel-images img { min-height: 350px; min-width: 100%; max-width:150%; } #news-carousel-images .carousel-caption { left:15px; right:15px; margin:0; padding:0; bottom:10px; text-align:left } #news-carousel-images .carousel-caption h1 { margin:0 } #news-carousel-images .carousel-caption small { font-size: 11px; margin: 0; text-transform: uppercase; } diff --git a/e107_plugins/online/templates/online_menu_template.php b/e107_plugins/online/templates/online_menu_template.php index 335c964f0..9420f9678 100644 --- a/e107_plugins/online/templates/online_menu_template.php +++ b/e107_plugins/online/templates/online_menu_template.php @@ -95,7 +95,7 @@ $ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS'] = "
  • {---}
  • "; -$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBER_TOTAL'] = "
  • ".LAN_ONLINE_2."{---}
  • "; +$ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBERS_TOTAL'] = "
  • ".LAN_ONLINE_2."{---}
  • "; $ONLINE_MENU_WRAPPER['extended']['ONLINE_MEMBER_NEWEST'] = "
  • ".LAN_ONLINE_6."
    • {---}
  • "; $ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST'] = "".LAN_ONLINE_8."{---}
    "; $ONLINE_MENU_WRAPPER['extended']['ONLINE_MOST_MEMBERS'] = LAN_ONLINE_2."{---}"; diff --git a/e107_plugins/rss_menu/rss_sql.php b/e107_plugins/rss_menu/rss_sql.php index 2686a8c33..e79ebb93d 100644 --- a/e107_plugins/rss_menu/rss_sql.php +++ b/e107_plugins/rss_menu/rss_sql.php @@ -10,4 +10,4 @@ CREATE TABLE rss ( rss_limit tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (rss_id), KEY rss_name (rss_name) -) ENGINE=MyISAM; +) ENGINE=MyISAM; \ No newline at end of file diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index 5b5db8f4f..a0b550a30 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -533,6 +533,13 @@ class wysiwyg {title: 'Code Highlighted', block: 'pre', classes: 'prettyprint linenums' } ]}, + {title: 'Lists', items: [ + {title: 'FontAwesome', selector: 'ul', classes: 'fa-ul' }, + {title: 'FontAwesome List Icon', selector: 'i', classes: 'fa-li' }, + {title: 'Bootstrap Listgroup', selector: 'ul', classes: 'list-group' }, + {title: 'Bootstrap Listgroup Item', selector: 'li', classes: 'list-group-item' }, + ]}, + {title: 'Alignment', items: [ {title: 'Left', block: 'div', classes: 'text-left', icon: 'alignleft'}, {title: 'Center', block: 'div',classes: 'text-center', icon: 'aligncenter'}, @@ -615,6 +622,8 @@ class wysiwyg {title: 'Button (Danger)', value: 'btn btn-danger'} ]"; + + /* $ret['setup'] = "function(ed) { ed.addMenuItem('test', { text: 'Clear Floats', diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 4767c552d..2d1a26974 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -260,7 +260,11 @@ img.image-selector { margin-bottom:0; } .dropdown-menu img { padding: 0 0; margin-right: 10px; } ul.navbar-nav li ul.dropdown-menu > li a img, -ul.navbar-nav li ul.dropdown-menu > li a i { +ul.navbar-nav li ul.dropdown-menu > li a i, +ul#e-latest img, +ul#e-latest i, +ul#e-status img, +ul#e-status i { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); @@ -270,7 +274,11 @@ ul.navbar-nav li ul.dropdown-menu > li a i { } ul.navbar-nav li ul.dropdown-menu a:hover i, -ul.navbar-nav li ul.dropdown-menu a:hover img +ul.navbar-nav li ul.dropdown-menu a:hover img, +ul#e-latest a:hover img, +ul#e-latest a:hover i, +ul#e-status a:hover img, +ul#e-status a:hover i { filter: none; -webkit-filter: none; @@ -1230,8 +1238,10 @@ li.rssRow > div { /* Theme selection */ -.admin-theme-thumb { width:100%; height:130px;overflow:hidden;border:1px solid black; margin:0; margin-bottom:10px; padding:0; } + +.admin-theme-thumb { position:relative; width:100%; height:130px;overflow:hidden;border:1px solid black; margin:0; margin-bottom:10px; padding:0; } .admin-theme-thumb:hover { opacity:0.4 } +.admin-theme-thumb img { position:absolute; height:130px; left:-10px; min-width:110%; } .admin-theme-options { transition: opacity .20s ease-in-out; @@ -1325,6 +1335,14 @@ footer { } */ +@media (max-width: 1400px ){ + +ul.navbar-nav.navbar-left > li > a > i { display:none; } + +} + + + @media (max-width: 1100px) { .navbar-header { float: none; diff --git a/e107_themes/bootstrap3/admin_template.php b/e107_themes/bootstrap3/admin_template.php index 594df8448..3406b2d5c 100644 --- a/e107_themes/bootstrap3/admin_template.php +++ b/e107_themes/bootstrap3/admin_template.php @@ -26,8 +26,8 @@ $E_ADMIN_NAVIGATION['start_other'] = '
    {NEWFLAG}{FORUMNAME}
    {FORUMDESCRIPTION}{FORUMSUBFORUMS}
    {THREADS}{REPLIES}{LASTPOST:type=date}{LASTPOSTUSER}{LASTPOST:type=url}
    {NEWFLAG}{FORUMNAME}
    {FORUMDESCRIPTION}{FORUMSUBFORUMS}
    {THREADS}{REPLIES}{LASTPOST}
    {POSTER}
    {THREADDATE}
    {REPLIES} {VIEWS}{LASTPOST:type=date}{LASTPOSTUSER}{LASTPOST:type=url}{LASTPOST}