From 299052480371b25e37edf3dc86f314371a2b4c50 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 16 Dec 2012 16:02:13 -0800 Subject: [PATCH] Default-install fixes. Login Menu Template upgraded --- e107_admin/db.php | 2 +- e107_core/xml/default_install.xml | 895 ++++++++++-------- e107_handlers/online_class.php | 2 +- e107_handlers/xml_class.php | 9 +- .../login_menu/login_menu_template.php | 48 +- install_.php | 4 +- 6 files changed, 577 insertions(+), 383 deletions(-) diff --git a/e107_admin/db.php b/e107_admin/db.php index dd0a0a74b..57aa83492 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -672,7 +672,7 @@ class system_tools
- ".$frm->admin_button('exportXmlFile', "Export File", 'exportXmlFile')." + ".$frm->admin_button('exportXmlFile', "Export File", 'other')."
"; diff --git a/e107_core/xml/default_install.xml b/e107_core/xml/default_install.xml index d9e508878..fac48fe84 100644 --- a/e107_core/xml/default_install.xml +++ b/e107_core/xml/default_install.xml @@ -25,8 +25,8 @@ 0 0 0 - 247 - desc + 247 + desc 0 0 e107cookie @@ -69,11 +69,22 @@ )]]> + 'tinymce', +)]]> + 'siteinfo', +)]]> + 'news', + 'page' => 'page', +)]]> 0 default 0 0 + 0 100 1 30 @@ -86,12 +97,15 @@ '', )]]> + 1 80 /usr/X11R6/bin/ 80 1 0 0 + %A, %d %b, %Y + %I:%M %p 1251664949 0 @@ -102,8 +116,6 @@ 0 30 %A %d %B %Y - %H:%M:%S - %A, %d %b, %Y - %I:%M %p 3 none 4 @@ -116,7 +128,7 @@ '', )]]> - + 0 array ( @@ -139,6 +151,12 @@ 0 0 0 + '1.0', + 'page' => '1.0', + 'siteinfo' => '1.0', + 'tinymce' => '1.0', +)]]> 254 250 1 @@ -159,7 +177,7 @@ 1 0 - %d %b : %H:%M + %d %b %Y : %H:%M 0 3 @@ -190,28 +208,22 @@ City, State, Country e107 Website System e107 Website System - jayya - - 3_column - - array ( - '@attributes' => - array ( - 'title' => '3 Columns', - 'preview' => 'preview.jpg', - 'default' => 'true', - ), - 0 => '', - ), - '2_column' => + My Website + e107 Website System + bootstrap + + default + array ( '@attributes' => array ( 'title' => '2 Columns', - 'preview' => 'preview.jpg', + 'default' => 'true', ), - 0 => '', + 'custompages' => 'usersettings.php', + 0 => NULL, ), )]]> @@ -324,6 +336,7 @@ City, State, Country 1 3 cookie + 1 0 1 1 @@ -491,305 +504,494 @@ City, State, Country )]]> - - - 1 - wmessage - 1145848343 - 1 - - 0 - Welcome! - - - - - 1 - Home - index.php - - - 1 - 1 - 0 - 0 - 0 - - - 3 - Members - user.php - - - 1 - 3 - 0 - 0 - 0 - - - 4 - Submit News - submitnews.php - - - 1 - 4 - 0 - 0 - 0 - - - 5 - Contact Us - contact.php - - - 1 - 5 - 0 - 0 - 0 - - - - - 1 - login_menu - 1 - 1 - 0 - - login_menu/ - - - - - 3 - online_menu - 0 - 0 - 0 - - online/ - - - - - 4 - blogcalendar_menu - 0 - 0 - 0 - - blogcalendar_menu/ - - - - - 5 - tree_menu - 0 - 0 - 0 - - tree_menu/ - - - - - 6 - search_menu - 0 - 0 - 0 - - search_menu/ - - - - - 7 - compliance_menu - 0 - 0 - 0 - - siteinfo/ - - - - - 8 - userlanguage_menu - 0 - 0 - 0 - - user_menu/ - - - - - 9 - powered_by_menu - 2 - 2 - 0 - - siteinfo/ - - - - - 12 - banner_menu - 0 - 0 - 0 - - banner/ - - - - - 14 - clock_menu - 0 - 0 - 0 - - clock_menu/ - - - - - 15 - sitebutton_menu - 0 - 0 - 0 - - siteinfo/ - - - - - 16 - comment_menu - 0 - 0 - 0 - - comment_menu/ - - - - - 17 - lastseen_menu - 0 - 0 - 0 - - online/ - - - - - 18 - other_news_menu - 0 - 0 - 0 - - other_news_menu/ - - - - - 19 - other_news2_menu - 0 - 0 - 0 - - other_news_menu/ - - - - - 20 - admin_menu - 0 - 0 - 0 - - admin_menu/ - - - - - 24 - counter_menu - 0 - 0 - 0 - - siteinfo/ - - - - - 25 - latestnews_menu - 0 - 0 - 0 - - siteinfo/ - - - - - 26 - usertheme_menu - 0 - 0 - 0 - - user_menu/ - - - - + + + 1 + _common + _common_image + (Common Images) + Media in this category will be available in all areas of admin. + 253 + + 0 + + + 2 + _common + _common_file + (Common Files) + Media in this category will be available in all areas of admin. + 253 + + 0 + + + 3 + news + news + News + Will be available in the news area. + 253 + + 1 + + + 4 + page + page + Custom Pages + Will be available in the custom pages area of admin. + 253 + + 0 + + + 5 + download + download_image + Download Images + + 253 + + 0 + + + 6 + download + download_thumb + Download Thumbnails + + 253 + + 0 + + + 7 + download + download_file + Download Files + + 253 + + 0 + + + 8 + news + news_thumb + News Thumbnails (Legacy) + Legacy news thumbnails. + 253 + + 1 + + + 9 + _icon + _icon_16 + Icons 16px + Available where icons are used in admin. + 253 + + 0 + + + 10 + _icon + _icon_32 + Icons 32px + Available where icons are used in admin. + 253 + + 0 + + + 11 + _icon + _icon_48 + Icons 48px + Available where icons are used in admin. + 253 + + 0 + + + 12 + _icon + _icon_64 + Icons 64px + Available where icons are used in admin. + 253 + + 0 + + + + + 1 + wmessage + 1145848343 + 1 + Hello World! + 0 + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque mattis sapien nec velit laoreet pulvinar. Integer sollicitudin risus nec nunc aliquam condimentum. Quisque malesuada posuere vulputate. Aliquam sit amet metus quam? Sed quam sem, condimentum ac convallis vel, posuere at augue. Cras accumsan, erat a laoreet blandit, turpis enim ullamcorper lectus, a tempus justo nunc id orci. Nulla vehicula, dolor vel rhoncus varius, nunc sapien laoreet turpis; id commodo arcu erat fringilla orci. Aenean gravida adipiscing nulla, ut tristique erat interdum porta. Sed at semper felis. Nullam bibendum faucibus gravida. In leo enim, gravida non molestie non, ultricies id nunc. Maecenas placerat interdum luctus. Ut mauris nisi, faucibus eu venenatis ac, lobortis ac velit. Donec sed leo urna, et vehicula neque. Curabitur malesuada auctor ornare. + + + + + + 1 + Home + index.php + + + 1 + 0 + 0 + 0 + 0 + + + + + 3 + Members + user.php + + + 2 + 3 + 0 + 0 + 0 + + + + + 4 + Submit News + submitnews.php + + + 2 + 4 + 0 + 0 + 0 + + + + + 5 + Contact Us + contact.php + + + 1 + 5 + 0 + 0 + 0 + + + + + 6 + News + news.php + + + 1 + 1 + 0 + 0 + 0 + + + + + 7 + Content + page.php + + + 1 + 2 + 0 + 0 + 0 + + + + + + + 1 + login_menu + 1 + 1 + 0 + + login_menu/ + + + + + 2 + online_menu + 0 + 0 + 0 + + online/ + + + + + 3 + blogcalendar_menu + 0 + 0 + 0 + + blogcalendar_menu/ + + + + + 4 + tree_menu + 0 + 0 + 0 + + tree_menu/ + + + + + 5 + search_menu + 0 + 0 + 0 + + search_menu/ + + + + + 6 + counter_menu + 0 + 0 + + + siteinfo/ + + + + + 7 + userlanguage_menu + 0 + 0 + 0 + + user_menu/ + + + + + 8 + compliance_menu + 0 + 0 + + + siteinfo/ + + + + + 9 + other_news_menu + 0 + 0 + + + news/ + + + + + 10 + clock_menu + 0 + 0 + 0 + + clock_menu/ + + + + + 11 + other_news2_menu + 0 + 0 + + + news/ + + + + + 12 + comment_menu + 0 + 0 + 0 + + comment_menu/ + + + + + 13 + lastseen_menu + 0 + 0 + 0 + + online/ + + + + + 14 + news_months_menu + 0 + 0 + + + news/ + + + + + 15 + admin_menu + 0 + 0 + 0 + + admin_menu/ + + + + + 16 + news_categories_menu + 0 + 0 + + + news/ + + + + + 17 + latestnews_menu + 0 + 0 + + + news/ + + + + + 18 + usertheme_menu + 0 + 0 + 0 + + user_menu/ + + + + + 19 + powered_by_menu + 0 + 0 + + + siteinfo/ + + + + + 20 + sitebutton_menu + 0 + 0 + + + siteinfo/ + + + + + 21 + news_months_menu + 1 + 1 + + + news/ + + + + - - 1 - Welcome to e107 - Welcome :-) :-( :-))) - - 1251665200 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - - welcome.png - 0 - - - - - 1 - Misc - news_16.png - - + + 1 + Welcome to e107 + welcome-to-e107 + [p]Welcome [img=style=vertical-align%3A+middle%3B+border%3A+0%3B]{e_IMAGE}emotes/default/smile.png[/img] [img=style=vertical-align%3A+middle%3B+border%3A+0%3B]{e_IMAGE}emotes/default/frown.png[/img] [img=style=vertical-align%3A+middle%3B+border%3A+0%3B]{e_IMAGE}emotes/default/smile.png[/img] ))[/p] + [p] [/p] + + + 1355612400 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + 0 + + + + + 1 + Misc + + + + 254 + news_16.png + 0 + + @@ -816,56 +1018,5 @@ City, State, Country - - - 1 - _common - (Common Area) - - 254 - - - 2 - news - News - - 254 - - - 3 - page - Custom Pages - - 254 - - - 4 - _icon_16 - Icons 16px - - 254 - - - 5 - _icon_32 - Icons 32px - - 254 - - - 6 - _icon_48 - Icons 48px - - 254 - - - 7 - _icon_64 - Icons 64px - - 254 - - \ No newline at end of file diff --git a/e107_handlers/online_class.php b/e107_handlers/online_class.php index 432b746e8..bec39b1e6 100755 --- a/e107_handlers/online_class.php +++ b/e107_handlers/online_class.php @@ -214,7 +214,7 @@ class e_online } // Always allow localhost - any problems are usually semi-intentional! - if (($row['online_ip'] != '127.0.0.1') && ($row['online_ip'] != e107::LOCALHOST_IP)) + if ((varset($row['online_ip']) != '127.0.0.1') && (varset($row['online_ip']) != e107::LOCALHOST_IP)) { // Check for excessive access if ($row['online_pagecount'] > $online_bancount) diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 998a5d3ae..af95efe05 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -773,10 +773,11 @@ class xmlClass */ public function e107Export($xmlprefs, $tables, $debug = FALSE) { + error_reporting(0); require_once(e_ADMIN."ver.php"); $text = "\n"; - $text .= "\n"; + $text .= "\n"; if(varset($xmlprefs)) // Export Core Preferences. { @@ -789,7 +790,7 @@ class xmlClass { if(isset($val)) { - $text .= "\t\t<".$type." name='$key'>".$this->e107ExportValue($val)."\n"; + $text .= "\t\t<".$type." name=\"".$key."\">".$this->e107ExportValue($val)."\n"; } } } @@ -803,13 +804,13 @@ class xmlClass { $eTable= str_replace(MPREFIX,"",$tbl); e107::getDB()->db_Select($eTable, "*"); - $text .= "\t\n"; + $text .= "\t\n"; while($row = e107::getDB()-> db_Fetch()) { $text .= "\t\t\n"; foreach($row as $key=>$val) { - $text .= "\t\t\t".$this->e107ExportValue($val,$key)."\n"; + $text .= "\t\t\t".$this->e107ExportValue($val,$key)."\n"; } $text .= "\t\t\n"; diff --git a/e107_plugins/login_menu/login_menu_template.php b/e107_plugins/login_menu/login_menu_template.php index ec1008fe5..b8355def1 100644 --- a/e107_plugins/login_menu/login_menu_template.php +++ b/e107_plugins/login_menu/login_menu_template.php @@ -134,9 +134,9 @@ if ( ! isset($LOGIN_MENU_LOGGED)) - LM_STAT_LABEL - LM_STAT_EMPTY -*/ - - $sc_style['LM_MAINTENANCE']['pre'] = '
'; + ---------------- Legacy Layout -------------------------------- + + $sc_style['LM_MAINTENANCE']['pre'] = '
'; $sc_style['LM_MAINTENANCE']['post'] = '

'; $sc_style['LM_ADMINLINK']['pre'] = ''; @@ -165,6 +165,48 @@ if ( ! isset($LOGIN_MENU_LOGGED)) {LM_STATS} {LM_LISTNEW_LINK} '; +*/ + +// New Template for v2. Bullets via CSS etc. Login-Menu Stats may require work. + + $sc_style['LM_MAINTENANCE']['pre'] = ''; + + $sc_style['LM_ADMINLINK']['pre'] = ''; + + $sc_style['LM_EXTERNAL_LINKS']['pre'] = ''; + + $sc_style['LM_STATS']['pre'] = '
  • '; + $sc_style['LM_STATS']['post'] = '
  • '; + + $sc_style['LM_LISTNEW_LINK']['pre'] = ''; + + $sc_style['LM_ADMIN_CONFIGURE']['pre'] = ''; + + $sc_style['LM_LOGOUT']['pre'] = ''; + + $sc_style['LM_LOGOUT']['pre'] = ''; + + + $LOGIN_MENU_LOGGED = ' + + '; } if ( ! isset($LOGIN_MENU_EXTERNAL_LINK)) diff --git a/install_.php b/install_.php index fd2587114..01e35abc1 100644 --- a/install_.php +++ b/install_.php @@ -593,11 +593,11 @@ class e_install //TODO Add option to continue install even if DB exists. - if($this->previous_steps['mysql']['createdb'] == 1) + if($this->previous_steps['mysql']['createdb'] == 1 || !$DB_ALREADY_EXISTS) { $query = 'CREATE DATABASE '.$this->previous_steps['mysql']['db'].' CHARACTER SET `utf8` '; } - else + elseif($DB_ALREADY_EXISTS) { $query = 'ALTER DATABASE '.$this->previous_steps['mysql']['db'].' CHARACTER SET `utf8` '; }