From d2db9951a959ac10a3886ddbeedb99e48694cd04 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 Mar 2017 12:11:56 -0700 Subject: [PATCH 01/66] Issue #2478 - Search --- e107_handlers/search_class.php | 8 ++++---- e107_plugins/download/e_search.php | 8 ++++---- search.php | 11 +++++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/e107_handlers/search_class.php b/e107_handlers/search_class.php index 63051d666..9dab98f14 100644 --- a/e107_handlers/search_class.php +++ b/e107_handlers/search_class.php @@ -226,7 +226,7 @@ class e_search foreach ($search_fields as $field_key => $field) { - $search_query[] = "(". varset($weights[$field_key],0.6)." * (MATCH(".$field.") AGAINST ('".$this -> query."' IN BOOLEAN MODE)))"; + $search_query[] = "(". varset($weights[$field_key],0.6)." * (MATCH(".$field.") AGAINST ('".str_replace(" ","+",$this -> query)."' IN BOOLEAN MODE)))"; $field_query[] = "MATCH(".$field.") AGAINST ('".$this -> query."' IN BOOLEAN MODE)"; } @@ -239,8 +239,8 @@ class e_search { $sql_order .= ', '.$sort_key.' '.$sort_value; } - - $limit = " LIMIT ".$result_flag.",".$search_res; + + $limit = " LIMIT ".intval($result_flag).",".$search_res; $sql_query = "SELECT SQL_CALC_FOUND_ROWS ".$return_fields.", (".$match_query.") AS relevance FROM #".$table." WHERE ".$where." (".$field_query.") HAVING relevance > 0 ORDER BY relevance DESC ".$sql_order.$limit.";"; @@ -250,7 +250,7 @@ class e_search if(E107_DBG_SQLQUERIES) { - echo e107::getMessage()->addDebug($sql_query)->render(); + echo e107::getMessage()->addDebug(str_replace('#',MPREFIX,$sql_query))->render(); } diff --git a/e107_plugins/download/e_search.php b/e107_plugins/download/e_search.php index 4afe14adb..606cada13 100644 --- a/e107_plugins/download/e_search.php +++ b/e107_plugins/download/e_search.php @@ -46,10 +46,10 @@ class download_search extends e_search // include plugin-folder in the name. 'author'=> array('type' => 'author', 'text' => LAN_SEARCH_61) ), - 'return_fields' => array('d.download_id', 'd.download_sef','d.download_category', 'download_category_id', 'd.download_name', 'd.download_description', 'd.download_author', 'd.download_author_website', 'd.download_datestamp', 'd.download_class', 'c.download_category_name', 'c.download_category_class'), - 'search_fields' => array('d.download_name'=> '1.2', 'd.download_url' => '0.9', 'd.download_description'=>'0.6', 'd.download_author'=>'0.6', 'd.download_author_website'=>'0.4'), // fields and weights. + 'return_fields' => array('d.download_id', 'd.download_sef','d.download_category', 'c.download_category_id', 'd.download_name', 'd.download_description', 'd.download_author', 'd.download_author_website', 'd.download_datestamp', 'd.download_class', 'c.download_category_name', 'c.download_category_class'), + 'search_fields' => array('d.download_name'=> '1.2', 'd.download_url' => '0.9', 'd.download_description'=>'0.6', 'd.download_author'=>'0.6', 'd.download_author_website'=>'0.4'), // fields and weights. - 'order' => array('download_datestamp' => DESC), + 'order' => array('download_datestamp' => 'DESC'), 'refpage' => e_PLUGIN_ABS.'download/download.php' ); @@ -94,7 +94,7 @@ class download_search extends e_search // include plugin-folder in the name. { $tp = e107::getParser(); - $qry = "download_active > '0' AND d.download_visible IN (".USERCLASS_LIST.") AND c.download_category_class IN (".USERCLASS_LIST.") AND".$advanced_where; + $qry = "download_active > '0' AND d.download_visible IN (".USERCLASS_LIST.") AND c.download_category_class IN (".USERCLASS_LIST.") AND"; if (isset($parm['cat']) && is_numeric($parm['cat'])) { diff --git a/search.php b/search.php index 6fa5538c3..dad89db5d 100644 --- a/search.php +++ b/search.php @@ -51,7 +51,8 @@ class search extends e_shortcode private $auto_order = 1000; private $enhanced = false; private $query = null; - private $result_flag = false; + private $doSearch = false; + private $result_flag = 0; // same as 'from' private $message = ''; public $template = array(); private $enhancedTypes = array( @@ -894,7 +895,7 @@ class search extends e_shortcode $_GET = $this->magic_search($_GET); } - $full_query = $tp->filter($_GET['q'],'w'); + $full_query = $tp->filter($_GET['q']); if ($_GET['in']) { @@ -976,8 +977,10 @@ class search extends e_shortcode if ($this->query) { - $this->result_flag = true; // intval($_GET['r']); + $this->result_flag = intval($_GET['r']); + $this->doSearch = true; } + return $this->query; } @@ -988,7 +991,7 @@ class search extends e_shortcode public function doSearch() { - return $this->result_flag; + return $this->doSearch; } From ab79296f4c18744a5935127e743acc339198babc Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 Mar 2017 12:23:44 -0700 Subject: [PATCH 02/66] Fixes #2505 - Social XURL icons template limitation fixed. --- e107_plugins/social/e_shortcode.php | 4 +++- .../social/templates/social_template.php | 17 ----------------- .../social/templates/social_xurl_template.php | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 e107_plugins/social/templates/social_template.php create mode 100644 e107_plugins/social/templates/social_xurl_template.php diff --git a/e107_plugins/social/e_shortcode.php b/e107_plugins/social/e_shortcode.php index dd126be4c..e95a9b092 100644 --- a/e107_plugins/social/e_shortcode.php +++ b/e107_plugins/social/e_shortcode.php @@ -61,7 +61,9 @@ class social_shortcodes extends e_shortcode function sc_xurl_icons($parm='') { $tp = e107::getParser(); - $template = e107::getTemplate('social','social','xurl_icons'); + $tmpl = !empty($parm['template']) ? $parm['template'] : 'default'; + + $template = e107::getTemplate('social','social_xurl',$tmpl); $social = array( 'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url'=>'news')) : ''), 'title'=>'RSS/Atom Feed'), diff --git a/e107_plugins/social/templates/social_template.php b/e107_plugins/social/templates/social_template.php deleted file mode 100644 index 7eb8dd47b..000000000 --- a/e107_plugins/social/templates/social_template.php +++ /dev/null @@ -1,17 +0,0 @@ -'; - $SOCIAL_TEMPLATE['xurl_icons']['item'] = ''; - $SOCIAL_TEMPLATE['xurl_icons']['end'] = '

'; \ No newline at end of file diff --git a/e107_plugins/social/templates/social_xurl_template.php b/e107_plugins/social/templates/social_xurl_template.php new file mode 100644 index 000000000..c566a489d --- /dev/null +++ b/e107_plugins/social/templates/social_xurl_template.php @@ -0,0 +1,17 @@ +'; + $SOCIAL_XURL_TEMPLATE['default']['item'] = ''; + $SOCIAL_XURL_TEMPLATE['default']['end'] = '

'; \ No newline at end of file From 209018fb264b0479f7a3a9e394648ecdaaedeb23 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 Mar 2017 12:24:01 -0700 Subject: [PATCH 03/66] News search LAN fix. --- e107_admin/search.php | 2 +- e107_plugins/news/e_search.php | 2 +- search.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_admin/search.php b/e107_admin/search.php index 578d985e5..d2e0697a9 100644 --- a/e107_admin/search.php +++ b/e107_admin/search.php @@ -16,7 +16,7 @@ if (!getperms('X')) e107::redirect('admin'); exit; } - +e107::coreLan('search');// need LAN_SEARCH_98 e107::coreLan('search', true); $e_sub_cat = 'search'; diff --git a/e107_plugins/news/e_search.php b/e107_plugins/news/e_search.php index 4ce337c77..632c31eb1 100644 --- a/e107_plugins/news/e_search.php +++ b/e107_plugins/news/e_search.php @@ -55,7 +55,7 @@ class news_search extends e_search // include plugin-folder in the name. 'return_fields' => array('n.news_id', 'n.news_title', 'n.news_sef', 'n.news_body', 'n.news_extended', 'n.news_allow_comments', 'n.news_datestamp', 'n.news_category', 'c.category_name'), 'search_fields' => array('n.news_title' => '1.2', 'n.news_body' => '0.6', 'n.news_extended' => '0.6', 'n.news_summary' => '1.2'), // fields and their weights. - 'order' => array('news_datestamp' => DESC), + 'order' => array('news_datestamp' => 'DESC'), 'refpage' => 'news.php' ); diff --git a/search.php b/search.php index dad89db5d..4a0d067d6 100644 --- a/search.php +++ b/search.php @@ -980,7 +980,7 @@ class search extends e_shortcode $this->result_flag = intval($_GET['r']); $this->doSearch = true; } - + return $this->query; } From 863e1afee0a2733c0c7edf8fbb6826beb5263d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Car=C3=ADsio?= Date: Sat, 18 Mar 2017 23:51:07 -0300 Subject: [PATCH 04/66] Patch for the issue #2506 --- e107_plugins/forum/forum.php | 16 ++++++++-------- e107_plugins/forum/forum_viewforum.php | 8 ++++---- e107_plugins/forum/forum_viewtopic.php | 2 +- e107_plugins/forum/newforumposts_menu.php | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index eaa10e65c..4d7f9261e 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -390,7 +390,7 @@ foreach ($forumList['parents'] as $parent) $sc->setVars($parent); $sc->wrapper('forum/main/parent'); - $forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT, false, $sc); + $forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT, true, $sc); if (!count($forumList['forums'][$parent['forum_id']])) { $text .= "".LAN_FORUM_0068.""; @@ -424,7 +424,7 @@ foreach ($forumList['parents'] as $parent) if (isset($FORUM_MAIN_PARENT_END)) { //-- $forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT_END, $pVars); - $forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT_END, false, $sc); + $forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT_END, true, $sc); } } } @@ -629,20 +629,20 @@ if (e_QUERY == 'new') //-- $forum_newstring .= $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars); $sc->setVars($thread); - $forum_newstring .= $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, false, $sc); + $forum_newstring .= $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, true, $sc); } if (empty($newThreadList)) { //-- $nVars->NEWSPOSTNAME = LAN_FORUM_0029; //-- $forum_newstring = $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars); - $forum_newstring = $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, false, $sc); + $forum_newstring = $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, true, $sc); } //-- $forum_new_start = $tp->simpleParse($FORUM_NEWPOSTS_START, $nVars); //-- $forum_new_end = $tp->simpleParse($FORUM_NEWPOSTS_END, $nVars); - $forum_new_start = $tp->parseTemplate($FORUM_NEWPOSTS_START, false, $sc); - $forum_new_end = $tp->parseTemplate($FORUM_NEWPOSTS_END, false, $sc); + $forum_new_start = $tp->parseTemplate($FORUM_NEWPOSTS_START, true, $sc); + $forum_new_end = $tp->parseTemplate($FORUM_NEWPOSTS_END, true, $sc); if ($forum->prefs->get('enclose')) { @@ -664,11 +664,11 @@ $breadarray = array( //-- $forum_main_start = $tp->simpleParse($FORUM_MAIN_START, $fVars); $sc->wrapper('forum/main/start'); -$forum_main_start = $tp->parseTemplate($FORUM_MAIN_START, false, $sc); +$forum_main_start = $tp->parseTemplate($FORUM_MAIN_START, true, $sc); //-- $forum_main_end = $tp->simpleParse($FORUM_MAIN_END, $fVars); $sc->wrapper('forum/main/end'); -$forum_main_end = $tp->parseTemplate($FORUM_MAIN_END, false, $sc); +$forum_main_end = $tp->parseTemplate($FORUM_MAIN_END, true, $sc); if ($forum->prefs->get('enclose')) { diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 10423545f..ec12b2dbe 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -559,9 +559,9 @@ if($container_only) //var_dump ($FORUM_VIEW_START); // var_dump ($FORUM_VIEW_SUB); -$forum_view_start = $tp->parseTemplate($FORUM_VIEW_START_CONTAINER.$FORUM_VIEW_START, false, $sc); -$forum_view_forum = $tp->parseTemplate($forum_view_forum, false, $sc); -$forum_view_end = $tp->parseTemplate($FORUM_VIEW_END.$FORUM_VIEW_END_CONTAINER, false, $sc); +$forum_view_start = $tp->parseTemplate($FORUM_VIEW_START_CONTAINER.$FORUM_VIEW_START, true, $sc); +$forum_view_forum = $tp->parseTemplate($forum_view_forum, true, $sc); +$forum_view_end = $tp->parseTemplate($FORUM_VIEW_END.$FORUM_VIEW_END_CONTAINER, true, $sc); //$forum_view_start .= "

FVARS FORUM

".$tp->simpleParse($FORUM_VIEW_START, $fVars); //$forum_view_end = $tp->simpleParse($FORUM_VIEW_END, $fVars); @@ -569,7 +569,7 @@ $forum_view_end = $tp->parseTemplate($FORUM_VIEW_END.$FORUM_VIEW_END_CONTAINER, if ($forum->prefs->get('enclose')) { // $forum_view_subs???? - $caption = varset($FORUM_VIEW_CAPTION) ? $tp->parseTemplate($FORUM_VIEW_CAPTION, TRUE, $sc) : $forum->prefs->get('title'); + $caption = varset($FORUM_VIEW_CAPTION) ? $tp->parseTemplate($FORUM_VIEW_CAPTION, true, $sc) : $forum->prefs->get('title'); $ns->tablerender($caption, $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1')); } diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 05ca2f9c8..4799dc5a6 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -616,7 +616,7 @@ require_once (HEADERF); if ($forum->prefs->get('enclose')) { - $forumTitle = empty($FORUMCAPTION) ? e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME) : $tp->parseTemplate($FORUMCAPTION, TRUE, $sc); + $forumTitle = empty($FORUMCAPTION) ? e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME) : $tp->parseTemplate($FORUMCAPTION, true, $sc); $ns->tablerender($forumTitle, $mes->render().$forumstring, array('forum_viewtopic', 'main')); } else diff --git a/e107_plugins/forum/newforumposts_menu.php b/e107_plugins/forum/newforumposts_menu.php index 5b05385f4..b550106b0 100755 --- a/e107_plugins/forum/newforumposts_menu.php +++ b/e107_plugins/forum/newforumposts_menu.php @@ -111,7 +111,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) $sc = e107::getScBatch('view', 'forum')->setScVar('param',$param); - $list = $tp->parseTemplate($template['start'],true); + $list = $tp->parseTemplate($template['start'], true); while($row = $sql->fetch()) { @@ -119,7 +119,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) $sc->setScVar('postInfo', $row); $sc->setVars($row); - $list .= $tp->parseTemplate($template['item'],false,$sc); + $list .= $tp->parseTemplate($template['item'], true, $sc); /* @@ -189,7 +189,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php) - $list .= $tp->parseTemplate($template['end'],true); + $list .= $tp->parseTemplate($template['end'], true); $text = $list; From ce4e2be003a3253de7c514a79344f3eec8bc918d Mon Sep 17 00:00:00 2001 From: MikeyGMT Date: Sun, 19 Mar 2017 16:42:57 +0000 Subject: [PATCH 05/66] Text to Lans in Admin UI #6 Text to Lans in Admin UI #6 Checked prefs, theme and plugin manager, un/reinstalled featurebox, works fine. --- e107_handlers/admin_ui.php | 107 ++++++++++----------- e107_languages/English/English.php | 1 + e107_languages/English/admin/lan_admin.php | 7 ++ 3 files changed, 58 insertions(+), 57 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 724a4ec79..cbd310b91 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -1092,7 +1092,7 @@ class e_admin_dispatcher if(!$this->checkModeAccess($currentMode)) { $request->setAction('e403'); - e107::getMessage()->addError('You don\'t have permissions to view this page.') + e107::getMessage()->addError(LAN_NO_PERMISSIONS) ->addDebug('Mode access restriction triggered.'); return false; } @@ -1103,7 +1103,7 @@ class e_admin_dispatcher if(!$this->checkRouteAccess($route)) { $request->setAction('e403'); - e107::getMessage()->addError('You don\'t have permissions to view this page.') + e107::getMessage()->addError(LAN_NO_PERMISSIONS) ->addDebug('Route access restriction triggered:'.$route); return false; } @@ -1675,7 +1675,7 @@ class e_admin_controller if(!empty($this->disallow) && in_array($currentAction, $this->disallow)) { $request->setAction('e403'); - e107::getMessage()->addError('You don\'t have permissions to view this page.') + e107::getMessage()->addError(LAN_NO_PERMISSIONS) ->addDebug('Controller action disallowed restriction triggered.'); return false; } @@ -1684,7 +1684,7 @@ class e_admin_controller if(!empty($this->allow) && !in_array($currentAction, $this->allow)) { $request->setAction('e403'); - e107::getMessage()->addError('You don\'t have permissions to view this page.') + e107::getMessage()->addError(LAN_NO_PERMISSIONS) ->addDebug('Controller action not in allowed list restriction triggered.'); return false; } @@ -2167,7 +2167,7 @@ class e_admin_controller public function E404Page() { - return '
'.LAN_UI_404_BODY_ERROR.'
'; // TODO - lan + return '
'.LAN_UI_404_BODY_ERROR.'
'; } @@ -2184,7 +2184,7 @@ class e_admin_controller public function E403Page() { - return '
'.LAN_UI_403_BODY_ERROR.'
'; // TODO - lan + return '
'.LAN_UI_403_BODY_ERROR.'
'; } @@ -3246,8 +3246,7 @@ class e_admin_controller_ui extends e_admin_controller // check userclass manager class if (!isset($e_userclass->class_tree[$id]) || !$user->checkClass($e_userclass->class_tree[$id])) { - // TODO lan - $msg = $tp->lanVars("You don't have management permissions on [x]",$label); + $msg = $tp->lanVars(LAN_NO_ADMIN_PERMISSION,$label); $this->getTreeModel()->addMessageWarning($msg); unset($classes[$id],$msg); } @@ -3304,11 +3303,11 @@ class e_admin_controller_ui extends e_admin_controller case 'datestamp': $dateConvert = array( - "hour" => "1 hour ago", - "day" => "24 hours ago", - "week" => "1 week ago", - "month" => "1 month ago", - "year" => "1 year ago" + "hour" => LAN_UI_FILTER_PAST_HOUR,//"1 hour ago",//etc + "day" => LAN_UI_FILTER_PAST_24_HOURS, + "week" => LAN_UI_FILTER_PAST_WEEK, + "month" => LAN_UI_FILTER_PAST_MONTH, + "year" => LAN_UI_FILTER_PAST_YEAR ); $ky = $filter[2]; @@ -4669,32 +4668,32 @@ class e_admin_ui extends e_admin_controller_ui $res = $sql->insert('links', $linkArray); - // FIXME lans if($res !== FALSE) { - e107::getMessage()->addSuccess('Created Sitelink: '.($name ? $name : 'n/a').""); - $scount++; + e107::getMessage()->addSuccess(LAN_CREATED.": ".LAN_SITELINK.": ".($name ? $name : 'n/a')); + $scount++; } else { if($sql->getLastErrorNumber()) { - e107::getMessage()->addError('SQL Link Creation Error'); //TODO - Lan + e107::getMessage()->addError(LAN_CREATED_FAILED.": ".LAN_SITELINK.": ".$name.": ".LAN_SQL_ERROR); e107::getMessage()->addDebug('SQL Link Creation Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText()); - } + } else { - e107::getMessage()->addError('Unknown error: '.$name." not added"); + e107::getMessage()->addError(LAN_CREATED_FAILED.": ".LAN_SITELINK.": ".$name.": ".LAN_UNKNOWN_ERROR);//Unknown Error } } - + } - if($scount > 0) - { - e107::getMessage()->addSuccess("
{$scount} new sitelinks were added but are currently unassigned. You should now modify these links to your liking.

Modify Links"); + if($scount > 0) + { + e107::getMessage()->addSuccess(LAN_CREATED." (".$scount.") ".ADLAN_138); + e107::getMessage()->addSuccess("".LAN_CONFIGURE." ".ADLAN_138.""); return $scount; - } + } return false; @@ -4749,30 +4748,29 @@ class e_admin_ui extends e_admin_controller_ui $res = $sql->insert('featurebox', $fbArray); - // FIXME lans if($res !== FALSE) { - e107::getMessage()->addSuccess('Created Featurebox Item: '.($name ? $name : 'n/a').""); - $scount++; + e107::getMessage()->addSuccess(LAN_CREATED.": ".LAN_PLUGIN_FEATUREBOX_NAME.": ".($name ? $name : 'n/a')); + $scount++; } else { if($sql->getLastErrorNumber()) { - e107::getMessage()->addError('SQL Featurebox Creation Error'); //TODO - Lan - e107::getMessage()->addDebug('SQL Featurebox Creation Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText()); + e107::getMessage()->addError(LAN_CREATED_FAILED.": ".LAN_PLUGIN_FEATUREBOX_NAME.": ".$name.": ".LAN_SQL_ERROR); + e107::getMessage()->addDebug('SQL Featurebox Creation Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText()); } else { - e107::getMessage()->addError('Unknown error: '.$name." not added"); + e107::getMessage()->addError(LAN_CREATED_FAILED.": ".$name.": ".LAN_UNKNOWN_ERROR); } } - } if($scount > 0) { - e107::getMessage()->addSuccess("
{$scount} new featurebox items were added but are currently unassigned. You should now modify these items to your liking.

Modify Featurebox Items"); + e107::getMessage()->addSuccess(LAN_CREATED." (".$scount.") ".LAN_PLUGIN_FEATUREBOX_NAME); + e107::getMessage()->addSuccess(""); return $scount; } @@ -4891,8 +4889,8 @@ class e_admin_ui extends e_admin_controller_ui } else { - // TODO lan - $this->getTreeModel()->addMessageWarning("Comma list is empty, aborting.")->setMessages(); + $this->getTreeModel()->addMessageWarning(LAN_UPDATED_FAILED)->setMessages();//"Comma list is empty, aborting." + $this->getTreeModel()->addDebug(LAN_UPDATED_FAILED.": Comma list is empty, aborting.")->setMessages(); } break; @@ -5139,7 +5137,7 @@ class e_admin_ui extends e_admin_controller_ui { header($protocol.': 404 Not Found', true, 404); header("Status: 404 Not Found", true, 404); - echo 'Field not found'; // FIXME lan + echo LAN_FIELD.": ".$this->fields[$_POST['name']].": ".LAN_NOT_FOUND; // Field: x: not found! $this->logajax('Field not found'); return; } @@ -5154,7 +5152,7 @@ class e_admin_ui extends e_admin_controller_ui { header($protocol.': 403 Forbidden', true, 403); header("Status: 403 Forbidden", true, 403); - echo 'Forbidden'; // FIXME lan + echo ADLAN_86; //Forbidden $this->logajax("Forbidden"); return; } @@ -5877,7 +5875,6 @@ class e_admin_form_ui extends e_form } /** - * TODO - lans * Generic DB Record Creation Form. * @return string */ @@ -5942,7 +5939,6 @@ class e_admin_form_ui extends e_form } /** - * TODO - lans * Generic Settings Form. * @return string */ @@ -6536,12 +6532,12 @@ class e_admin_form_ui extends e_form if(isset($options['addAll'])) { - $option['attach_all__'.$key] = vartrue($options['addAll'], '(add all)'); + $option['attach_all__'.$key] = vartrue($options['addAll'], "(".LAN_ADD_ALL.")"); unset($options['addAll']); } if(isset($options['clearAll'])) { - $_option['deattach_all__'.$key] = vartrue($options['clearAll'], '(clear all)'); + $_option['deattach_all__'.$key] = vartrue($options['clearAll'], "(".LAN_CLEAR_ALL.")"); unset($options['clearAll']); } @@ -6549,16 +6545,16 @@ class e_admin_form_ui extends e_form { foreach ($options as $value) { - $option['attach__'.$key.'__'.$value] = 'Add '.$value; - $_option['deattach__'.$key.'__'.$value] = 'Remove '.$value; + $option['attach__'.$key.'__'.$value] = LAN_ADD." ".$value; + $_option['deattach__'.$key.'__'.$value] = LAN_REMOVE." ".$value; } } else { foreach ($options as $value => $label) { - $option['attach__'.$key.'__'.$value] = 'Add '.$label; - $_option['deattach__'.$key.'__'.$value] = 'Remove '.$label; + $option['attach__'.$key.'__'.$value] = LAN_ADD." ".$label; + $_option['deattach__'.$key.'__'.$value] = LAN_REMOVE." ".$label; } } $option = array_merge($option, $_option); @@ -6648,14 +6644,12 @@ class e_admin_form_ui extends e_form break; case 'datestamp': - //TODO today, yesterday, this-month, last-month . - - $dateFilters = array ( + $dateFilters = array ( 'hour' => LAN_UI_FILTER_PAST_HOUR, - "day" => LAN_UI_FILTER_PAST_24_HOURS, - "week" => LAN_UI_FILTER_PAST_WEEK, - "month" => LAN_UI_FILTER_PAST_MONTH, - "year" => LAN_UI_FILTER_PAST_YEAR + "day" => LAN_UI_FILTER_PAST_24_HOURS, + "week" => LAN_UI_FILTER_PAST_WEEK, + "month" => LAN_UI_FILTER_PAST_MONTH, + "year" => LAN_UI_FILTER_PAST_YEAR ); foreach($dateFilters as $k => $name) @@ -6679,14 +6673,13 @@ class e_admin_form_ui extends e_form if($type === 'batch') { - // FIXME Lan foreach ($classes as $k => $v) { - $option['ucadd__'.$key.'__'.$k] = LAN_ADD.' '.$v; - $_option['ucremove__'.$key.'__'.$k] = 'Remove '.$v; + $option['ucadd__'.$key.'__'.$k] = LAN_ADD.' '.$v; + $_option['ucremove__'.$key.'__'.$k] = LAN_REMOVE." ".$v; } - $option['ucaddall__'.$key] = '(add all)'; - $_option['ucdelall__'.$key] = '(clear all)'; + $option['ucaddall__'.$key] = "(".LAN_ADD_ALL.")"; + $_option['ucdelall__'.$key] = "(".LAN_CLEAR_ALL.")"; $option = array_merge($option, $_option); } else @@ -6741,7 +6734,7 @@ class e_admin_form_ui extends e_form } else { - $option[$key.'__'.$k] = vartrue($data['user_name'],'Unknown'); + $option[$key.'__'.$k] = vartrue($data['user_name'],LAN_UNKNOWN); } diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php index 6320d6f13..e487a9e7f 100644 --- a/e107_languages/English/English.php +++ b/e107_languages/English/English.php @@ -50,6 +50,7 @@ define("EMESSLAN_TITLE_SUCCESS", "Success"); define("EMESSLAN_TITLE_WARNING", "Warning"); define("EMESSLAN_TITLE_DEBUG", "System Debug"); +define("LAN_NO_PERMISSIONS", "You do not have permission to view this page."); define("LAN_EDIT","Edit"); define("LAN_DELETE","Delete"); define("LAN_DEFAULT","Default"); diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index c1bb5e53d..07b686dbe 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -272,6 +272,9 @@ define("LAN_NEVER", "Never"); define("LAN_PRUNE", "Prune"); define("LAN_RESET","Reset"); define("LAN_CLEAR","Clear"); +define("LAN_ADD_ALL", "Add All"); +define("LAN_CLEAR_ALL", "Clear All"); +define("LAN_UNKNOWN", "Unknown"); define("LAN_ALL","All"); define("LAN_IMPORT","Import"); // define("LAN_OK","OK"); // defined in e107_languages/English/English.php @@ -357,6 +360,7 @@ define("LAN_CONFIGURE", "Configure"); // define("LAN_BACK", "Back"); @see e107_languages/English.php define("LAN_NOPERMISSION", "no permissions"); +define("LAN_NO_ADMIN_PERMISSION", "You do not have administrator permissions for [x]"); define("LAN_CREDITS","Credits"); define("LAN_NEWVERSION","e107 v[x] Available"); @@ -444,6 +448,8 @@ define("LAN_UI_404_METHOD_ERROR", "Action [x] not found!"); define("LAN_UI_403_BODY_ERROR", "Access to the requested page is denied."); define("LAN_UI_403_TITLE_ERROR", "Access denied"); define("LAN_UI_FORM_METHOD_ERROR", "FATAL ERROR: The field name [x] is not allowed. Please rename the key [x] to something else in your fields array and database table (if required)."); +define("LAN_UNKNOWN_ERROR", "Unknown Error"); +define("LAN_SQL_ERROR", "SQL Error"); define("LAN_UI_BATCH_UPDATE_SUCCESS", "[x] set for [y] record(s)."); define("LAN_UI_BATCH_REVERSED_SUCCESS", "[x] records successfully reversed."); @@ -501,6 +507,7 @@ define("LAN_DASHBOARD_LAYOUT", "Dashboard Layout"); define("LAN_UNAVAILABLE", "Unavailable"); define("LAN_NO_LABEL_PROVIDED", "No Label Provided"); define("LAN_NOT_FOUND", "Not Found!"); +define("LAN_FIELD", "Field"); define("LAN_MAINTENANCE", "Maintenance"); define("LAN_RETURN_TO_FRONT_PANEL", "Return to Front Panel"); From 9b644e4eac8d57562dbc6d81bf37b95af2acbee4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 19 Mar 2017 13:15:24 -0700 Subject: [PATCH 06/66] Closes #2507 - v2 template path fix. --- e107_core/shortcodes/single/search.sc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/single/search.sc b/e107_core/shortcodes/single/search.sc index 0675eb171..17c245611 100644 --- a/e107_core/shortcodes/single/search.sc +++ b/e107_core/shortcodes/single/search.sc @@ -5,7 +5,11 @@ e107::includeLan(e_PLUGIN."search_menu/languages/".e_LANGUAGE.".php"); $text = ""; if (!isset($SEARCH_SHORTCODE)) { - if (file_exists(THEME."search_template.php")) + if (file_exists(THEME."templates/search_template.php")) + { + include(THEME."templates/search_template.php"); + } + elseif (file_exists(THEME."search_template.php")) { include(THEME."search_template.php"); } From b5578a64e02b10d056884cb6b8cc43eefa3a2fd7 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 19 Mar 2017 13:49:01 -0700 Subject: [PATCH 07/66] Notice removal. SVG media-category fix. --- e107_handlers/db_debug_class.php | 2 +- e107_themes/landingzero/install/install.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index ae6413392..a6f9b19a3 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -782,7 +782,7 @@ class e107_db_debug { $message = "
".print_r($message,true)."
"; } - if (!E107_DBG_BASIC && !E107_DBG_ALLERRORS && !E107_DBG_SQLDETAILS && !E107_DBG_NOTICES) + if (!deftrue('E107_DBG_BASIC') && !deftrue('E107_DBG_ALLERRORS') && !deftrue('E107_DBG_SQLDETAILS') && !deftrue('E107_DBG_NOTICES')) { return false; } diff --git a/e107_themes/landingzero/install/install.xml b/e107_themes/landingzero/install/install.xml index f49d689c4..7cc6b8fc9 100644 --- a/e107_themes/landingzero/install/install.xml +++ b/e107_themes/landingzero/install/install.xml @@ -340,6 +340,17 @@ {e_THEME}landingzero/install/beach.jpg 0 + + 14 + _icon + _icon_svg + Icons SVG + + Available where icons are used in admin. + 253 + + 0 + From ae8e1f119829b72fcbeda8c48dc5e561848b9010 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 20 Mar 2017 11:18:02 -0700 Subject: [PATCH 08/66] Menu-Manager side-panel height fix. --- e107_admin/header.php | 4 + e107_admin/menus.php | 16 ++-- .../shortcodes/batch/admin_shortcodes.php | 1 + e107_themes/bootstrap3/admin_style.css | 75 +++++++++++++++++++ e107_themes/bootstrap3/admin_theme.php | 7 +- 5 files changed, 94 insertions(+), 9 deletions(-) diff --git a/e107_admin/header.php b/e107_admin/header.php index f36ec51a3..4c1abd030 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -465,6 +465,10 @@ if(deftrue('e_MENUMANAGER_ACTIVE')) { $body_onload .= " id=\"layout-".e107::getForm()->name2id(THEME_LAYOUT)."\" "; } +else +{ + $body_onload .= " id=\"admin-".str_replace(".php","",e_PAGE)."\" "; +} // // J: Send end of and start of diff --git a/e107_admin/menus.php b/e107_admin/menus.php index d385e5bde..32aee2589 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -45,14 +45,14 @@ if(e_MENUMANAGER_ACTIVE === false ) e107::library('load', 'bootstrap.switch'); e107::js('footer', '{e_WEB}js/bootstrap.switch.init.js', 'jquery', 5); - if(!deftrue("e_DEBUG")) +// if(!deftrue("e_DEBUG")) { e107::getJs()->inlineCSS(' body { overflow:hidden } '); } - else - { +// else +/* { e107::js('footer-inline'," $('#menu_iframe').attr('scrolling','no'); $('#menu_iframe').load(function() { @@ -60,7 +60,7 @@ if(e_MENUMANAGER_ACTIVE === false ) $(this).css('height',height); }); "); - } + }*/ e107::getJs()->inlineCSS(" .menu-manager-items { padding-right:15px} @@ -90,20 +90,20 @@ if(e_MENUMANAGER_ACTIVE === false ) .menu-selector ul li:nth-child(odd){ background-color:rgba(0,0,0,0.2) } - .menu-selector { height:330px; display:block; padding-bottom:50px; overflow-y:scroll; margin-bottom:10px } + .menu-selector { /*height:330px; */ display:block; padding-bottom:50px; /*overflow-y:scroll;*/ margin-bottom:10px } .menu-selector input:checked + span { color: white; } @media all and (min-height: 1000px) { - .menu-selector { height:500px } + /*.menu-selector { height:200px }*/ } @media all and (max-height: 800px) { - .menu-selector { height:250px } + /*.menu-selector { height:250px }*/ iframe#menu_iframe { height: 87vh } - .menu-selector ul li { font-size: 0.8em } + /*.menu-selector ul li { font-size: 0.8em }*/ } ul.dropdown-menu.e-mm-selector { padding: 10px; margin-top: -2px; margin-right:-2px; } diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 65563ea9f..917488b6b 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -157,6 +157,7 @@ class admin_shortcodes if(function_exists('e_help') && ($tmp = e_help())) // new in v2.x for non-admin-ui admin pages. { + $ns->setUniqueId('sc-admin-help'); $help_text = $ns->tablerender($tmp['caption'],$tmp['text'],'e_help',true); } diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index c2c948cda..a07af048b 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1488,6 +1488,81 @@ footer { */ + + + +body#admin-menus > .container-fluid > .row, +body#admin-menus .admin-left-panel, + +.row-flex, +.row-flex > div[class*='col-'] { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex:1 1 auto; + +} + +body#admin-menus > .container-fluid > .row { + height: 92vh; +} + +body#admin-menus .admin-left-panel { +flex-flow: column nowrap; +} + +.row-flex > div[class*='col-'], .container-flex > div[class*='col-'] { + margin:-.2px; /* hack adjust for wrapping */ +} + +.container-flex > div[class*='col-'] div, +.row-flex > div[class*='col-'] div { + width:100%; +} + +body#admin-menus #sc-admin-help, +body#admin-menus #sc-admin-help .panel-body, +.flex-col { + display: flex; + display: -webkit-flex; + flex: 1 100%; + flex-flow: column nowrap; +} + +.flex-grow { + display: flex; + -webkit-flex: 2; + flex: 2; +} + +body#admin-menus #sc-admin-help { + overflow-y:hidden; + } + +body#admin-menus #sc-admin-help .panel-body { + overflow-y:scroll; + } + + + + + + + + + + + + + + + + + + + @media (min-width: 1101px ){ .navbar-fixed-top { height: 51px; } } diff --git a/e107_themes/bootstrap3/admin_theme.php b/e107_themes/bootstrap3/admin_theme.php index efbe9f77e..b6ee6e898 100644 --- a/e107_themes/bootstrap3/admin_theme.php +++ b/e107_themes/bootstrap3/admin_theme.php @@ -192,7 +192,12 @@ class bootstrap3_admintheme case 'core-infopanel': case 'site_info': - echo '
+ echo '

' . $caption . '

From 2fabda120fff89bfa86a8a8b1819dee9d4648d7f Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 20 Mar 2017 12:38:11 -0700 Subject: [PATCH 09/66] Disable menus help panel. --- e107_core/shortcodes/batch/admin_shortcodes.php | 8 +++++++- e107_languages/English/admin/help/menus.php | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 917488b6b..922e4c0ba 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -161,9 +161,15 @@ class admin_shortcodes $help_text = $ns->tablerender($tmp['caption'],$tmp['text'],'e_help',true); } + if(e_PAGE === "menus.php") // quite fix to disable e107_admin/menus.php help file in all languages. + { + return $help_text; + } + + $helpfile = ''; - if(strpos(e_SELF, e_ADMIN_ABS) !== FALSE) + if(strpos(e_SELF, e_ADMIN_ABS) !== false) { if (is_readable(e_LANGUAGEDIR.e_LANGUAGE.'/admin/help/'.e_PAGE)) { diff --git a/e107_languages/English/admin/help/menus.php b/e107_languages/English/admin/help/menus.php index da1348d44..59d12b738 100644 --- a/e107_languages/English/admin/help/menus.php +++ b/e107_languages/English/admin/help/menus.php @@ -16,11 +16,6 @@ if (!getperms("2")) exit; } -if(!deftrue("e_DEBUG_MENUMANAGER")) -{ - return; -} - $sql = e107::getDb(); $tp = e107::getParser(); From 329095336ee3a69ae2a936df14ef53a9c5f68686 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 21 Mar 2017 12:29:05 -0700 Subject: [PATCH 10/66] Fixes #1984 Disable CHAP when SSL is enabled or encryption method is not legacy MD5 --- e107_admin/prefs.php | 11 ++++++++++- e107_themes/bootstrap3/admin_style.css | 2 +- e107_web/js/core/admin.jquery.js | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index fbee9061d..83ac79286 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -96,6 +96,12 @@ if(isset($_POST['updateprefs'])) $mes->addError(PRFLAN_211); } + + if(!empty($_POST['passwordEncoding']) || !empty($_POST['ssl_enabled'])) + { + $_POST['password_CHAP'] = 0; // disable chap unless using md5 without SSL. + } + // Table of range checking values - min and max for numerics. Only do the important ones $pref_limits = array('loginname_maxlength' => array('min' => 10, 'max' => 100, 'default' => 30), 'displayname_maxlength' => array('min' => 5, 'max' => 100, 'default' => 15), @@ -1427,7 +1433,10 @@ $text .= " $text .= " - ".$frm->select('password_CHAP',$CHAP_list,$pref['password_CHAP'] ); + "; + + $CHAPopt = !empty($pref['ssl_enabled']) || !empty($pref['passwordEncoding']) ? array('disabled'=>1) : null; + $text .= $frm->select('password_CHAP',$CHAP_list,$pref['password_CHAP'], $CHAPopt ); //." ".$frm->select_open('password_CHAP'); //TODO - user tracking session name - visible only if Cookie is enabled (JS) diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index a07af048b..705cdeebc 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1545,7 +1545,7 @@ body#admin-menus #sc-admin-help .panel-body { overflow-y:scroll; } - +.form-control[disabled] { opacity: 0.5; } diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js index fc3292653..3394700e7 100644 --- a/e107_web/js/core/admin.jquery.js +++ b/e107_web/js/core/admin.jquery.js @@ -775,9 +775,13 @@ $(document).ready(function() $(selector).toggle(); + // $('.menu-selector input[type="checkbox"]').removeAttr("checked"); + return false; }); + + $(".e-mm-selector li input").click(function(e){ From 9a8c1d375b9161deffe32898e43214293418fd05 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 21 Mar 2017 16:03:28 -0700 Subject: [PATCH 11/66] Updated ver.php to v2.1.6 (git) --- e107_admin/ver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/ver.php b/e107_admin/ver.php index 6faf523ba..657d91f38 100644 --- a/e107_admin/ver.php +++ b/e107_admin/ver.php @@ -10,6 +10,6 @@ if (!defined('e107_INIT')) { exit; } -$e107info['e107_version'] = "2.1.5 (git)"; +$e107info['e107_version'] = "2.1.6 (git)"; ?> \ No newline at end of file From e1ce2f528de73de2681f19c34608973e8356bd51 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Wed, 22 Mar 2017 00:40:32 +0100 Subject: [PATCH 12/66] Closes #2513 - Clarify messages to main admins on /login.php --- e107_languages/English/lan_login.php | 7 +++-- login.php | 47 ++++++++++++++-------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/e107_languages/English/lan_login.php b/e107_languages/English/lan_login.php index d28679461..e7a04b0b7 100644 --- a/e107_languages/English/lan_login.php +++ b/e107_languages/English/lan_login.php @@ -12,7 +12,7 @@ define("LAN_LOGIN_1", "User name"); define("LAN_LOGIN_2", "User password"); define("LAN_LOGIN_3", "Protected server"); -define("LAN_LOGIN_4", "Please sign in"); // XXX Modified +define("LAN_LOGIN_4", "Please sign in"); // XXX Modified define("LAN_LOGIN_5", "Click here to Sign-Up"); define("LAN_LOGIN_6", "Not accepting new members at this time"); define("LAN_LOGIN_7", "Enter visible code"); @@ -40,5 +40,8 @@ define("LAN_LOGIN_28", "Email"); define("LAN_LOGIN_29", "Username or Email"); define("LAN_LOGIN_30", "Error adding new alt_auth user to DB"); define("LAN_LOGIN_31", "Your credentials could not be added to the system"); - +define("LAN_LOGIN_32", "You are seeing this message because you are currently logged in as the Main Admin."); +define("LAN_LOGIN_33", "[Return to the homepage]"); // the [ ] brackets are replaced with a button link +define("LAN_LOGIN_34", "User registration and/or login is currently disabled."); +define("LAN_LOGIN_35", "[Enable it]"); // the [ ] brackets are replaced with a button link ?> \ No newline at end of file diff --git a/login.php b/login.php index 75645c0cf..d5f6b6c2b 100644 --- a/login.php +++ b/login.php @@ -1,20 +1,13 @@ ".$LOGIN_TEMPLATE['page']['body'].""; $LOGIN_TABLE_FOOTER = $LOGIN_TEMPLATE['page']['footer']; } - + $text = $tp->parseTemplate($LOGIN_TABLE,true, $sc); if(getperms('0')) { - echo "
You are currently logged in as the Main Admin.
"; //TODO LAN + $find = array('[', ']'); + $replace = array("
", ""); + $return_link = str_replace($find, $replace, LAN_LOGIN_33); + + echo "
".LAN_LOGIN_32."

".$return_link."
"; if(empty($pref['user_reg'])) { - echo "
User registration and/or login is currently disabled. Go here to enable it.
"; //TODO LAN + $find = array('[', ']'); + $replace = array("", ""); + $pref_link = str_replace($find, $replace, LAN_LOGIN_35); + + echo "
".LAN_LOGIN_34."

".$pref_link."
"; } } - + $login_message = SITENAME; // $login_message = LAN_LOGIN_3." | ".SITENAME; if(strpos($LOGIN_TABLE_HEADER,'LOGIN_TABLE_LOGINMESSAGE') === false && strpos($LOGIN_TABLE,'LOGIN_TABLE_LOGINMESSAGE') === false) From 0ec1c74e6bb1918ee527b3e68647767819380b17 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 22 Mar 2017 13:57:11 -0700 Subject: [PATCH 13/66] Allow for importing of table data from e107 v1.x "Content Management" plugin into "Pages/Menus" tables. --- e107_plugins/import/admin_import.php | 5 +- e107_plugins/import/import_classes.php | 17 +- e107_plugins/import/import_page_class.php | 12 +- .../import/import_pagechapter_class.php | 154 ++++++++++++++++++ .../import/providers/e107_import_class.php | 127 ++++++++++++++- 5 files changed, 298 insertions(+), 17 deletions(-) create mode 100644 e107_plugins/import/import_pagechapter_class.php diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index 07865b2ee..abd791d53 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -96,6 +96,7 @@ class import_main_ui extends e_admin_ui 'users' => array('message' => LAN_CONVERT_25, 'classfile' => 'import_user_class.php', 'classname' => 'user_import'), 'news' => array('message' => LAN_CONVERT_28, 'classfile' => 'import_news_class.php', 'classname' => 'news_import'), 'page' => array('message' => "Pages", 'classfile' => 'import_page_class.php', 'classname' => 'page_import'), + 'pagechapter' => array('message' => "Page Chapters", 'classfile' => 'import_pagechapter_class.php', 'classname' => 'pagechapter_import'), 'links' => array('message' => "Links", 'classfile' => 'import_links_class.php', 'classname' => 'links_import'), 'media' => array('message' => "Media", 'classfile' => 'import_media_class.php', 'classname' => 'media_import'), 'forum' => array('message' => "Forum", 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'), @@ -547,7 +548,8 @@ class import_main_ui extends e_admin_ui $text .= " ".LAN_CONVERT_38." - ".$frm->checkbox('import_delete_existing_data', 1,$_POST['import_delete_existing_data'], array('label'=>' ','title'=>LAN_CONVERT_39))." + ".$frm->radio_switch('import_delete_existing_data', $_POST['import_delete_existing_data'])." +
".LAN_CONVERT_39."
"; //TODO @@ -732,6 +734,7 @@ class import_main_ui extends e_admin_ui if ($this->deleteExisting == true) { + $mes->addDebug("dbImport(): Emptying target table. "); $exporter->emptyTargetDB(); // Clean output DB - reasonably safe now } diff --git a/e107_plugins/import/import_classes.php b/e107_plugins/import/import_classes.php index 102dd705a..686bd59ca 100644 --- a/e107_plugins/import/import_classes.php +++ b/e107_plugins/import/import_classes.php @@ -71,6 +71,10 @@ class base_import_class return $this->savePageData($dataRecord); break; + case 'pagechapter' : + return $this->savePageChapterData($dataRecord); + break; + case 'links' : return $this->saveLinksData($dataRecord); break; @@ -110,7 +114,7 @@ class base_import_class { if($mode == 'db') { - $result = $this->ourDB->db_Fetch(); + $result = $this->ourDB->fetch(); } else { @@ -134,6 +138,10 @@ class base_import_class return $this->copyPageData($initial, $result); break; + case 'pagechapter' : + return $this->copyPageChapterData($initial, $result); + break; + case 'links' : return $this->copyLinksData($initial, $result); break; @@ -197,7 +205,12 @@ class base_import_class { return $target; } - + + function copyPageChapterData(&$target, &$source) + { + return $target; + } + function copyLinksData(&$target, &$source) { return $target; diff --git a/e107_plugins/import/import_page_class.php b/e107_plugins/import/import_page_class.php index 8bb3c1411..f932ac0ff 100644 --- a/e107_plugins/import/import_page_class.php +++ b/e107_plugins/import/import_page_class.php @@ -41,14 +41,14 @@ class page_import 'page_metakeys' => '', 'page_metadscr' => '', 'page_text' => '', - 'page_author' => 1, + 'page_author' => USERID, 'page_datestamp' => '', 'page_rating_flag' => '0', 'page_comment_flag' => '0', 'page_password' => '', 'page_class' => '0', 'page_ip_restrict' => '', - 'menu_name' => '', + 'menu_name' => '', 'page_template' => 'default' ); @@ -61,15 +61,14 @@ class page_import // Constructor function __construct() { - global $sql; - $this->pageDB = new db; // Have our own database object to write to the table + $this->pageDB = e107::getDb('page'); // Have our own database object to write to the table } // Empty the DB - not necessary function emptyTargetDB($inc_admin = FALSE) { - // $this->pageDB->db_Delete('page'); + $this->pageDB->truncate('page'); } @@ -95,7 +94,7 @@ class page_import */ function saveData($row) { - if(!$result = $this->pageDB->db_Insert('page',$row)) + if(!$result = $this->pageDB->insert('page',$row)) { return 4; } @@ -109,6 +108,7 @@ class page_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { + return $this->pageDB->getLastErrorText(); $errorTexts = array( 0 => 'No error', 1 => 'Can\'t change main admin data', diff --git a/e107_plugins/import/import_pagechapter_class.php b/e107_plugins/import/import_pagechapter_class.php new file mode 100644 index 000000000..0e2693c38 --- /dev/null +++ b/e107_plugins/import/import_pagechapter_class.php @@ -0,0 +1,154 @@ + '', + 'chapter_parent' => 1, + 'chapter_name' => '', + 'chapter_sef' => '', + 'chapter_meta_description' => '', + 'chapter_meta_keywords' => '', + 'chapter_manager' => e_UC_ADMIN, + 'chapter_icon' => '', + 'chapter_order' => 0, + 'chapter_template' => 'default', + 'chapter_visibility' => 0, + 'chapter_fields' => null + + ); + + // Fields which must be set up by the caller. + var $mandatory = array( + 'chapter_name' + ); + + // Constructor + function __construct() + { + $this->pageDB = e107::getDb('pagechapter'); // Have our own database object to write to the table + } + + + // Empty the DB + function emptyTargetDB($inc_admin = FALSE) + { + $this->pageDB->truncate('page_chapters'); + + $insert = array( + 'chapter_id' => '1', + 'chapter_parent' => '0', + 'chapter_name' => 'General', + 'chapter_sef' => 'general', + 'chapter_meta_description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.', + 'chapter_meta_keywords' => '', + 'chapter_manager' => '0', + 'chapter_icon' => '', + 'chapter_order' => '0', + 'chapter_template' => 'default', + 'chapter_visibility' => '0', + 'chapter_fields' => null + ); + + + $this->pageDB->insert('page_chapters',$insert); // insert a default book. + } + + + // Set a new default for a particular field + function overrideDefault($key, $value) + { +// echo "Override: {$key} => {$value}
"; + if (!isset($this->defaults[$key])) return FALSE; + $this->defaults[$key] = $value; + } + + + // Returns an array with all relevant fields set to the current default + function getDefaults() + { + return $this->defaults; + } + + /** + * Insert data into e107 DB + * @param row - array of table data + * @return integer, boolean - error code on failure, TRUE on success + */ + function saveData($row) + { + + if(empty($row['chapter_name'])) + { + return 3; + } + + + if(!$result = $this->pageDB->insert('page_chapters',$row)) + { + return 4; + } + + //if ($result === FALSE) return 6; + + return true; + } + + + + function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . + { + $errorTexts = array( + 0 => 'No error', + 1 => 'Can\'t change main admin data', + 2 => 'invalid field passed', + 3 => 'Mandatory field not set', + 4 => 'Entry already exists', + 5 => 'Invalid characters in user or login name', + 6 => 'Error saving extended user fields' + ); + + if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; + + return 'Unknown: '.$errnum; + + } + + + +} + + +?> \ No newline at end of file diff --git a/e107_plugins/import/providers/e107_import_class.php b/e107_plugins/import/providers/e107_import_class.php index 904d77fbb..a4f166c49 100644 --- a/e107_plugins/import/providers/e107_import_class.php +++ b/e107_plugins/import/providers/e107_import_class.php @@ -34,11 +34,33 @@ class e107_import extends base_import_class public $title = 'e107'; public $description = 'Reads 0.7 and 0.8 version files'; - public $supported = array('users'); + public $supported = array('users', 'page', 'pagechapter'); public $mprefix = 'e107_'; - - + function init() + { + + $this->pcontent = intval($_POST['pcontent']); + + } + + + function config() + { + $frm = e107::getForm(); + + $present = e107::getDb()->isTable('pcontent'); + + $var[0]['caption'] = "Use old 'Content Management' tables for Pages"; + $var[0]['html'] = $frm->radio_switch('pcontent',$present); + // $var[0]['help'] = "Change the author of the news items"; + + // $var[1]['caption'] = "Include revisions"; + // $var[1]['html'] = $frm->checkbox('news_revisions',1); + // $var[1]['help'] = "Change the author of the news items"; + + return $var; + } // Set up a query for the specified task. // Returns TRUE on success. FALSE on error @@ -47,13 +69,27 @@ class e107_import extends base_import_class if ($this->ourDB == NULL) return FALSE; switch ($task) { - case 'users' : - $query = "SELECT * FROM {$this->DBPrefix}user WHERE `user_id` != 1"; - $result = $this->ourDB->db_Select_gen($query); + case 'users' : + $query = "SELECT * FROM {$this->DBPrefix}user WHERE `user_id` != 1"; + $result = $this->ourDB->db_Select_gen($query); - if ($result === FALSE) return FALSE; + if ($result === false) return false; break; - + + case 'page' : + $query = "SELECT * FROM {$this->DBPrefix}pcontent WHERE `content_parent` > 0"; + $result = $this->ourDB->gen($query); + + if ($result === false) return false; + break; + + case 'pagechapter' : + $query = "SELECT * FROM {$this->DBPrefix}pcontent WHERE `content_parent` = '0'"; + $result = $this->ourDB->gen($query); + + if ($result === false) return false; + break; + default : @@ -66,6 +102,81 @@ class e107_import extends base_import_class } + /** + * Align source data to e107 Page Table + * @param $target array - default e107 target values for e107_page table. + * @param $source array - WordPress table data + */ + function copyPageData(&$target, &$source) + { + + + + // $target['page_id'] = $source['ID']; // auto increment + $target['page_title'] = $source['content_heading']; + $target['page_sef'] = eHelper::title2sef($source['content_heading'], 'dashl'); + $target['page_text'] = $this->checkHtml($source['content_text']) ; + $target['page_chapter'] = $source['content_parent']; + // $target['page_metakeys'] = ''; + $target['page_metadscr'] = $source['content_summary']; + $target['page_datestamp'] = $source['content_datestamp']; + $target['page_author'] = (int) $source['content_author']; + // $target['page_category'] = '', + $target['page_comment_flag'] = (int) $source['content_comment']; + $target['page_rating_flag'] = (int) $source['content_rate']; + // $target['page_password'] = $source['post_password']; + $target['page_order'] = (int) $source['content_order']; + $target['page_class'] = (int) $source['content_class']; + + + + return $target; // comment out to debug + + + } + + + private function checkHtml($text) + { + $tp = e107::getParser(); + if($tp->isHtml($text) && strpos($text,'[html]')!==0) + { + return "[html]".$text."[/html]"; + } + + return $text; + + } + + /** + * Align source data to e107 Page Table + * @param $target array - default e107 target values for e107_page table. + * @param $source array - WordPress table data + */ + function copyPageChapterData(&$target, &$source) + { + $target['chapter_id'] = $source['content_id']; + $target['chapter_parent'] = empty($source['content_parent']) ? 1 : (int) $source['content_parent']; + $target['chapter_name'] = $source['content_heading']; + $target['chapter_sef'] = eHelper::title2sef($source['content_heading'], 'dashl'); + $target['chapter_meta_description'] = $source['content_text']; + $target['chapter_meta_keywords'] = ''; + // $target['chapter_manager'] = ''; + $target['chapter_icon'] = $source['content_icon']; + $target['chapter_order'] = 0; + // $target['chapter_template'] = ''; + // $target['chapter_visibility'] = 0; + // $target['chapter_fields'] = ''; + + return $target; // comment out to debug + + + } + + + + + //------------------------------------ // Internal functions below here //------------------------------------ From 09981a8664fd12722313d2b0c5058b837a3c91bf Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 24 Mar 2017 13:51:45 +0100 Subject: [PATCH 14/66] possibility to format contact name shortcode --- e107_core/shortcodes/batch/contact_shortcodes.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index fb425bff8..f47f081a0 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -90,12 +90,16 @@ class contact_shortcodes extends e_shortcode } + /* example {CONTACT_NAME} */ + /* example {CONTACT_NAME: class=form-control} */ + /* example {CONTACT_NAME: class=col-md-12&placeholder=".LANCONTACT_03." *} */ + function sc_contact_name($parm='') { $userName = deftrue('USERNAME'); - - return ""; - + $class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control'; + $placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : ''; + return ""; } @@ -145,4 +149,4 @@ class contact_shortcodes extends e_shortcode } -?> \ No newline at end of file +?> From 70d1cd63bc632858fba5b827f6bae5d6cc3a184c Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 24 Mar 2017 13:55:03 +0100 Subject: [PATCH 15/66] possibility to format contact email shortcode --- e107_core/shortcodes/batch/contact_shortcodes.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index fb425bff8..5717b98ac 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -100,12 +100,18 @@ class contact_shortcodes extends e_shortcode + /* example {CONTACT_EMAIL} */ + /* example {CONTACT_EMAIL: class=form-control} */ + /* example {CONTACT_EMAIL: class=col-md-12&placeholder=".LANCONTACT_04." *} */ + function sc_contact_email($parm='') { $userEmail = deftrue('USEREMAIL'); $disabled = (!empty($userEmail)) ? 'readonly' : ''; // don't allow change from a verified email address. - return ""; + $class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control'; + $placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : ''; + return ""; } @@ -145,4 +151,4 @@ class contact_shortcodes extends e_shortcode } -?> \ No newline at end of file +?> From 8ef981ca849db9adb7d9a5ed6b06824c467022f3 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 24 Mar 2017 14:05:30 +0100 Subject: [PATCH 16/66] possibility to format contact subject shortcode --- e107_core/shortcodes/batch/contact_shortcodes.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index fb425bff8..c49f96315 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -110,9 +110,15 @@ class contact_shortcodes extends e_shortcode + /* example {CONTACT_SUBJECT} */ + /* example {CONTACT_SUBJECT: class=form-control} */ + /* example {CONTACT_SUBJECT: class=col-md-12&placeholder=".LANCONTACT_05." *} */ + function sc_contact_subject($parm='') { - return ""; + $class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control'; + $placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : ''; + return ""; } @@ -145,4 +151,4 @@ class contact_shortcodes extends e_shortcode } -?> \ No newline at end of file +?> From c2e9544ca4f874e6adf1453b81bedd65eb138731 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 24 Mar 2017 14:21:00 +0100 Subject: [PATCH 17/66] improved param $class in contact subject shordcode --- e107_core/shortcodes/batch/contact_shortcodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index fb425bff8..d113cd052 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -131,10 +131,10 @@ class contact_shortcodes extends e_shortcode { $size = 'input-xxlarge'; } - + $class = (!empty($parm['class'])) ? $parm['class'] : 'tbox '.$size.' form-control'; - return ""; + return ""; } @@ -145,4 +145,4 @@ class contact_shortcodes extends e_shortcode } -?> \ No newline at end of file +?> From dab0eea918b9f5b7f31c372317690aa2cb51e74c Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 24 Mar 2017 15:13:38 +0100 Subject: [PATCH 18/66] formatting contact submit button shortcode --- e107_core/shortcodes/batch/contact_shortcodes.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index fb425bff8..5589571dd 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -138,11 +138,15 @@ class contact_shortcodes extends e_shortcode } + /* example {CONTACT_SUBMIT_BUTTON} */ + /* example {CONTACT_SUBMIT_BUTTON: class=contact submit btn btn-minimal} */ function sc_contact_submit_button($parm='') { - return ""; + $class = (!empty($parm['class'])) ? $parm['class'] : 'btn btn-primary button'; + + return ""; } } -?> \ No newline at end of file +?> From 3005e0bd8f173c8811c97236970666e4f8fccb7d Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 25 Mar 2017 13:01:50 -0700 Subject: [PATCH 19/66] Fixes #2517 - support for the style_custom.css file in theme folder which is auto-loaded after style.css. --- e107_core/templates/header_default.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 823e45e65..43bc840f1 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -273,30 +273,21 @@ else // Theme default $e_js->themeCSS(THEME_STYLE, $css_default); - - /* Moved to class2 and defined as THEME_STYLE - if($e_pref->get('themecss') && file_exists(THEME.$e_pref->get('themecss'))) + + // Support for style.css - override theme default CSS + if(file_exists(THEME."style_custom.css")) { - //echo "\n"; - $e_js->themeCSS($e_pref->get('themecss'), $css_default); + $e_js->themeCSS('style_custom.css',$css_default); } - else - { - // echo "\n"; - $e_js->themeCSS('style.css', $css_default); - } - */ + // Support for print and handheld media - override theme default CSS if(file_exists(THEME."style_mobile.css")) { - //echo "\n"; - //$css_default = "screen"; $e_js->themeCSS('style_mobile.css', 'handheld'); } + if(file_exists(THEME."style_print.css")) { - // echo "\n"; - // $css_default = "screen"; $e_js->themeCSS('style_print.css', 'print'); } } From 4463de3a373208ac3244b6bf15c3169f7829b5af Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 25 Mar 2017 15:11:42 -0700 Subject: [PATCH 20/66] Pages/Menus Overview list added. --- e107_admin/cpage.php | 52 ++++++++++++++++++++++---- e107_themes/bootstrap3/admin_style.css | 2 +- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 7c97fe88e..f78e9af1d 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -17,6 +17,7 @@ if (!getperms("5|J")) { e107::redirect('admin'); exit; } e107::css('inline'," .e-wysiwyg { height: 400px } +td.menu-field { background-color: rgba(0,0,0,0.07); } "); e107::coreLan('cpage', true); @@ -34,6 +35,12 @@ class page_admin extends e_admin_dispatcher 'ui' => 'page_admin_form_ui', 'uipath' => null ), + 'overview' => array( + 'controller' => 'page_admin_ui', + 'path' => null, + 'ui' => 'page_admin_form_ui', + 'uipath' => null + ), 'cat' => array( 'controller' => 'page_chapters_ui', 'path' => null, @@ -56,8 +63,10 @@ class page_admin extends e_admin_dispatcher ); protected $adminMenu = array( + 'overview/list' => array('caption'=> "Overview", 'perm' => '5|J'), //TODO LAN 'page/list' => array('caption'=> CUSLAN_48, 'perm' => '5'), - 'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J', 'tab' => 2), + 'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J', 'tab' => 2), + 'page/create' => array('caption'=> CUSLAN_12, 'perm' => '5'), 'other' => array('divider'=> true), 'cat/list' => array('caption'=> CUSLAN_50, 'perm' => '5'), // Create Category. @@ -72,6 +81,7 @@ class page_admin extends e_admin_dispatcher protected $adminMenuAliases = array( + 'overview/edit' => 'overview/list', 'page/edit' => 'page/list', 'menu/edit' => 'menu/create', 'cat/edit' => 'cat/list' @@ -134,9 +144,11 @@ class page_admin_form_ui extends e_admin_form_ui $text = " ".ADMIN_EDIT_ICON.""; - - $text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-default')); - + + if($this->getController()->getMode() === 'overview') + { + $text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-default')); + } return $text; } } @@ -556,7 +568,7 @@ class page_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank'), - 'page_title' => array('title'=> LAN_TITLE, 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), + 'page_title' => array('title'=> "Page Title", 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), 'page_chapter' => array('title'=> CUSLAN_63, 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true), 'page_template' => array('title'=> LAN_TEMPLATE, 'tab' => 0, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>array()), @@ -597,7 +609,7 @@ class page_admin_ui extends e_admin_ui // 'page_ip_restrict' => array('title'=> LXXAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar - 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>'sort=1') + 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last','readParms'=>'sort=1&deleteClass=e_UC_NOBODY') ); protected $fieldpref = array("page_id","page_title","page_chapter","page_template","page_author","page_class"); @@ -606,7 +618,8 @@ class page_admin_ui extends e_admin_ui 'listPages' => array('title'=> CUSLAN_29, 'type'=>'boolean'), 'listBooks' => array('title'=> CUSLAN_50, 'type'=>'boolean'), 'listBooksTemplate' => array('title'=> CUSLAN_72, 'type'=>'dropdown'), - 'pageCookieExpire' => array('title'=> CUSLAN_30, 'type'=>'number') //TODO Set default value to 84600 + 'pageCookieExpire' => array('title'=> CUSLAN_30, 'type'=>'number'), //TODO Set default value to 84600 + 'admin_page_perpage' => array('title'=> "Items per Page", 'type'=>'number'), //TODO Set default value to 84600 ); protected $books = array(); @@ -617,7 +630,30 @@ class page_admin_ui extends e_admin_ui function init() { + if($this->getMode() === 'overview') + { + $this->listQry = "SELECT SQL_CALC_FOUND_ROWS p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id "; // without any Order or Limit. + $this->fieldpref = array("page_id", "page_title", 'page_chapter', 'page_template', "menu_title", 'menu_image', 'menu_template' ); + $this->sortField = false; + + $this->fields['menu_title']['width'] = 'auto'; + + $this->fields['page_title']['width'] = 'auto'; + + $this->fields['options']['type'] = 'method'; + + + foreach($this->fields as $k=>$fld) + { + $this->fields[$k]['nolist'] = false; + + if(strpos($k,'menu_') === 0) + { + $this->fields[$k]['class'] = 'menu-field '.$fld['class']; + } + } + } if(vartrue($_POST['menu_delete'])) // Delete a Menu (or rather, remove it's data ) @@ -631,7 +667,7 @@ class page_admin_ui extends e_admin_ui } // USED IN Menu LIST/INLINE-EDIT MODE ONLY. - if($this->getMode() == 'menu' && ($this->getAction() == 'list' || $this->getAction() == 'inline')) + if($this->getMode() === 'menu' && ($this->getAction() == 'list' || $this->getAction() == 'inline')) { $this->listQry = "SELECT SQL_CALC_FOUND_ROWS p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE (p.menu_name != '' OR p.menu_image != '' OR p.menu_icon !='') "; // without any Order or Limit. diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 705cdeebc..67d429a19 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1547,7 +1547,7 @@ body#admin-menus #sc-admin-help .panel-body { .form-control[disabled] { opacity: 0.5; } - +.e-image-preview { display:inline-block } From 3a85433249392b41783e940c393e3ec7fa5391ce Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 25 Mar 2017 15:32:10 -0700 Subject: [PATCH 21/66] Page/Menu Overview column widths --- e107_admin/cpage.php | 13 +++++++++++-- e107_themes/bootstrap3/admin_style.css | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index f78e9af1d..6723d39bd 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -638,20 +638,29 @@ class page_admin_ui extends e_admin_ui $this->sortField = false; $this->fields['menu_title']['width'] = 'auto'; + $this->fields['menu_image']['readParms'] = 'thumb=60x55'; + $this->fields['menu_image']['width'] = 'auto'; $this->fields['page_title']['width'] = 'auto'; $this->fields['options']['type'] = 'method'; - foreach($this->fields as $k=>$fld) + foreach($this->fieldpref as $k) { $this->fields[$k]['nolist'] = false; + if($k === 'page_id') + { + continue; + } + if(strpos($k,'menu_') === 0) { - $this->fields[$k]['class'] = 'menu-field '.$fld['class']; + $this->fields[$k]['class'] = 'menu-field '.$this->fields[$k]['class']; } + + $this->fields[$k]['width'] = '13%'; } } diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 67d429a19..ab3893018 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1549,7 +1549,7 @@ body#admin-menus #sc-admin-help .panel-body { .e-image-preview { display:inline-block } - +td img.thumbnail { margin-bottom:0 } From 489fb66d650b90d3ca6a8e10ace894ab030121c2 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 26 Mar 2017 13:03:58 -0700 Subject: [PATCH 22/66] Fixes #2527 - extra line-breaks were being added to HTML. --- e107_handlers/e_parse_class.php | 46 ++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 488f64a17..5ea3eb799 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1539,17 +1539,25 @@ class e_parse extends e_parser } // Turn off a few things if not enabled in options - if(!vartrue($pref['smiley_activate'])) + if(empty($pref['smiley_activate'])) { - $opts['emotes'] = FALSE; + $opts['emotes'] = false; } - if(!vartrue($pref['make_clickable'])) + + if(empty($pref['make_clickable'])) { - $opts['link_click'] = FALSE; + $opts['link_click'] = false; } - if(!vartrue($pref['link_replace'])) + + if(empty($pref['link_replace'])) { - $opts['link_replace'] = FALSE; + $opts['link_replace'] = false; + } + + if($this->isHtml($text)) //BC FIx for when HTML is saved without [html][/html] + { + $opts['nobreak'] = true; + $text = trim($text); } $fromadmin = $opts['fromadmin']; @@ -1568,7 +1576,7 @@ class e_parse extends e_parser $text = strip_tags($text); } - if (MAGIC_QUOTES_GPC == TRUE) // precaution for badly saved data. + if (MAGIC_QUOTES_GPC === true) // precaution for badly saved data. { $text = stripslashes($text); } @@ -1590,7 +1598,7 @@ class e_parse extends e_parser - if ($parseBB == FALSE) + if ($parseBB == false) { $content = array($text); } @@ -4077,17 +4085,25 @@ class e_parser */ function isBBcode($text) { - $bbsearch = array('[/h]','[/b]','[/link]', '[/right]'); - - if(str_replace($bbsearch,'',$text)) - { - return true; - } - else + if(preg_match('#(?<=<)\w+(?=[^<]*?>)#', $text)) { return false; } + $bbsearch = array('[/h]', '[/b]', '[/link]', '[/right]', '[/center]', '[/flash]', '[/code]', '[/table]'); + + foreach($bbsearch as $v) + { + if(strpos($text,$v)!==false) + { + return true; + } + + } + + return false; + + } From 0416c97400e677d4b94f12c9c67216c553437606 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 26 Mar 2017 16:34:27 -0700 Subject: [PATCH 23/66] Downloads: Fixes #1062 legacy icon path --- e107_plugins/download/download_shortcodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/download/download_shortcodes.php b/e107_plugins/download/download_shortcodes.php index 0c1c74274..e5f94cb38 100644 --- a/e107_plugins/download/download_shortcodes.php +++ b/e107_plugins/download/download_shortcodes.php @@ -996,7 +996,7 @@ class download_shortcodes extends e_shortcode if (!$source) return " "; // list($ret[TRUE],$ret[FALSE]) = explode(chr(1), $source.chr(1)); //XXX ??? // if (!$ret[FALSE]) $ret[FALSE] = $ret[TRUE]; //XXX ??? - $parms = array('legacy'=> e_IMAGE."icons/"); + $parms = array('legacy'=> "{e_IMAGE}icons/"); return e107::getParser()->toIcon($source, $parms); //return "*"; } From 0846180664dee5f9c31d998cfb45d30dd72e9618 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 26 Mar 2017 16:35:06 -0700 Subject: [PATCH 24/66] Dynamic Download URL support (using shortcodes). Quick View added to downloads admin area. --- e107_plugins/download/includes/admin.php | 5 ++++- e107_plugins/download/request.php | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index 67c51f7fa..1a10deebe 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -258,10 +258,13 @@ class download_main_admin_ui extends e_admin_ui // default - true - TODO - move to displaySettings protected $batchDelete = true; + protected $url = array('route'=>'download/view/item', 'vars' => array('id' => 'download_id', 'name' => 'download_sef'), 'name' => 'download_name', 'description' => ''); // 'link' only needed if profile not provided. + + protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'data' => null, 'width'=>'5%', 'thclass' =>'center', 'forced'=> TRUE, 'class'=>'center', 'toggle' => 'e-multiselect'), - 'download_id' => array('title'=> ID, 'type' => 'number', 'data' => 'int', 'width'=>'5%', 'thclass' => '', 'forced'=> TRUE, 'primary'=>TRUE/*, 'noedit'=>TRUE*/), //Primary ID is not editable + 'download_id' => array('title'=> LAN_ID, 'type' => 'text', 'data' => 'int', 'width'=>'5%', 'thclass' => '', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank', 'primary'=>TRUE/*, 'noedit'=>TRUE*/), //Primary ID is not editable 'download_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'thclass' => ''), 'download_url' => array('title'=> DOWLAN_13, 'type' => 'url', 'data' => 'str', 'width'=>'auto', 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE), 'download_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline'=>true, 'data' => 'str', 'width'=>'auto', 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE, 'writeParms'=>'sef=download_name'), diff --git a/e107_plugins/download/request.php b/e107_plugins/download/request.php index 979731318..11414e549 100644 --- a/e107_plugins/download/request.php +++ b/e107_plugins/download/request.php @@ -215,8 +215,11 @@ if ($type == "file") echo $binary_data; exit(); } - if (strstr($download_url, "http://") || strstr($download_url, "ftp://") || strstr($download_url, "https://")) { - header("Location: {$download_url}"); + if (strstr($download_url, "http://") || strstr($download_url, "ftp://") || strstr($download_url, "https://")) + { + $download_url = e107::getParser()->parseTemplate($download_url,true); // support for shortcode-driven dynamic URLS. + e107::redirect($download_url); + // header("Location: {$download_url}"); exit(); } else From c581b89aa12b35759e796a6fd2abde1749e22708 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 27 Mar 2017 09:43:21 -0700 Subject: [PATCH 25/66] Download breadcrumb fix. --- e107_handlers/form_handler.php | 7 +- e107_plugins/download/download_shortcodes.php | 32 ++- .../download/handlers/download_class.php | 185 ++++++++++++------ .../download/templates/download_template.php | 2 +- 4 files changed, 164 insertions(+), 62 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 9e0259750..605052814 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2995,9 +2995,14 @@ class e_form $text = '
-
+
{DOWNLOAD_CAT_NEWDOWNLOAD_TEXT}
{DOWNLOAD_CAT_SEARCH}
"; From 0935f7b858e1a628ca8c5e446d99db8fdf164fb9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 27 Mar 2017 10:38:51 -0700 Subject: [PATCH 26/66] Support for root namespaces using e_url addon configuration. --- e107_admin/eurl.php | 18 ++++++-- e107_handlers/e107_class.php | 85 ++++++++++++++++++++++++++++++++++-- index.php | 23 +++++++++- 3 files changed, 117 insertions(+), 9 deletions(-) diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php index b74f04fe6..565927dad 100644 --- a/e107_admin/eurl.php +++ b/e107_admin/eurl.php @@ -207,7 +207,7 @@ class eurl_admin_ui extends e_admin_controller_ui protected function simplePage() { // $this->addTitle("Simple Redirects"); - $eUrl =e107::getAddonConfig('e_url'); + $eUrl =e107::getUrlConfig(); $frm = e107::getForm(); $tp = e107::getParser(); $cfg = e107::getConfig(); @@ -315,8 +315,17 @@ class eurl_admin_ui extends e_admin_controller_ui { // main module pref dropdown $this->prefs['url_main_module']['writeParms'][''] = 'None'; + + // e_url.php aliases + $tmp = e107::getUrlConfig('alias'); + foreach($tmp as $plugin=>$alias) + { + $this->prefs['url_main_module']['writeParms'][$alias] = eHelper::labelize($plugin); + } + + // legacy URL (news, pages ) $modules = e107::getPref('url_config', array()); - ksort($modules); + foreach ($modules as $module => $location) { $labels = array(); @@ -326,10 +335,11 @@ class eurl_admin_ui extends e_admin_controller_ui if(!$config || !vartrue($config['config']['allowMain'])) continue; $admin = $obj->admin(); $labels = vartrue($admin['labels'], array()); - - + $this->prefs['url_main_module']['writeParms'][$module] = vartrue($section['name'], eHelper::labelize($module)); } + + ksort($this->prefs['url_main_module']['writeParms']); // title2sef transform type pref $types = explode('|', 'none|dashl|dashc|dash|underscorel|underscorec|underscore|plusl|plusc|plus'); diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 30a85f4dd..6013776bc 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2416,6 +2416,73 @@ class e107 return FALSE; } + /** + * Retrieves the e_url config - new v2.1.6 + * @return array + */ + public static function getUrlConfig($mode='config') + { + $new_addon = array(); + + $filename = 'e_url'; + $elist = self::getPref($filename.'_list'); + $className = substr($filename, 2); // remove 'e_' + $methodName = 'config'; + + $profile = null; // for future use. + + if(!empty($elist)) + { + foreach(array_keys($elist) as $key) + { + if(is_readable(e_PLUGIN.$key.'/'.$filename.'.php')) + { + include_once(e_PLUGIN.$key.'/'.$filename.'.php'); + + $class_name = $key.'_'.$className; + + if(is_object($class_name)) + { + $obj = $class_name; + $class_name = get_class($obj); + } + else + { + $obj = new $class_name; + } + + if($mode === 'alias') + { + if(!empty($obj->alias)) + { + $new_addon[$key] = $obj->alias; + } + + continue; + } + + $array = self::callMethod($obj, $methodName,$profile); + + if($array) + { + foreach($array as $k=>$v) + { + if(empty($v['alias']) && !empty($obj->alias)) + { + $v['alias'] = $obj->alias; + } + $new_addon[$key][$k] = $v; + + } + + } + + } + } + } + + return $new_addon; + } /** * Get theme name or path. @@ -3157,7 +3224,7 @@ class e107 if(!$tmp = self::getRegistry('core/e107/addons/e_url')) { - $tmp = self::getAddonConfig('e_url'); + $tmp = self::getUrlConfig(); self::setRegistry('core/e107/addons/e_url',$tmp); } @@ -3165,6 +3232,8 @@ class e107 $pref = self::getPref('e_url_alias'); $sefActive = self::getPref('e_url_list'); + $rootNamespace = self::getPref('url_main_module'); + if(is_string($options)) // backwards compat. { @@ -3185,12 +3254,22 @@ class e107 $options['fragment'] = '#' . $options['fragment']; } - if(varset($tmp[$plugin][$key]['sef'])) + if(!empty($tmp[$plugin][$key]['sef'])) { if(!empty($tmp[$plugin][$key]['alias'])) { $alias = (!empty($pref[e_LAN][$plugin][$key])) ? $pref[e_LAN][$plugin][$key] : $tmp[$plugin][$key]['alias']; - $tmp[$plugin][$key]['sef'] = str_replace('{alias}', $alias, $tmp[$plugin][$key]['sef']); + + if(!empty($rootNamespace) && $rootNamespace === $plugin) + { + $replaceAlias = array('{alias}\/','{alias}/'); + $tmp[$plugin][$key]['sef'] = str_replace($replaceAlias, '', $tmp[$plugin][$key]['sef']); + } + else + { + $tmp[$plugin][$key]['sef'] = str_replace('{alias}', $alias, $tmp[$plugin][$key]['sef']); + } + } diff --git a/index.php b/index.php index b9bae8c0f..77481ecdf 100644 --- a/index.php +++ b/index.php @@ -95,7 +95,8 @@ } else*/ { - $tmp = e107::getAddonConfig('e_url'); + // $tmp = e107::getAddonConfig('e_url'); + $tmp = e107::getUrlConfig(); // e107::getCache()->set('Addon_url',e107::serialize($tmp,'json'),true,true,true); } @@ -104,6 +105,8 @@ if(count($tmp)) { + $rootNamespace = e107::getPref('url_main_module'); + $replaceAlias = array('{alias}\/?','{alias}/?','{alias}\/','{alias}/',); foreach($tmp as $plug=>$cfg) { @@ -127,7 +130,15 @@ { $alias = (!empty($pref['e_url_alias'][e_LAN][$plug][$k])) ? $pref['e_url_alias'][e_LAN][$plug][$k] : $v['alias']; // e107::getMessage()->addDebug("e_url alias found: ".$alias.""); - $v['regex'] = str_replace('{alias}', $alias, $v['regex']); + if(!empty($rootNamespace) && $rootNamespace === $plug) + { + $v['regex'] = str_replace($replaceAlias, '', $v['regex']); + } + else + { + + $v['regex'] = str_replace('{alias}', $alias, $v['regex']); + } } @@ -163,7 +174,15 @@ } elseif(getperms('0')) { + require_once(HEADERF); + echo "
"; + echo "

SEF Debug Info

"; echo "File missing: ".$file; + echo "
Matched key: ".$k.""; + + print_a($v); + echo "
"; + require_once(FOOTERF); exit; } From f90832a9d5266037daaa98cf0730e9e67b960484 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 27 Mar 2017 16:27:08 -0700 Subject: [PATCH 27/66] Admin-ui automated tree sorting when $sortField and $sortParent are defined. --- e107_handlers/admin_ui.php | 27 ++++++++++++++++++++++-- e107_plugins/download/includes/admin.php | 24 +++++++++++++-------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index cbd310b91..d2b9debb5 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -2345,6 +2345,10 @@ class e_admin_controller_ui extends e_admin_controller /** * @var array UI field data */ + + + protected $pid; + protected $fields = array(); /** @@ -2415,6 +2419,12 @@ class e_admin_controller_ui extends e_admin_controller * @var string field containing the order number */ protected $sortField = null; + + + /** + * @var string field containing the parent field + */ + protected $sortParent = null; /** * @var int reorder step @@ -3997,10 +4007,23 @@ class e_admin_controller_ui extends e_admin_controller $qry .= "\n".implode("\n", $joins); } } - else + else // default listQry { + if(!empty($listQry)) + { + $qry = $this->parseCustomListQry($listQry); + } + elseif($this->sortField && $this->sortParent) // automated 'tree' sorting. + { + $qry = "SELECT SQL_CALC_FOUND_ROWS a. *, CASE WHEN a.".$this->sortParent." = 0 THEN a.".$this->sortField." ELSE b.".$this->sortField." + (( a.".$this->sortField.")/1000) END AS treesort FROM `#".$this->table."` AS a LEFT JOIN `#".$this->table."` AS b ON a.".$this->sortParent." = b.".$this->pid; + $this->listOrder = 'treesort,'.$this->sortField; + $this->orderStep = ($this->orderStep === 1) ? 100 : $this->orderStep; + } + else + { + $qry = "SELECT SQL_CALC_FOUND_ROWS ".$tableSFields." FROM ".$tableFrom; + } - $qry = $listQry ? $this->parseCustomListQry($listQry) : "SELECT SQL_CALC_FOUND_ROWS ".$tableSFields." FROM ".$tableFrom; } // group field - currently auto-added only if there are joins diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index 1a10deebe..241799620 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -131,10 +131,16 @@ class download_cat_ui extends e_admin_ui protected $table = "download_category"; protected $pid = "download_category_id"; protected $perPage = 0; //no limit - protected $listOrder = 'download_category_order'; - // protected $defaultOrderField = 'download_category_parent,download_category_order'; - // protected $listQry = "SELECT * FROM #faq_info"; // without any Order or Limit. - // protected $editQry = "SELECT * FROM #faq_info WHERE faq_info_id = {ID}"; + // protected $listOrder = 'download_category_parent,download_category_order'; + + protected $batchCopy = true; + + // initiate as a parent/child tree. + protected $sortField = 'download_category_order'; + protected $sortParent = 'download_category_parent'; + + protected $listOrder = null; // automatic + protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), @@ -147,7 +153,7 @@ class download_cat_ui extends e_admin_ui 'download_category_parent' => array('title'=> LAN_PARENT, 'type' => 'method', 'width' => '5%', 'batch' => TRUE, 'filter'=>TRUE), 'download_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'inline' => true, 'width' => 'auto', 'data' => 'int', 'batch' => TRUE, 'filter'=>TRUE), 'download_category_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=>'int', 'width' => '5%', 'thclass' => 'right', 'class'=> 'right' ), - 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center') + 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center', 'sort'=>1) ); @@ -622,11 +628,11 @@ $columnInfo = array( ".$row['limit_id']." ".r_userclass_name($row['limit_classnum'])." - + ".DOWLAN_109." ".DOWLAN_110." - + ".DOWLAN_111." ".DOWLAN_109." ".DOWLAN_110." @@ -646,11 +652,11 @@ $columnInfo = array( ".r_userclass("newlimit_class", 0, "off", "guest, member, admin, classes, language")." - + ".DOWLAN_109." ".DOWLAN_110." - + ".DOWLAN_111." ".DOWLAN_109." ".DOWLAN_110." From c2cc206d21f9e23a9dec2dd003405136d80a2eec Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 27 Mar 2017 19:35:20 -0700 Subject: [PATCH 28/66] ADMIN_CHILD_ICON constant added. --- e107_core/templates/admin_icons_template.php | 2 +- e107_plugins/forum/forum_admin.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/e107_core/templates/admin_icons_template.php b/e107_core/templates/admin_icons_template.php index 6f64570f0..89f7176e8 100644 --- a/e107_core/templates/admin_icons_template.php +++ b/e107_core/templates/admin_icons_template.php @@ -440,7 +440,7 @@ if (!defined('E_16_FAILEDLOGIN')) { define("E_32_TRUE", ""); - + define("ADMIN_CHILD_ICON", ''); // must use single quotes. define("ADMIN_TRUE_ICON", ""); define("ADMIN_FALSE_ICON", ""); define("ADMIN_WARNING_ICON", ""); diff --git a/e107_plugins/forum/forum_admin.php b/e107_plugins/forum/forum_admin.php index d1ea7e54b..f8492aa35 100644 --- a/e107_plugins/forum/forum_admin.php +++ b/e107_plugins/forum/forum_admin.php @@ -822,7 +822,9 @@ if(!deftrue('OLD_FORUMADMIN')) } $linkQ = e_SELF."?searchquery=&filter_options=page_chapter__".$id."&mode=page&action=list"; - $level_image = $parent ? ' ' : ''; + // $level_image = $parent ? ' ' : ''; + + $level_image = $parent ? str_replace('level-x','level-'.$level, ADMIN_CHILD_ICON) : ''; return ($parent) ? $level_image.$curVal : $curVal; } @@ -858,7 +860,10 @@ if(!deftrue('OLD_FORUMADMIN')) $level = 2; } - $ret['inlineParms'] = array('pre'=>''); + // $ret['inlineParms'] = array('pre'=>''); + + $ret['inlineParms'] = array('pre'=> str_replace('level-x','level-'.$level, ADMIN_CHILD_ICON)); + } From a2026244a3be305dfe3d80ed3b83577a2406009b Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 28 Mar 2017 15:16:27 -0700 Subject: [PATCH 29/66] Issue #2487 - Category Tree fixes. --- e107_core/templates/admin_icons_template.php | 2 +- e107_handlers/admin_ui.php | 203 ++++++++++++++++++- e107_handlers/form_handler.php | 5 +- e107_plugins/download/includes/admin.php | 28 ++- e107_themes/bootstrap3/admin_style.css | 8 +- 5 files changed, 226 insertions(+), 20 deletions(-) diff --git a/e107_core/templates/admin_icons_template.php b/e107_core/templates/admin_icons_template.php index 89f7176e8..760ff12eb 100644 --- a/e107_core/templates/admin_icons_template.php +++ b/e107_core/templates/admin_icons_template.php @@ -440,7 +440,7 @@ if (!defined('E_16_FAILEDLOGIN')) { define("E_32_TRUE", ""); - define("ADMIN_CHILD_ICON", ''); // must use single quotes. + define("ADMIN_CHILD_ICON", ''); // must use single quotes. define("ADMIN_TRUE_ICON", ""); define("ADMIN_FALSE_ICON", ""); define("ADMIN_WARNING_ICON", ""); diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index d2b9debb5..0e8fd6ec6 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -2420,6 +2420,10 @@ class e_admin_controller_ui extends e_admin_controller */ protected $sortField = null; + /** + * @var string field containing the order number + */ + protected $treePrefix = null; /** * @var string field containing the parent field @@ -2621,6 +2625,26 @@ class e_admin_controller_ui extends e_admin_controller { return $this->sortField; } + + /** + * Get Sort Field data + * @return string + */ + public function getSortParent() + { + return $this->sortParent; + } + + + + /** + * Get Sort Field data + * @return string + */ + public function getTreePrefix() + { + return $this->treePrefix; + } /** * Get Tab data @@ -4015,9 +4039,10 @@ class e_admin_controller_ui extends e_admin_controller } elseif($this->sortField && $this->sortParent) // automated 'tree' sorting. { - $qry = "SELECT SQL_CALC_FOUND_ROWS a. *, CASE WHEN a.".$this->sortParent." = 0 THEN a.".$this->sortField." ELSE b.".$this->sortField." + (( a.".$this->sortField.")/1000) END AS treesort FROM `#".$this->table."` AS a LEFT JOIN `#".$this->table."` AS b ON a.".$this->sortParent." = b.".$this->pid; - $this->listOrder = 'treesort,'.$this->sortField; - $this->orderStep = ($this->orderStep === 1) ? 100 : $this->orderStep; + // $qry = "SELECT SQL_CALC_FOUND_ROWS a. *, CASE WHEN a.".$this->sortParent." = 0 THEN a.".$this->sortField." ELSE b.".$this->sortField." + (( a.".$this->sortField.")/1000) END AS treesort FROM `#".$this->table."` AS a LEFT JOIN `#".$this->table."` AS b ON a.".$this->sortParent." = b.".$this->pid; + $qry = $this->getParentChildQuery(); + $this->listOrder = '_treesort '; // .$this->sortField; + // $this->orderStep = ($this->orderStep === 1) ? 100 : $this->orderStep; } else { @@ -4140,6 +4165,75 @@ class e_admin_controller_ui extends e_admin_controller return $qry; } + + protected function getParentChildQuery() + { + + $parent= $this->getSortParent(); + $table = $this->getTableName(); + $pid = $this->getPrimaryName(); + $order = $this->getSortField(); + + $sql = " + + DROP FUNCTION IF EXISTS `getDepth` ; + CREATE FUNCTION `getDepth` (project_id INT) RETURNS int + BEGIN + DECLARE depth INT; + SET depth=1; + + WHILE project_id > 0 DO + SELECT IFNULL(".$parent.",-1) + INTO project_id + FROM ( SELECT ".$parent." FROM `#".$table."` WHERE ".$pid." = project_id) t; + + IF project_id > 0 THEN + SET depth = depth + 1; + END IF; + + END WHILE; + + RETURN depth; + + END + ; + + + + DROP FUNCTION IF EXISTS `getTreeSort`; + CREATE FUNCTION getTreeSort(incid INT) + RETURNS CHAR(255) + BEGIN + SET @parentstr = CONVERT(incid, CHAR); + SET @parent = -1; + label1: WHILE @parent != 0 DO + SET @parent = (SELECT ".$parent." FROM `#".$table."` WHERE ".$pid." =incid); + SET @order = (SELECT ".$order." FROM `#".$table."` WHERE ".$pid." =incid); + SET @parentstr = CONCAT(if(@parent = 0,'',@parent), LPAD(@order,3,0), @parentstr); + SET incid = @parent; + END WHILE label1; + + RETURN @parentstr; + END + ; + + "; + + // FIXME - make order work correctly (modify @order) when twin digits or higher are used. + + e107::getDb()->gen($sql); + + return "SELECT *, getTreeSort(".$pid.") as _treesort, getDepth(".$pid.") as _depth FROM `#".$table."` "; + + + + } + + + + + + /** * Manage submit item * Note: $callbackBefore will break submission if returns false @@ -4318,6 +4412,7 @@ class e_admin_ui extends e_admin_controller_ui protected $sortField; protected $sortParent; protected $orderStep; + protected $treePrefix; /** @@ -5276,10 +5371,18 @@ class e_admin_ui extends e_admin_controller_ui $updated[] = "#".$id." -- ".$this->sortField." = ".$c; } // echo($sql->getLastQuery()."\n"); - $c += $step; + $c++; // += $step; } + + if(!empty($this->sortParent) && !empty($this->sortField) ) + { + return null; + } + + //file_put_contents(e_LOG."sortAjax.log", print_r($_POST['all'],true)); + // Increment every other record after the current page of records. // $changed = (intval($_POST['neworder']) * $step) + $from ; $changed = $c - $step; @@ -5289,10 +5392,10 @@ class e_admin_ui extends e_admin_controller_ui // ------------ Fix Child Order when parent is used. ---------------- - +/* if(!empty($this->sortParent) && !empty($this->sortField) ) // Make sure there is space for at least 99 { - + $parent = array(); $data2 = $sql->retrieve($this->table,$this->pid.','.$this->sortField,$this->sortParent .' = 0',true); foreach($data2 as $val) @@ -5322,7 +5425,7 @@ class e_admin_ui extends e_admin_controller_ui $sql->update($this->table, $this->sortField . ' = '.$c.' WHERE '.$this->pid.' = '.intval($row[$this->pid]).' LIMIT 1'); } - +*/ @@ -5897,6 +6000,76 @@ class e_admin_form_ui extends e_form { } + + /** + * @todo Get a 'depth/level' field working with mysql and change the 'level' accordingly + * @param mixed $curVal + * @param string $mode read|write|inline + * @param array $parm + * @return array|string + */ + public function treePrefix($curVal, $mode, $parm) + { + $controller = $this->getController(); + $parentField = $controller->getSortParent(); + $treePrefixField = $controller->getTreePrefix(); + $parent = $controller->getListModel()->get($parentField); + $level = $controller->getListModel()->get("_depth"); + + + if($mode === 'read') + { + + $inline = $this->getController()->getFieldAttr($treePrefixField,'inline'); + + if($inline === true) + { + return $curVal; + } + + $level_image = $parent ? str_replace('level-x','level-'.$level, ADMIN_CHILD_ICON) : ''; + + return ($parent) ? $level_image.$curVal : $curVal; + + } + + + if($mode === 'inline') + { + $ret = array('inlineType'=>'text'); + + if(!empty($parent)) + { + $ret['inlineParms'] = array('pre'=> str_replace('level-x','level-'.$level, ADMIN_CHILD_ICON)); + } + + + return $ret; + } + + +/* + if($mode == 'write') // not used. + { + // return $frm->text('forum_name',$curVal,255,'size=xxlarge'); + } + + if($mode == 'filter') + { + return; + } + if($mode == 'batch') + { + return; + } +*/ + + + + + } + + /** * Generic DB Record Creation Form. * @return string @@ -6052,6 +6225,22 @@ class e_admin_form_ui extends e_form $fields['options']['sort'] = false; } + if($treefld = $controller->getTreePrefix()) + { + $fields[$treefld]['type'] = 'method'; + $fields[$treefld]['method'] = 'treePrefix'; /* @see e_admin_form_ui::treePrefix(); */ + + $tr = $controller->getTreeModel()->toArray(); + + foreach($tr as $row) + { + e107::getDebug()->log($row[$treefld].' > '.$row['_treesort']); + } + + } + + + // ------------------------------------------ $coreBatchOptions = array( diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 605052814..509e47e8e 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -4031,6 +4031,7 @@ class e_form } + if(!empty($attributes['inline'])) $parms['editable'] = true; // attribute alias if(!empty($attributes['sort'])) $parms['sort'] = true; // attribute alias @@ -4872,11 +4873,11 @@ class e_form } // print_a($attributes); // Inline Editing. - if(!vartrue($attributes['noedit']) && vartrue($parms['editable'])) // avoid bad markup, better solution coming up + if(empty($attributes['noedit']) && !empty($parms['editable'])) // avoid bad markup, better solution coming up { $mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], '')); - $methodParms = call_user_func_array(array($this, $method), array($value, 'inline', $parms)); + $methodParms = call_user_func_array(array($this, $meth), array($value, 'inline', $parms)); $inlineParms = (!empty($methodParms['inlineParms'])) ? $methodParms['inlineParms'] : null; diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index 241799620..fcc234ade 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -131,31 +131,43 @@ class download_cat_ui extends e_admin_ui protected $table = "download_category"; protected $pid = "download_category_id"; protected $perPage = 0; //no limit - // protected $listOrder = 'download_category_parent,download_category_order'; protected $batchCopy = true; // initiate as a parent/child tree. protected $sortField = 'download_category_order'; protected $sortParent = 'download_category_parent'; - - protected $listOrder = null; // automatic + protected $treePrefix = 'download_category_name'; + // protected $orderStep = 1000; + // protected $listOrder = null; // automatic protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'method', 'width' => '5%', 'thclass' => 'center','class'=>'center','writeParms'=>'glyphs=1' ), 'download_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE), - 'download_category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), - 'download_category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), + 'download_category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data'=>'str', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), + 'download_category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'data'=>'str', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), - 'download_category_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name + 'download_category_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'data'=>'str', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name 'download_category_parent' => array('title'=> LAN_PARENT, 'type' => 'method', 'width' => '5%', 'batch' => TRUE, 'filter'=>TRUE), 'download_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'inline' => true, 'width' => 'auto', 'data' => 'int', 'batch' => TRUE, 'filter'=>TRUE), - 'download_category_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=>'int', 'width' => '5%', 'thclass' => 'right', 'class'=> 'right' ), + 'download_category_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'nolist'=>true, 'data'=>'int', 'width' => '5%', 'thclass' => 'right', 'class'=> 'right' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center', 'sort'=>1) ); - + + protected $fieldpref = array('download_category_icon', 'download_category_id', 'download_category_name', 'download_category_sef', 'download_category_class', 'download_category_order'); + + + function init() + { + if(deftrue('e_DEBUG')) + { + $this->fields['download_category_order']['nolist'] = false; + } + + } + function getDownloadCategoryTree($id = false, $default = 'n/a') { diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index ab3893018..bd0b3bb98 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1552,8 +1552,12 @@ body#admin-menus #sc-admin-help .panel-body { td img.thumbnail { margin-bottom:0 } - - +/* Parent/Child Indicator */ +.treeprefix {margin-right:4px} +.treeprefix.level-2 { margin-left:10px } +.treeprefix.level-3 { margin-left:30px } +.treeprefix.level-4 { margin-left:50px } +.treeprefix.level-5 { margin-left:70px } From 2b37a57348aa3cc032d64c84a76b4dc555f982a0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 28 Mar 2017 17:34:01 -0700 Subject: [PATCH 30/66] typo fix --- e107_handlers/admin_ui.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 0e8fd6ec6..70144a08e 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -5425,13 +5425,13 @@ class e_admin_ui extends e_admin_controller_ui $sql->update($this->table, $this->sortField . ' = '.$c.' WHERE '.$this->pid.' = '.intval($row[$this->pid]).' LIMIT 1'); } -*/ + } - +*/ $this->afterSort($result, $_POST); // e107::getLog()->addDebug(print_r($_POST,true))->toFile('SortAjax','Admin-UI Ajax Sort Log', true); From 453a7fc91e75cfa42abf40005ac2f9ef98da6148 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 28 Mar 2017 17:55:35 -0700 Subject: [PATCH 31/66] PHP 5.6 fix for sql function queries. --- e107_handlers/admin_ui.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 70144a08e..cfd80f7a6 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4174,9 +4174,14 @@ class e_admin_controller_ui extends e_admin_controller $pid = $this->getPrimaryName(); $order = $this->getSortField(); - $sql = " - DROP FUNCTION IF EXISTS `getDepth` ; + + $sql = "DROP FUNCTION IF EXISTS `getDepth` ;"; + + e107::getDb()->gen($sql); + + + $sql = " CREATE FUNCTION `getDepth` (project_id INT) RETURNS int BEGIN DECLARE depth INT; @@ -4197,10 +4202,15 @@ class e_admin_controller_ui extends e_admin_controller END ; + "; + e107::getDb()->gen($sql); - DROP FUNCTION IF EXISTS `getTreeSort`; + $sql = "DROP FUNCTION IF EXISTS `getTreeSort`;"; + + e107::getDb()->gen($sql); + $sql = " CREATE FUNCTION getTreeSort(incid INT) RETURNS CHAR(255) BEGIN @@ -4219,7 +4229,6 @@ class e_admin_controller_ui extends e_admin_controller "; - // FIXME - make order work correctly (modify @order) when twin digits or higher are used. e107::getDb()->gen($sql); From c0ff3dd2329bfe06585cff4fb95cf8af607700b7 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 29 Mar 2017 13:56:53 -0700 Subject: [PATCH 32/66] Fixes #2534 - News Category Caption. --- e107_handlers/news_class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index 0481a4273..e30784685 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -882,6 +882,12 @@ class e_news_tree extends e_front_tree_model if($tablerender) { $caption = vartrue($parms['caption']) ? defset($parms['caption'], $parms['caption']) : LAN_NEWSLATEST_MENU_TITLE; // found in plugins/news/languages/English.php + + if(!empty($parms['caption'][e_LANGUAGE])) + { + $caption = $parms['caption'][e_LANGUAGE]; + } + $mod = true === $tablerender ? 'news_latest_menu' : $tablerender; return e107::getRender()->tablerender($caption, $ret, varset($parms['mode'], $mod), $return); } @@ -1096,6 +1102,12 @@ class e_news_category_tree extends e_front_tree_model if($tablerender) { $caption = vartrue($parms['caption']) ? defset($parms['caption'], $parms['caption']) : LAN_NEWSCAT_MENU_TITLE; // found in plugins/news/languages/English.php + + if(!empty($parms['caption'][e_LANGUAGE])) + { + $caption = $parms['caption'][e_LANGUAGE]; + } + $mod = true === $tablerender ? 'news_categories_menu' : $tablerender; return e107::getRender()->tablerender($caption, $ret, varset($parms['mode'], $mod), $return); } From f7639dd2824c1606a483421343076ffb52b325d6 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Thu, 30 Mar 2017 11:29:45 +0200 Subject: [PATCH 33/66] Fixes #2540 - Added common LAN_REMOVE --- e107_languages/English/admin/lan_admin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 07b686dbe..0208b1b52 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -244,6 +244,7 @@ define("LAN_INSTALLED","Installed");//TODO elsewhere define("LAN_LAST_UPDATED","Last Updated"); define("LAN_UPDATE_AVAILABLE","Update Available"); define("LAN_ADD", "Add"); +define("LAN_REMOVE", "Remove"); define("LAN_ADD_MORE", "Add More"); define("LAN_MULTIPLE_CHOICE", "Multiple Choice"); @@ -273,7 +274,7 @@ define("LAN_PRUNE", "Prune"); define("LAN_RESET","Reset"); define("LAN_CLEAR","Clear"); define("LAN_ADD_ALL", "Add All"); -define("LAN_CLEAR_ALL", "Clear All"); +define("LAN_CLEAR_ALL", "Clear All"); define("LAN_UNKNOWN", "Unknown"); define("LAN_ALL","All"); define("LAN_IMPORT","Import"); From 7ab368076f0401f8034a342e282cef173c0399f5 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 30 Mar 2017 08:57:01 -0700 Subject: [PATCH 34/66] Admin-ui: Additional checks for valid parent value when editing parent/child record. eg. download_category etc. --- e107_handlers/admin_ui.php | 42 ++++++++++++++++++---- e107_handlers/form_handler.php | 20 ++++++++++- e107_languages/English/admin/lan_admin.php | 2 ++ e107_plugins/download/includes/admin.php | 41 +++++++++++++++------ 4 files changed, 88 insertions(+), 17 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index cfd80f7a6..1a534b826 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4040,7 +4040,7 @@ class e_admin_controller_ui extends e_admin_controller elseif($this->sortField && $this->sortParent) // automated 'tree' sorting. { // $qry = "SELECT SQL_CALC_FOUND_ROWS a. *, CASE WHEN a.".$this->sortParent." = 0 THEN a.".$this->sortField." ELSE b.".$this->sortField." + (( a.".$this->sortField.")/1000) END AS treesort FROM `#".$this->table."` AS a LEFT JOIN `#".$this->table."` AS b ON a.".$this->sortParent." = b.".$this->pid; - $qry = $this->getParentChildQuery(); + $qry = $this->getParentChildQry(); $this->listOrder = '_treesort '; // .$this->sortField; // $this->orderStep = ($this->orderStep === 1) ? 100 : $this->orderStep; } @@ -4166,7 +4166,12 @@ class e_admin_controller_ui extends e_admin_controller } - protected function getParentChildQuery() + /** + * Return a Parent/Child SQL Query based on sortParent and sortField variables + * @param bool|false $orderby - include 'ORDER BY' in the qry. + * @return string + */ + public function getParentChildQry($orderby=false) { $parent= $this->getSortParent(); @@ -4188,9 +4193,10 @@ class e_admin_controller_ui extends e_admin_controller SET depth=1; WHILE project_id > 0 DO + SELECT IFNULL(".$parent.",-1) INTO project_id - FROM ( SELECT ".$parent." FROM `#".$table."` WHERE ".$pid." = project_id) t; + FROM ( SELECT ".$parent." FROM `#".$table."` WHERE ".$pid." = project_id) AS t; IF project_id > 0 THEN SET depth = depth + 1; @@ -4232,10 +4238,14 @@ class e_admin_controller_ui extends e_admin_controller e107::getDb()->gen($sql); - return "SELECT *, getTreeSort(".$pid.") as _treesort, getDepth(".$pid.") as _depth FROM `#".$table."` "; - + $qry = "SELECT *, getTreeSort(".$pid.") as _treesort, getDepth(".$pid.") as _depth FROM `#".$table."` "; + if($orderby === true) + { + $qry .= " ORDER BY _treesort"; + } + return $qry; } @@ -4289,7 +4299,26 @@ class e_admin_controller_ui extends e_admin_controller // - Autoincrement sortField on 'Create'. - if(($_posted['etrigger_submit'] === 'create') && !empty($this->sortField) && empty($this->sortParent) && empty($_posted[$this->sortField]) ) + + // Prevent parent being assigned as self. + if(!empty($this->sortParent) && $this->getAction() === 'edit' && ($model->getId() == $_posted[$this->sortParent] ) ) + { + $vars = array( + 'x'=> $this->getFieldAttr($this->sortParent,'title'), + 'y'=> $this->getFieldAttr($this->pid,'title'), + ); + + $message = e107::getParser()->lanVars(LAN_UI_X_CANT_EQUAL_Y, $vars); + $model->addMessageWarning($message); + $model->setMessages(); + $this->getUI()->addWarning($this->sortParent); + return false; + } + + + + + if(($this->getAction() === 'create') && !empty($this->sortField) && empty($this->sortParent) && empty($_posted[$this->sortField]) ) { $incVal = e107::getDb()->max($this->table, $this->sortField) + 1; @@ -5956,6 +5985,7 @@ class e_admin_form_ui extends e_form protected $_controller = null; + /** * Constructor * @param e_admin_ui $controller diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 509e47e8e..83e2a61fd 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -66,6 +66,7 @@ class e_form protected $_tabindex_counter = 0; protected $_tabindex_enabled = true; protected $_cached_attributes = array(); + protected $_field_warnings = array(); @@ -84,6 +85,13 @@ class e_form $this->setRequiredString(''); } + + public function addWarning($field) + { + $this->_field_warnings[] = $field; + + } + /** * Open a new form * @param string name @@ -5967,7 +5975,17 @@ class e_form } */ - + if(in_array($key,$this->_field_warnings)) + { + if(is_string($writeParms)) + { + parse_str($writeParms,$writeParms); + } + + $writeParms['tdClassRight'] .= ' has-warning'; + + } + $leftCell = $required."".defset(vartrue($att['title']), vartrue($att['title']))."".$label; $rightCell = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId())." {$help}"; diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 0208b1b52..32f664c12 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -524,3 +524,5 @@ define("LAN_ENGINE", "Engine"); define("LAN_SOURCE", "Source"); define("LAN_ERROR_CONNECTION","Unable to connect for updates. Please check firewall and/or internet connection."); + +define("LAN_UI_X_CANT_EQUAL_Y", "[x] cannot be the same as [y]"); diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index fcc234ade..c86337d00 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -158,6 +158,7 @@ class download_cat_ui extends e_admin_ui protected $fieldpref = array('download_category_icon', 'download_category_id', 'download_category_name', 'download_category_sef', 'download_category_class', 'download_category_order'); + protected $downloadCats = array(); function init() { @@ -166,27 +167,47 @@ class download_cat_ui extends e_admin_ui $this->fields['download_category_order']['nolist'] = false; } + $this->setDownloadCategoryTree(); + } - function getDownloadCategoryTree($id = false, $default = 'n/a') + private function setDownloadCategoryTree() { - // TODO get faq category tree + + $sql = e107::getDb(); - $sql -> gen('SELECT * FROM #download_category ORDER BY download_category_order'); - $cats = array(); - $cats[0] = $default; + $qry = $this->getParentChildQry(true); + $sql->gen($qry); + + $this->downloadCats[0] = LAN_NONE; + while($row = $sql->fetch()) { - $cats[$row['download_category_id']] = $row['download_category_name']; + $num = $row['_depth'] - 1; + $id = $row['download_category_id']; + $this->downloadCats[$id] = str_repeat("  ",$num).$row['download_category_name']; } - + + if($this->getAction() === 'edit') // make sure parent is not the same as ID. + { + $r = $this->getId(); + unset($this->downloadCats[$r]); + } + + } + + + + function getDownloadCategoryTree($id = false) + { + if($id) { - return $cats[$id]; + return $this->downloadCats[$id]; } - return $cats; + return $this->downloadCats; } } @@ -205,7 +226,7 @@ class download_cat_form_ui extends e_admin_form_ui break; case 'write': - return $this->selectbox('download_category_parent', $controller->getDownloadCategoryTree(), $curVal); + return $this->select('download_category_parent', $controller->getDownloadCategoryTree(), $curVal); break; case 'filter': From 525a0975179e978970e841a61ee62900f47d4af3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 30 Mar 2017 13:53:06 -0700 Subject: [PATCH 35/66] Admin-ui: readParm['url'] added and other url fixes. --- e107_handlers/admin_ui.php | 2 +- e107_handlers/form_handler.php | 98 +++++++++++++++++++++--- e107_plugins/download/includes/admin.php | 21 ++--- e107_themes/bootstrap3/admin_style.css | 6 +- 4 files changed, 103 insertions(+), 24 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 1a534b826..410b5a826 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4238,7 +4238,7 @@ class e_admin_controller_ui extends e_admin_controller e107::getDb()->gen($sql); - $qry = "SELECT *, getTreeSort(".$pid.") as _treesort, getDepth(".$pid.") as _depth FROM `#".$table."` "; + $qry = "SELECT SQL_CALC_FOUND_ROWS *, getTreeSort(".$pid.") as _treesort, getDepth(".$pid.") as _depth FROM `#".$table."` "; if($orderby === true) { diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 83e2a61fd..6bbf4b3d5 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -4008,6 +4008,67 @@ class e_form return $text; } + /** + * Check if a value should be linked and wrap in tag if required. + * @todo global pref for the target option? + * @param mixed $value + * @param array $parms + * @param $id + * @return string + */ + private function renderLink($value, $parms, $id=null) + { + if(empty($parms['link']) && empty($parms['url'])) + { + return $value; + } + + $dialog = vartrue($parms['target']) =='dialog' ? " e-modal" : ""; // iframe + $ext = vartrue($parms['target']) =='blank' ? " rel='external' " : ""; // new window + $modal = vartrue($parms['target']) =='modal' ? " data-toggle='modal' data-cache='false' data-target='#uiModal' " : ""; + + + if(!empty($parms['url'])) // ie. use e_url.php + { + $plugin = $this->getController()->getPluginName(); + $data = $this->getController()->getListModel()->getData(); + $link = e107::url($plugin,$parms['url'],$data); + } + else // old way. + { + $tp = e107::getParser(); + + $link = str_replace('[id]',$id,$parms['link']); + $link = $tp->replaceConstants($link); // SEF URL is not important since we're in admin. + + + if($parms['link'] === 'sef' && $this->getController()->getListModel()) + { + $model = $this->getController()->getListModel(); + + if(!$model->getUrl()) + { + $model->setUrl($this->getController()->getUrl()); + } + // assemble the url + $link = $model->url(null); + } + elseif(!empty($data[$parms['link']])) // support for a field-name as the link. eg. link_url. + { + $data = $this->getController()->getListModel()->getData(); + $link = $tp->replaceConstants(vartrue($data[$parms['link']])); + } + } + // in case something goes wrong... + if($link) + { + return "".$value.""; + } + + return $value; + + } + /** @@ -4048,6 +4109,9 @@ class e_form $attributes['type'] = $parms['type']; } + + + $this->renderValueTrigger($field, $value, $parms, $id); $tp = e107::getParser(); @@ -4166,11 +4230,16 @@ class e_form } - if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up + if(empty($attributes['noedit']) && !empty($parms['editable']) && empty($parms['link'])) // avoid bad markup, better solution coming up { $mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], '')); $value = "".$value.""; } + else + { + $value = $this->renderLink($value,$parms,$id); + } + $value = vartrue($parms['pre']).$value.vartrue($parms['post']); // else same @@ -4317,19 +4386,22 @@ class e_form $value = defset($value, $value); } - if(vartrue($parms['truncate'])) + if(!empty($parms['truncate'])) { $value = $tp->text_truncate($value, $parms['truncate'], '...'); } - elseif(vartrue($parms['htmltruncate'])) + elseif(!empty($parms['htmltruncate'])) { $value = $tp->html_truncate($value, $parms['htmltruncate'], '...'); } - if(vartrue($parms['wrap'])) + if(!empty($parms['wrap'])) { $value = $tp->htmlwrap($value, (int) $parms['wrap'], varset($parms['wrapChar'], ' ')); } - if(vartrue($parms['link']) && $id/* && is_numeric($id)*/) + + $value = $this->renderLink($value,$parms,$id); + /* + if(!empty($parms['link']) && $id) { $link = str_replace('[id]', $id, $parms['link']); $link = $tp->replaceConstants($link); // SEF URL is not important since we're in admin. @@ -4338,9 +4410,7 @@ class e_form $ext = vartrue($parms['target']) == 'blank' ? " rel='external' " : ""; // new window $modal = vartrue($parms['target']) == 'modal' ? " data-toggle='modal' data-cache='false' data-target='#uiModal' " : ""; - if($parms['link'] == 'sef' && $this->getController() - ->getListModel() - ) + if($parms['link'] == 'sef' && $this->getController()->getListModel()) { $model = $this->getController()->getListModel(); // copy url config @@ -4351,6 +4421,7 @@ class e_form // assemble the url $link = $model->url(); } + elseif(vartrue($data[$parms['link']])) // support for a field-name as the link. eg. link_url. { $link = $tp->replaceConstants(vartrue($data[$parms['link']])); @@ -4361,7 +4432,7 @@ class e_form { $value = "" . $value . ""; } - } + }*/ if(empty($value)) { @@ -4417,7 +4488,11 @@ class e_form { $value = $tp->htmlwrap($value, (int)$parms['wrap'], varset($parms['wrapChar'], ' ')); } - if(vartrue($parms['link']) && $id/* && is_numeric($id)*/) + + $value = $this->renderLink($value,$parms,$id); + + /* + if(vartrue($parms['link']) && $id) { $link = str_replace('[id]',$id,$parms['link']); $link = $tp->replaceConstants($link); // SEF URL is not important since we're in admin. @@ -4441,7 +4516,7 @@ class e_form // in case something goes wrong... if($link) $value = "".$value.""; - } + }*/ if(empty($value)) { @@ -4993,6 +5068,7 @@ class e_form //TODO - order default: + $value = $this->renderLink($value,$parms,$id); //unknown type break; } diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index c86337d00..0bc15bd73 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -126,11 +126,11 @@ class plugin_download_admin extends e_admin_dispatcher class download_cat_ui extends e_admin_ui { - protected $pluginTitle = LAN_PLUGIN_DOWNLOAD_NAME; - protected $pluginName = 'download'; - protected $table = "download_category"; - protected $pid = "download_category_id"; - protected $perPage = 0; //no limit + protected $pluginTitle = LAN_PLUGIN_DOWNLOAD_NAME; + protected $pluginName = 'download'; + protected $table = "download_category"; + protected $pid = "download_category_id"; + protected $perPage = 0; //no limit protected $batchCopy = true; @@ -138,14 +138,17 @@ class download_cat_ui extends e_admin_ui protected $sortField = 'download_category_order'; protected $sortParent = 'download_category_parent'; protected $treePrefix = 'download_category_name'; - // protected $orderStep = 1000; - // protected $listOrder = null; // automatic + // protected $orderStep = // automatic + // protected $listOrder = // automatic + + //legacy URL scheme + protected $url = array('route'=>'download/list/category', 'vars' => array('id' => 'download_category_id', 'name' => 'download_category_sef'), 'name' => 'download_category_name', 'description' => ''); // 'link' only needed if profile not provided. protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'method', 'width' => '5%', 'thclass' => 'center','class'=>'center','writeParms'=>'glyphs=1' ), - 'download_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE), + 'download_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank'), 'download_category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data'=>'str', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), 'download_category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'data'=>'str', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'), @@ -307,7 +310,7 @@ class download_main_admin_ui extends e_admin_ui 'download_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'thclass' => ''), 'download_url' => array('title'=> DOWLAN_13, 'type' => 'url', 'data' => 'str', 'width'=>'auto', 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE), 'download_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline'=>true, 'data' => 'str', 'width'=>'auto', 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE, 'writeParms'=>'sef=download_name'), - 'download_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'data' => 'str', 'width'=>'auto', 'thclass' => ''), + 'download_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'data' => 'str', 'width'=>'auto', 'thclass' => ''), 'download_author' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'), 'download_author_email' => array('title'=> DOWLAN_16, 'type' => 'email', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'), diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index bd0b3bb98..0b022006f 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1555,9 +1555,9 @@ td img.thumbnail { margin-bottom:0 } /* Parent/Child Indicator */ .treeprefix {margin-right:4px} .treeprefix.level-2 { margin-left:10px } -.treeprefix.level-3 { margin-left:30px } -.treeprefix.level-4 { margin-left:50px } -.treeprefix.level-5 { margin-left:70px } +.treeprefix.level-3 { margin-left:35px } +.treeprefix.level-4 { margin-left:60px } +.treeprefix.level-5 { margin-left:85px } From f4e3564c729cb982c7d3416d2c032cce3a86173b Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 30 Mar 2017 18:11:15 -0700 Subject: [PATCH 36/66] SMF Import Routine - TBC --- .../import/providers/smf_import_class.php | 307 +++++++++--------- 1 file changed, 151 insertions(+), 156 deletions(-) diff --git a/e107_plugins/import/providers/smf_import_class.php b/e107_plugins/import/providers/smf_import_class.php index 4b034b15d..1f2e87c97 100644 --- a/e107_plugins/import/providers/smf_import_class.php +++ b/e107_plugins/import/providers/smf_import_class.php @@ -15,22 +15,41 @@ class smf_import extends base_import_class { public $title = 'SMF v2.x (Simple Machines Forum)'; - public $description = 'Supports users only'; - public $supported = array('users'); + public $description = 'Currently does not import membergroups or more than 1 post attachment '; + public $supported = array('users','forum','forumthread','forumpost'); public $mprefix = 'smf_'; public $sourceType = 'db'; function init() { - + - } + } + + function config() + { + + return; + + $frm = e107::getForm(); + + $var[0]['caption'] = "Path to phpBB3 Attachments folder (optional)"; + $var[0]['html'] = $frm->text('forum_attachment_path',null,40,'size=xxlarge'); + $var[0]['help'] = "Relative to the root folder of your e107 installation"; + + return $var; + } + // Set up a query for the specified task. // Returns TRUE on success. FALSE on error function setupQuery($task, $blank_user=FALSE) { - if ($this->ourDB == NULL) return FALSE; + if ($this->ourDB == null) + { + e107::getMessage()->addDebug("Unable to connext"); + return FALSE; + } switch ($task) { @@ -43,23 +62,45 @@ class smf_import extends base_import_class } $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}members WHERE `is_activated`=1"); - if ($result === FALSE) return FALSE; + if ($result === false) + { + $message = $this->ourDB->getLastErrorText(); + e107::getMessage()->addError($message); + return false; + } break; case 'forum' : - $result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}boards`"); - if ($result === FALSE) return FALSE; + $qry = "SELECT f.*, m.id_member, m.poster_name, m.poster_time FROM `{$this->DBPrefix}boards` AS f LEFT JOIN `{$this->DBPrefix}messages` AS m ON f.id_last_msg = m.id_msg GROUP BY f.id_board "; + + $result = $this->ourDB->gen($qry); + if ($result === false) + { + $message = $this->ourDB->getLastErrorText(); + e107::getMessage()->addError($message); + return false; + } break; case 'forumthread' : - $result = $this->ourDB->gen("SELECT t.*,m.* FROM `{$this->DBPrefix}topics` AS t LEFT JOIN `{$this->DBPrefix}messages` AS m ON t.id_first_msg = m.id_msg GROUP BY t.id_topic"); - if ($result === FALSE) return FALSE; + + $qry = "SELECT t.*, m.poster_name, m.poster_time, m.id_member, l.poster_name as lastpost_name, l.poster_time as lastpost_time, l.id_member as lastpost_user FROM `{$this->DBPrefix}topics` AS t + LEFT JOIN `{$this->DBPrefix}messages` AS m ON t.id_first_msg = m.id_msg + LEFT JOIN `{$this->DBPrefix}messages` AS l ON t.id_last_msg = l.id_msg + GROUP BY t.id_topic"; + + $result = $this->ourDB->gen($qry); + if ($result === false) return false; + break; case 'forumpost' : - //$result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}posts`"); - //if ($result === FALSE) return FALSE; + + $qry = "SELECT m.*, a.filename, a.fileext, a.size FROM `{$this->DBPrefix}messages` AS m LEFT JOIN `{$this->DBPrefix}attachments` AS a ON m.id_msg = a.id_msg GROUP BY m.id_msg ORDER BY m.id_msg ASC "; + + $result = $this->ourDB->gen($qry); + if ($result === false) return false; break; case 'forumtrack' : @@ -80,12 +121,27 @@ class smf_import extends base_import_class function convertUserclass($data) { - - if($data == 1) + if(empty($data)) { - + return 0; } - + + $convert = array( + // 1 => e_UC_ADMINMOD, + 2 => e_UC_ADMINMOD, + 3 => e_UC_MODS, + 4 => e_UC_NEWUSER, + + ); + + if(!empty($convert[$data])) + { + return $convert[$data]; + } + + + return 0; + /* 1 Administrator #FF0000 -1 0 5#staradmin.gif 1 0 -2 2 Global Moderator #0000FF -1 0 5#stargmod.gif 0 0 -2 @@ -143,8 +199,8 @@ class smf_import extends base_import_class $target['user_ip'] = $source['member_ip']; $target['user_homepage'] = $source['website_url']; $target['user_birthday'] = $source['birthdate']; - $target['user_admin'] = $this->convertadmin($source['id_group']); - $target['user_class'] = $this->convertadmin($source['id_group']); + $target['user_admin'] = $this->convertAdmin($source['id_group']); + $target['user_class'] = $this->convertUserclass($source['id_group']); $target['user_plugin_forum_viewed'] = 0; $target['user_plugin_forum_posts'] = $source['posts']; @@ -166,54 +222,23 @@ class smf_import extends base_import_class $target['forum_name'] = $source['name']; $target['forum_description'] = $source['description']; $target['forum_parent'] = $source['id_parent']; - $target['forum_sub'] = ""; + $target['forum_sub'] = ($source['child_level'] > 1) ? $source['id_parent'] : 0; $target['forum_datestamp'] = time(); $target['forum_moderators'] = ""; $target['forum_threads'] = $source['num_topics']; $target['forum_replies'] = $source['num_posts']; - $target['forum_lastpost_user'] = ''; - $target['forum_lastpost_user_anon'] = ''; - $target['forum_lastpost_info'] = ''; - // $target['forum_class'] = ""; + $target['forum_lastpost_user'] = $source['id_member']; + $target['forum_lastpost_user_anon'] = empty($source['id_member']) ? $source['poster_name'] : null; + $target['forum_lastpost_info'] = $source['poster_time'].'.'.$source['id_last_msg']; + $target['forum_class'] = e_UC_MEMBER; $target['forum_order'] = $source['board_order']; - // $target['forum_postclass'] - // $target['forum_threadclass'] - // $target['forum_options'] + $target['forum_postclass'] = e_UC_MEMBER; + $target['forum_threadclass'] = e_UC_MEMBER; + $target['forum_options'] = e_UC_MEMBER; return $target; - - - /* - CREATE TABLE {$db_prefix}boards ( - id_board smallint(5) unsigned NOT NULL auto_increment, - id_cat tinyint(4) unsigned NOT NULL default '0', - child_level tinyint(4) unsigned NOT NULL default '0', - id_parent smallint(5) unsigned NOT NULL default '0', - board_order smallint(5) NOT NULL default '0', - id_last_msg int(10) unsigned NOT NULL default '0', - id_msg_updated int(10) unsigned NOT NULL default '0', - member_groups varchar(255) NOT NULL default '-1,0', - id_profile smallint(5) unsigned NOT NULL default '1', - name varchar(255) NOT NULL default '', - description text NOT NULL, - num_topics mediumint(8) unsigned NOT NULL default '0', - num_posts mediumint(8) unsigned NOT NULL default '0', - count_posts tinyint(4) NOT NULL default '0', - id_theme tinyint(4) unsigned NOT NULL default '0', - override_theme tinyint(4) unsigned NOT NULL default '0', - unapproved_posts smallint(5) NOT NULL default '0', - unapproved_topics smallint(5) NOT NULL default '0', - redirect varchar(255) NOT NULL default '', - PRIMARY KEY (id_board), - UNIQUE categories (id_cat, id_board), - KEY id_parent (id_parent), - KEY id_msg_updated (id_msg_updated), - KEY member_groups (member_groups(48)) - ) ENGINE=MyISAM; - * */ - } @@ -225,126 +250,96 @@ class smf_import extends base_import_class function copyForumThreadData(&$target, &$source) { - $target['thread_id'] = $source['topic_id']; - $target['thread_name'] = $source['topic_title']; - $target['thread_forum_id'] = $source['forum_id']; - $target['thread_views'] = $source['topic_views']; - // $target['thread_active'] = $source['topic_status']; - $target['thread_lastpost'] = $source['topic_last_post_id']; - $target['thread_sticky'] = $source['topic_time_limit']; - $target['thread_datestamp'] = $source['topic_time']; - $target['thread_user'] = $source['topic_poster']; - $target['thread_user_anon'] = $source['topic_first_poster_name']; - $target['thread_lastuser'] = $source['topic_last_poster_id']; - $target['thread_lastuser_anon'] = $source['topic_last_poster_name']; - $target['thread_total_replies'] = $source['topic_replies']; - // $target['thread_options'] = $source['topic_']; + $target['thread_id'] = (int) $source['id_topic']; + $target['thread_name'] = $source['subject']; + $target['thread_forum_id'] = (int) $source['id_board']; + $target['thread_views'] = (int) $source['num_views']; + $target['thread_active'] = intval($source['locked']) === 0 ? 1 : 0; + $target['thread_lastpost'] = (int) $source['lastpost_time']; + $target['thread_sticky'] = (int) $source['id_sticky']; + $target['thread_datestamp'] = (int) $source['poster_time']; + $target['thread_user'] = (int) $source['id_member_started']; + $target['thread_user_anon'] = empty($source['id_member']) ? $source['poster_name'] : null; + $target['thread_lastuser'] = (int) $source['lastpost_user']; + $target['thread_lastuser_anon'] = empty($source['lastpost_user']) ? $source['lastpost_name'] : null; + $target['thread_total_replies'] = (int) $source['num_replies']; + $target['thread_options'] = null; return $target; - /* - CREATE TABLE {$db_prefix}topics ( - id_topic mediumint(8) unsigned NOT NULL auto_increment, - is_sticky tinyint(4) NOT NULL default '0', - id_board smallint(5) unsigned NOT NULL default '0', - id_first_msg int(10) unsigned NOT NULL default '0', - id_last_msg int(10) unsigned NOT NULL default '0', - id_member_started mediumint(8) unsigned NOT NULL default '0', - id_member_updated mediumint(8) unsigned NOT NULL default '0', - id_poll mediumint(8) unsigned NOT NULL default '0', - id_previous_board smallint(5) NOT NULL default '0', - id_previous_topic mediumint(8) NOT NULL default '0', - num_replies int(10) unsigned NOT NULL default '0', - num_views int(10) unsigned NOT NULL default '0', - locked tinyint(4) NOT NULL default '0', - unapproved_posts smallint(5) NOT NULL default '0', - approved tinyint(3) NOT NULL default '1', - PRIMARY KEY (id_topic), - UNIQUE last_message (id_last_msg, id_board), - UNIQUE first_message (id_first_msg, id_board), - UNIQUE poll (id_poll, id_topic), - KEY is_sticky (is_sticky), - KEY approved (approved), - KEY id_board (id_board), - KEY member_started (id_member_started, id_board), - KEY last_message_sticky (id_board, is_sticky, id_last_msg), - KEY board_news (id_board, id_first_msg) - ) ENGINE=MyISAM; - */ - - } /** * $target - e107_forum_post table - * $source -smf //TODO + * $source -smf */ function copyForumPostData(&$target, &$source) { - $target['post_id'] = $source['post_id']; - $target['post_entry'] = $source['post_text']; - $target['post_thread'] = $source['topic_id']; - $target['post_forum'] = $source['forum_id']; - // $target['post_status'] = $source['']; - $target['post_datestamp'] = $source['post_time']; - $target['post_user'] = $source['poster_id']; - $target['post_edit_datestamp'] = $source['post_edit_time']; + $target['post_id'] = (int)$source['id_msg']; + $target['post_entry'] = $source['body']; + $target['post_thread'] = (int) $source['id_topic']; + $target['post_forum'] = (int) $source['id_board']; + $target['post_status'] = intval($source['approved']) === 1 ? 0 : 1; + $target['post_datestamp'] = (int) $source['poster_time']; + $target['post_user'] = (int) $source['id_member']; + $target['post_edit_datestamp'] = (int) $source['modified_time']; $target['post_edit_user'] = $source['post_edit_user']; - $target['post_ip'] = $source['poster_ip']; - // $target['post_user_anon'] = $source['']; - // $target['post_attachments'] = $source['']; - // $target['post_options'] = $source['']; - - + $target['post_ip'] = e107::getIPHandler()->ipEncode($source['poster_ip']); + $target['post_user_anon'] = empty($source['id_member']) ? $source['poster_name'] : null; + $target['post_attachments'] = $this->processAttachments($source); + $target['post_options'] = null; + + return $target; - - /*CREATE TABLE {$db_prefix}messages ( - id_msg int(10) unsigned NOT NULL auto_increment, - id_topic mediumint(8) unsigned NOT NULL default '0', - id_board smallint(5) unsigned NOT NULL default '0', - poster_time int(10) unsigned NOT NULL default '0', - id_member mediumint(8) unsigned NOT NULL default '0', - id_msg_modified int(10) unsigned NOT NULL default '0', - subject varchar(255) NOT NULL default '', - poster_name varchar(255) NOT NULL default '', - poster_email varchar(255) NOT NULL default '', - poster_ip varchar(255) NOT NULL default '', - smileys_enabled tinyint(4) NOT NULL default '1', - modified_time int(10) unsigned NOT NULL default '0', - modified_name varchar(255) NOT NULL default '', - body text NOT NULL, - icon varchar(16) NOT NULL default 'xx', - approved tinyint(3) NOT NULL default '1', - PRIMARY KEY (id_msg), - UNIQUE topic (id_topic, id_msg), - UNIQUE id_board (id_board, id_msg), - UNIQUE id_member (id_member, id_msg), - KEY approved (approved), - KEY ip_index (poster_ip(15), id_topic), - KEY participation (id_member, id_topic), - KEY show_posts (id_member, id_board), - KEY id_topic (id_topic), - KEY id_member_msg (id_member, approved, id_msg), - KEY current_topic (id_topic, id_msg, id_member, approved), - KEY related_ip (id_member, poster_ip, id_msg) - ) ENGINE=MyISAM; - * - - INSERT INTO {$db_prefix}messages - (id_msg, id_msg_modified, id_topic, id_board, poster_time, subject, poster_name, poster_email, poster_ip, modified_name, body, icon) - VALUES (1, 1, 1, 1, UNIX_TIMESTAMP(), '{$default_topic_subject}', 'Simple Machines', 'info@simplemachines.org', '127.0.0.1', '', '{$default_topic_message}', 'xx'); - - */ } + /** + * todo copyForumPostAttachments() + * @param $source + * @return null|string + */ + + + /** + * @todo Support for multiple attachments. + * @param $source + * @return null|string + */ + private function processAttachments($source) + { + if(empty($source['filename'])) + { + return null; + } + + + if($source['fileext'] == 'png' || $source['fileext'] == 'jpg' || $source['fileext'] == 'jpg') + { + $type = 'img'; + } + else + { + $type = 'file'; + } + + $arr = array(); + $arr[$type][0] = array( + 'file' => $source['filename'], + 'name' => $source['filename'], + 'size' => $source['size'] + ); + + return e107::serialize($arr); + + } /** * $target - e107_forum_track - * $source - phpbb_forums_track : https://wiki.phpbb.com/Table.phpbb_forums_track + * $source -??? */ function copyForumTrackData(&$target, &$source) { From d110d8d4e983e6f730807052d013b20d3b81cb58 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 10:51:21 -0700 Subject: [PATCH 37/66] Support multiple database connections for the same mysql-user. --- e107_handlers/mysql_class.php | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index d52e733d1..80156c71b 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -328,7 +328,10 @@ class e_db_mysql $this->db_Set_Charset(); $this->setSQLMode(); - if ($db_ConnectionID == NULL){ $db_ConnectionID = $this->mySQLaccess; } + //if ($db_ConnectionID == NULL){ + $db_ConnectionID = $this->mySQLaccess; + + // } return true; } @@ -347,18 +350,26 @@ class e_db_mysql /** * Select the database to use. - * @param string database name - * @param string table prefix . eg. e107_ + * @param string $database name + * @param string $table prefix . eg. e107_ + * @param boolean $multiple set to maintain connection to a secondary database. * @return boolean true when database selection was successful otherwise false. */ - public function database($database, $prefix = MPREFIX) + public function database($database, $prefix = MPREFIX, $multiple=false) { $this->mySQLdefaultdb = $database; $this->mySQLPrefix = $prefix; - + + if($multiple === true) + { + $this->mySQLPrefix = "`".$database."`.".$prefix; + return true; + } + if($this->pdo) { - try + + try { $this->mySQLaccess->query("use ".$database); // $this->mySQLaccess->select_db($database); $dbh->query("use newdatabase"); @@ -1816,7 +1827,8 @@ class e_db_mysql $this->mySQLcurTable = $table; $this->tabset = true; } - return ' `'.$this->mySQLPrefix.$table.'`'.substr($matches[0],-1); + + return " ".$this->mySQLPrefix.$table.substr($matches[0],-1); } From c8a1f1fe6a46514298c1ebee6d41002b90e448a0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 11:41:39 -0700 Subject: [PATCH 38/66] SMF Forum import --- e107_plugins/import/admin_import.php | 50 +++++++++++++++---- e107_plugins/import/import_classes.php | 15 +++--- .../import/providers/phpbb3_import_class.php | 10 ++-- .../import/providers/smf_import_class.php | 11 ++-- 4 files changed, 60 insertions(+), 26 deletions(-) diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index abd791d53..2c17c3109 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -463,8 +463,9 @@ class import_main_ui extends e_admin_ui if($proObj->sourceType == 'db' || !$proObj->sourceType) // STANDARD db Setup { - - + $databases = $this->getDatabases(); + $prefix = (varset($_POST['dbParamPrefix']) ? $_POST['dbParamPrefix'] : $proObj->mprefix); + /* $text .= " $importType ".LAN_CONVERT_19." @@ -481,13 +482,16 @@ class import_main_ui extends e_admin_ui $importType ".LAN_CONVERT_21." + ";*/ + + $text .= " $importType ".LAN_CONVERT_22." - + ".$frm->select('dbParamDatabase', $databases, null, array('required'=>1), LAN_SELECT)." $importType ".LAN_CONVERT_23." - mprefix)."' maxlength='100' /> + ".$frm->text('dbParamPrefix', $prefix, 100)." "; @@ -597,7 +601,32 @@ class import_main_ui extends e_admin_ui } + private function getDatabases() + { + $tmp = e107::getDb()->gen("SHOW DATABASES"); + $databases = e107::getDb()->db_getList(); + $arr = array(); + + $exclude = array('mysql', 'information_schema', 'performance_schema', 'phpmyadmin'); + + foreach($databases as $v) + { + $id = $v['Database']; + + if(in_array($id,$exclude)) + { + continue; + } + + $arr[$id] = $id; + + } + + return $arr; + + + } @@ -637,7 +666,7 @@ class import_main_ui extends e_admin_ui if (class_exists($this->importClass)) { $mes->addDebug("dbImport(): Converter Class Available: ".$this->importClass); - $converter = new $this->importClass; + $converter = new $this->importClass ; $converter->init(); } else @@ -651,14 +680,17 @@ class import_main_ui extends e_admin_ui if($mode == 'db') // Don't do DB check on RSS/XML { - if (!isset($_POST['dbParamHost']) || !isset($_POST['dbParamUsername']) || !isset($_POST['dbParamPassword']) || !isset($_POST['dbParamDatabase'])) + if (empty($_POST['dbParamDatabase'])) { $mes->addError(LAN_CONVERT_41); return false; } - $result = $converter->db_Connect($tp->filter($_POST['dbParamHost']), $tp->filter($_POST['dbParamUsername']), $tp->filter($_POST['dbParamPassword']), $tp->filter($_POST['dbParamDatabase']), $tp->filter($_POST['dbParamPrefix'])); - if ($result !== TRUE) + $result = $converter->database($tp->filter($_POST['dbParamDatabase']), $tp->filter($_POST['dbParamPrefix'])); + + // $result = $converter->database($tp->filter($_POST['dbParamDatabase']), $tp->filter($_POST['dbParamPrefix']), true); + + if ($result !== true) { $mes->addError(LAN_CONVERT_43.": ".$result); // db connect failed return false; @@ -716,7 +748,7 @@ class import_main_ui extends e_admin_ui $result = $converter->setupQuery($k, !$this->deleteExisting); - if ($result !== TRUE) + if ($result !== true) { $mes->addError(LAN_CONVERT_44.' '.$k); // couldn't set query break; diff --git a/e107_plugins/import/import_classes.php b/e107_plugins/import/import_classes.php index 686bd59ca..e70feccaf 100644 --- a/e107_plugins/import/import_classes.php +++ b/e107_plugins/import/import_classes.php @@ -20,26 +20,27 @@ Root classes for import and saving of data. Application-specific classes build o class base_import_class { - var $ourDB = NULL; - var $DBPrefix = ''; - var $currentTask = ''; - var $copyUserInfo = TRUE; + var $ourDB = null; + var $DBPrefix = ''; + var $currentTask = ''; + var $copyUserInfo = true; protected $arrayData = array(); /** * Connect to the external DB if not already connected */ - function db_Connect($server, $user, $password, $database, $prefix) + function database($database, $prefix) { if ($this->ourDB == NULL) { $this->ourDB = e107::getDb('ourDB'); - $result = $this->ourDB->db_Connect($server, $user, $password, $database); - $this->DBPrefix = $prefix; + $result = $this->ourDB->database($database,$prefix,true); + $this->DBPrefix = "`".$database."`.".$prefix; if ($result) { return $result; } + } return TRUE; diff --git a/e107_plugins/import/providers/phpbb3_import_class.php b/e107_plugins/import/providers/phpbb3_import_class.php index aee6f84d7..5a445b26f 100644 --- a/e107_plugins/import/providers/phpbb3_import_class.php +++ b/e107_plugins/import/providers/phpbb3_import_class.php @@ -80,19 +80,19 @@ class phpbb3_import extends base_import_class break; case 'forum' : - $result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}forums`"); + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}forums"); if ($result === FALSE) return FALSE; break; case 'forumthread' : - $result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}topics`"); + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}topics"); if ($result === FALSE) return FALSE; break; case 'forumpost' : - if($this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}attachments`")) + if($this->ourDB->gen("SELECT * FROM {$this->DBPrefix}attachments")) { while($row = $this->ourDB->fetch()) { @@ -101,12 +101,12 @@ class phpbb3_import extends base_import_class $this->forum_attachments[$id][$key] = $row['real_filename']; } } - $result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}posts`"); + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}posts"); if ($result === FALSE) return FALSE; break; case 'forumtrack' : - $result = $this->ourDB->gen("SELECT * FROM `{$this->DBPrefix}forums_track`"); + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}forums_track"); if ($result === FALSE) return FALSE; break; diff --git a/e107_plugins/import/providers/smf_import_class.php b/e107_plugins/import/providers/smf_import_class.php index 1f2e87c97..5c1c8e711 100644 --- a/e107_plugins/import/providers/smf_import_class.php +++ b/e107_plugins/import/providers/smf_import_class.php @@ -72,7 +72,7 @@ class smf_import extends base_import_class case 'forum' : - $qry = "SELECT f.*, m.id_member, m.poster_name, m.poster_time FROM `{$this->DBPrefix}boards` AS f LEFT JOIN `{$this->DBPrefix}messages` AS m ON f.id_last_msg = m.id_msg GROUP BY f.id_board "; + $qry = "SELECT f.*, m.id_member, m.poster_name, m.poster_time FROM {$this->DBPrefix}boards AS f LEFT JOIN {$this->DBPrefix}messages AS m ON f.id_last_msg = m.id_msg GROUP BY f.id_board "; $result = $this->ourDB->gen($qry); if ($result === false) @@ -85,9 +85,9 @@ class smf_import extends base_import_class case 'forumthread' : - $qry = "SELECT t.*, m.poster_name, m.poster_time, m.id_member, l.poster_name as lastpost_name, l.poster_time as lastpost_time, l.id_member as lastpost_user FROM `{$this->DBPrefix}topics` AS t - LEFT JOIN `{$this->DBPrefix}messages` AS m ON t.id_first_msg = m.id_msg - LEFT JOIN `{$this->DBPrefix}messages` AS l ON t.id_last_msg = l.id_msg + $qry = "SELECT t.*, m.poster_name, m.subject, m.poster_time, m.id_member, l.poster_name as lastpost_name, l.poster_time as lastpost_time, l.id_member as lastpost_user FROM {$this->DBPrefix}topics AS t + LEFT JOIN {$this->DBPrefix}messages AS m ON t.id_first_msg = m.id_msg + LEFT JOIN {$this->DBPrefix}messages AS l ON t.id_last_msg = l.id_msg GROUP BY t.id_topic"; $result = $this->ourDB->gen($qry); @@ -97,7 +97,7 @@ class smf_import extends base_import_class case 'forumpost' : - $qry = "SELECT m.*, a.filename, a.fileext, a.size FROM `{$this->DBPrefix}messages` AS m LEFT JOIN `{$this->DBPrefix}attachments` AS a ON m.id_msg = a.id_msg GROUP BY m.id_msg ORDER BY m.id_msg ASC "; + $qry = "SELECT m.*, a.filename, a.fileext, a.size FROM {$this->DBPrefix}messages AS m LEFT JOIN {$this->DBPrefix}attachments AS a ON m.id_msg = a.id_msg GROUP BY m.id_msg ORDER BY m.id_msg ASC "; $result = $this->ourDB->gen($qry); if ($result === false) return false; @@ -236,6 +236,7 @@ class smf_import extends base_import_class $target['forum_postclass'] = e_UC_MEMBER; $target['forum_threadclass'] = e_UC_MEMBER; $target['forum_options'] = e_UC_MEMBER; + $target['forum_sef'] = eHelper::title2sef($source['name'],'dashl'); return $target; From 67eac1137013538457d747d53fa14aa5612878f4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 12:35:39 -0700 Subject: [PATCH 39/66] Notice removal and sorting fixed. --- e107_plugins/import/admin_import.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index 2c17c3109..407db0a6d 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -141,7 +141,7 @@ class import_main_ui extends e_admin_ui } - + natsort($this->providers); } @@ -236,7 +236,7 @@ class import_main_ui extends e_admin_ui ".'DBLAN_10'." ".$frm->hidden('mode','main')." ".$frm->hidden('action','import')." - +
@@ -501,16 +501,18 @@ class import_main_ui extends e_admin_ui if(method_exists($proObj,"config")) // Config Found in Class - render options from it. { - $ops = $proObj->config(); - foreach($ops as $key=>$val) + if($ops = $proObj->config()) { - $text .= " - - - \n"; - } + foreach($ops as $key=>$val) + { + $text .= " + + + \n"; + } + } } @@ -1572,6 +1574,7 @@ function csv_split(&$data,$delim=',',$enveloper='') function headerjs() { + return; // global $import_class_names; // Keys are the various db options global $import_class_support; global $db_import_blocks; From 6c3112f9a6ceab8b204c64c5b9c3326e6eca6b52 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 14:26:26 -0700 Subject: [PATCH 40/66] Mega-Menu shortcode example added to Bootstrap theme. --- e107_plugins/news/news_grid_menu.php | 4 ++- e107_themes/bootstrap3/style.css | 17 ++++++++++++ e107_themes/bootstrap3/theme_shortcodes.php | 30 +++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/e107_plugins/news/news_grid_menu.php b/e107_plugins/news/news_grid_menu.php index 1d20b0cfa..60c5b64d7 100644 --- a/e107_plugins/news/news_grid_menu.php +++ b/e107_plugins/news/news_grid_menu.php @@ -15,7 +15,7 @@ if (!defined('e107_INIT')) { exit; } * @param string $parm['source'] latest (latest news items) | sticky (news items) | template (assigned to news-grid layout) * @param integer $parm['order'] n.news_datestamp DESC * @param integer $parm['limit'] 10 - * @param string $parm['template'] default | or any key as defined in news_grid_template.php + * @param string $parm['layout'] default | or any key as defined in news_grid_template.php * * @example hard-coded {MENU: path=news/news_grid&limit=6&source=latest&featured=2&template=other} * @example admin assigned - Add via Media-Manager and then configure. @@ -24,4 +24,6 @@ if (!defined('e107_INIT')) { exit; } $cached = e107::getObject('news')->render_newsgrid($parm); +var_dump($parm); + echo $cached; diff --git a/e107_themes/bootstrap3/style.css b/e107_themes/bootstrap3/style.css index 0b310d6c1..a3d76c8f7 100644 --- a/e107_themes/bootstrap3/style.css +++ b/e107_themes/bootstrap3/style.css @@ -156,6 +156,23 @@ li.dropdown-submenu.lower ul.submenu-start li:hover { background-color:#f5f5f5; .news-grid-default .featured { margin-bottom:30px; } .news-grid-other .featured { margin-bottom:30px; } + +/* MENU MENU Example*/ + + + +.theme-sc-bootstrap-megamenu-example { position: static !important; } + +.theme-sc-bootstrap-megamenu-example .dropdown-menu { + padding: 20px 15px 15px; + width: 100%; +} +.theme-sc-bootstrap-megamenu-example .dropdown-menu ul.media-list { +margin-bottom: 10px; + } + + + /* CUSTOM Responsive Styles */ diff --git a/e107_themes/bootstrap3/theme_shortcodes.php b/e107_themes/bootstrap3/theme_shortcodes.php index 34d0a61f1..9ff5bb57c 100644 --- a/e107_themes/bootstrap3/theme_shortcodes.php +++ b/e107_themes/bootstrap3/theme_shortcodes.php @@ -261,6 +261,36 @@ class theme_shortcodes extends e_shortcode } + /** + * Mega-Menu Shortcode Example. + * @usage Select "bootstrap_megamenu_example" in Admin > Sitelinks > Create/Edit > Function + * @notes Changing the method name will require changing .theme-sc-bootstrap-megamenu-example in style.css + * @param null $data Link data. + * @return string + */ + function sc_bootstrap_megamenu_example($data) + { + // include a plugin, custom code, whatever you wish. + + // return print_a($data,true); + + $parm= array(); + $parm['caption'] = ''; + $parm['titleLimit'] = 25; // number of chars fo news title + $parm['summaryLimit'] = 50; // number of chars for new summary + $parm['source'] = 'latest'; // latest (latest news items) | sticky (news items) | template (assigned to news-grid layout) + $parm['order'] = 'DESC'; // n.news_datestamp DESC + $parm['limit'] = '6'; // 10 + $parm['layout'] = 'media-list'; // default | or any key as defined in news_grid_template.php + $parm['featured'] = 0; + + + return "
". e107::getObject('news')->render_newsgrid($parm) ."
"; + + + } + + From d571bd33d8bbbffa44e65ced381774cafafc448d Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 14:27:40 -0700 Subject: [PATCH 41/66] Remove debug info --- e107_plugins/news/news_grid_menu.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/e107_plugins/news/news_grid_menu.php b/e107_plugins/news/news_grid_menu.php index 60c5b64d7..eef5ccd94 100644 --- a/e107_plugins/news/news_grid_menu.php +++ b/e107_plugins/news/news_grid_menu.php @@ -24,6 +24,4 @@ if (!defined('e107_INIT')) { exit; } $cached = e107::getObject('news')->render_newsgrid($parm); -var_dump($parm); - echo $cached; From 3c65faf6e3b2dbb7b1d75e70c16e61c8f5cb633d Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 14:58:22 -0700 Subject: [PATCH 42/66] Downloads: #2544 download meta tags. Apple-icon fix. --- e107_core/templates/header_default.php | 2 +- .../download/handlers/download_class.php | 24 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 43bc840f1..8e18a4002 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -227,7 +227,7 @@ if (is_array($pref['e_meta_list'])) if(isset($pref['sitebutton'])) { - $appleIcon = $tp->thumbUrl($pref['sitebutton'],'w=144&h=144&crop=1',true); + $appleIcon = $tp->thumbUrl($pref['sitebutton'],'w=144&h=144&crop=1',null, true); echo "\n"; unset($appleIcon); } diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index bda77d3fe..da0eb8f99 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -315,8 +315,26 @@ class download } + /** + * Meta for 'view' mode..to be expanded to handle list and maincats etc. + * @param array $row + * @todo modes for different actions based on $this->qry['action'] + */ + private function setMeta($row) + { + $tp = e107::getParser(); + $metaImage = $tp->thumbUrl($row['download_image'], array('w'=>500), null, true); + $metaDescription = $tp->toHtml($row['download_description'],true); + define('e_PAGETITLE', $tp->toText($row['download_name'])); + e107::meta('description', $tp->toText($metaDescription)); + e107::meta('keywords', $row['download_keywords']); + e107::meta('og:description', $tp->toText($metaDescription)); + e107::meta('og:image', $metaImage); + e107::meta('twitter:image:src', $metaImage); + + } @@ -392,8 +410,10 @@ class download $dlrow = $sql->fetch(); $sc->setVars($dlrow); - - // $comment_edit_query = 'comment.download.'.$id; + + $this->setMeta($dlrow); + + if(!defined("DL_IMAGESTYLE")) { From 3758d55e1c094bd7c9a2b9820cfa52aeb1613e4b Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 15:19:19 -0700 Subject: [PATCH 43/66] Downloads: Issue #2544 - Fix for e_PAGETITLE. 'view/pagetitle' template added. --- e107_plugins/download/download.php | 4 +++- .../download/handlers/download_class.php | 23 ++++++++----------- .../download/templates/download_template.php | 5 ++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index b5558b3a7..c625c46d2 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -44,7 +44,6 @@ 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%"); } @@ -92,6 +91,9 @@ if (!e107::isInstalled('download')) $texts = $dl->render(); // Load before header. + + if(!defined("e_PAGETITLE")) {define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME);} + require_once (HEADERF); diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index da0eb8f99..0eae0bf11 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -327,7 +327,6 @@ class download $metaImage = $tp->thumbUrl($row['download_image'], array('w'=>500), null, true); $metaDescription = $tp->toHtml($row['download_description'],true); - define('e_PAGETITLE', $tp->toText($row['download_name'])); e107::meta('description', $tp->toText($metaDescription)); e107::meta('keywords', $row['download_keywords']); e107::meta('og:description', $tp->toText($metaDescription)); @@ -354,7 +353,7 @@ class download $DOWNLOAD_VIEW_TABLE = $template['item']; $DOWNLOAD_VIEW_TABLE_END = varset($template['end']); $DL_VIEW_NEXTPREV = varset($template['nextprev']); - // $DL_VIEW_PAGETITLE = varset($template['pagetitle']); + $DL_VIEW_PAGETITLE = varset($template['pagetitle']); $DL_VIEW_CAPTION = varset($template['caption'],"{DOWNLOAD_VIEW_CAPTION}"); } else // Legacy v1.x @@ -406,29 +405,25 @@ class download //require_once(FOOTERF); //exit; } - - - $dlrow = $sql->fetch(); - $sc->setVars($dlrow); - $this->setMeta($dlrow); - - - if(!defined("DL_IMAGESTYLE")) { define("DL_IMAGESTYLE","border:0px"); } - + + $dlrow = $sql->fetch(); + $sc->setVars($dlrow); + $this->setMeta($dlrow); + if(!isset($DL_VIEW_PAGETITLE)) { - $DL_VIEW_PAGETITLE = LAN_PLUGIN_DOWNLOAD_NAME." / {DOWNLOAD_CATEGORY} / {DOWNLOAD_VIEW_NAME}"; + $DL_VIEW_PAGETITLE = "{DOWNLOAD_VIEW_NAME} / {DOWNLOAD_CATEGORY} / ".LAN_PLUGIN_DOWNLOAD_NAME; } $DL_TITLE = $tp->parseTemplate($DL_VIEW_PAGETITLE, TRUE, $sc); - + define("e_PAGETITLE", $DL_TITLE); - + $DL_TEMPLATE = $DOWNLOAD_VIEW_TABLE_START.$DOWNLOAD_VIEW_TABLE.$DOWNLOAD_VIEW_TABLE_END; diff --git a/e107_plugins/download/templates/download_template.php b/e107_plugins/download/templates/download_template.php index 5bfe0846b..4bcf2fa8f 100644 --- a/e107_plugins/download/templates/download_template.php +++ b/e107_plugins/download/templates/download_template.php @@ -438,8 +438,9 @@ $DOWNLOAD_WRAPPER['view']['DOWNLOAD_VIEW_AUTHORWEBSITE'] = "
@@ -1167,13 +1167,13 @@ class news_admin_ui extends e_admin_ui diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index e2e14cdd3..06890ee90 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1576,7 +1576,7 @@ td img.thumbnail { margin-bottom:0 } .adminlist { border:1px solid rgba(0,0,0,0.1); } - +.nav-admin .fa { font-size:18px } diff --git a/e107_themes/bootstrap3/admin_template.php b/e107_themes/bootstrap3/admin_template.php index 25a531134..448e85a0b 100644 --- a/e107_themes/bootstrap3/admin_template.php +++ b/e107_themes/bootstrap3/admin_template.php @@ -20,14 +20,14 @@ if (!defined('e107_INIT')) { exit(); } //e107::lan('theme', 'admin',true); -$E_ADMIN_NAVIGATION['start'] = '
".$val['caption']."".$val['html']; - $text .= (vartrue($val['help'])) ? "
".$val['help']."
" : ""; - $text .= "
".$val['caption']."".$val['html']; + $text .= (vartrue($val['help'])) ? "
".$val['help']."
" : ""; + $text .= "
".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."\n\n"; - - - - // // D: Register CSS // @@ -465,7 +461,7 @@ if(function_exists('theme_head')) echo theme_head(); } -// FIXME description and keywords meta tags shouldn't be sent on all pages +/* @deprecated */ $diz_merge = (defined("META_MERGE") && META_MERGE != FALSE && $pref['meta_description'][e_LANGUAGE]) ? $pref['meta_description'][e_LANGUAGE]." " : ""; $key_merge = (defined("META_MERGE") && META_MERGE != FALSE && $pref['meta_keywords'][e_LANGUAGE]) ? $pref['meta_keywords'][e_LANGUAGE]."," : ""; @@ -493,9 +489,15 @@ function render_meta($type) } } -echo (defined("META_DESCRIPTION")) ? "\n\n" : render_meta('description'); -echo (defined("META_KEYWORDS")) ? "\n\n" : render_meta('keywords'); - +// legay meta-tag checks. +if(empty(e107::getUrl()->response()->getMetaKeywords())) +{ + echo (defined("META_KEYWORDS")) ? "\n\n" : render_meta('keywords'); +} +if(empty(e107::getUrl()->response()->getMetaDescription())) +{ + echo (defined("META_DESCRIPTION")) ? "\n\n" : render_meta('description'); +} //echo render_meta('copyright'); //echo render_meta('author'); diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 0eae0bf11..465791ad1 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -415,6 +415,7 @@ class download $sc->setVars($dlrow); $this->setMeta($dlrow); + if(!isset($DL_VIEW_PAGETITLE)) { $DL_VIEW_PAGETITLE = "{DOWNLOAD_VIEW_NAME} / {DOWNLOAD_CATEGORY} / ".LAN_PLUGIN_DOWNLOAD_NAME; From fcbe12c5f6055188f29d0596e3054e5b593bbc70 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 19:04:34 -0700 Subject: [PATCH 45/66] PHP Notice fixes. mbstring function fallback. --- e107_core/templates/header_default.php | 2 +- e107_handlers/e_parse_class.php | 12 +++++++----- e107_handlers/form_handler.php | 18 +++++++++++++++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index fce88dd3c..9cf7e7ffb 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -489,7 +489,7 @@ function render_meta($type) } } -// legay meta-tag checks. +// legay meta-tag checks. if(empty(e107::getUrl()->response()->getMetaKeywords())) { echo (defined("META_KEYWORDS")) ? "\n\n" : render_meta('keywords'); diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 5ea3eb799..0380f9284 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1350,23 +1350,25 @@ class e_parse extends e_parser $text = html_entity_decode($text,ENT_QUOTES,'utf-8'); - return mb_strimwidth($text, 0, $len, $more); + if(function_exists('mb_strimwidth')) + { + return mb_strimwidth($text, 0, $len, $more); + } - // $ret = $this->usubstr($text, 0, $len); + $ret = $this->usubstr($text, 0, $len); // search for possible broken html entities // - if an & is in the last 8 chars, removing it and whatever follows shouldn't hurt // it should work for any characters encoding -/* - $leftAmp = $this->ustrrpos($this->usubstr($ret, -8), '&'); if($leftAmp) { $ret = $this->usubstr($ret, 0, $this->ustrlen($ret) - 8 + $leftAmp); } - return $ret.$more;*/ + return $ret.$more; + } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 6bbf4b3d5..9a8a70ba2 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -810,10 +810,22 @@ class e_form function number($name, $value=0, $maxlength = 200, $options = array()) { if(is_string($options)) parse_str($options, $options); - if (empty($options['maxlength'])) $maxlength = $options['maxlength']; + + if(!empty($options['maxlength'])) + { + $maxlength = $options['maxlength']; + } + unset($options['maxlength']); - if(empty($options['size'])) $options['size'] = 15; - if(empty($options['class'])) $options['class'] = 'tbox number e-spinner input-small '; + + if(empty($options['size'])) + { + $options['size'] = 15; + } + if(empty($options['class'])) + { + $options['class'] = 'tbox number e-spinner input-small '; + } if(!empty($options['size'])) { From 327925a93780b6521dfba114c9e8226f60a8afe4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 31 Mar 2017 20:00:06 -0700 Subject: [PATCH 46/66] Admin theme tweaks --- e107_themes/bootstrap3/admin_style.css | 15 ++++++++++++++- e107_themes/bootstrap3/admin_template.php | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 0b022006f..e2e14cdd3 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1559,9 +1559,22 @@ td img.thumbnail { margin-bottom:0 } .treeprefix.level-4 { margin-left:60px } .treeprefix.level-5 { margin-left:85px } +/* Cleanup tables for light themes */ +.adminlist.table-bordered > thead > tr > th, +.adminlist.table-bordered > thead > tr > td, +.adminlist.table-bordered > tbody > tr > th, +.adminlist.table-bordered > tbody > tr > td, +.adminlist.table-bordered > tfoot > tr > th, +.adminlist.table-bordered > tfoot > tr > td { + border-left: 0; + border-right:0; +} +/* Cleanup table borders/headers */ +#admin-ui-list-batch , +.adminlist > thead > tr { background-color: rgba(0,0,0,0.1); } - +.adminlist { border:1px solid rgba(0,0,0,0.1); } diff --git a/e107_themes/bootstrap3/admin_template.php b/e107_themes/bootstrap3/admin_template.php index 4000670ea..25a531134 100644 --- a/e107_themes/bootstrap3/admin_template.php +++ b/e107_themes/bootstrap3/admin_template.php @@ -155,7 +155,7 @@ $E_ADMIN_NAVIGATION['end'] = ''; */ -$inverse = (e107::getPref('admincss') == "admin_light.css") ? "navbar-inverse" : ""; +// $inverse = (e107::getPref('admincss') == "admin_light.css") ? "navbar-inverse" : ""; $ADMIN_MODAL = ' From 68127bd72f21fdf1c80058adbe65485d3607a43f Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 1 Apr 2017 09:17:25 -0700 Subject: [PATCH 47/66] admin-ui example updates. --- e107_admin/plugin.php | 5 ++++- e107_plugins/_blank/admin_config.php | 29 ++++++++-------------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 7eec354a4..15d892e0d 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -5025,8 +5025,11 @@ class ".$table." extends e_admin_ui protected \$batchDelete = true; protected \$batchExport = true; protected \$batchCopy = true; + // protected \$sortField = 'somefield_order'; - // protected \$orderStep = 10; + // protected \$sortParent = 'somefield_parent'; + // protected \$treePrefix = 'somefield_title'; + // protected \$tabs = array('Tabl 1','Tab 2'); // Use 'tab'=>0 OR 'tab'=>1 in the \$fields below to enable. // protected \$listQry = \"SELECT * FROM `#tableName` WHERE field != '' \"; // Example Custom Query. LEFT JOINS allowed. Should be without any Order or Limit. diff --git a/e107_plugins/_blank/admin_config.php b/e107_plugins/_blank/admin_config.php index 79f333b9b..e2c48f210 100644 --- a/e107_plugins/_blank/admin_config.php +++ b/e107_plugins/_blank/admin_config.php @@ -98,22 +98,6 @@ class plugin_blank_admin_ui extends e_admin_ui */ protected $table = "blank"; - /** - * If present this array will be used to build your list query - * You can link fileds from $field array with 'table' parameter, which should equal to a key (table) from this array - * 'leftField', 'rightField' and 'fields' attributes here are required, the rest is optional - * Table alias is supported - * Note: - * - 'leftTable' could contain only table alias - * - 'leftField' and 'rightField' shouldn't contain table aliases, they will be auto-added - * - 'whereJoin' and 'where' should contain table aliases e.g. 'whereJoin' => 'AND u.user_ban=0' - * - * @var array [optional] table_name => array join parameters - */ - protected $tableJoin = array( - //'u.user' => array('leftField' => 'comment_author_id', 'rightField' => 'user_id', 'fields' => '*'/*, 'leftTable' => '', 'joinType' => 'LEFT JOIN', 'whereJoin' => '', 'where' => ''*/) - ); - /** * This is only needed if you need to JOIN tables AND don't wanna use $tableJoin * Write your list query without any Order or Limit. @@ -132,14 +116,17 @@ class plugin_blank_admin_ui extends e_admin_ui // optional protected $perPage = 20; - // default - true - TODO - move to displaySettings protected $batchDelete = true; - // UNDER CONSTRUCTION - protected $displaySettings = array(); + // protected \$sortField = 'somefield_order'; + + + // protected \$sortParent = 'somefield_parent'; + + + // protected \$treePrefix = 'somefield_title'; + - // UNDER CONSTRUCTION - protected $disallowPages = array('main/create', 'main/prefs'); //TODO change the blank_url type back to URL before blank. // required From 7a517b7d76550be49cc764b95c7f8e4458e3c0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 1 Apr 2017 18:27:47 +0200 Subject: [PATCH 48/66] Update cpage.php --- e107_admin/cpage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 6723d39bd..540f0b4d7 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -63,7 +63,7 @@ class page_admin extends e_admin_dispatcher ); protected $adminMenu = array( - 'overview/list' => array('caption'=> "Overview", 'perm' => '5|J'), //TODO LAN + 'overview/list' => array('caption'=> CUSLAN_1, 'perm' => '5|J'), 'page/list' => array('caption'=> CUSLAN_48, 'perm' => '5'), 'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J', 'tab' => 2), @@ -568,7 +568,7 @@ class page_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank'), - 'page_title' => array('title'=> "Page Title", 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), + 'page_title' => array('title'=> CUSLAN_2, 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), 'page_chapter' => array('title'=> CUSLAN_63, 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true), 'page_template' => array('title'=> LAN_TEMPLATE, 'tab' => 0, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>array()), @@ -619,7 +619,7 @@ class page_admin_ui extends e_admin_ui 'listBooks' => array('title'=> CUSLAN_50, 'type'=>'boolean'), 'listBooksTemplate' => array('title'=> CUSLAN_72, 'type'=>'dropdown'), 'pageCookieExpire' => array('title'=> CUSLAN_30, 'type'=>'number'), //TODO Set default value to 84600 - 'admin_page_perpage' => array('title'=> "Items per Page", 'type'=>'number'), //TODO Set default value to 84600 + 'admin_page_perpage' => array('title'=> CUSLAN_3, 'type'=>'number'), //TODO Set default value to 84600 ); protected $books = array(); From 98a3a385e29b4c7059e0c60d0b5417e266919805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 1 Apr 2017 18:29:21 +0200 Subject: [PATCH 49/66] Update lan_cpage.php --- e107_languages/English/admin/lan_cpage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e107_languages/English/admin/lan_cpage.php b/e107_languages/English/admin/lan_cpage.php index 8f8e77c7d..bf63500df 100644 --- a/e107_languages/English/admin/lan_cpage.php +++ b/e107_languages/English/admin/lan_cpage.php @@ -6,6 +6,10 @@ * */ +define("CUSLAN_1", "Overview"); +define("CUSLAN_2", "Page Title"); +define("CUSLAN_3", "Items per Page"); + define("CUSLAN_9", "Text"); define("CUSLAN_11", "Meta description"); define("CUSLAN_12", "Create Page/Menu"); @@ -92,4 +96,4 @@ define("CUSLAN_79", "You must enter either a page title or a menu name."); -?> \ No newline at end of file +?> From 54e7ba2150d4904e1b462d21179cbbbbf4a2247e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 1 Apr 2017 18:44:22 +0200 Subject: [PATCH 50/66] Update lan_cpage.php --- e107_languages/English/admin/lan_cpage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e107_languages/English/admin/lan_cpage.php b/e107_languages/English/admin/lan_cpage.php index bf63500df..8edabf18c 100644 --- a/e107_languages/English/admin/lan_cpage.php +++ b/e107_languages/English/admin/lan_cpage.php @@ -9,6 +9,8 @@ define("CUSLAN_1", "Overview"); define("CUSLAN_2", "Page Title"); define("CUSLAN_3", "Items per Page"); +define("CUSLAN_4", "Custom Fields"); +define("CUSLAN_5", "(New Book)"); define("CUSLAN_9", "Text"); define("CUSLAN_11", "Meta description"); From bbaab02c81a0c742eb7437e21dd0fff0bb0ad374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 1 Apr 2017 18:45:46 +0200 Subject: [PATCH 51/66] Update cpage.php --- e107_admin/cpage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 540f0b4d7..ef1f50fee 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -205,7 +205,7 @@ class page_chapters_ui extends e_admin_ui { $this->addTitle(CUSLAN_63); // e107::getMessage()->addWarning("Experimental: Custom Fields"); - $this->tabs = array(LAN_GENERAL,"Custom Fields"); + $this->tabs = array(LAN_GENERAL,CUSLAN_4); $this->fields['chapter_fields'] = array('title'=>"Fields", 'tab'=>1, 'type'=>'method', 'data'=>'json', 'writeParms'=>array('nolabel'=>2)); if($this->getAction() === 'list') @@ -220,7 +220,7 @@ class page_chapters_ui extends e_admin_ui $sql = e107::getDb(); $sql->gen("SELECT chapter_id,chapter_name FROM #page_chapters WHERE chapter_parent =0"); - $this->books[0] = "(New Book)"; + $this->books[0] = CUSLAN_5; while($row = $sql->fetch()) { From ebe903945f36ee6adf5bf4157f80f9c176ea25c3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 1 Apr 2017 13:56:09 -0700 Subject: [PATCH 52/66] Import: PHP-Nuke News items and Categories. PHPFusion userclasses added. Template added for easily adding other systems. --- e107_plugins/import/admin_import.php | 54 +- e107_plugins/import/import_classes.php | 69 ++- e107_plugins/import/import_news_class.php | 92 +++- e107_plugins/import/import_page_class.php | 144 +++++- .../import/import_pagechapter_class.php | 154 ------ e107_plugins/import/import_user_class.php | 107 ++++ .../providers/PHPFusion_import_class.php | 331 +++++++++++-- .../import/providers/PHPNuke_import_class.php | 379 ++++++++------ .../providers/template_import_class.php | 466 ++++++++++++++++++ e107_themes/bootstrap3/theme.xml | 1 + 10 files changed, 1425 insertions(+), 372 deletions(-) delete mode 100644 e107_plugins/import/import_pagechapter_class.php create mode 100644 e107_plugins/import/providers/template_import_class.php diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index 407db0a6d..4f6deabb9 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -94,19 +94,21 @@ class import_main_ui extends e_admin_ui // Definitions of available areas to import protected $importTables = array( 'users' => array('message' => LAN_CONVERT_25, 'classfile' => 'import_user_class.php', 'classname' => 'user_import'), + 'userclass' => array('message' => "Userclasses", 'nolist'=>true, 'classfile' => 'import_user_class.php', 'classname' => 'userclass_import'), + 'news' => array('message' => LAN_CONVERT_28, 'classfile' => 'import_news_class.php', 'classname' => 'news_import'), - 'page' => array('message' => "Pages", 'classfile' => 'import_page_class.php', 'classname' => 'page_import'), - 'pagechapter' => array('message' => "Page Chapters", 'classfile' => 'import_pagechapter_class.php', 'classname' => 'pagechapter_import'), + 'newscategory' => array('message' => "News Categories", 'nolist'=>true, 'classfile' => 'import_news_class.php', 'classname' => 'newscategory_import'), + + 'page' => array('message' => "Pages", 'classfile' => 'import_page_class.php', 'classname' => 'page_import'), + 'pagechapter' => array('message' => "Page Chapters", 'nolist'=>true, 'classfile' => 'import_page_class.php', 'classname' => 'pagechapter_import'), 'links' => array('message' => "Links", 'classfile' => 'import_links_class.php', 'classname' => 'links_import'), 'media' => array('message' => "Media", 'classfile' => 'import_media_class.php', 'classname' => 'media_import'), 'forum' => array('message' => "Forum", 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'), 'forumthread' => array('message' => "Forum Topics/Threads", 'classfile' => 'import_forum_class.php', 'classname' => 'forumthread_import', 'nolist'=>true), 'forumpost' => array('message' => "Forum Posts", 'classfile' => 'import_forum_class.php', 'classname' => 'forumpost_import', 'nolist'=>true), 'forumtrack' => array('message' => "Forum Track", 'classfile' => 'import_forum_class.php', 'classname' => 'forumtrack_import', 'nolist'=>true), - // 'forumpost' => array('message' => "Media", 'classfile' => 'import_media_class.php', 'classname' => 'media_import'), - 'comments' => array('message'=> LAN_COMMENTS), - // 'forumdefs' => array('message' => LAN_CONVERT_26), - // 'forumposts' => array('message' => LAN_CONVERT_48), + // 'comments' => array('message'=> LAN_COMMENTS), + // 'polls' => array('message' => LAN_CONVERT_27) ); @@ -122,26 +124,31 @@ class import_main_ui extends e_admin_ui foreach($importClassList as $file) { + + $tag = str_replace('_class.php','',$file['fname']); $key = str_replace("_import_class.php","",$file['fname']); + if($key === 'template') + { + continue; + } + include_once($file['path'].$file['fname']); // This will set up the variables $this->providers[$key] = $this->getMeta($tag); - if(vartrue($_GET['type'])) + if(!empty($_GET['type'])) { - $this->importClass = $_GET['type']."_import"; - + $this->importClass = filter_var($_GET['type'])."_import"; } - - } - - - natsort($this->providers); + + + uksort($this->providers,'strcasecmp'); + } @@ -236,13 +243,20 @@ class import_main_ui extends e_admin_ui ".'DBLAN_10'." ".$frm->hidden('mode','main')." ".$frm->hidden('action','import')." - +
+ "; + + foreach($this->importTables as $key=>$val) + { + if(!empty($val['nolist'])){ continue; } + $text .= "\n"; + } + + + $text .= " - - - - + @@ -282,7 +296,7 @@ class import_main_ui extends e_admin_ui $iconFile = e_PLUGIN."import/images/".str_replace("_import","",strtolower($k)).".png"; - $icon = (file_exists($iconFile)) ? "" : ""; + $icon = (file_exists($iconFile)) ? "" : ""; $text .= "\n"; diff --git a/e107_plugins/import/import_classes.php b/e107_plugins/import/import_classes.php index e70feccaf..e8f0e1728 100644 --- a/e107_plugins/import/import_classes.php +++ b/e107_plugins/import/import_classes.php @@ -63,10 +63,18 @@ class base_import_class case 'users' : return $this->saveUserData($dataRecord); break; - + + case 'userclass' : + return $this->saveUserClassData($dataRecord); + break; + case 'news' : return $this->saveNewsData($dataRecord); break; + + case 'newscategory' : + return $this->saveNewsCategoryData($dataRecord); + break; case 'page' : return $this->savePageData($dataRecord); @@ -130,11 +138,19 @@ class base_import_class case 'users' : return $this->copyUserData($initial, $result); break; - + + case 'userclass' : + return $this->copyUserClassData($initial, $result); + break; + case 'news' : return $this->copyNewsData($initial, $result); break; - + + case 'newscategory' : + return $this->copyNewsCategoryData($initial, $result); + break; + case 'page' : return $this->copyPageData($initial, $result); break; @@ -196,11 +212,21 @@ class base_import_class { return $target; } + + function copyUserClassData(&$target, &$source) + { + return $target; + } function copyNewsData(&$target, &$source) { return $target; } + + function copyNewsCategoryData(&$target, &$source) + { + return $target; + } function copyPageData(&$target, &$source) { @@ -242,7 +268,44 @@ class base_import_class return $target; } + /** + * @param $source + * @param $target + */ + public function debug($source,$target) + { + echo "
".$icon.$title."
".$info['description']."
+ + + + + +
Source CMSTarget e107
".$this->renderTable($source)."".$this->renderTable($target)."
"; + } + + private function renderTable($source) + { + $text = " + "; + + foreach($source as $k=>$v) + { + $text .= " + + + "; + + + } + + $text .= " +
FieldData
".$k."".htmlentities($v)."
+ "; + + return $text; + + } //=========================================================== // UTILITY ROUTINES diff --git a/e107_plugins/import/import_news_class.php b/e107_plugins/import/import_news_class.php index c2fe74560..8fb10f6ab 100644 --- a/e107_plugins/import/import_news_class.php +++ b/e107_plugins/import/import_news_class.php @@ -66,16 +66,14 @@ class news_import // Constructor function __construct() { - global $sql; - $this->newsDB = new db; // Have our own database object to write to the news table + $this->newsDB = e107::getDb('news'); // Have our own database object to write to the news table } // Empty the news DB function emptyTargetDB($inc_admin = FALSE) { - // leave existing - // $this->newsDB->db_Delete('news'); + $this->newsDB->truncate('news'); } @@ -103,7 +101,7 @@ class news_import */ function saveData($row) { - if(!$result = $this->newsDB->db_Insert('news',$row)) + if(!$result = $this->newsDB->insert('news',$row)) { return 4; } @@ -135,6 +133,90 @@ class news_import +} + + + +class newscategory_import +{ + var $newsDB = NULL; + var $blockMainAdmin = TRUE; + var $error; + + var $default = array( + + // 'category_id' => '', // auto-increment + 'category_name' => '', + 'category_sef' => '', + 'category_meta_description' => '', + 'category_meta_keywords' => '', + 'category_manager' => e_UC_ADMIN, + 'category_icon' => '', + 'category_order' => 0, + ); + + /* Fields which must be set up by the caller. */ + var $mandatory = array( + 'category_id', + 'category_name', + ); + + // Constructor + function __construct() + { + $this->newsDB = e107::getDb('newscat'); // Have our own database object to write to the news table + } + + + // Empty the news DB + function emptyTargetDB($inc_admin = FALSE) + { + $this->newsDB->truncate('news_category'); + } + + + // Set a new default for a particular field + function overrideDefault($key, $value) + { +// echo "Override: {$key} => {$value}
"; + if (!isset($this->default[$key])) return FALSE; + $this->default[$key] = $value; + } + + + // Returns an array with all relevant fields set to the current default + function getDefaults() + { + return $this->default; + } + + + + /** + * Insert data into e107 DB + * @param row - array of table data + * @return integer, boolean - error code on failure, TRUE on success + */ + function saveData($row) + { + if(!$result = $this->newsDB->insert('news_category',$row)) + { + return 4; + } + + + return true; + } + + + + function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . + { + return $this->newsDB->getLastErrorText(); + } + + + } diff --git a/e107_plugins/import/import_page_class.php b/e107_plugins/import/import_page_class.php index f932ac0ff..18d43c1b7 100644 --- a/e107_plugins/import/import_page_class.php +++ b/e107_plugins/import/import_page_class.php @@ -109,20 +109,7 @@ class page_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { return $this->pageDB->getLastErrorText(); - $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' - ); - - if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; - - return 'Unknown: '.$errnum; - + } @@ -130,4 +117,133 @@ class page_import } + + + + + + +class pagechapter_import +{ + var $pageDB = null; + var $blockMainAdmin = true; + var $error; + + var $defaults = array( + 'chapter_id' => '', + 'chapter_parent' => 1, + 'chapter_name' => '', + 'chapter_sef' => '', + 'chapter_meta_description' => '', + 'chapter_meta_keywords' => '', + 'chapter_manager' => e_UC_ADMIN, + 'chapter_icon' => '', + 'chapter_order' => 0, + 'chapter_template' => 'default', + 'chapter_visibility' => 0, + 'chapter_fields' => null + + ); + + // Fields which must be set up by the caller. + var $mandatory = array( + 'chapter_name' + ); + + // Constructor + function __construct() + { + $this->pageDB = e107::getDb('pagechapter'); // Have our own database object to write to the table + } + + + // Empty the DB + function emptyTargetDB($inc_admin = FALSE) + { + $this->pageDB->truncate('page_chapters'); + + $insert = array( + 'chapter_id' => '1', + 'chapter_parent' => '0', + 'chapter_name' => 'General', + 'chapter_sef' => 'general', + 'chapter_meta_description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.', + 'chapter_meta_keywords' => '', + 'chapter_manager' => '0', + 'chapter_icon' => '', + 'chapter_order' => '0', + 'chapter_template' => 'default', + 'chapter_visibility' => '0', + 'chapter_fields' => null + ); + + + $this->pageDB->insert('page_chapters',$insert); // insert a default book. + } + + + // Set a new default for a particular field + function overrideDefault($key, $value) + { +// echo "Override: {$key} => {$value}
"; + if (!isset($this->defaults[$key])) return FALSE; + $this->defaults[$key] = $value; + } + + + // Returns an array with all relevant fields set to the current default + function getDefaults() + { + return $this->defaults; + } + + /** + * Insert data into e107 DB + * @param row - array of table data + * @return integer, boolean - error code on failure, TRUE on success + */ + function saveData($row) + { + + if(empty($row['chapter_name'])) + { + return 3; + } + + + if(!$result = $this->pageDB->insert('page_chapters',$row)) + { + return 4; + } + + //if ($result === FALSE) return 6; + + return true; + } + + + + function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . + { + $errorTexts = array( + 0 => 'No error', + 1 => 'Can\'t change main admin data', + 2 => 'invalid field passed', + 3 => 'Mandatory field not set', + 4 => 'Entry already exists', + 5 => 'Invalid characters in user or login name', + 6 => 'Error saving extended user fields' + ); + + if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; + + return $this->pageDB->getLastErrorText(); + + } + + + +} + + ?> \ No newline at end of file diff --git a/e107_plugins/import/import_pagechapter_class.php b/e107_plugins/import/import_pagechapter_class.php deleted file mode 100644 index 0e2693c38..000000000 --- a/e107_plugins/import/import_pagechapter_class.php +++ /dev/null @@ -1,154 +0,0 @@ - '', - 'chapter_parent' => 1, - 'chapter_name' => '', - 'chapter_sef' => '', - 'chapter_meta_description' => '', - 'chapter_meta_keywords' => '', - 'chapter_manager' => e_UC_ADMIN, - 'chapter_icon' => '', - 'chapter_order' => 0, - 'chapter_template' => 'default', - 'chapter_visibility' => 0, - 'chapter_fields' => null - - ); - - // Fields which must be set up by the caller. - var $mandatory = array( - 'chapter_name' - ); - - // Constructor - function __construct() - { - $this->pageDB = e107::getDb('pagechapter'); // Have our own database object to write to the table - } - - - // Empty the DB - function emptyTargetDB($inc_admin = FALSE) - { - $this->pageDB->truncate('page_chapters'); - - $insert = array( - 'chapter_id' => '1', - 'chapter_parent' => '0', - 'chapter_name' => 'General', - 'chapter_sef' => 'general', - 'chapter_meta_description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.', - 'chapter_meta_keywords' => '', - 'chapter_manager' => '0', - 'chapter_icon' => '', - 'chapter_order' => '0', - 'chapter_template' => 'default', - 'chapter_visibility' => '0', - 'chapter_fields' => null - ); - - - $this->pageDB->insert('page_chapters',$insert); // insert a default book. - } - - - // Set a new default for a particular field - function overrideDefault($key, $value) - { -// echo "Override: {$key} => {$value}
"; - if (!isset($this->defaults[$key])) return FALSE; - $this->defaults[$key] = $value; - } - - - // Returns an array with all relevant fields set to the current default - function getDefaults() - { - return $this->defaults; - } - - /** - * Insert data into e107 DB - * @param row - array of table data - * @return integer, boolean - error code on failure, TRUE on success - */ - function saveData($row) - { - - if(empty($row['chapter_name'])) - { - return 3; - } - - - if(!$result = $this->pageDB->insert('page_chapters',$row)) - { - return 4; - } - - //if ($result === FALSE) return 6; - - return true; - } - - - - function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . - { - $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' - ); - - if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; - - return 'Unknown: '.$errnum; - - } - - - -} - - -?> \ No newline at end of file diff --git a/e107_plugins/import/import_user_class.php b/e107_plugins/import/import_user_class.php index 13aa528d4..1df81ab3d 100644 --- a/e107_plugins/import/import_user_class.php +++ b/e107_plugins/import/import_user_class.php @@ -253,4 +253,111 @@ class user_import } + + +class userclass_import +{ + var $ucdb = null; + var $blockMainAdmin = true; + var $error; + + var $defaults = array( + 'userclass_id' => 0, + 'userclass_name' => 0, + 'userclass_description' => 0, + 'userclass_editclass' => 0, + 'userclass_parent' => 0, + 'userclass_accum' => 0, + 'userclass_visibility' => 0, + 'userclass_type' => 0, + 'userclass_icon' => 0, + 'userclass_perms' => 0, + + ); + + // Fields which must be set up by the caller. + var $mandatory = array( + 'userclass_name' + ); + + // Constructor + function __construct() + { + $this->ucdb = e107::getDb('pagechapter'); // Have our own database object to write to the table + } + + + // Empty the DB + function emptyTargetDB($inc_admin = FALSE) + { + $this->ucdb->truncate('userclass_classes'); + + } + + + // Set a new default for a particular field + function overrideDefault($key, $value) + { +// echo "Override: {$key} => {$value}
"; + if (!isset($this->defaults[$key])) return FALSE; + $this->defaults[$key] = $value; + } + + + // Returns an array with all relevant fields set to the current default + function getDefaults() + { + return $this->defaults; + } + + /** + * Insert data into e107 DB + * @param row - array of table data + * @return integer, boolean - error code on failure, TRUE on success + */ + function saveData($row) + { + + if(empty($row['userclass_name'])) + { + return 3; + } + + + if(!$result = $this->ucdb->insert('userclass_classes',$row)) + { + return 4; + } + + //if ($result === FALSE) return 6; + + return true; + } + + + + function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . + { + $errorTexts = array( + 0 => 'No error', + 1 => 'Can\'t change main admin data', + 2 => 'invalid field passed', + 3 => 'Mandatory field not set', + 4 => 'Entry already exists', + 5 => 'Invalid characters in user or login name', + 6 => 'Error saving extended user fields' + ); + + if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; + + return $this->ucdb->getLastErrorText(); + + } + + + +} + + + ?> \ No newline at end of file diff --git a/e107_plugins/import/providers/PHPFusion_import_class.php b/e107_plugins/import/providers/PHPFusion_import_class.php index 6258c3a32..964f73778 100644 --- a/e107_plugins/import/providers/PHPFusion_import_class.php +++ b/e107_plugins/import/providers/PHPFusion_import_class.php @@ -25,9 +25,9 @@ class PHPFusion_import extends base_import_class { public $title = 'PHP Fusion'; - public $description = 'Based on V5.1'; - public $supported = array('users'); - public $mprefix = false; + public $description = 'Based on v9'; + public $supported = array('users', 'userclass'); + public $mprefix = 'fusion_'; // Set up a query for the specified task. // Returns TRUE on success. FALSE on error @@ -37,9 +37,17 @@ class PHPFusion_import extends base_import_class switch ($task) { case 'users' : - $result = $this->ourDB->db_Select_gen("SELECT * FROM {$this->DBPrefix}users"); + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}users"); if ($result === FALSE) return FALSE; break; + + + case 'userclass' : + $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}user_groups"); + if ($result === FALSE) return FALSE; + break; + + default : return FALSE; } @@ -54,36 +62,293 @@ class PHPFusion_import extends base_import_class //------------------------------------ // Copy data read from the DB into the record to be returned. - function copyUserData(&$target, &$source) - { - if ($this->copyUserInfo) $target['user_id'] = $source['user_id']; - $target['user_name'] = $source['user_name']; - $target['user_loginname'] = $source['user_name']; - $target['user_password'] = $source['user_password']; - $target['user_email'] = $source['user_email']; - $target['user_hideemail'] = $source['user_hide_email']; - $target['user_image'] = $source['user_avatar']; - $target['user_signature'] = $source['user_sig']; - $target['user_forums'] = $source['user_posts']; - $target['user_join'] = $source['user_joined']; - $target['user_lastvisit'] = $source['user_lastvisit']; - $target['user_location'] = $source['user_location']; - $target['user_birthday'] = $source['user_birthdate']; - $target['user_aim'] = $source['user_aim']; - $target['user_icq'] = $source['user_icq']; - $target['user_msn'] = $source['user_msn']; - $target['user_yahoo'] = $source['user_yahoo']; - $target['user_homepage'] = $source['user_web']; - $target['user_timezone'] = $source['user_offset']; // guess - may need conversion - $target['user_ip'] = $source['user_ip']; -// $target['user_'] = $source['']; -// $target['user_'] = $source['']; - -// $target['user_ban'] = ($source['user_status'] ? 2 : 0); // Guess - return $target; - } + function copyUserData(&$target, &$source) + { + if ($this->copyUserInfo) $target['user_id'] = $source['user_id']; + $target['user_name'] = $source['user_name']; + $target['user_loginname'] = $source['user_name']; + $target['user_password'] = $source['user_password']; + $target['user_email'] = $source['user_email']; + $target['user_hideemail'] = $source['user_hide_email']; + $target['user_image'] = $source['user_avatar']; + $target['user_signature'] = $source['user_sig']; + $target['user_forums'] = $source['user_posts']; + $target['user_join'] = $source['user_joined']; + $target['user_lastvisit'] = $source['user_lastvisit']; + $target['user_location'] = $source['user_location']; + $target['user_birthday'] = $source['user_birthdate']; + $target['user_aim'] = $source['user_aim']; + $target['user_icq'] = $source['user_icq']; + $target['user_msn'] = $source['user_msn']; + $target['user_yahoo'] = $source['user_yahoo']; + $target['user_homepage'] = $source['user_web']; + $target['user_timezone'] = $source['user_offset']; // guess - may need conversion + $target['user_ip'] = $source['user_ip']; + // $target['user_'] = $source['']; + // $target['user_'] = $source['']; + + // $target['user_ban'] = ($source['user_status'] ? 2 : 0); // Guess + + + + //return $target; + + $this->debug($source,$target); + } + + + + + + /** + * Align source data to e107 User Table + * @param $target array - default e107 target values for e107_user table. + * @param $source array - WordPress table data + */ + function copyUserClassData(&$target, &$source) + { + + $target['userclass_id'] = $source['group_id']; + $target['userclass_name'] = $source['group_name']; + $target['userclass_description'] = $source['group_description']; + $target['userclass_editclass'] = e_UC_ADMIN; + $target['userclass_parent'] = 0; + $target['userclass_accum'] = ''; + $target['userclass_visibility'] = e_UC_ADMIN; + $target['userclass_type'] = ''; + $target['userclass_icon'] = ''; + $target['userclass_perms'] = ''; + + // return $target; + + $this->debug($source,$target); + + } + + + + + + /** + * Align source data with e107 News Table + * @param $target array - default e107 target values for e107_news table. + * @param $source array - other cms table data + */ + function copyNewsData(&$target, &$source) + { + + $target['news_id'] = $source['']; // leave empty to auto-increment. + $target['news_title'] = $source['']; + $target['news_sef'] = $source['']; + $target['news_body'] = $source['']; // wrap in [html] tags if required. + $target['news_extended'] = $source['']; // wrap in [html] tags if required. + $target['news_meta_keywords'] = $source['']; + $target['news_meta_description'] = $source['']; + $target['news_datestamp'] = $source['datestamp']; + $target['news_author'] = $source['']; + $target['news_category'] = $source['']; + $target['news_allow_comments'] = $source['']; + $target['news_start'] = $source['']; + $target['news_end'] = $source['']; + $target['news_class'] = $source['']; + $target['news_render_type'] = $source['']; + $target['news_comment_total'] = $source['']; + $target['news_summary'] = $source['']; + $target['news_thumbnail'] = $source['']; + $target['news_sticky'] = $source['']; + + return $target; // comment out to debug + + // $this->renderDebug($source,$target); + + + } + + + /** + * Align source data with e107 News Table + * @param $target array - default e107 target values for e107_news table. + * @param $source array - other cms table data + */ + function copyNewsCategoryData(&$target, &$source) + { + $target['category_id'] = $source['']; + $target['category_name'] = $source['']; + $target['category_sef'] = $source['']; + $target['category_meta_description'] = $source['']; + $target['category_meta_keywords'] = $source['']; + $target['category_manager'] = $source['']; + $target['category_icon'] = $source['']; + $target['category_order'] = $source['']; + + return $target; // comment out to debug + + } + + + + /** + * Align source data to e107 Page Table + * @param $target array - default e107 target values for e107_page table. + * @param $source array - other cms table data + */ + function copyPageData(&$target, &$source) + { + + + $target['page_id'] = $source['']; + $target['page_title'] = $source['']; + $target['page_sef'] = $source['']; + $target['page_text'] = $source['']; + $target['page_metakeys'] = $source['']; + $target['page_metadscr'] = $source['']; + $target['page_datestamp'] = $source['']; + $target['page_author'] = $source['']; + $target['page_category'] = $source['']; + $target['page_comment_flag'] = $source['']; + $target['page_password'] = $source['']; + $target['page_class'] = $source['']; + + return $target; // comment out to debug + + } + + + + + /** + * $target - e107_forum table + * $source - other cms + */ + function copyForumData(&$target, &$source) + { + + $target['forum_id'] = $source['']; + $target['forum_name'] = $source['']; + $target['forum_description'] = $source['']; + $target['forum_parent'] = $source['']; + $target['forum_sub'] = $source['']; + $target['forum_datestamp'] = $source['']; + $target['forum_moderators'] = $source['']; + + $target['forum_threads'] = $source['']; + $target['forum_replies'] = $source['']; + $target['forum_lastpost_user'] = $source['']; + $target['forum_lastpost_user_anon'] = $source['']; + $target['forum_lastpost_info'] = $source['']; + $target['forum_class'] = $source['']; + $target['forum_order'] = $source['']; + $target['forum_postclass'] = $source['']; + $target['forum_threadclass'] = $source['']; + $target['forum_options'] = $source['']; + $target['forum_sef'] = $source['']; + + return $target; + + + } + + + /** + * $target - e107 forum_threads + * $source - other cms + */ + function copyForumThreadData(&$target, &$source) + { + + $target['thread_id'] = $source['']; + $target['thread_name'] = $source['']; + $target['thread_forum_id'] = $source['']; + $target['thread_views'] = $source['']; + $target['thread_active'] = $source['']; + $target['thread_lastpost'] = $source['']; + $target['thread_sticky'] = $source['']; + $target['thread_datestamp'] = $source['']; + $target['thread_user'] = $source['']; + $target['thread_user_anon'] = $source['']; + $target['thread_lastuser'] = $source['']; + $target['thread_lastuser_anon'] = $source['']; + $target['thread_total_replies'] = $source['']; + $target['thread_options'] = $source['']; + + return $target; + + } + + + /** + * $target - e107_forum_post table + * $source - other cms + */ + function copyForumPostData(&$target, &$source) + { + + $target['post_id'] = $source['']; + $target['post_entry'] = $source['']; + $target['post_thread'] = $source['']; + $target['post_forum'] = $source['']; + $target['post_status'] = $source['']; + $target['post_datestamp'] = $source['']; + $target['post_user'] = $source['']; + $target['post_edit_datestamp'] = $source['']; + $target['post_edit_user'] = $source['']; + $target['post_ip'] = $source['']; + $target['post_user_anon'] = $source['']; + $target['post_attachments'] = $source['']; + $target['post_options'] = $source['']; + + + return $target; + + $this->debug($source,$target); + + } + + /** + * Align source data to e107 Links Table + * @param $target array - default e107 target values for e107_links table. + * @param $source array - WordPress table data + */ + function copyLinksData(&$target, &$source) + { + + /* e107 Link Targets. + 0 => LCLAN_20, // 0 = same window + 1 => LCLAN_23, // new window + 4 => LCLAN_24, // 4 = miniwindow 600x400 + 5 => LINKLAN_1 // 5 = miniwindow 800x600 + */ + + $target['link_id'] = $source['']; // leave blank to auto-increment + $target['link_name'] = $source['']; + $target['link_url'] = $source['']; + $target['link_description'] = $source['']; // wrap with [html] [/html] if necessary. + $target['link_button'] = $source['']; // image file. + $target['link_category'] = $source['']; // integer + $target['link_order'] = $source['']; // integer + $target['link_parent'] = $source['']; // integer + $target['link_open'] = $source['']; // link_target + $target['link_class'] = $source['']; + $target['link_sefurl'] = $source['']; + + + + + return $target; // comment out to debug + + $this->debug($source,$target); + + + } + + + + + + + } -?> +?> \ No newline at end of file diff --git a/e107_plugins/import/providers/PHPNuke_import_class.php b/e107_plugins/import/providers/PHPNuke_import_class.php index 87a0a35a7..ff939b1f3 100644 --- a/e107_plugins/import/providers/PHPNuke_import_class.php +++ b/e107_plugins/import/providers/PHPNuke_import_class.php @@ -26,25 +26,95 @@ class PHPNuke_import extends base_import_class public $title = 'PHP Nuke 8.2'; - public $description = 'Supports users only'; - public $supported = array('users'); // add news and page to test. + public $description = ''; + public $supported = array('users', 'news', 'newscategory'); // add news and page to test. public $mprefix = 'nuke_'; // Set up a query for the specified task. - // Returns TRUE on success. FALSE on error - function setupQuery($task, $blank_user=FALSE) + // Returns TRUE on success. false on error + function setupQuery($task, $blank_user=false) { - if ($this->ourDB == NULL) return FALSE; + if ($this->ourDB == NULL) return false; switch ($task) { case 'users' : $result = $this->ourDB->gen("SELECT * FROM {$this->DBPrefix}users WHERE `user_active`=1"); - if ($result === FALSE) return FALSE; + if ($result === false) return false; break; + + case 'news' : + $query = "SELECT *, UNIX_TIMESTAMP(time) as datestamp FROM {$this->DBPrefix}stories ORDER BY sid"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'newscategory' : + $query = "SELECT * FROM {$this->DBPrefix}topics ORDER BY topicid"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + + case 'userclass' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'page' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'pagechapter' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'media' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'links': + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + + case 'forum' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumthread' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumpost' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumtrack' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + default : - return FALSE; + return false; } + $this->copyUserInfo = !$blank_user; $this->currentTask = $task; return TRUE; @@ -91,151 +161,76 @@ class PHPNuke_import extends base_import_class $target['user_homepage'] = $source['user_website']; $target['user_ip'] = $source['last_ip']; - return $target; + return $target; // comment out to debug. - - // Php Nuke Field Reference. - $source['user_id']; - $source['name']; - $source['username']; - $source['user_email']; - $source['femail']; - $source['user_website']; - $source['user_avatar']; - $source['user_regdate']; - $source['user_icq']; - $source['user_occ']; - $source['user_from']; - $source['user_interests']; - $source['user_sig']; - $source['user_viewemail']; - $source['user_theme']; - $source['user_aim']; - $source['user_yim']; - $source['user_msnm']; - $source['user_password']; - $source['storynum']; - $source['umode']; - $source['uorder']; - $source['thold']; - $source['noscore']; - $source['bio']; - $source['ublockon']; - $source['ublock']; - $source['theme']; - $source['commentmax']; - $source['counter']; - $source['newsletter']; - $source['user_posts']; - $source['user_attachsig']; - $source['user_rank']; - $source['user_level']; - $source['broadcast']; - $source['popmeson']; - $source['user_active']; - $source['user_session_time']; - $source['user_session_page']; - $source['user_lastvisit']; - $source['user_timezone']; - $source['user_style']; - $source['user_lang']; - $source['user_dateformat']; - $source['user_new_privmsg']; - $source['user_unread_privmsg']; - $source['user_last_privmsg']; - $source['user_emailtime']; - $source['user_allowhtml']; - $source['user_allowbbcode']; - $source['user_allowsmile']; - $source['user_allowavatar']; - $source['user_allow_pm']; - $source['user_allow_viewonline']; - $source['user_notify']; - $source['user_notify_pm']; - $source['user_popup_pm']; - $source['user_avatar_type']; - $source['user_sig_bbcode_uid']; - $source['user_actkey']; - $source['user_newpasswd']; - $source['points']; - $source['last_ip']; - $source['karma']; + $this->debug($source,$target); - // old data. - if ($this->copyUserInfo) $target['user_id'] = $source['user_id']; - $target['user_name'] = $source['username']; - $target['user_loginname'] = $source['username']; - $target['user_loginname'] = $source['name']; - $target['user_password'] = $source['user_password']; - $target['user_join'] = strtotime($source['user_regdate']); - $target['user_email'] = $source['user_email']; - $target['user_hideemail'] = $source['user_viewemail']; - $target['user_image'] = $source['user_avatar']; - $target['user_signature'] = $source['user_sig']; - $target['user_forums'] = $source['user_posts']; - $target['user_lastvisit'] = $source['user_lastvisit']; - $target['user_image'] = $source['user_avatar']; - - $target['user_timezone'] = $source['user_timezone']; // source is decimal(5,2) - $target['user_language'] = $source['user_lang']; // May need conversion - $target['user_location'] = $source['user_from']; - $target['user_icq'] = $source['user_icq']; - $target['user_aim'] = $source['user_aim']; - $target['user_yahoo'] = $source['user_yim']; - $target['user_msn'] = $source['user_msnm']; - $target['user_homepage'] = $source['user_website']; - $target['user_ip'] = $source['last_ip']; - // $target['user_'] = $source['']; - - // $source['user_rank']; - // $target['user_admin'] = ($source['user_level'] == 1) ? 1 : 0; // Guess - // if ($target['user_admin'] != 0) $target['user_perms'] = '0.'; - // $target['user_ban'] = ($source['ublockon'] ? 2 : 0); // Guess - } - /** + /** * Align source data with e107 News Table * @param $target array - default e107 target values for e107_news table. - * @param $source array - RSS data + * @param $source array - other cms table data */ function copyNewsData(&$target, &$source) { + $target['news_id'] = (int) $source['sid']; + $target['news_title'] = $source['title']; + $target['news_sef'] = ''; + $target['news_body'] = "[html]".$source['hometext']."[/html]"; + $target['news_extended'] = "[html]".$source['bodytext']."[/html]"; + $target['news_meta_keywords'] = ''; + $target['news_meta_description'] = ''; + $target['news_datestamp'] = $source['datestamp']; + $target['news_author'] = $source['']; + $target['news_category'] = (int) $source['topic']; + $target['news_allow_comments'] = (int) $source['acomm']; + $target['news_start'] = ''; + $target['news_end'] = ''; + // $target['news_class'] = ''; + // $target['news_render_type'] = ''; + $target['news_comment_total'] = $source['comments']; +// $target['news_summary'] = $source['']; + $target['news_thumbnail'] = ''; + $target['news_sticky'] = ''; - // $target['news_title'] = ''; - // $target['news_sef'] = ''; - // $target['news_body'] = "[html]something[/html]"; - // $target['news_extended'] = ''; - //$target['news_meta_keywords'] = implode(",",$keywords); - // $target['news_meta_description'] = ''; - // $target['news_datestamp'] = strtotime($source['pubDate'][0]); - // $target['news_author'] = $source['post_author']; - // $target['news_category'] = ''; - // $target['news_allow_comments'] = ($source['comment_status']=='open') ? 1 : 0; - // $target['news_start'] = ''; - // $target['news_end'] = ''; - /// $target['news_class'] = ''; - // $target['news_render_type'] = ''; - // $target['news_comment_total'] = $source['comment_count']; - // $target['news_summary'] = $source['post_excerpt']; - // $target['news_thumbnail'] = ''; - // $target['news_sticky'] = ''; + return $target; // comment out to debug. - return $target; // comment out to debug + $this->debug($source,$target); - // $this->renderDebug($source,$target); + } + /** + * Align source data with e107 News Table + * @param $target array - default e107 target values for e107_news table. + * @param $source array - other cms table data + */ + function copyNewsCategoryData(&$target, &$source) + { + $target['category_id'] = (int) $source['topicid']; + $target['category_name'] = $source['topictext']; + $target['category_sef'] = eHelper::title2sef($source['topicname'],'dashl'); + // $target['category_meta_description'] = $source['']; + // $target['category_meta_keywords'] = $source['']; + $target['category_manager'] = e_UC_ADMIN; + $target['category_icon'] = $source['topicimage']; + // $target['category_order'] = $source['']; + + return $target; // comment out to debug. + + $this->debug($source,$target); + } @@ -243,33 +238,131 @@ class PHPNuke_import extends base_import_class /** * Align source data to e107 Page Table * @param $target array - default e107 target values for e107_page table. - * @param $source array - WordPress table data + * @param $source array - other cms table data */ function copyPageData(&$target, &$source) { - // $target['page_id'] = $source['ID']; // auto increment - // $target['page_title'] = $source['post_title']); - // $target['page_sef'] = $source['post_name']; - // $target['page_text'] = (vartrue($source['post_content'])) ? "[html]".$source['post_content']."[/html]" : ""; - // $target['page_metakeys'] = ''; - // $target['page_metadscr'] = ''; - // $target['page_datestamp'] = strtotime($source['post_date']); - // $target['page_author'] = $source['post_author']; - // $target['page_category'] = '', - // $target['page_comment_flag'] = ($source['comment_status']=='open') ? 1 : 0; - // $target['page_password'] = $source['post_password']; - // $target['page_class'] = e_UC_ADMIN; + $target['page_id'] = $source['']; + $target['page_title'] = $source['']; + $target['page_sef'] = $source['']; + $target['page_text'] = $source['']; + $target['page_metakeys'] = $source['']; + $target['page_metadscr'] = $source['']; + $target['page_datestamp'] = $source['']; + $target['page_author'] = $source['']; + $target['page_category'] = $source['']; + $target['page_comment_flag'] = $source['']; + $target['page_password'] = $source['']; + $target['page_class'] = $source['']; - return $target; // comment out to debug + // return $target; // comment out to debug. + + $this->debug($source,$target); + + } + + + + + /** + * $target - e107_forum table + * $source - other cms + */ + function copyForumData(&$target, &$source) + { + + $target['forum_id'] = $source['']; + $target['forum_name'] = $source['']; + $target['forum_description'] = $source['']; + $target['forum_parent'] = $source['']; + $target['forum_sub'] = $source['']; + $target['forum_datestamp'] = $source['']; + $target['forum_moderators'] = $source['']; + + $target['forum_threads'] = $source['']; + $target['forum_replies'] = $source['']; + $target['forum_lastpost_user'] = $source['']; + $target['forum_lastpost_user_anon'] = $source['']; + $target['forum_lastpost_info'] = $source['']; + $target['forum_class'] = $source['']; + $target['forum_order'] = $source['']; + $target['forum_postclass'] = $source['']; + $target['forum_threadclass'] = $source['']; + $target['forum_options'] = $source['']; + $target['forum_sef'] = $source['']; + + // return $target; // comment out to debug. + + $this->debug($source,$target); } + /** + * $target - e107 forum_threads + * $source - other cms + */ + function copyForumThreadData(&$target, &$source) + { + + $target['thread_id'] = $source['']; + $target['thread_name'] = $source['']; + $target['thread_forum_id'] = $source['']; + $target['thread_views'] = $source['']; + $target['thread_active'] = $source['']; + $target['thread_lastpost'] = $source['']; + $target['thread_sticky'] = $source['']; + $target['thread_datestamp'] = $source['']; + $target['thread_user'] = $source['']; + $target['thread_user_anon'] = $source['']; + $target['thread_lastuser'] = $source['']; + $target['thread_lastuser_anon'] = $source['']; + $target['thread_total_replies'] = $source['']; + $target['thread_options'] = $source['']; + + // return $target; // comment out to debug. + + $this->debug($source,$target); + + } + + + /** + * $target - e107_forum_post table + * $source - other cms + */ + function copyForumPostData(&$target, &$source) + { + + $target['post_id'] = $source['']; + $target['post_entry'] = $source['']; + $target['post_thread'] = $source['']; + $target['post_forum'] = $source['']; + $target['post_status'] = $source['']; + $target['post_datestamp'] = $source['']; + $target['post_user'] = $source['']; + $target['post_edit_datestamp'] = $source['']; + $target['post_edit_user'] = $source['']; + $target['post_ip'] = $source['']; + $target['post_user_anon'] = $source['']; + $target['post_attachments'] = $source['']; + $target['post_options'] = $source['']; + + + // return $target; // comment out to debug. + + $this->debug($source,$target); + } + + + + + } -?> +?> \ No newline at end of file diff --git a/e107_plugins/import/providers/template_import_class.php b/e107_plugins/import/providers/template_import_class.php new file mode 100644 index 000000000..0197e720d --- /dev/null +++ b/e107_plugins/import/providers/template_import_class.php @@ -0,0 +1,466 @@ +myparam = intval($_POST['news_author']); + + } + + function config() + { + + $frm = e107::getForm(); + + $mylist = array(1=>'Param 1', 2=>'Param 2'); + + $var[0]['caption'] = "Optional Parameter"; + $var[0]['html'] = $frm->select('myparam',$mylist); + $var[0]['help'] = "Change the author of the news items"; + + // $var[1]['caption'] = "Include revisions"; + // $var[1]['html'] = $frm->checkbox('news_revisions',1); + // $var[1]['help'] = "Change the author of the news items"; + + return $var; + } + + + /** + * Set up a query for the specified task. + * @param $task + * @param bool|false $blank_user + * @return bool TRUE on success. false on error + */ + function setupQuery($task, $blank_user=false) + { + if ($this->ourDB == NULL) return false; + + switch ($task) + { + case 'users' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + + break; + + case 'userclass' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'news' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'newschapter' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'page' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'pagechapter' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'media' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'links': + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + + case 'forum' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumthread' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumpost' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + case 'forumtrack' : + $query = "SELECT * FROM {$this->DBPrefix}mytable ORDER BY my_id"; + $result = $this->ourDB->gen($query); + if ($result === false) return false; + break; + + + default : + return false; + } + + $this->copyUserInfo = !$blank_user; + $this->currentTask = $task; + return TRUE; + } + + + //------------------------------------ + // Internal functions below here + //------------------------------------ + + /** + * Align source data to e107 User Table + * @param $target array - default e107 target values for e107_user table. + * @param $source array - WordPress table data + */ + function copyUserData(&$target, &$source) + { + $target['user_name'] = $source['']; + $target['user_loginname'] = $source['']; + $target['user_password'] = $source['']; + $target['user_email'] = $source['']; + $target['user_hideemail'] = $source['']; + $target['user_join'] = $source['']; + $target['user_admin'] = $source['']; + $target['user_lastvisit'] = $source['']; + $target['user_login'] = $source['']; + $target['user_ban'] = $source['']; + $target['user_customtitle'] = $source['']; + $target['user_sess'] = $source['']; // Photo + $target['user_signature'] = $source['']; + $target['user_image'] = $source['']; // Avatar + $target['user_currentvisit'] = $source['']; + $target['user_lastpost'] = $source['']; + $target['user_chats'] = $source['']; + $target['user_comments'] = $source['']; + + $target['user_ip'] = $source['']; + $target['user_prefs'] = $source['']; + $target['user_visits'] = $source['']; + $target['user_class'] = $source['']; + $target['user_perms'] = $source['']; + $target['user_xup'] = $source['']; + $target['user_language'] = $source['']; + $target['user_country'] = $source['']; + $target['user_location'] = $source['']; + $target['user_aim'] = $source['']; + $target['user_icq'] = $source['']; + $target['user_yahoo'] = $source['']; + $target['user_msn'] = $source['']; + $target['user_homepage'] = $source['']; + $target['user_birthday'] = $source['']; + $target['user_timezone'] = $source['']; + + $this->debug($source,$target); + + //return $target; + } + + /** + * Align source data to e107 User Table + * @param $target array - default e107 target values for e107_user table. + * @param $source array - WordPress table data + */ + function copyUserClassData(&$target, &$source) + { + + $target['userclass_id'] = $source['']; + $target['userclass_name'] = $source['']; + $target['userclass_description'] = $source['']; + $target['userclass_editclass'] = $source['']; + $target['userclass_parent'] = $source['']; + $target['userclass_accum'] = $source['']; + $target['userclass_visibility'] = $source['']; + $target['userclass_type'] = $source['']; + $target['userclass_icon'] = $source['']; + $target['userclass_perms'] = $source['']; + + return $target; + + } + + + /** + * Align source data with e107 News Table + * @param $target array - default e107 target values for e107_news table. + * @param $source array - other cms table data + */ + function copyNewsData(&$target, &$source) + { + + $target['news_id'] = $source['']; // leave empty to auto-increment. + $target['news_title'] = $source['']; + $target['news_sef'] = $source['']; + $target['news_body'] = $source['']; // wrap in [html] tags if required. + $target['news_extended'] = $source['']; // wrap in [html] tags if required. + $target['news_meta_keywords'] = $source['']; + $target['news_meta_description'] = $source['']; + $target['news_datestamp'] = $source['datestamp']; + $target['news_author'] = $source['']; + $target['news_category'] = $source['']; + $target['news_allow_comments'] = $source['']; + $target['news_start'] = $source['']; + $target['news_end'] = $source['']; + $target['news_class'] = $source['']; + $target['news_render_type'] = $source['']; + $target['news_comment_total'] = $source['']; + $target['news_summary'] = $source['']; + $target['news_thumbnail'] = $source['']; + $target['news_sticky'] = $source['']; + + return $target; // comment out to debug + + // $this->renderDebug($source,$target); + + + } + + + /** + * Align source data with e107 News Table + * @param $target array - default e107 target values for e107_news table. + * @param $source array - other cms table data + */ + function copyNewsCategoryData(&$target, &$source) + { + $target['category_id'] = $source['']; + $target['category_name'] = $source['']; + $target['category_sef'] = $source['']; + $target['category_meta_description'] = $source['']; + $target['category_meta_keywords'] = $source['']; + $target['category_manager'] = $source['']; + $target['category_icon'] = $source['']; + $target['category_order'] = $source['']; + + return $target; // comment out to debug + + } + + + + /** + * Align source data to e107 Page Table + * @param $target array - default e107 target values for e107_page table. + * @param $source array - other cms table data + */ + function copyPageData(&$target, &$source) + { + + + $target['page_id'] = $source['']; + $target['page_title'] = $source['']; + $target['page_sef'] = $source['']; + $target['page_text'] = $source['']; + $target['page_metakeys'] = $source['']; + $target['page_metadscr'] = $source['']; + $target['page_datestamp'] = $source['']; + $target['page_author'] = $source['']; + $target['page_category'] = $source['']; + $target['page_comment_flag'] = $source['']; + $target['page_password'] = $source['']; + $target['page_class'] = $source['']; + + return $target; // comment out to debug + + } + + + + + /** + * $target - e107_forum table + * $source - other cms + */ + function copyForumData(&$target, &$source) + { + + $target['forum_id'] = $source['']; + $target['forum_name'] = $source['']; + $target['forum_description'] = $source['']; + $target['forum_parent'] = $source['']; + $target['forum_sub'] = $source['']; + $target['forum_datestamp'] = $source['']; + $target['forum_moderators'] = $source['']; + + $target['forum_threads'] = $source['']; + $target['forum_replies'] = $source['']; + $target['forum_lastpost_user'] = $source['']; + $target['forum_lastpost_user_anon'] = $source['']; + $target['forum_lastpost_info'] = $source['']; + $target['forum_class'] = $source['']; + $target['forum_order'] = $source['']; + $target['forum_postclass'] = $source['']; + $target['forum_threadclass'] = $source['']; + $target['forum_options'] = $source['']; + $target['forum_sef'] = $source['']; + + return $target; + + + } + + + /** + * $target - e107 forum_threads + * $source - other cms + */ + function copyForumThreadData(&$target, &$source) + { + + $target['thread_id'] = $source['']; + $target['thread_name'] = $source['']; + $target['thread_forum_id'] = $source['']; + $target['thread_views'] = $source['']; + $target['thread_active'] = $source['']; + $target['thread_lastpost'] = $source['']; + $target['thread_sticky'] = $source['']; + $target['thread_datestamp'] = $source['']; + $target['thread_user'] = $source['']; + $target['thread_user_anon'] = $source['']; + $target['thread_lastuser'] = $source['']; + $target['thread_lastuser_anon'] = $source['']; + $target['thread_total_replies'] = $source['']; + $target['thread_options'] = $source['']; + + return $target; + + } + + + /** + * $target - e107_forum_post table + * $source - other cms + */ + function copyForumPostData(&$target, &$source) + { + + $target['post_id'] = $source['']; + $target['post_entry'] = $source['']; + $target['post_thread'] = $source['']; + $target['post_forum'] = $source['']; + $target['post_status'] = $source['']; + $target['post_datestamp'] = $source['']; + $target['post_user'] = $source['']; + $target['post_edit_datestamp'] = $source['']; + $target['post_edit_user'] = $source['']; + $target['post_ip'] = $source['']; + $target['post_user_anon'] = $source['']; + $target['post_attachments'] = $source['']; + $target['post_options'] = $source['']; + + + return $target; + + $this->debug($source,$target); + + } + + /** + * Align source data to e107 Links Table + * @param $target array - default e107 target values for e107_links table. + * @param $source array - WordPress table data + */ + function copyLinksData(&$target, &$source) + { + + /* e107 Link Targets. + 0 => LCLAN_20, // 0 = same window + 1 => LCLAN_23, // new window + 4 => LCLAN_24, // 4 = miniwindow 600x400 + 5 => LINKLAN_1 // 5 = miniwindow 800x600 + */ + + $target['link_id'] = $source['']; // leave blank to auto-increment + $target['link_name'] = $source['']; + $target['link_url'] = $source['']; + $target['link_description'] = $source['']; // wrap with [html] [/html] if necessary. + $target['link_button'] = $source['']; // image file. + $target['link_category'] = $source['']; // integer + $target['link_order'] = $source['']; // integer + $target['link_parent'] = $source['']; // integer + $target['link_open'] = $source['']; // link_target + $target['link_class'] = $source['']; + $target['link_sefurl'] = $source['']; + + + + + return $target; // comment out to debug + + $this->debug($source,$target); + + + } + + + /** + * Custom Method if needed. + * @param $text + * @return string + */ + private function convertText($text) + { + //$text = e107::getParser()->toDb($text); + return $text; + + $text = html_entity_decode($text,ENT_QUOTES,'UTF-8'); + + $detected = mb_detect_encoding($text); // 'ISO-8859-1' + $text = iconv($detected,'UTF-8',$text); + + + + return $text; + } + + + + +} + + +?> \ No newline at end of file diff --git a/e107_themes/bootstrap3/theme.xml b/e107_themes/bootstrap3/theme.xml index 70dcc6e4a..011ec8169 100644 --- a/e107_themes/bootstrap3/theme.xml +++ b/e107_themes/bootstrap3/theme.xml @@ -25,6 +25,7 @@ + From 183a67c9afe70bd994a88196b45778ba0a4feb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:27:12 +0200 Subject: [PATCH 53/66] Update English_admin.php --- e107_plugins/import/languages/English_admin.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/e107_plugins/import/languages/English_admin.php b/e107_plugins/import/languages/English_admin.php index 1b1686d79..5babdc70f 100644 --- a/e107_plugins/import/languages/English_admin.php +++ b/e107_plugins/import/languages/English_admin.php @@ -75,7 +75,6 @@ define("LAN_CONVERT_45","Cannot read import code file"); define("LAN_CONVERT_46","Error: --ERRNUM-- while writing to --DB-- database, line "); define("LAN_CONVERT_47","Batch --BLOCK-- import completed. --LINES-- read, --USERS-- added, --ERRORS-- errors"); define("LAN_CONVERT_48","Forum posts"); - define("LAN_CONVERT_49","Drupal"); define("LAN_CONVERT_50","Basic import"); define("LAN_CONVERT_51","The version of targeted Drupal."); @@ -84,3 +83,19 @@ define("LAN_CONVERT_53","The base URL of Drupal website (e.g., http://mydrupalsi define("LAN_CONVERT_54","Drupal Base URL"); define("LAN_CONVERT_55","The base URL path (i.e., directory) of the Drupal installation (e.g., /drupal/)."); define("LAN_CONVERT_56","Drupal Base Path"); +define("LAN_CONVERT_57", "No error"); +define("LAN_CONVERT_58", "Can\'t change main admin data"); +define("LAN_CONVERT_59", "invalid field passed"); +define("LAN_CONVERT_60", "Mandatory field not set"); +define("LAN_CONVERT_61", "User already exists"); +define("LAN_CONVERT_62", "Invalid characters in user or login name"); +define("LAN_CONVERT_63", "Error saving extended user fields"); +define("LAN_CONVERT_64", "Select"); +define("LAN_CONVERT_65", "Pages"); +define("LAN_CONVERT_66", "Page Chapters"); +define("LAN_CONVERT_67", "Links"); +define("LAN_CONVERT_68", "Media"); +define("LAN_CONVERT_69", "Forum"); +define("LAN_CONVERT_70", "Forum Topics/Threads"); +define("LAN_CONVERT_71", "Forum Posts"); +define("LAN_CONVERT_72", "Forum Track"); From f3c8b8ca6ec81d8c7f8438640a5d388ad6090a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:31:59 +0200 Subject: [PATCH 54/66] Update English_admin.php --- e107_plugins/import/languages/English_admin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e107_plugins/import/languages/English_admin.php b/e107_plugins/import/languages/English_admin.php index 5babdc70f..3a8c8bd76 100644 --- a/e107_plugins/import/languages/English_admin.php +++ b/e107_plugins/import/languages/English_admin.php @@ -99,3 +99,5 @@ define("LAN_CONVERT_69", "Forum"); define("LAN_CONVERT_70", "Forum Topics/Threads"); define("LAN_CONVERT_71", "Forum Posts"); define("LAN_CONVERT_72", "Forum Track"); +define("LAN_CONVERT_73", "Userclasses"); +define("LAN_CONVERT_74", "News Categories"); From a1f9670cd8362e9ec6baa253f217a66e09d59e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:36:17 +0200 Subject: [PATCH 55/66] Update admin_import.php --- e107_plugins/import/admin_import.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index 4f6deabb9..1244c47fb 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -94,19 +94,19 @@ class import_main_ui extends e_admin_ui // Definitions of available areas to import protected $importTables = array( 'users' => array('message' => LAN_CONVERT_25, 'classfile' => 'import_user_class.php', 'classname' => 'user_import'), - 'userclass' => array('message' => "Userclasses", 'nolist'=>true, 'classfile' => 'import_user_class.php', 'classname' => 'userclass_import'), + 'userclass' => array('message' => LAN_CONVERT_73, 'nolist'=>true, 'classfile' => 'import_user_class.php', 'classname' => 'userclass_import'), 'news' => array('message' => LAN_CONVERT_28, 'classfile' => 'import_news_class.php', 'classname' => 'news_import'), - 'newscategory' => array('message' => "News Categories", 'nolist'=>true, 'classfile' => 'import_news_class.php', 'classname' => 'newscategory_import'), + 'newscategory' => array('message' => LAN_CONVERT_74, 'nolist'=>true, 'classfile' => 'import_news_class.php', 'classname' => 'newscategory_import'), - 'page' => array('message' => "Pages", 'classfile' => 'import_page_class.php', 'classname' => 'page_import'), - 'pagechapter' => array('message' => "Page Chapters", 'nolist'=>true, 'classfile' => 'import_page_class.php', 'classname' => 'pagechapter_import'), - 'links' => array('message' => "Links", 'classfile' => 'import_links_class.php', 'classname' => 'links_import'), - 'media' => array('message' => "Media", 'classfile' => 'import_media_class.php', 'classname' => 'media_import'), - 'forum' => array('message' => "Forum", 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'), - 'forumthread' => array('message' => "Forum Topics/Threads", 'classfile' => 'import_forum_class.php', 'classname' => 'forumthread_import', 'nolist'=>true), - 'forumpost' => array('message' => "Forum Posts", 'classfile' => 'import_forum_class.php', 'classname' => 'forumpost_import', 'nolist'=>true), - 'forumtrack' => array('message' => "Forum Track", 'classfile' => 'import_forum_class.php', 'classname' => 'forumtrack_import', 'nolist'=>true), + 'page' => array('message' => LAN_CONVERT_65, 'classfile' => 'import_page_class.php', 'classname' => 'page_import'), + 'pagechapter' => array('message' => LAN_CONVERT_66, 'nolist'=>true, 'classfile' => 'import_page_class.php', 'classname' => 'pagechapter_import'), + 'links' => array('message' => LAN_CONVERT_67, 'classfile' => 'import_links_class.php', 'classname' => 'links_import'), + 'media' => array('message' => LAN_CONVERT_68, 'classfile' => 'import_media_class.php', 'classname' => 'media_import'), + 'forum' => array('message' => LAN_CONVERT_69, 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'), + 'forumthread' => array('message' => LAN_CONVERT_70, 'classfile' => 'import_forum_class.php', 'classname' => 'forumthread_import', 'nolist'=>true), + 'forumpost' => array('message' => LAN_CONVERT_71, 'classfile' => 'import_forum_class.php', 'classname' => 'forumpost_import', 'nolist'=>true), + 'forumtrack' => array('message' => LAN_CONVERT_72, 'classfile' => 'import_forum_class.php', 'classname' => 'forumtrack_import', 'nolist'=>true), // 'comments' => array('message'=> LAN_COMMENTS), // 'polls' => array('message' => LAN_CONVERT_27) @@ -310,7 +310,7 @@ class import_main_ui extends e_admin_ui $text .= "
"; - $text .= $frm->admin_button('type', $k, 'other',"Select"); + $text .= $frm->admin_button('type', $k, 'other',LAN_CONVERT_64); // $text .= $frm->admin_button('import_type', $k, 'other',"Select"); $text .= " @@ -1686,4 +1686,4 @@ function headerjs() -?> \ No newline at end of file +?> From e4cd7cf09cf359858e1427319ac93c820377fe1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:38:03 +0200 Subject: [PATCH 56/66] Update import_user_class.php --- e107_plugins/import/import_user_class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/e107_plugins/import/import_user_class.php b/e107_plugins/import/import_user_class.php index 1df81ab3d..5eb76ade5 100644 --- a/e107_plugins/import/import_user_class.php +++ b/e107_plugins/import/import_user_class.php @@ -238,13 +238,13 @@ class user_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'User already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, ++ 1 => LAN_CONVERT_58, ++ 2 => LAN_CONVERT_59, ++ 3 => LAN_CONVERT_60, ++ 4 => LAN_CONVERT_61, ++ 5 => LAN_CONVERT_62, ++ 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -360,4 +360,4 @@ class userclass_import -?> \ No newline at end of file +?> From 85c18b03b395720d2001a0dd81b147b33ddc7ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:41:55 +0200 Subject: [PATCH 57/66] Update import_forum_class.php --- e107_plugins/import/import_forum_class.php | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/e107_plugins/import/import_forum_class.php b/e107_plugins/import/import_forum_class.php index 16110ece8..9d5180fee 100644 --- a/e107_plugins/import/import_forum_class.php +++ b/e107_plugins/import/import_forum_class.php @@ -93,13 +93,13 @@ class forum_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -197,13 +197,13 @@ class forumthread_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -307,13 +307,13 @@ class forumpost_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -402,13 +402,13 @@ class forumtrack_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -423,4 +423,4 @@ class forumtrack_import -?> \ No newline at end of file +?> From aeff020e2c59eb2be2591ad027b8bb1573e3dea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:43:33 +0200 Subject: [PATCH 58/66] Update import_user_class.php --- e107_plugins/import/import_user_class.php | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/e107_plugins/import/import_user_class.php b/e107_plugins/import/import_user_class.php index 5eb76ade5..a62da6351 100644 --- a/e107_plugins/import/import_user_class.php +++ b/e107_plugins/import/import_user_class.php @@ -239,12 +239,12 @@ class user_import { $errorTexts = array( 0 => LAN_CONVERT_57, -+ 1 => LAN_CONVERT_58, -+ 2 => LAN_CONVERT_59, -+ 3 => LAN_CONVERT_60, -+ 4 => LAN_CONVERT_61, -+ 5 => LAN_CONVERT_62, -+ 6 => LAN_CONVERT_63 + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -339,13 +339,13 @@ class userclass_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; From e97551bd01a1afc98c36ed9b0963fac01021d92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:44:28 +0200 Subject: [PATCH 59/66] Update import_links_class.php --- e107_plugins/import/import_links_class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/e107_plugins/import/import_links_class.php b/e107_plugins/import/import_links_class.php index 020f32b52..bd907de16 100644 --- a/e107_plugins/import/import_links_class.php +++ b/e107_plugins/import/import_links_class.php @@ -107,13 +107,13 @@ class links_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -127,4 +127,4 @@ class links_import } -?> \ No newline at end of file +?> From f2c02e7642bc3ec6ed8312ab5aaf076bc59b6ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:45:06 +0200 Subject: [PATCH 60/66] Update import_news_class.php --- e107_plugins/import/import_news_class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/e107_plugins/import/import_news_class.php b/e107_plugins/import/import_news_class.php index 8fb10f6ab..d77216212 100644 --- a/e107_plugins/import/import_news_class.php +++ b/e107_plugins/import/import_news_class.php @@ -116,13 +116,13 @@ class news_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -220,4 +220,4 @@ class newscategory_import } -?> \ No newline at end of file +?> From 7affb6cb19be77a2890873bd20a629ced34b97f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sun, 2 Apr 2017 10:45:44 +0200 Subject: [PATCH 61/66] Update import_page_class.php --- e107_plugins/import/import_page_class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/e107_plugins/import/import_page_class.php b/e107_plugins/import/import_page_class.php index 18d43c1b7..f1fad4b9e 100644 --- a/e107_plugins/import/import_page_class.php +++ b/e107_plugins/import/import_page_class.php @@ -226,13 +226,13 @@ class pagechapter_import function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' . { $errorTexts = array( - 0 => 'No error', - 1 => 'Can\'t change main admin data', - 2 => 'invalid field passed', - 3 => 'Mandatory field not set', - 4 => 'Entry already exists', - 5 => 'Invalid characters in user or login name', - 6 => 'Error saving extended user fields' + 0 => LAN_CONVERT_57, + 1 => LAN_CONVERT_58, + 2 => LAN_CONVERT_59, + 3 => LAN_CONVERT_60, + 4 => LAN_CONVERT_61, + 5 => LAN_CONVERT_62, + 6 => LAN_CONVERT_63 ); if (isset($errorTexts[$errnum])) return $errorTexts[$errnum]; @@ -246,4 +246,4 @@ class pagechapter_import } -?> \ No newline at end of file +?> From 52b44b833d05b1623ab79693e042db3a0d2938fe Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 2 Apr 2017 07:57:08 -0700 Subject: [PATCH 62/66] Admin-ui: Parent/Child order fix. --- e107_handlers/admin_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 410b5a826..3e704bb9c 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4225,7 +4225,7 @@ class e_admin_controller_ui extends e_admin_controller label1: WHILE @parent != 0 DO SET @parent = (SELECT ".$parent." FROM `#".$table."` WHERE ".$pid." =incid); SET @order = (SELECT ".$order." FROM `#".$table."` WHERE ".$pid." =incid); - SET @parentstr = CONCAT(if(@parent = 0,'',@parent), LPAD(@order,3,0), @parentstr); + SET @parentstr = CONCAT(if(@parent = 0,'',@parent), LPAD(@order,4,0), @parentstr); SET incid = @parent; END WHILE label1; From 9063e0a1928e5ea49d44bdde21211c6adac5ce59 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 2 Apr 2017 07:57:41 -0700 Subject: [PATCH 63/66] Corporate admin theme style added. --- e107_handlers/media_class.php | 2 +- e107_themes/bootstrap3/css/corporate.css | 5638 ++++++++++++++++++++++ 2 files changed, 5639 insertions(+), 1 deletion(-) create mode 100644 e107_themes/bootstrap3/css/corporate.css diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index af4991f80..84a51bc3a 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -1405,7 +1405,7 @@ class e_media $searchPlaceholder = varset($parm['searchPlaceholder'], LAN_SEARCH); $text = '
'; - $text .= ""; + $text .= ""; // $text .= "bablalal"; // $text .= ''; $text .= ''; diff --git a/e107_themes/bootstrap3/css/corporate.css b/e107_themes/bootstrap3/css/corporate.css new file mode 100644 index 000000000..eb2fecbdf --- /dev/null +++ b/e107_themes/bootstrap3/css/corporate.css @@ -0,0 +1,5638 @@ +@charset "UTF-8"; +/* CSS generated by http://lavishbootstrap.com */ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; } + +body { + margin: 0; } + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; } + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; } + +audio:not([controls]) { + display: none; + height: 0; } + +[hidden], +template { + display: none; } + +a { + background-color: transparent; } + +a:active, +a:hover { + outline: 0; } + +abbr[title] { + border-bottom: 1px dotted; } + +b, +strong { + font-weight: bold; } + +dfn { + font-style: italic; } + +h1 { + font-size: 2em; + margin: 0.67em 0; } + +mark { + background: #ff0; + color: #000; } + +small { + font-size: 80%; } + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +img { + border: 0; } + +svg:not(:root) { + overflow: hidden; } + +figure { + margin: 1em 40px; } + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; } + +pre { + overflow: auto; } + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; } + +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; } + +button { + overflow: visible; } + +button, +select { + text-transform: none; } + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; } + +button[disabled], +html input[disabled] { + cursor: default; } + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; } + +input { + line-height: normal; } + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; } + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } + +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; } + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +legend { + border: 0; + padding: 0; } + +textarea { + overflow: auto; } + +optgroup { + font-weight: bold; } + +table { + border-collapse: collapse; + border-spacing: 0; } + +td, +th { + padding: 0; } + +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + background: transparent !important; + color: #000 !important; + box-shadow: none !important; + text-shadow: none !important; } + + a, + a:visited { + text-decoration: underline; } + + a[href]:after { + content: " (" attr(href) ")"; } + + abbr[title]:after { + content: " (" attr(title) ")"; } + + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; } + + thead { + display: table-header-group; } + + tr, + img { + page-break-inside: avoid; } + + img { + max-width: 100% !important; } + + p, + h2, + h3 { + orphans: 3; + widows: 3; } + + h2, + h3 { + page-break-after: avoid; } + + select { + background: #fff !important; } + + .navbar { + display: none; } + + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; } + + .label { + border: 1px solid #000; } + + .table { + border-collapse: collapse !important; } + .table td, + .table th { + background-color: #fff !important; } + + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; } } +@font-face { + font-family: 'Glyphicons Halflings'; + src: url("../fonts/bootstrap/glyphicons-halflings-regular.eot"); + src: url("../fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/bootstrap/glyphicons-halflings-regular.woff2") format("woff2"), url("../fonts/bootstrap/glyphicons-halflings-regular.woff") format("woff"), url("../fonts/bootstrap/glyphicons-halflings-regular.ttf") format("truetype"), url("../fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); } +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +.glyphicon-asterisk:before { + content: "\2a"; } + +.glyphicon-plus:before { + content: "\2b"; } + +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; } + +.glyphicon-minus:before { + content: "\2212"; } + +.glyphicon-cloud:before { + content: "\2601"; } + +.glyphicon-envelope:before { + content: "\2709"; } + +.glyphicon-pencil:before { + content: "\270f"; } + +.glyphicon-glass:before { + content: "\e001"; } + +.glyphicon-music:before { + content: "\e002"; } + +.glyphicon-search:before { + content: "\e003"; } + +.glyphicon-heart:before { + content: "\e005"; } + +.glyphicon-star:before { + content: "\e006"; } + +.glyphicon-star-empty:before { + content: "\e007"; } + +.glyphicon-user:before { + content: "\e008"; } + +.glyphicon-film:before { + content: "\e009"; } + +.glyphicon-th-large:before { + content: "\e010"; } + +.glyphicon-th:before { + content: "\e011"; } + +.glyphicon-th-list:before { + content: "\e012"; } + +.glyphicon-ok:before { + content: "\e013"; } + +.glyphicon-remove:before { + content: "\e014"; } + +.glyphicon-zoom-in:before { + content: "\e015"; } + +.glyphicon-zoom-out:before { + content: "\e016"; } + +.glyphicon-off:before { + content: "\e017"; } + +.glyphicon-signal:before { + content: "\e018"; } + +.glyphicon-cog:before { + content: "\e019"; } + +.glyphicon-trash:before { + content: "\e020"; } + +.glyphicon-home:before { + content: "\e021"; } + +.glyphicon-file:before { + content: "\e022"; } + +.glyphicon-time:before { + content: "\e023"; } + +.glyphicon-road:before { + content: "\e024"; } + +.glyphicon-download-alt:before { + content: "\e025"; } + +.glyphicon-download:before { + content: "\e026"; } + +.glyphicon-upload:before { + content: "\e027"; } + +.glyphicon-inbox:before { + content: "\e028"; } + +.glyphicon-play-circle:before { + content: "\e029"; } + +.glyphicon-repeat:before { + content: "\e030"; } + +.glyphicon-refresh:before { + content: "\e031"; } + +.glyphicon-list-alt:before { + content: "\e032"; } + +.glyphicon-lock:before { + content: "\e033"; } + +.glyphicon-flag:before { + content: "\e034"; } + +.glyphicon-headphones:before { + content: "\e035"; } + +.glyphicon-volume-off:before { + content: "\e036"; } + +.glyphicon-volume-down:before { + content: "\e037"; } + +.glyphicon-volume-up:before { + content: "\e038"; } + +.glyphicon-qrcode:before { + content: "\e039"; } + +.glyphicon-barcode:before { + content: "\e040"; } + +.glyphicon-tag:before { + content: "\e041"; } + +.glyphicon-tags:before { + content: "\e042"; } + +.glyphicon-book:before { + content: "\e043"; } + +.glyphicon-bookmark:before { + content: "\e044"; } + +.glyphicon-print:before { + content: "\e045"; } + +.glyphicon-camera:before { + content: "\e046"; } + +.glyphicon-font:before { + content: "\e047"; } + +.glyphicon-bold:before { + content: "\e048"; } + +.glyphicon-italic:before { + content: "\e049"; } + +.glyphicon-text-height:before { + content: "\e050"; } + +.glyphicon-text-width:before { + content: "\e051"; } + +.glyphicon-align-left:before { + content: "\e052"; } + +.glyphicon-align-center:before { + content: "\e053"; } + +.glyphicon-align-right:before { + content: "\e054"; } + +.glyphicon-align-justify:before { + content: "\e055"; } + +.glyphicon-list:before { + content: "\e056"; } + +.glyphicon-indent-left:before { + content: "\e057"; } + +.glyphicon-indent-right:before { + content: "\e058"; } + +.glyphicon-facetime-video:before { + content: "\e059"; } + +.glyphicon-picture:before { + content: "\e060"; } + +.glyphicon-map-marker:before { + content: "\e062"; } + +.glyphicon-adjust:before { + content: "\e063"; } + +.glyphicon-tint:before { + content: "\e064"; } + +.glyphicon-edit:before { + content: "\e065"; } + +.glyphicon-share:before { + content: "\e066"; } + +.glyphicon-check:before { + content: "\e067"; } + +.glyphicon-move:before { + content: "\e068"; } + +.glyphicon-step-backward:before { + content: "\e069"; } + +.glyphicon-fast-backward:before { + content: "\e070"; } + +.glyphicon-backward:before { + content: "\e071"; } + +.glyphicon-play:before { + content: "\e072"; } + +.glyphicon-pause:before { + content: "\e073"; } + +.glyphicon-stop:before { + content: "\e074"; } + +.glyphicon-forward:before { + content: "\e075"; } + +.glyphicon-fast-forward:before { + content: "\e076"; } + +.glyphicon-step-forward:before { + content: "\e077"; } + +.glyphicon-eject:before { + content: "\e078"; } + +.glyphicon-chevron-left:before { + content: "\e079"; } + +.glyphicon-chevron-right:before { + content: "\e080"; } + +.glyphicon-plus-sign:before { + content: "\e081"; } + +.glyphicon-minus-sign:before { + content: "\e082"; } + +.glyphicon-remove-sign:before { + content: "\e083"; } + +.glyphicon-ok-sign:before { + content: "\e084"; } + +.glyphicon-question-sign:before { + content: "\e085"; } + +.glyphicon-info-sign:before { + content: "\e086"; } + +.glyphicon-screenshot:before { + content: "\e087"; } + +.glyphicon-remove-circle:before { + content: "\e088"; } + +.glyphicon-ok-circle:before { + content: "\e089"; } + +.glyphicon-ban-circle:before { + content: "\e090"; } + +.glyphicon-arrow-left:before { + content: "\e091"; } + +.glyphicon-arrow-right:before { + content: "\e092"; } + +.glyphicon-arrow-up:before { + content: "\e093"; } + +.glyphicon-arrow-down:before { + content: "\e094"; } + +.glyphicon-share-alt:before { + content: "\e095"; } + +.glyphicon-resize-full:before { + content: "\e096"; } + +.glyphicon-resize-small:before { + content: "\e097"; } + +.glyphicon-exclamation-sign:before { + content: "\e101"; } + +.glyphicon-gift:before { + content: "\e102"; } + +.glyphicon-leaf:before { + content: "\e103"; } + +.glyphicon-fire:before { + content: "\e104"; } + +.glyphicon-eye-open:before { + content: "\e105"; } + +.glyphicon-eye-close:before { + content: "\e106"; } + +.glyphicon-warning-sign:before { + content: "\e107"; } + +.glyphicon-plane:before { + content: "\e108"; } + +.glyphicon-calendar:before { + content: "\e109"; } + +.glyphicon-random:before { + content: "\e110"; } + +.glyphicon-comment:before { + content: "\e111"; } + +.glyphicon-magnet:before { + content: "\e112"; } + +.glyphicon-chevron-up:before { + content: "\e113"; } + +.glyphicon-chevron-down:before { + content: "\e114"; } + +.glyphicon-retweet:before { + content: "\e115"; } + +.glyphicon-shopping-cart:before { + content: "\e116"; } + +.glyphicon-folder-close:before { + content: "\e117"; } + +.glyphicon-folder-open:before { + content: "\e118"; } + +.glyphicon-resize-vertical:before { + content: "\e119"; } + +.glyphicon-resize-horizontal:before { + content: "\e120"; } + +.glyphicon-hdd:before { + content: "\e121"; } + +.glyphicon-bullhorn:before { + content: "\e122"; } + +.glyphicon-bell:before { + content: "\e123"; } + +.glyphicon-certificate:before { + content: "\e124"; } + +.glyphicon-thumbs-up:before { + content: "\e125"; } + +.glyphicon-thumbs-down:before { + content: "\e126"; } + +.glyphicon-hand-right:before { + content: "\e127"; } + +.glyphicon-hand-left:before { + content: "\e128"; } + +.glyphicon-hand-up:before { + content: "\e129"; } + +.glyphicon-hand-down:before { + content: "\e130"; } + +.glyphicon-circle-arrow-right:before { + content: "\e131"; } + +.glyphicon-circle-arrow-left:before { + content: "\e132"; } + +.glyphicon-circle-arrow-up:before { + content: "\e133"; } + +.glyphicon-circle-arrow-down:before { + content: "\e134"; } + +.glyphicon-globe:before { + content: "\e135"; } + +.glyphicon-wrench:before { + content: "\e136"; } + +.glyphicon-tasks:before { + content: "\e137"; } + +.glyphicon-filter:before { + content: "\e138"; } + +.glyphicon-briefcase:before { + content: "\e139"; } + +.glyphicon-fullscreen:before { + content: "\e140"; } + +.glyphicon-dashboard:before { + content: "\e141"; } + +.glyphicon-paperclip:before { + content: "\e142"; } + +.glyphicon-heart-empty:before { + content: "\e143"; } + +.glyphicon-link:before { + content: "\e144"; } + +.glyphicon-phone:before { + content: "\e145"; } + +.glyphicon-pushpin:before { + content: "\e146"; } + +.glyphicon-usd:before { + content: "\e148"; } + +.glyphicon-gbp:before { + content: "\e149"; } + +.glyphicon-sort:before { + content: "\e150"; } + +.glyphicon-sort-by-alphabet:before { + content: "\e151"; } + +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; } + +.glyphicon-sort-by-order:before { + content: "\e153"; } + +.glyphicon-sort-by-order-alt:before { + content: "\e154"; } + +.glyphicon-sort-by-attributes:before { + content: "\e155"; } + +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; } + +.glyphicon-unchecked:before { + content: "\e157"; } + +.glyphicon-expand:before { + content: "\e158"; } + +.glyphicon-collapse-down:before { + content: "\e159"; } + +.glyphicon-collapse-up:before { + content: "\e160"; } + +.glyphicon-log-in:before { + content: "\e161"; } + +.glyphicon-flash:before { + content: "\e162"; } + +.glyphicon-log-out:before { + content: "\e163"; } + +.glyphicon-new-window:before { + content: "\e164"; } + +.glyphicon-record:before { + content: "\e165"; } + +.glyphicon-save:before { + content: "\e166"; } + +.glyphicon-open:before { + content: "\e167"; } + +.glyphicon-saved:before { + content: "\e168"; } + +.glyphicon-import:before { + content: "\e169"; } + +.glyphicon-export:before { + content: "\e170"; } + +.glyphicon-send:before { + content: "\e171"; } + +.glyphicon-floppy-disk:before { + content: "\e172"; } + +.glyphicon-floppy-saved:before { + content: "\e173"; } + +.glyphicon-floppy-remove:before { + content: "\e174"; } + +.glyphicon-floppy-save:before { + content: "\e175"; } + +.glyphicon-floppy-open:before { + content: "\e176"; } + +.glyphicon-credit-card:before { + content: "\e177"; } + +.glyphicon-transfer:before { + content: "\e178"; } + +.glyphicon-cutlery:before { + content: "\e179"; } + +.glyphicon-header:before { + content: "\e180"; } + +.glyphicon-compressed:before { + content: "\e181"; } + +.glyphicon-earphone:before { + content: "\e182"; } + +.glyphicon-phone-alt:before { + content: "\e183"; } + +.glyphicon-tower:before { + content: "\e184"; } + +.glyphicon-stats:before { + content: "\e185"; } + +.glyphicon-sd-video:before { + content: "\e186"; } + +.glyphicon-hd-video:before { + content: "\e187"; } + +.glyphicon-subtitles:before { + content: "\e188"; } + +.glyphicon-sound-stereo:before { + content: "\e189"; } + +.glyphicon-sound-dolby:before { + content: "\e190"; } + +.glyphicon-sound-5-1:before { + content: "\e191"; } + +.glyphicon-sound-6-1:before { + content: "\e192"; } + +.glyphicon-sound-7-1:before { + content: "\e193"; } + +.glyphicon-copyright-mark:before { + content: "\e194"; } + +.glyphicon-registration-mark:before { + content: "\e195"; } + +.glyphicon-cloud-download:before { + content: "\e197"; } + +.glyphicon-cloud-upload:before { + content: "\e198"; } + +.glyphicon-tree-conifer:before { + content: "\e199"; } + +.glyphicon-tree-deciduous:before { + content: "\e200"; } + +.glyphicon-cd:before { + content: "\e201"; } + +.glyphicon-save-file:before { + content: "\e202"; } + +.glyphicon-open-file:before { + content: "\e203"; } + +.glyphicon-level-up:before { + content: "\e204"; } + +.glyphicon-copy:before { + content: "\e205"; } + +.glyphicon-paste:before { + content: "\e206"; } + +.glyphicon-alert:before { + content: "\e209"; } + +.glyphicon-equalizer:before { + content: "\e210"; } + +.glyphicon-king:before { + content: "\e211"; } + +.glyphicon-queen:before { + content: "\e212"; } + +.glyphicon-pawn:before { + content: "\e213"; } + +.glyphicon-bishop:before { + content: "\e214"; } + +.glyphicon-knight:before { + content: "\e215"; } + +.glyphicon-baby-formula:before { + content: "\e216"; } + +.glyphicon-tent:before { + content: "\26fa"; } + +.glyphicon-blackboard:before { + content: "\e218"; } + +.glyphicon-bed:before { + content: "\e219"; } + +.glyphicon-apple:before { + content: "\f8ff"; } + +.glyphicon-erase:before { + content: "\e221"; } + +.glyphicon-hourglass:before { + content: "\231b"; } + +.glyphicon-lamp:before { + content: "\e223"; } + +.glyphicon-duplicate:before { + content: "\e224"; } + +.glyphicon-piggy-bank:before { + content: "\e225"; } + +.glyphicon-scissors:before { + content: "\e226"; } + +.glyphicon-bitcoin:before { + content: "\e227"; } + +.glyphicon-btc:before { + content: "\e227"; } + +.glyphicon-xbt:before { + content: "\e227"; } + +.glyphicon-yen:before { + content: "\00a5"; } + +.glyphicon-jpy:before { + content: "\00a5"; } + +.glyphicon-ruble:before { + content: "\20bd"; } + +.glyphicon-rub:before { + content: "\20bd"; } + +.glyphicon-scale:before { + content: "\e230"; } + +.glyphicon-ice-lolly:before { + content: "\e231"; } + +.glyphicon-ice-lolly-tasted:before { + content: "\e232"; } + +.glyphicon-education:before { + content: "\e233"; } + +.glyphicon-option-horizontal:before { + content: "\e234"; } + +.glyphicon-option-vertical:before { + content: "\e235"; } + +.glyphicon-menu-hamburger:before { + content: "\e236"; } + +.glyphicon-modal-window:before { + content: "\e237"; } + +.glyphicon-oil:before { + content: "\e238"; } + +.glyphicon-grain:before { + content: "\e239"; } + +.glyphicon-sunglasses:before { + content: "\e240"; } + +.glyphicon-text-size:before { + content: "\e241"; } + +.glyphicon-text-color:before { + content: "\e242"; } + +.glyphicon-text-background:before { + content: "\e243"; } + +.glyphicon-object-align-top:before { + content: "\e244"; } + +.glyphicon-object-align-bottom:before { + content: "\e245"; } + +.glyphicon-object-align-horizontal:before { + content: "\e246"; } + +.glyphicon-object-align-left:before { + content: "\e247"; } + +.glyphicon-object-align-vertical:before { + content: "\e248"; } + +.glyphicon-object-align-right:before { + content: "\e249"; } + +.glyphicon-triangle-right:before { + content: "\e250"; } + +.glyphicon-triangle-left:before { + content: "\e251"; } + +.glyphicon-triangle-bottom:before { + content: "\e252"; } + +.glyphicon-triangle-top:before { + content: "\e253"; } + +.glyphicon-console:before { + content: "\e254"; } + +.glyphicon-superscript:before { + content: "\e255"; } + +.glyphicon-subscript:before { + content: "\e256"; } + +.glyphicon-menu-left:before { + content: "\e257"; } + +.glyphicon-menu-right:before { + content: "\e258"; } + +.glyphicon-menu-down:before { + content: "\e259"; } + +.glyphicon-menu-up:before { + content: "\e260"; } + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + +html { + font-size: 10px; + -webkit-tap-highlight-color: transparent; } + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857; + color: #67655D; + background-color: #D4D8D1; } + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; } + +a { + color: #577492; + text-decoration: none; } + a:hover, a:focus { + color: #3a4e62; + text-decoration: underline; } + a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + +figure { + margin: 0; } + +img { + vertical-align: middle; } + +.img-responsive { + display: block; + max-width: 100%; + height: auto; } + +.img-rounded { + border-radius: 6px; } + +.img-thumbnail { + padding: 4px; + line-height: 1.42857; + background-color: #D4D8D1; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; + display: inline-block; + max-width: 100%; + height: auto; } + +.img-circle { + border-radius: 50%; } + +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #A8A8A1; } + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; } + +.sr-only-focusable:active, .sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; } + +[role="button"] { + cursor: pointer; } + +h1, h2, h3, h4, h5, h6, +.h1, .h2, .h3, .h4, .h5, .h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; } + h1 small, + h1 .small, h2 small, + h2 .small, h3 small, + h3 .small, h4 small, + h4 .small, h5 small, + h5 .small, h6 small, + h6 .small, + .h1 small, + .h1 .small, .h2 small, + .h2 .small, .h3 small, + .h3 .small, .h4 small, + .h4 .small, .h5 small, + .h5 .small, .h6 small, + .h6 .small { + font-weight: normal; + line-height: 1; + color: #AA9A66; } + +h1, .h1, +h2, .h2, +h3, .h3 { + margin-top: 20px; + margin-bottom: 10px; } + h1 small, + h1 .small, .h1 small, + .h1 .small, + h2 small, + h2 .small, .h2 small, + .h2 .small, + h3 small, + h3 .small, .h3 small, + .h3 .small { + font-size: 65%; } + +h4, .h4, +h5, .h5, +h6, .h6 { + margin-top: 10px; + margin-bottom: 10px; } + h4 small, + h4 .small, .h4 small, + .h4 .small, + h5 small, + h5 .small, .h5 small, + .h5 .small, + h6 small, + h6 .small, .h6 small, + .h6 .small { + font-size: 75%; } + +h1, .h1 { + font-size: 36px; } + +h2, .h2 { + font-size: 30px; } + +h3, .h3 { + font-size: 24px; } + +h4, .h4 { + font-size: 18px; } + +h5, .h5 { + font-size: 14px; } + +h6, .h6 { + font-size: 12px; } + +p { + margin: 0 0 10px; } + +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; } + @media (min-width: 768px) { + .lead { + font-size: 21px; } } + +small, +.small { + font-size: 85%; } + +mark, +.mark { + background-color: #fcf8e3; + padding: .2em; } + +.text-left { + text-align: left; } + +.text-right { + text-align: right; } + +.text-center { + text-align: center; } + +.text-justify { + text-align: justify; } + +.text-nowrap { + white-space: nowrap; } + +.text-lowercase { + text-transform: lowercase; } + +.text-uppercase, .initialism { + text-transform: uppercase; } + +.text-capitalize { + text-transform: capitalize; } + +.text-muted { + color: #AA9A66; } + +.text-primary { + color: #577492; } + +a.text-primary:hover { + color: #445b72; } + +.text-success { + color: #3c763d; } + +a.text-success:hover { + color: #2b542c; } + +.text-info { + color: #31708f; } + +a.text-info:hover { + color: #245269; } + +.text-warning { + color: #8a6d3b; } + +a.text-warning:hover { + color: #66512c; } + +.text-danger { + color: #a94442; } + +a.text-danger:hover { + color: #843534; } + +.bg-primary { + color: #fff; } + +.bg-primary { + background-color: #577492; } + +a.bg-primary:hover { + background-color: #445b72; } + +.bg-success { + background-color: #dff0d8; } + +a.bg-success:hover { + background-color: #c1e2b3; } + +.bg-info { + background-color: #d9edf7; } + +a.bg-info:hover { + background-color: #afd9ee; } + +.bg-warning { + background-color: #fcf8e3; } + +a.bg-warning:hover { + background-color: #f7ecb5; } + +.bg-danger { + background-color: #f2dede; } + +a.bg-danger:hover { + background-color: #e4b9b9; } + +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #A8A8A1; } + +ul, +ol { + margin-top: 0; + margin-bottom: 10px; } + ul ul, + ul ol, + ol ul, + ol ol { + margin-bottom: 0; } + +.list-unstyled { + padding-left: 0; + list-style: none; } + +.list-inline { + padding-left: 0; + list-style: none; + margin-left: -5px; } + .list-inline > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; } + +dl { + margin-top: 0; + margin-bottom: 20px; } + +dt, +dd { + line-height: 1.42857; } + +dt { + font-weight: bold; } + +dd { + margin-left: 0; } + +.dl-horizontal dd:before, .dl-horizontal dd:after { + content: " "; + display: table; } +.dl-horizontal dd:after { + clear: both; } +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + .dl-horizontal dd { + margin-left: 180px; } } + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #AA9A66; } + +.initialism { + font-size: 90%; } + +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #A8A8A1; } + blockquote p:last-child, + blockquote ul:last-child, + blockquote ol:last-child { + margin-bottom: 0; } + blockquote footer, + blockquote small, + blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857; + color: #AA9A66; } + blockquote footer:before, + blockquote small:before, + blockquote .small:before { + content: '\2014 \00A0'; } + +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #A8A8A1; + border-left: 0; + text-align: right; } + .blockquote-reverse footer:before, + .blockquote-reverse small:before, + .blockquote-reverse .small:before, + blockquote.pull-right footer:before, + blockquote.pull-right small:before, + blockquote.pull-right .small:before { + content: ''; } + .blockquote-reverse footer:after, + .blockquote-reverse small:after, + .blockquote-reverse .small:after, + blockquote.pull-right footer:after, + blockquote.pull-right small:after, + blockquote.pull-right .small:after { + content: '\00A0 \2014'; } + +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857; } + +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } + +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; } + +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); } + kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + box-shadow: none; } + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857; + word-break: break-all; + word-wrap: break-word; + color: #67655D; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; } + pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; } + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; } + +.container { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; } + .container:before, .container:after { + content: " "; + display: table; } + .container:after { + clear: both; } + @media (min-width: 768px) { + .container { + width: 750px; } } + @media (min-width: 992px) { + .container { + width: 970px; } } + @media (min-width: 1200px) { + .container { + width: 1170px; } } + +.container-fluid { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; } + .container-fluid:before, .container-fluid:after { + content: " "; + display: table; } + .container-fluid:after { + clear: both; } + +.row { + margin-left: -15px; + margin-right: -15px; } + .row:before, .row:after { + content: " "; + display: table; } + .row:after { + clear: both; } + +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; } + +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; } + +.col-xs-1 { + width: 8.33333%; } + +.col-xs-2 { + width: 16.66667%; } + +.col-xs-3 { + width: 25%; } + +.col-xs-4 { + width: 33.33333%; } + +.col-xs-5 { + width: 41.66667%; } + +.col-xs-6 { + width: 50%; } + +.col-xs-7 { + width: 58.33333%; } + +.col-xs-8 { + width: 66.66667%; } + +.col-xs-9 { + width: 75%; } + +.col-xs-10 { + width: 83.33333%; } + +.col-xs-11 { + width: 91.66667%; } + +.col-xs-12 { + width: 100%; } + +.col-xs-pull-0 { + right: auto; } + +.col-xs-pull-1 { + right: 8.33333%; } + +.col-xs-pull-2 { + right: 16.66667%; } + +.col-xs-pull-3 { + right: 25%; } + +.col-xs-pull-4 { + right: 33.33333%; } + +.col-xs-pull-5 { + right: 41.66667%; } + +.col-xs-pull-6 { + right: 50%; } + +.col-xs-pull-7 { + right: 58.33333%; } + +.col-xs-pull-8 { + right: 66.66667%; } + +.col-xs-pull-9 { + right: 75%; } + +.col-xs-pull-10 { + right: 83.33333%; } + +.col-xs-pull-11 { + right: 91.66667%; } + +.col-xs-pull-12 { + right: 100%; } + +.col-xs-push-0 { + left: auto; } + +.col-xs-push-1 { + left: 8.33333%; } + +.col-xs-push-2 { + left: 16.66667%; } + +.col-xs-push-3 { + left: 25%; } + +.col-xs-push-4 { + left: 33.33333%; } + +.col-xs-push-5 { + left: 41.66667%; } + +.col-xs-push-6 { + left: 50%; } + +.col-xs-push-7 { + left: 58.33333%; } + +.col-xs-push-8 { + left: 66.66667%; } + +.col-xs-push-9 { + left: 75%; } + +.col-xs-push-10 { + left: 83.33333%; } + +.col-xs-push-11 { + left: 91.66667%; } + +.col-xs-push-12 { + left: 100%; } + +.col-xs-offset-0 { + margin-left: 0%; } + +.col-xs-offset-1 { + margin-left: 8.33333%; } + +.col-xs-offset-2 { + margin-left: 16.66667%; } + +.col-xs-offset-3 { + margin-left: 25%; } + +.col-xs-offset-4 { + margin-left: 33.33333%; } + +.col-xs-offset-5 { + margin-left: 41.66667%; } + +.col-xs-offset-6 { + margin-left: 50%; } + +.col-xs-offset-7 { + margin-left: 58.33333%; } + +.col-xs-offset-8 { + margin-left: 66.66667%; } + +.col-xs-offset-9 { + margin-left: 75%; } + +.col-xs-offset-10 { + margin-left: 83.33333%; } + +.col-xs-offset-11 { + margin-left: 91.66667%; } + +.col-xs-offset-12 { + margin-left: 100%; } + +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; } + + .col-sm-1 { + width: 8.33333%; } + + .col-sm-2 { + width: 16.66667%; } + + .col-sm-3 { + width: 25%; } + + .col-sm-4 { + width: 33.33333%; } + + .col-sm-5 { + width: 41.66667%; } + + .col-sm-6 { + width: 50%; } + + .col-sm-7 { + width: 58.33333%; } + + .col-sm-8 { + width: 66.66667%; } + + .col-sm-9 { + width: 75%; } + + .col-sm-10 { + width: 83.33333%; } + + .col-sm-11 { + width: 91.66667%; } + + .col-sm-12 { + width: 100%; } + + .col-sm-pull-0 { + right: auto; } + + .col-sm-pull-1 { + right: 8.33333%; } + + .col-sm-pull-2 { + right: 16.66667%; } + + .col-sm-pull-3 { + right: 25%; } + + .col-sm-pull-4 { + right: 33.33333%; } + + .col-sm-pull-5 { + right: 41.66667%; } + + .col-sm-pull-6 { + right: 50%; } + + .col-sm-pull-7 { + right: 58.33333%; } + + .col-sm-pull-8 { + right: 66.66667%; } + + .col-sm-pull-9 { + right: 75%; } + + .col-sm-pull-10 { + right: 83.33333%; } + + .col-sm-pull-11 { + right: 91.66667%; } + + .col-sm-pull-12 { + right: 100%; } + + .col-sm-push-0 { + left: auto; } + + .col-sm-push-1 { + left: 8.33333%; } + + .col-sm-push-2 { + left: 16.66667%; } + + .col-sm-push-3 { + left: 25%; } + + .col-sm-push-4 { + left: 33.33333%; } + + .col-sm-push-5 { + left: 41.66667%; } + + .col-sm-push-6 { + left: 50%; } + + .col-sm-push-7 { + left: 58.33333%; } + + .col-sm-push-8 { + left: 66.66667%; } + + .col-sm-push-9 { + left: 75%; } + + .col-sm-push-10 { + left: 83.33333%; } + + .col-sm-push-11 { + left: 91.66667%; } + + .col-sm-push-12 { + left: 100%; } + + .col-sm-offset-0 { + margin-left: 0%; } + + .col-sm-offset-1 { + margin-left: 8.33333%; } + + .col-sm-offset-2 { + margin-left: 16.66667%; } + + .col-sm-offset-3 { + margin-left: 25%; } + + .col-sm-offset-4 { + margin-left: 33.33333%; } + + .col-sm-offset-5 { + margin-left: 41.66667%; } + + .col-sm-offset-6 { + margin-left: 50%; } + + .col-sm-offset-7 { + margin-left: 58.33333%; } + + .col-sm-offset-8 { + margin-left: 66.66667%; } + + .col-sm-offset-9 { + margin-left: 75%; } + + .col-sm-offset-10 { + margin-left: 83.33333%; } + + .col-sm-offset-11 { + margin-left: 91.66667%; } + + .col-sm-offset-12 { + margin-left: 100%; } } +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; } + + .col-md-1 { + width: 8.33333%; } + + .col-md-2 { + width: 16.66667%; } + + .col-md-3 { + width: 25%; } + + .col-md-4 { + width: 33.33333%; } + + .col-md-5 { + width: 41.66667%; } + + .col-md-6 { + width: 50%; } + + .col-md-7 { + width: 58.33333%; } + + .col-md-8 { + width: 66.66667%; } + + .col-md-9 { + width: 75%; } + + .col-md-10 { + width: 83.33333%; } + + .col-md-11 { + width: 91.66667%; } + + .col-md-12 { + width: 100%; } + + .col-md-pull-0 { + right: auto; } + + .col-md-pull-1 { + right: 8.33333%; } + + .col-md-pull-2 { + right: 16.66667%; } + + .col-md-pull-3 { + right: 25%; } + + .col-md-pull-4 { + right: 33.33333%; } + + .col-md-pull-5 { + right: 41.66667%; } + + .col-md-pull-6 { + right: 50%; } + + .col-md-pull-7 { + right: 58.33333%; } + + .col-md-pull-8 { + right: 66.66667%; } + + .col-md-pull-9 { + right: 75%; } + + .col-md-pull-10 { + right: 83.33333%; } + + .col-md-pull-11 { + right: 91.66667%; } + + .col-md-pull-12 { + right: 100%; } + + .col-md-push-0 { + left: auto; } + + .col-md-push-1 { + left: 8.33333%; } + + .col-md-push-2 { + left: 16.66667%; } + + .col-md-push-3 { + left: 25%; } + + .col-md-push-4 { + left: 33.33333%; } + + .col-md-push-5 { + left: 41.66667%; } + + .col-md-push-6 { + left: 50%; } + + .col-md-push-7 { + left: 58.33333%; } + + .col-md-push-8 { + left: 66.66667%; } + + .col-md-push-9 { + left: 75%; } + + .col-md-push-10 { + left: 83.33333%; } + + .col-md-push-11 { + left: 91.66667%; } + + .col-md-push-12 { + left: 100%; } + + .col-md-offset-0 { + margin-left: 0%; } + + .col-md-offset-1 { + margin-left: 8.33333%; } + + .col-md-offset-2 { + margin-left: 16.66667%; } + + .col-md-offset-3 { + margin-left: 25%; } + + .col-md-offset-4 { + margin-left: 33.33333%; } + + .col-md-offset-5 { + margin-left: 41.66667%; } + + .col-md-offset-6 { + margin-left: 50%; } + + .col-md-offset-7 { + margin-left: 58.33333%; } + + .col-md-offset-8 { + margin-left: 66.66667%; } + + .col-md-offset-9 { + margin-left: 75%; } + + .col-md-offset-10 { + margin-left: 83.33333%; } + + .col-md-offset-11 { + margin-left: 91.66667%; } + + .col-md-offset-12 { + margin-left: 100%; } } +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; } + + .col-lg-1 { + width: 8.33333%; } + + .col-lg-2 { + width: 16.66667%; } + + .col-lg-3 { + width: 25%; } + + .col-lg-4 { + width: 33.33333%; } + + .col-lg-5 { + width: 41.66667%; } + + .col-lg-6 { + width: 50%; } + + .col-lg-7 { + width: 58.33333%; } + + .col-lg-8 { + width: 66.66667%; } + + .col-lg-9 { + width: 75%; } + + .col-lg-10 { + width: 83.33333%; } + + .col-lg-11 { + width: 91.66667%; } + + .col-lg-12 { + width: 100%; } + + .col-lg-pull-0 { + right: auto; } + + .col-lg-pull-1 { + right: 8.33333%; } + + .col-lg-pull-2 { + right: 16.66667%; } + + .col-lg-pull-3 { + right: 25%; } + + .col-lg-pull-4 { + right: 33.33333%; } + + .col-lg-pull-5 { + right: 41.66667%; } + + .col-lg-pull-6 { + right: 50%; } + + .col-lg-pull-7 { + right: 58.33333%; } + + .col-lg-pull-8 { + right: 66.66667%; } + + .col-lg-pull-9 { + right: 75%; } + + .col-lg-pull-10 { + right: 83.33333%; } + + .col-lg-pull-11 { + right: 91.66667%; } + + .col-lg-pull-12 { + right: 100%; } + + .col-lg-push-0 { + left: auto; } + + .col-lg-push-1 { + left: 8.33333%; } + + .col-lg-push-2 { + left: 16.66667%; } + + .col-lg-push-3 { + left: 25%; } + + .col-lg-push-4 { + left: 33.33333%; } + + .col-lg-push-5 { + left: 41.66667%; } + + .col-lg-push-6 { + left: 50%; } + + .col-lg-push-7 { + left: 58.33333%; } + + .col-lg-push-8 { + left: 66.66667%; } + + .col-lg-push-9 { + left: 75%; } + + .col-lg-push-10 { + left: 83.33333%; } + + .col-lg-push-11 { + left: 91.66667%; } + + .col-lg-push-12 { + left: 100%; } + + .col-lg-offset-0 { + margin-left: 0%; } + + .col-lg-offset-1 { + margin-left: 8.33333%; } + + .col-lg-offset-2 { + margin-left: 16.66667%; } + + .col-lg-offset-3 { + margin-left: 25%; } + + .col-lg-offset-4 { + margin-left: 33.33333%; } + + .col-lg-offset-5 { + margin-left: 41.66667%; } + + .col-lg-offset-6 { + margin-left: 50%; } + + .col-lg-offset-7 { + margin-left: 58.33333%; } + + .col-lg-offset-8 { + margin-left: 66.66667%; } + + .col-lg-offset-9 { + margin-left: 75%; } + + .col-lg-offset-10 { + margin-left: 83.33333%; } + + .col-lg-offset-11 { + margin-left: 91.66667%; } + + .col-lg-offset-12 { + margin-left: 100%; } } +table { + background-color: transparent; } + +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #AA9A66; + text-align: left; } + +th { + text-align: left; } + +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; } + .table > thead > tr > th, + .table > thead > tr > td, + .table > tbody > tr > th, + .table > tbody > tr > td, + .table > tfoot > tr > th, + .table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857; + vertical-align: top; + border-top: 1px solid #67655D; } + .table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #67655D; } + .table > caption + thead > tr:first-child > th, + .table > caption + thead > tr:first-child > td, + .table > colgroup + thead > tr:first-child > th, + .table > colgroup + thead > tr:first-child > td, + .table > thead:first-child > tr:first-child > th, + .table > thead:first-child > tr:first-child > td { + border-top: 0; } + .table > tbody + tbody { + border-top: 2px solid #67655D; } + .table .table { + background-color: #D4D8D1; } + +.table-condensed > thead > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > th, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > th, +.table-condensed > tfoot > tr > td { + padding: 5px; } + +.table-bordered { + border: 1px solid #67655D; } + .table-bordered > thead > tr > th, + .table-bordered > thead > tr > td, + .table-bordered > tbody > tr > th, + .table-bordered > tbody > tr > td, + .table-bordered > tfoot > tr > th, + .table-bordered > tfoot > tr > td { + border: 1px solid #67655D; } + .table-bordered > thead > tr > th, + .table-bordered > thead > tr > td { + border-bottom-width: 2px; } + +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; } + +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; } + +table col[class*="col-"] { + position: static; + float: none; + display: table-column; } + +table td[class*="col-"], +table th[class*="col-"] { + position: static; + float: none; + display: table-cell; } + +.table > thead > tr > td.active, +.table > thead > tr > th.active, .table > thead > tr.active > td, .table > thead > tr.active > th, +.table > tbody > tr > td.active, +.table > tbody > tr > th.active, +.table > tbody > tr.active > td, +.table > tbody > tr.active > th, +.table > tfoot > tr > td.active, +.table > tfoot > tr > th.active, +.table > tfoot > tr.active > td, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; } + +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; } + +.table > thead > tr > td.success, +.table > thead > tr > th.success, .table > thead > tr.success > td, .table > thead > tr.success > th, +.table > tbody > tr > td.success, +.table > tbody > tr > th.success, +.table > tbody > tr.success > td, +.table > tbody > tr.success > th, +.table > tfoot > tr > td.success, +.table > tfoot > tr > th.success, +.table > tfoot > tr.success > td, +.table > tfoot > tr.success > th { + background-color: #dff0d8; } + +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; } + +.table > thead > tr > td.info, +.table > thead > tr > th.info, .table > thead > tr.info > td, .table > thead > tr.info > th, +.table > tbody > tr > td.info, +.table > tbody > tr > th.info, +.table > tbody > tr.info > td, +.table > tbody > tr.info > th, +.table > tfoot > tr > td.info, +.table > tfoot > tr > th.info, +.table > tfoot > tr.info > td, +.table > tfoot > tr.info > th { + background-color: #d9edf7; } + +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; } + +.table > thead > tr > td.warning, +.table > thead > tr > th.warning, .table > thead > tr.warning > td, .table > thead > tr.warning > th, +.table > tbody > tr > td.warning, +.table > tbody > tr > th.warning, +.table > tbody > tr.warning > td, +.table > tbody > tr.warning > th, +.table > tfoot > tr > td.warning, +.table > tfoot > tr > th.warning, +.table > tfoot > tr.warning > td, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; } + +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; } + +.table > thead > tr > td.danger, +.table > thead > tr > th.danger, .table > thead > tr.danger > td, .table > thead > tr.danger > th, +.table > tbody > tr > td.danger, +.table > tbody > tr > th.danger, +.table > tbody > tr.danger > td, +.table > tbody > tr.danger > th, +.table > tfoot > tr > td.danger, +.table > tfoot > tr > th.danger, +.table > tfoot > tr.danger > td, +.table > tfoot > tr.danger > th { + background-color: #f2dede; } + +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; } + +.table-responsive { + overflow-x: auto; + min-height: 0.01%; } + @media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #67655D; } + .table-responsive > .table { + margin-bottom: 0; } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; } + .table-responsive > .table-bordered { + border: 0; } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; } } + +fieldset { + padding: 0; + margin: 0; + border: 0; + min-width: 0; } + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #67655D; + border: 0; + border-bottom: 1px solid #e5e5e5; } + +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; } + +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; } + +input[type="file"] { + display: block; } + +input[type="range"] { + display: block; + width: 100%; } + +select[multiple], +select[size] { + height: auto; } + +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857; + color: #67655d; } + +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857; + color: #67655d; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } + .form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); } + .form-control::-moz-placeholder { + color: #999; + opacity: 1; } + .form-control:-ms-input-placeholder { + color: #999; } + .form-control::-webkit-input-placeholder { + color: #999; } + .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { + background-color: #A8A8A1; + opacity: 1; } + .form-control[disabled], fieldset[disabled] .form-control { + cursor: not-allowed; } + +textarea.form-control { + height: auto; } + +input[type="search"] { + -webkit-appearance: none; } + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + line-height: 34px; } + input[type="date"].input-sm, .input-group-sm > input[type="date"].form-control, + .input-group-sm > input[type="date"].input-group-addon, + .input-group-sm > .input-group-btn > input[type="date"].btn, .input-group-sm input[type="date"], + input[type="time"].input-sm, + .input-group-sm > input[type="time"].form-control, + .input-group-sm > input[type="time"].input-group-addon, + .input-group-sm > .input-group-btn > input[type="time"].btn, .input-group-sm + input[type="time"], + input[type="datetime-local"].input-sm, + .input-group-sm > input[type="datetime-local"].form-control, + .input-group-sm > input[type="datetime-local"].input-group-addon, + .input-group-sm > .input-group-btn > input[type="datetime-local"].btn, .input-group-sm + input[type="datetime-local"], + input[type="month"].input-sm, + .input-group-sm > input[type="month"].form-control, + .input-group-sm > input[type="month"].input-group-addon, + .input-group-sm > .input-group-btn > input[type="month"].btn, .input-group-sm + input[type="month"] { + line-height: 30px; } + input[type="date"].input-lg, .input-group-lg > input[type="date"].form-control, + .input-group-lg > input[type="date"].input-group-addon, + .input-group-lg > .input-group-btn > input[type="date"].btn, .input-group-lg input[type="date"], + input[type="time"].input-lg, + .input-group-lg > input[type="time"].form-control, + .input-group-lg > input[type="time"].input-group-addon, + .input-group-lg > .input-group-btn > input[type="time"].btn, .input-group-lg + input[type="time"], + input[type="datetime-local"].input-lg, + .input-group-lg > input[type="datetime-local"].form-control, + .input-group-lg > input[type="datetime-local"].input-group-addon, + .input-group-lg > .input-group-btn > input[type="datetime-local"].btn, .input-group-lg + input[type="datetime-local"], + input[type="month"].input-lg, + .input-group-lg > input[type="month"].form-control, + .input-group-lg > input[type="month"].input-group-addon, + .input-group-lg > .input-group-btn > input[type="month"].btn, .input-group-lg + input[type="month"] { + line-height: 46px; } } +.form-group { + margin-bottom: 15px; } + +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; } + .radio label, + .checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; } + +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-left: -20px; + margin-top: 4px \9; } + +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; } + +.radio-inline, +.checkbox-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + vertical-align: middle; + font-weight: normal; + cursor: pointer; } + +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; } + +input[type="radio"][disabled], input[type="radio"].disabled, fieldset[disabled] input[type="radio"], +input[type="checkbox"][disabled], +input[type="checkbox"].disabled, fieldset[disabled] +input[type="checkbox"] { + cursor: not-allowed; } + +.radio-inline.disabled, fieldset[disabled] .radio-inline, +.checkbox-inline.disabled, fieldset[disabled] +.checkbox-inline { + cursor: not-allowed; } + +.radio.disabled label, fieldset[disabled] .radio label, +.checkbox.disabled label, fieldset[disabled] +.checkbox label { + cursor: not-allowed; } + +.form-control-static { + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; + min-height: 34px; } + .form-control-static.input-lg, .input-group-lg > .form-control-static.form-control, + .input-group-lg > .form-control-static.input-group-addon, + .input-group-lg > .input-group-btn > .form-control-static.btn, .form-control-static.input-sm, .input-group-sm > .form-control-static.form-control, + .input-group-sm > .form-control-static.input-group-addon, + .input-group-sm > .input-group-btn > .form-control-static.btn { + padding-left: 0; + padding-right: 0; } + +.input-sm, .input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; } + +select.input-sm, .input-group-sm > select.form-control, +.input-group-sm > select.input-group-addon, +.input-group-sm > .input-group-btn > select.btn { + height: 30px; + line-height: 30px; } + +textarea.input-sm, .input-group-sm > textarea.form-control, +.input-group-sm > textarea.input-group-addon, +.input-group-sm > .input-group-btn > textarea.btn, +select[multiple].input-sm, +.input-group-sm > select[multiple].form-control, +.input-group-sm > select[multiple].input-group-addon, +.input-group-sm > .input-group-btn > select[multiple].btn { + height: auto; } + +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; } +.form-group-sm select.form-control { + height: 30px; + line-height: 30px; } +.form-group-sm textarea.form-control, +.form-group-sm select[multiple].form-control { + height: auto; } +.form-group-sm .form-control-static { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + min-height: 32px; } + +.input-lg, .input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33333; + border-radius: 6px; } + +select.input-lg, .input-group-lg > select.form-control, +.input-group-lg > select.input-group-addon, +.input-group-lg > .input-group-btn > select.btn { + height: 46px; + line-height: 46px; } + +textarea.input-lg, .input-group-lg > textarea.form-control, +.input-group-lg > textarea.input-group-addon, +.input-group-lg > .input-group-btn > textarea.btn, +select[multiple].input-lg, +.input-group-lg > select[multiple].form-control, +.input-group-lg > select[multiple].input-group-addon, +.input-group-lg > .input-group-btn > select[multiple].btn { + height: auto; } + +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33333; + border-radius: 6px; } +.form-group-lg select.form-control { + height: 46px; + line-height: 46px; } +.form-group-lg textarea.form-control, +.form-group-lg select[multiple].form-control { + height: auto; } +.form-group-lg .form-control-static { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33333; + min-height: 38px; } + +.has-feedback { + position: relative; } + .has-feedback .form-control { + padding-right: 42.5px; } + +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; } + +.input-lg + .form-control-feedback, .input-group-lg > .form-control + .form-control-feedback, +.input-group-lg > .input-group-addon + .form-control-feedback, +.input-group-lg > .input-group-btn > .btn + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; } + +.input-sm + .form-control-feedback, .input-group-sm > .form-control + .form-control-feedback, +.input-group-sm > .input-group-addon + .form-control-feedback, +.input-group-sm > .input-group-btn > .btn + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; } + +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { + color: #3c763d; } +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } + .has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; } +.has-success .input-group-addon { + color: #3c763d; + border-color: #3c763d; + background-color: #dff0d8; } +.has-success .form-control-feedback { + color: #3c763d; } + +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { + color: #8a6d3b; } +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } + .has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; } +.has-warning .input-group-addon { + color: #8a6d3b; + border-color: #8a6d3b; + background-color: #fcf8e3; } +.has-warning .form-control-feedback { + color: #8a6d3b; } + +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { + color: #a94442; } +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } + .has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; } +.has-error .input-group-addon { + color: #a94442; + border-color: #a94442; + background-color: #f2dede; } +.has-error .form-control-feedback { + color: #a94442; } + +.has-feedback label ~ .form-control-feedback { + top: 25px; } +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; } + +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #a7a59d; } + +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; } + .form-inline .form-control-static { + display: inline-block; } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; } + .form-inline .input-group > .form-control { + width: 100%; } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; } + .form-inline .has-feedback .form-control-feedback { + top: 0; } } + +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + margin-top: 0; + margin-bottom: 0; + padding-top: 7px; } +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; } +.form-horizontal .form-group { + margin-left: -15px; + margin-right: -15px; } + .form-horizontal .form-group:before, .form-horizontal .form-group:after { + content: " "; + display: table; } + .form-horizontal .form-group:after { + clear: both; } +@media (min-width: 768px) { + .form-horizontal .control-label { + text-align: right; + margin-bottom: 0; + padding-top: 7px; } } +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; } +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.33333px; } } +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; } } + +.btn { + display: inline-block; + margin-bottom: 0; + font-weight: normal; + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + border: 1px solid transparent; + white-space: nowrap; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .btn:focus, .btn.focus, .btn:active:focus, .btn:active.focus, .btn.active:focus, .btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + .btn:hover, .btn:focus, .btn.focus { + color: #333; + text-decoration: none; } + .btn:active, .btn.active { + outline: 0; + background-image: none; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } + .btn.disabled, .btn[disabled], fieldset[disabled] .btn { + cursor: not-allowed; + pointer-events: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; } + +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; } + .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; } + .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle { + background-image: none; } + .btn-default.disabled, .btn-default.disabled:hover, .btn-default.disabled:focus, .btn-default.disabled.focus, .btn-default.disabled:active, .btn-default.disabled.active, .btn-default[disabled], .btn-default[disabled]:hover, .btn-default[disabled]:focus, .btn-default[disabled].focus, .btn-default[disabled]:active, .btn-default[disabled].active, fieldset[disabled] .btn-default, fieldset[disabled] .btn-default:hover, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:active, fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; } + .btn-default .badge { + color: #fff; + background-color: #333; } + +.btn-primary { + color: #fff; + background-color: #577492; + border-color: #4d6782; } + .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { + color: #fff; + background-color: #445b72; + border-color: #37495c; } + .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { + background-image: none; } + .btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus, .btn-primary[disabled]:active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active { + background-color: #577492; + border-color: #4d6782; } + .btn-primary .badge { + color: #577492; + background-color: #fff; } + +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; } + .btn-success:hover, .btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle { + color: #fff; + background-color: #449d44; + border-color: #398439; } + .btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle { + background-image: none; } + .btn-success.disabled, .btn-success.disabled:hover, .btn-success.disabled:focus, .btn-success.disabled.focus, .btn-success.disabled:active, .btn-success.disabled.active, .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled].focus, .btn-success[disabled]:active, .btn-success[disabled].active, fieldset[disabled] .btn-success, fieldset[disabled] .btn-success:hover, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success.focus, fieldset[disabled] .btn-success:active, fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; } + .btn-success .badge { + color: #5cb85c; + background-color: #fff; } + +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; } + .btn-info:hover, .btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; } + .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle { + background-image: none; } + .btn-info.disabled, .btn-info.disabled:hover, .btn-info.disabled:focus, .btn-info.disabled.focus, .btn-info.disabled:active, .btn-info.disabled.active, .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled].focus, .btn-info[disabled]:active, .btn-info[disabled].active, fieldset[disabled] .btn-info, fieldset[disabled] .btn-info:hover, fieldset[disabled] .btn-info:focus, fieldset[disabled] .btn-info.focus, fieldset[disabled] .btn-info:active, fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; } + .btn-info .badge { + color: #5bc0de; + background-color: #fff; } + +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; } + .btn-warning:hover, .btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle { + color: #fff; + background-color: #ec971f; + border-color: #d58512; } + .btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle { + background-image: none; } + .btn-warning.disabled, .btn-warning.disabled:hover, .btn-warning.disabled:focus, .btn-warning.disabled.focus, .btn-warning.disabled:active, .btn-warning.disabled.active, .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled].focus, .btn-warning[disabled]:active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning, fieldset[disabled] .btn-warning:hover, fieldset[disabled] .btn-warning:focus, fieldset[disabled] .btn-warning.focus, fieldset[disabled] .btn-warning:active, fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; } + .btn-warning .badge { + color: #f0ad4e; + background-color: #fff; } + +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; } + .btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; } + .btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle { + background-image: none; } + .btn-danger.disabled, .btn-danger.disabled:hover, .btn-danger.disabled:focus, .btn-danger.disabled.focus, .btn-danger.disabled:active, .btn-danger.disabled.active, .btn-danger[disabled], .btn-danger[disabled]:hover, .btn-danger[disabled]:focus, .btn-danger[disabled].focus, .btn-danger[disabled]:active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger, fieldset[disabled] .btn-danger:hover, fieldset[disabled] .btn-danger:focus, fieldset[disabled] .btn-danger.focus, fieldset[disabled] .btn-danger:active, fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; } + .btn-danger .badge { + color: #d9534f; + background-color: #fff; } + +.btn-link { + color: #577492; + font-weight: normal; + border-radius: 0; } + .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; } + .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { + border-color: transparent; } + .btn-link:hover, .btn-link:focus { + color: #3a4e62; + text-decoration: underline; + background-color: transparent; } + .btn-link[disabled]:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:hover, fieldset[disabled] .btn-link:focus { + color: #AA9A66; + text-decoration: none; } + +.btn-lg, .btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33333; + border-radius: 6px; } + +.btn-sm, .btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; } + +.btn-xs, .btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; } + +.btn-block { + display: block; + width: 100%; } + +.btn-block + .btn-block { + margin-top: 5px; } + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; } + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; } + .fade.in { + opacity: 1; } + +.collapse { + display: none; } + .collapse.in { + display: block; } + +tr.collapse.in { + display: table-row; } + +tbody.collapse.in { + display: table-row-group; } + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-property: height, visibility; + transition-property: height, visibility; + -webkit-transition-duration: 0.35s; + transition-duration: 0.35s; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } + +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-right: 4px solid transparent; + border-left: 4px solid transparent; } + +.dropup, +.dropdown { + position: relative; } + +.dropdown-toggle:focus { + outline: 0; } + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + font-size: 14px; + text-align: left; + background-color: #332c2f; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + background-clip: padding-box; } + .dropdown-menu.pull-right { + right: 0; + left: auto; } + .dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; } + .dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857; + color: #c5ba97; + white-space: nowrap; } + +.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { + text-decoration: none; + color: #5a5851; + background-color: #f5f5f5; } + +.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + outline: 0; + background-color: #577492; } + +.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { + color: #AA9A66; } +.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: not-allowed; } + +.open > .dropdown-menu { + display: block; } +.open > a { + outline: 0; } + +.dropdown-menu-right { + left: auto; + right: 0; } + +.dropdown-menu-left { + left: 0; + right: auto; } + +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857; + color: #AA9A66; + white-space: nowrap; } + +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 990; } + +.pull-right > .dropdown-menu { + right: 0; + left: auto; } + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid; + content: ""; } +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; } + +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; } + .navbar-right .dropdown-menu-left { + left: 0; + right: auto; } } +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; } + .btn-group > .btn, + .btn-group-vertical > .btn { + position: relative; + float: left; } + .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active, + .btn-group-vertical > .btn:hover, + .btn-group-vertical > .btn:focus, + .btn-group-vertical > .btn:active, + .btn-group-vertical > .btn.active { + z-index: 2; } + +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; } + +.btn-toolbar { + margin-left: -5px; } + .btn-toolbar:before, .btn-toolbar:after { + content: " "; + display: table; } + .btn-toolbar:after { + clear: both; } + .btn-toolbar .btn-group, + .btn-toolbar .input-group { + float: left; } + .btn-toolbar > .btn, + .btn-toolbar > .btn-group, + .btn-toolbar > .input-group { + margin-left: 5px; } + +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; } + +.btn-group > .btn:first-child { + margin-left: 0; } + .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-bottom-right-radius: 0; + border-top-right-radius: 0; } + +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } + +.btn-group > .btn-group { + float: left; } + +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; } + +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-top-right-radius: 0; } + +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; } + +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; } + +.btn-group > .btn-lg + .dropdown-toggle, .btn-group-lg.btn-group > .btn + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; } + +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } + .btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; } + +.btn .caret { + margin-left: 0; } + +.btn-lg .caret, .btn-group-lg > .btn .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; } + +.dropup .btn-lg .caret, .dropup .btn-group-lg > .btn .caret { + border-width: 0 5px 5px; } + +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; } +.btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { + content: " "; + display: table; } +.btn-group-vertical > .btn-group:after { + clear: both; } +.btn-group-vertical > .btn-group > .btn { + float: none; } +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; } + +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; } +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-top-left-radius: 0; } + +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; } + +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } + +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; } + +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; } + .btn-group-justified > .btn, + .btn-group-justified > .btn-group { + float: none; + display: table-cell; + width: 1%; } + .btn-group-justified > .btn-group .btn { + width: 100%; } + .btn-group-justified > .btn-group .dropdown-menu { + left: auto; } + +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; } + +.input-group { + position: relative; + display: table; + border-collapse: separate; } + .input-group[class*="col-"] { + float: none; + padding-left: 0; + padding-right: 0; } + .input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; } + +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; } + .input-group-addon:not(:first-child):not(:last-child), + .input-group-btn:not(:first-child):not(:last-child), + .input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; } + +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; } + +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #67655d; + text-align: center; + background-color: #A8A8A1; + border: 1px solid #ccc; + border-radius: 4px; } + .input-group-addon.input-sm, + .input-group-sm > .input-group-addon, + .input-group-sm > .input-group-btn > .input-group-addon.btn { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; } + .input-group-addon.input-lg, + .input-group-lg > .input-group-addon, + .input-group-lg > .input-group-btn > .input-group-addon.btn { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; } + .input-group-addon input[type="radio"], + .input-group-addon input[type="checkbox"] { + margin-top: 0; } + +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-top-right-radius: 0; } + +.input-group-addon:first-child { + border-right: 0; } + +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } + +.input-group-addon:last-child { + border-left: 0; } + +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; } + .input-group-btn > .btn { + position: relative; } + .input-group-btn > .btn + .btn { + margin-left: -1px; } + .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { + z-index: 2; } + .input-group-btn:first-child > .btn, + .input-group-btn:first-child > .btn-group { + margin-right: -1px; } + .input-group-btn:last-child > .btn, + .input-group-btn:last-child > .btn-group { + margin-left: -1px; } + +.nav { + margin-bottom: 0; + padding-left: 0; + list-style: none; } + .nav:before, .nav:after { + content: " "; + display: table; } + .nav:after { + clear: both; } + .nav > li { + position: relative; + display: block; } + .nav > li > a { + position: relative; + display: block; + padding: 10px 15px; } + .nav > li > a:hover, .nav > li > a:focus { + text-decoration: none; + background-color: #A8A8A1; } + .nav > li.disabled > a { + color: #AA9A66; } + .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { + color: #AA9A66; + text-decoration: none; + background-color: transparent; + cursor: not-allowed; } + .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { + background-color: #A8A8A1; + border-color: #577492; } + .nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; } + .nav > li > a > img { + max-width: none; } + +.nav-tabs { + border-bottom: 1px solid #fff; } + .nav-tabs > li { + float: left; + margin-bottom: -1px; } + .nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; } + .nav-tabs > li > a:hover { + border-color: #A8A8A1 #A8A8A1 #ddd; } + .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { + color: #67655d; + background-color: #D4D8D1; + border: 1px solid #fff; + border-bottom-color: transparent; + cursor: default; } + +.nav-pills > li { + float: left; } + .nav-pills > li > a { + border-radius: 4px; } + .nav-pills > li + li { + margin-left: 2px; } + .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { + color: #fff; + background-color: #577492; } + +.nav-stacked > li { + float: none; } + .nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; } + +.nav-justified, .nav-tabs.nav-justified { + width: 100%; } + .nav-justified > li, .nav-tabs.nav-justified > li { + float: none; } + .nav-justified > li > a, .nav-tabs.nav-justified > li > a { + text-align: center; + margin-bottom: 5px; } + .nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; } + @media (min-width: 768px) { + .nav-justified > li, .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; } + .nav-justified > li > a, .nav-tabs.nav-justified > li > a { + margin-bottom: 0; } } + +.nav-tabs-justified, .nav-tabs.nav-justified { + border-bottom: 0; } + .nav-tabs-justified > li > a, .nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; } + .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus, + .nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; } + @media (min-width: 768px) { + .nav-tabs-justified > li > a, .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; } + .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #D4D8D1; } } + +.tab-content > .tab-pane { + display: none; } +.tab-content > .active { + display: block; } + +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-right-radius: 0; + border-top-left-radius: 0; } + +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; } + .navbar:before, .navbar:after { + content: " "; + display: table; } + .navbar:after { + clear: both; } + @media (min-width: 768px) { + .navbar { + border-radius: 4px; } } + +.navbar-header:before, .navbar-header:after { + content: " "; + display: table; } +.navbar-header:after { + clear: both; } +@media (min-width: 768px) { + .navbar-header { + float: left; } } + +.navbar-collapse { + overflow-x: visible; + padding-right: 15px; + padding-left: 15px; + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); + -webkit-overflow-scrolling: touch; } + .navbar-collapse:before, .navbar-collapse:after { + content: " "; + display: table; } + .navbar-collapse:after { + clear: both; } + .navbar-collapse.in { + overflow-y: auto; } + @media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + box-shadow: none; } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; } + .navbar-collapse.in { + overflow-y: visible; } + .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { + padding-left: 0; + padding-right: 0; } } + +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; } + @media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; } } + +.container > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-header, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; } + @media (min-width: 768px) { + .container > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-header, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; } } + +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; } + @media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; } } + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; } + @media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; } } + +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; } + +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; } + +.navbar-brand { + float: left; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; + height: 50px; } + .navbar-brand:hover, .navbar-brand:focus { + text-decoration: none; } + .navbar-brand > img { + display: block; } + @media (min-width: 768px) { + .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { + margin-left: -15px; } } + +.navbar-toggle { + position: relative; + float: right; + margin-right: 15px; + padding: 9px 10px; + margin-top: 8px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; } + .navbar-toggle:focus { + outline: 0; } + .navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; } + .navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; } + @media (min-width: 768px) { + .navbar-toggle { + display: none; } } + +.navbar-nav { + margin: 7.5px -15px; } + .navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; } + @media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + box-shadow: none; } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; } + .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; } } + @media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; } + .navbar-nav > li { + float: left; } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; } } + +.navbar-form { + margin-left: -15px; + margin-right: -15px; + padding: 10px 15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + margin-top: 8px; + margin-bottom: 8px; } + @media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; } + .navbar-form .form-control-static { + display: inline-block; } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; } + .navbar-form .input-group > .form-control { + width: 100%; } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; } + .navbar-form .has-feedback .form-control-feedback { + top: 0; } } + @media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; } + .navbar-form .form-group:last-child { + margin-bottom: 0; } } + @media (min-width: 768px) { + .navbar-form { + width: auto; + border: 0; + margin-left: 0; + margin-right: 0; + padding-top: 0; + padding-bottom: 0; + -webkit-box-shadow: none; + box-shadow: none; } } + +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-right-radius: 0; + border-top-left-radius: 0; } + +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } + +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; } + .navbar-btn.btn-sm, .btn-group-sm > .navbar-btn.btn { + margin-top: 10px; + margin-bottom: 10px; } + .navbar-btn.btn-xs, .btn-group-xs > .navbar-btn.btn { + margin-top: 14px; + margin-bottom: 14px; } + +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; } + @media (min-width: 768px) { + .navbar-text { + float: left; + margin-left: 15px; + margin-right: 15px; } } + +@media (min-width: 768px) { + .navbar-left { + float: left !important; } + + .navbar-right { + float: right !important; + margin-right: -15px; } + .navbar-right ~ .navbar-right { + margin-right: 0; } } +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; } + .navbar-default .navbar-brand { + color: #777; } + .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; } + .navbar-default .navbar-text { + color: #777; } + .navbar-default .navbar-nav > li > a { + color: #777; } + .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; } + .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; } + .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; } + .navbar-default .navbar-toggle { + border-color: #ddd; } + .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { + background-color: #ddd; } + .navbar-default .navbar-toggle .icon-bar { + background-color: #888; } + .navbar-default .navbar-collapse, + .navbar-default .navbar-form { + border-color: #e7e7e7; } + .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { + background-color: #e7e7e7; + color: #555; } + @media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; } } + .navbar-default .navbar-link { + color: #777; } + .navbar-default .navbar-link:hover { + color: #333; } + .navbar-default .btn-link { + color: #777; } + .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { + color: #333; } + .navbar-default .btn-link[disabled]:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:hover, fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; } + +.navbar-default { + background-color: #332C2F; + border-color: #181416; } + .navbar-default .navbar-brand { + color: #c5ba97; } + .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { + color: #fff; + background-color: transparent; } + .navbar-default .navbar-text { + color: #c5ba97; } + .navbar-default .navbar-nav > li > a { + color: #c5ba97; } + .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; } + .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { + color: #fff; + background-color: #181416; } + .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; } + .navbar-default .navbar-toggle { + border-color: #333; } + .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { + background-color: #333; } + .navbar-default .navbar-toggle .icon-bar { + background-color: #fff; } + .navbar-default .navbar-collapse, + .navbar-default .navbar-form { + border-color: #201b1d; } + .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { + background-color: #181416; + color: #fff; } + @media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #181416; } + .navbar-default .navbar-nav .open .dropdown-menu .divider { + background-color: #181416; } + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #c5ba97; } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #181416; } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; } } + .navbar-default .navbar-link { + color: #c5ba97; } + .navbar-default .navbar-link:hover { + color: #fff; } + .navbar-default .btn-link { + color: #c5ba97; } + .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { + color: #fff; } + .navbar-default .btn-link[disabled]:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:hover, fieldset[disabled] .navbar-default .btn-link:focus { + color: #444; } + +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; } + .breadcrumb > li { + display: inline-block; } + .breadcrumb > li + li:before { + content: "/ "; + padding: 0 5px; + color: #ccc; } + .breadcrumb > .active { + color: #AA9A66; } + +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; } + .pagination > li { + display: inline; } + .pagination > li > a, + .pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + line-height: 1.42857; + text-decoration: none; + color: #577492; + background-color: #fff; + border: 1px solid #ddd; + margin-left: -1px; } + .pagination > li:first-child > a, + .pagination > li:first-child > span { + margin-left: 0; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; } + .pagination > li:last-child > a, + .pagination > li:last-child > span { + border-bottom-right-radius: 4px; + border-top-right-radius: 4px; } + .pagination > li > a:hover, .pagination > li > a:focus, + .pagination > li > span:hover, + .pagination > li > span:focus { + color: #3a4e62; + background-color: #A8A8A1; + border-color: #ddd; } + .pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, + .pagination > .active > span, + .pagination > .active > span:hover, + .pagination > .active > span:focus { + z-index: 2; + color: #fff; + background-color: #577492; + border-color: #577492; + cursor: default; } + .pagination > .disabled > span, + .pagination > .disabled > span:hover, + .pagination > .disabled > span:focus, + .pagination > .disabled > a, + .pagination > .disabled > a:hover, + .pagination > .disabled > a:focus { + color: #AA9A66; + background-color: #fff; + border-color: #ddd; + cursor: not-allowed; } + +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; } +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-bottom-left-radius: 6px; + border-top-left-radius: 6px; } +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-bottom-right-radius: 6px; + border-top-right-radius: 6px; } + +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; } +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } + +.pager { + padding-left: 0; + margin: 20px 0; + list-style: none; + text-align: center; } + .pager:before, .pager:after { + content: " "; + display: table; } + .pager:after { + clear: both; } + .pager li { + display: inline; } + .pager li > a, + .pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; } + .pager li > a:hover, + .pager li > a:focus { + text-decoration: none; + background-color: #A8A8A1; } + .pager .next > a, + .pager .next > span { + float: right; } + .pager .previous > a, + .pager .previous > span { + float: left; } + .pager .disabled > a, + .pager .disabled > a:hover, + .pager .disabled > a:focus, + .pager .disabled > span { + color: #AA9A66; + background-color: #fff; + cursor: not-allowed; } + +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; } + .label:empty { + display: none; } + .btn .label { + position: relative; + top: -1px; } + +a.label:hover, a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; } + +.label-default { + background-color: #AA9A66; } + .label-default[href]:hover, .label-default[href]:focus { + background-color: #8e7f4f; } + +.label-primary { + background-color: #577492; } + .label-primary[href]:hover, .label-primary[href]:focus { + background-color: #445b72; } + +.label-success { + background-color: #5cb85c; } + .label-success[href]:hover, .label-success[href]:focus { + background-color: #449d44; } + +.label-info { + background-color: #5bc0de; } + .label-info[href]:hover, .label-info[href]:focus { + background-color: #31b0d5; } + +.label-warning { + background-color: #f0ad4e; } + .label-warning[href]:hover, .label-warning[href]:focus { + background-color: #ec971f; } + +.label-danger { + background-color: #d9534f; } + .label-danger[href]:hover, .label-danger[href]:focus { + background-color: #c9302c; } + +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + color: #fff; + line-height: 1; + vertical-align: baseline; + white-space: nowrap; + text-align: center; + background-color: #AA9A66; + border-radius: 10px; } + .badge:empty { + display: none; } + .btn .badge { + position: relative; + top: -1px; } + .btn-xs .badge, .btn-group-xs > .btn .badge, .btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; } + .list-group-item.active > .badge, .nav-pills > .active > a > .badge { + color: #577492; + background-color: #fff; } + .list-group-item > .badge { + float: right; } + .list-group-item > .badge + .badge { + margin-right: 5px; } + .nav-pills > li > a > .badge { + margin-left: 3px; } + +a.badge:hover, a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; } + +.jumbotron { + padding: 30px 15px; + margin-bottom: 30px; + color: inherit; + background-color: #A8A8A1; } + .jumbotron h1, + .jumbotron .h1 { + color: inherit; } + .jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; } + .jumbotron > hr { + border-top-color: #8f8f87; } + .container .jumbotron, .container-fluid .jumbotron { + border-radius: 6px; } + .jumbotron .container { + max-width: 100%; } + @media screen and (min-width: 768px) { + .jumbotron { + padding: 48px 0; } + .container .jumbotron, .container-fluid .jumbotron { + padding-left: 60px; + padding-right: 60px; } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; } } + +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857; + background-color: #D4D8D1; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border 0.2s ease-in-out; + -o-transition: border 0.2s ease-in-out; + transition: border 0.2s ease-in-out; } + .thumbnail > img, + .thumbnail a > img { + display: block; + max-width: 100%; + height: auto; + margin-left: auto; + margin-right: auto; } + .thumbnail .caption { + padding: 9px; + color: #67655D; } + +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #577492; } + +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; } + .alert h4 { + margin-top: 0; + color: inherit; } + .alert .alert-link { + font-weight: bold; } + .alert > p, + .alert > ul { + margin-bottom: 0; } + .alert > p + p { + margin-top: 5px; } + +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; } + .alert-dismissable .close, + .alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; } + +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #3c763d; } + .alert-success hr { + border-top-color: #c9e2b3; } + .alert-success .alert-link { + color: #2b542c; } + +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #31708f; } + .alert-info hr { + border-top-color: #a6e1ec; } + .alert-info .alert-link { + color: #245269; } + +.alert-warning { + background-color: #fcf8e3; + border-color: #faebcc; + color: #8a6d3b; } + .alert-warning hr { + border-top-color: #f7e1b5; } + .alert-warning .alert-link { + color: #66512c; } + +.alert-danger { + background-color: #f2dede; + border-color: #ebccd1; + color: #a94442; } + .alert-danger hr { + border-top-color: #e4b9c0; } + .alert-danger .alert-link { + color: #843534; } + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; } + to { + background-position: 0 0; } } +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; } + to { + background-position: 0 0; } } +.progress { + overflow: hidden; + height: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } + +.progress-bar { + float: left; + width: 0%; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #577492; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; } + +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 40px 40px; } + +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; } + +.progress-bar-success { + background-color: #5cb85c; } + .progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } + +.progress-bar-info { + background-color: #5bc0de; } + .progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } + +.progress-bar-warning { + background-color: #f0ad4e; } + .progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } + +.progress-bar-danger { + background-color: #d9534f; } + .progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } + +.media { + margin-top: 15px; } + .media:first-child { + margin-top: 0; } + +.media, +.media-body { + zoom: 1; + overflow: hidden; } + +.media-body { + width: 10000px; } + +.media-object { + display: block; } + +.media-right, +.media > .pull-right { + padding-left: 10px; } + +.media-left, +.media > .pull-left { + padding-right: 10px; } + +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; } + +.media-middle { + vertical-align: middle; } + +.media-bottom { + vertical-align: bottom; } + +.media-heading { + margin-top: 0; + margin-bottom: 5px; } + +.media-list { + padding-left: 0; + list-style: none; } + +.list-group { + margin-bottom: 20px; + padding-left: 0; } + +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; } + .list-group-item:first-child { + border-top-right-radius: 4px; + border-top-left-radius: 4px; } + .list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; } + +a.list-group-item { + color: #555; } + a.list-group-item .list-group-item-heading { + color: #333; } + a.list-group-item:hover, a.list-group-item:focus { + text-decoration: none; + color: #555; + background-color: #f5f5f5; } + +.list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { + background-color: #A8A8A1; + color: #AA9A66; + cursor: not-allowed; } + .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading { + color: inherit; } + .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text { + color: #AA9A66; } +.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #577492; + border-color: #577492; } + .list-group-item.active .list-group-item-heading, + .list-group-item.active .list-group-item-heading > small, + .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading, + .list-group-item.active:hover .list-group-item-heading > small, + .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading, + .list-group-item.active:focus .list-group-item-heading > small, + .list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; } + .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text { + color: #d1dae4; } + +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; } + +a.list-group-item-success { + color: #3c763d; } + a.list-group-item-success .list-group-item-heading { + color: inherit; } + a.list-group-item-success:hover, a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; } + a.list-group-item-success.active, a.list-group-item-success.active:hover, a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; } + +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; } + +a.list-group-item-info { + color: #31708f; } + a.list-group-item-info .list-group-item-heading { + color: inherit; } + a.list-group-item-info:hover, a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; } + a.list-group-item-info.active, a.list-group-item-info.active:hover, a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; } + +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; } + +a.list-group-item-warning { + color: #8a6d3b; } + a.list-group-item-warning .list-group-item-heading { + color: inherit; } + a.list-group-item-warning:hover, a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; } + a.list-group-item-warning.active, a.list-group-item-warning.active:hover, a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; } + +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; } + +a.list-group-item-danger { + color: #a94442; } + a.list-group-item-danger .list-group-item-heading { + color: inherit; } + a.list-group-item-danger:hover, a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; } + a.list-group-item-danger.active, a.list-group-item-danger.active:hover, a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; } + +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; } + +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; } + +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); } + +.panel-body { + padding: 15px; } + .panel-body:before, .panel-body:after { + content: " "; + display: table; } + .panel-body:after { + clear: both; } + +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; } + .panel-heading > .dropdown .dropdown-toggle { + color: inherit; } + +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; } + .panel-title > a, + .panel-title > small, + .panel-title > .small, + .panel-title > small > a, + .panel-title > .small > a { + color: inherit; } + +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; } + +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; } + .panel > .list-group .list-group-item, + .panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; } + .panel > .list-group:first-child .list-group-item:first-child, + .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-right-radius: 3px; + border-top-left-radius: 3px; } + .panel > .list-group:last-child .list-group-item:last-child, + .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; } + +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; } + +.list-group + .panel-footer { + border-top-width: 0; } + +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; } + .panel > .table caption, + .panel > .table-responsive > .table caption, + .panel > .panel-collapse > .table caption { + padding-left: 15px; + padding-right: 15px; } +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-right-radius: 3px; + border-top-left-radius: 3px; } + .panel > .table:first-child > thead:first-child > tr:first-child, + .panel > .table:first-child > tbody:first-child > tr:first-child, + .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, + .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; } + .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, + .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, + .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, + .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, + .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, + .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, + .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, + .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; } + .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, + .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, + .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, + .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, + .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, + .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, + .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, + .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; } +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; } + .panel > .table:last-child > tbody:last-child > tr:last-child, + .panel > .table:last-child > tfoot:last-child > tr:last-child, + .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, + .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; } + .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, + .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, + .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, + .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, + .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, + .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, + .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, + .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; } + .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, + .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, + .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, + .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, + .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, + .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, + .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, + .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; } +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #67655D; } +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; } +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; } + .panel > .table-bordered > thead > tr > th:first-child, + .panel > .table-bordered > thead > tr > td:first-child, + .panel > .table-bordered > tbody > tr > th:first-child, + .panel > .table-bordered > tbody > tr > td:first-child, + .panel > .table-bordered > tfoot > tr > th:first-child, + .panel > .table-bordered > tfoot > tr > td:first-child, + .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, + .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, + .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, + .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, + .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; } + .panel > .table-bordered > thead > tr > th:last-child, + .panel > .table-bordered > thead > tr > td:last-child, + .panel > .table-bordered > tbody > tr > th:last-child, + .panel > .table-bordered > tbody > tr > td:last-child, + .panel > .table-bordered > tfoot > tr > th:last-child, + .panel > .table-bordered > tfoot > tr > td:last-child, + .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, + .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, + .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, + .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, + .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; } + .panel > .table-bordered > thead > tr:first-child > td, + .panel > .table-bordered > thead > tr:first-child > th, + .panel > .table-bordered > tbody > tr:first-child > td, + .panel > .table-bordered > tbody > tr:first-child > th, + .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, + .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, + .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, + .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; } + .panel > .table-bordered > tbody > tr:last-child > td, + .panel > .table-bordered > tbody > tr:last-child > th, + .panel > .table-bordered > tfoot > tr:last-child > td, + .panel > .table-bordered > tfoot > tr:last-child > th, + .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, + .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, + .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, + .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; } +.panel > .table-responsive { + border: 0; + margin-bottom: 0; } + +.panel-group { + margin-bottom: 20px; } + .panel-group .panel { + margin-bottom: 0; + border-radius: 4px; } + .panel-group .panel + .panel { + margin-top: 5px; } + .panel-group .panel-heading { + border-bottom: 0; } + .panel-group .panel-heading + .panel-collapse > .panel-body, + .panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; } + .panel-group .panel-footer { + border-top: 0; } + .panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; } + +.panel-default { + border-color: #ddd; } + .panel-default > .panel-heading { + color: #67655D; + background-color: #f5f5f5; + border-color: #ddd; } + .panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; } + .panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #67655D; } + .panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; } + +.panel-primary { + border-color: #577492; } + .panel-primary > .panel-heading { + color: #fff; + background-color: #577492; + border-color: #577492; } + .panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #577492; } + .panel-primary > .panel-heading .badge { + color: #577492; + background-color: #fff; } + .panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #577492; } + +.panel-success { + border-color: #d6e9c6; } + .panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; } + .panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; } + .panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; } + .panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; } + +.panel-info { + border-color: #bce8f1; } + .panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; } + .panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; } + .panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; } + .panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; } + +.panel-warning { + border-color: #faebcc; } + .panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; } + .panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; } + .panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; } + .panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; } + +.panel-danger { + border-color: #ebccd1; } + .panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; } + .panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; } + .panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; } + .panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; } + +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; } + .embed-responsive .embed-responsive-item, + .embed-responsive iframe, + .embed-responsive embed, + .embed-responsive object, + .embed-responsive video { + position: absolute; + top: 0; + left: 0; + bottom: 0; + height: 100%; + width: 100%; + border: 0; } + +.embed-responsive-16by9 { + padding-bottom: 56.25%; } + +.embed-responsive-4by3 { + padding-bottom: 75%; } + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } + .well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); } + +.well-lg { + padding: 24px; + border-radius: 6px; } + +.well-sm { + padding: 9px; + border-radius: 3px; } + +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + opacity: 0.2; + filter: alpha(opacity=20); } + .close:hover, .close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + opacity: 0.5; + filter: alpha(opacity=50); } + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; } + +.modal-open { + overflow: hidden; } + +.modal { + display: none; + overflow: hidden; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + -webkit-overflow-scrolling: touch; + outline: 0; } + .modal.fade .modal-dialog { + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); + -webkit-transition: -webkit-transform 0.3s ease-out; + -moz-transition: -moz-transform 0.3s ease-out; + -o-transition: -o-transform 0.3s ease-out; + transition: transform 0.3s ease-out; } + .modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); } + +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; } + +.modal-dialog { + position: relative; + width: auto; + margin: 10px; } + +.modal-content { + position: relative; + background-color: #d4d8d1; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + background-clip: padding-box; + outline: 0; } + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; } + .modal-backdrop.fade { + opacity: 0; + filter: alpha(opacity=0); } + .modal-backdrop.in { + opacity: 0.5; + filter: alpha(opacity=50); } + +.modal-header { + padding: 15px; + border-bottom: 1px solid #e5e5e5; + min-height: 16.42857px; } + +.modal-header .close { + margin-top: -2px; } + +.modal-title { + margin: 0; + line-height: 1.42857; } + +.modal-body { + position: relative; + padding: 15px; } + +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; } + .modal-footer:before, .modal-footer:after { + content: " "; + display: table; } + .modal-footer:after { + clear: both; } + .modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; } + .modal-footer .btn-group .btn + .btn { + margin-left: -1px; } + .modal-footer .btn-block + .btn-block { + margin-left: 0; } + +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; } + +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; } + + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } + + .modal-sm { + width: 300px; } } +@media (min-width: 992px) { + .modal-lg { + width: 900px; } } +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-weight: normal; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); } + .tooltip.in { + opacity: 0.9; + filter: alpha(opacity=90); } + .tooltip.top { + margin-top: -3px; + padding: 5px 0; } + .tooltip.right { + margin-left: 3px; + padding: 0 5px; } + .tooltip.bottom { + margin-top: 3px; + padding: 5px 0; } + .tooltip.left { + margin-left: -3px; + padding: 0 5px; } + +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; } + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; } + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; } +.tooltip.top-left .tooltip-arrow { + bottom: 0; + right: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; } +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; } +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; } +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; } +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; } +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; } +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; } + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight: normal; + line-height: 1.42857; + text-align: left; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; } + .popover.top { + margin-top: -10px; } + .popover.right { + margin-left: 10px; } + .popover.bottom { + margin-top: 10px; } + .popover.left { + margin-left: -10px; } + +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; } + +.popover-content { + padding: 9px 14px; } + +.popover > .arrow, .popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; } + +.popover > .arrow { + border-width: 11px; } + +.popover > .arrow:after { + border-width: 10px; + content: ""; } + +.popover.top > .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; } + .popover.top > .arrow:after { + content: " "; + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #fff; } +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999999; + border-right-color: rgba(0, 0, 0, 0.25); } + .popover.right > .arrow:after { + content: " "; + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #fff; } +.popover.bottom > .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; } + .popover.bottom > .arrow:after { + content: " "; + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #fff; } +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999999; + border-left-color: rgba(0, 0, 0, 0.25); } + .popover.left > .arrow:after { + content: " "; + right: 1px; + border-right-width: 0; + border-left-color: #fff; + bottom: -10px; } + +.carousel { + position: relative; } + +.carousel-inner { + position: relative; + overflow: hidden; + width: 100%; } + .carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; } + .carousel-inner > .item > img, + .carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; + line-height: 1; } + @media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform 0.6s ease-in-out; + -moz-transition: -moz-transform 0.6s ease-in-out; + -o-transition: -o-transform 0.6s ease-in-out; + transition: transform 0.6s ease-in-out; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + -moz-perspective: 1000; + perspective: 1000; } + .carousel-inner > .item.next, .carousel-inner > .item.active.right { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + left: 0; } + .carousel-inner > .item.prev, .carousel-inner > .item.active.left { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + left: 0; } + .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + left: 0; } } + .carousel-inner > .active, + .carousel-inner > .next, + .carousel-inner > .prev { + display: block; } + .carousel-inner > .active { + left: 0; } + .carousel-inner > .next, + .carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; } + .carousel-inner > .next { + left: 100%; } + .carousel-inner > .prev { + left: -100%; } + .carousel-inner > .next.left, + .carousel-inner > .prev.right { + left: 0; } + .carousel-inner > .active.left { + left: -100%; } + .carousel-inner > .active.right { + left: 100%; } + +.carousel-control { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 15%; + opacity: 0.5; + filter: alpha(opacity=50); + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } + .carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } + .carousel-control.right { + left: auto; + right: 0; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } + .carousel-control:hover, .carousel-control:focus { + outline: 0; + color: #fff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); } + .carousel-control .icon-prev, + .carousel-control .icon-next, + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; } + .carousel-control .icon-prev, + .carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; } + .carousel-control .icon-next, + .carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; } + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + line-height: 1; + font-family: serif; } + .carousel-control .icon-prev:before { + content: '\2039'; } + .carousel-control .icon-next:before { + content: '\203a'; } + +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + margin-left: -30%; + padding-left: 0; + list-style: none; + text-align: center; } + .carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + border: 1px solid #fff; + border-radius: 10px; + cursor: pointer; + background-color: #000 \9; + background-color: transparent; } + .carousel-indicators .active { + margin: 0; + width: 12px; + height: 12px; + background-color: #fff; } + +.carousel-caption { + position: absolute; + left: 15%; + right: 15%; + bottom: 20px; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } + .carousel-caption .btn { + text-shadow: none; } + +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; } + + .carousel-caption { + left: 20%; + right: 20%; + padding-bottom: 30px; } + + .carousel-indicators { + bottom: 20px; } } +.clearfix:before, .clearfix:after { + content: " "; + display: table; } +.clearfix:after { + clear: both; } + +.center-block { + display: block; + margin-left: auto; + margin-right: auto; } + +.pull-right { + float: right !important; } + +.pull-left { + float: left !important; } + +.hide { + display: none !important; } + +.show { + display: block !important; } + +.invisible { + visibility: hidden; } + +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; } + +.hidden { + display: none !important; } + +.affix { + position: fixed; } + +@-ms-viewport { + width: device-width; } +.visible-xs { + display: none !important; } + +.visible-sm { + display: none !important; } + +.visible-md { + display: none !important; } + +.visible-lg { + display: none !important; } + +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; } + +@media (max-width: 767px) { + .visible-xs { + display: block !important; } + + table.visible-xs { + display: table; } + + tr.visible-xs { + display: table-row !important; } + + th.visible-xs, + td.visible-xs { + display: table-cell !important; } } +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; } } + +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; } } + +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; } } + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; } + + table.visible-sm { + display: table; } + + tr.visible-sm { + display: table-row !important; } + + th.visible-sm, + td.visible-sm { + display: table-cell !important; } } +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; } } + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; } } + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; } + + table.visible-md { + display: table; } + + tr.visible-md { + display: table-row !important; } + + th.visible-md, + td.visible-md { + display: table-cell !important; } } +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; } } + +@media (min-width: 1200px) { + .visible-lg { + display: block !important; } + + table.visible-lg { + display: table; } + + tr.visible-lg { + display: table-row !important; } + + th.visible-lg, + td.visible-lg { + display: table-cell !important; } } +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; } } + +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; } } + +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; } } + +@media (max-width: 767px) { + .hidden-xs { + display: none !important; } } +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; } } +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; } } +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; } } +.visible-print { + display: none !important; } + +@media print { + .visible-print { + display: block !important; } + + table.visible-print { + display: table; } + + tr.visible-print { + display: table-row !important; } + + th.visible-print, + td.visible-print { + display: table-cell !important; } } +.visible-print-block { + display: none !important; } + @media print { + .visible-print-block { + display: block !important; } } + +.visible-print-inline { + display: none !important; } + @media print { + .visible-print-inline { + display: inline !important; } } + +.visible-print-inline-block { + display: none !important; } + @media print { + .visible-print-inline-block { + display: inline-block !important; } } + +@media print { + .hidden-print { + display: none !important; } } From 7dfebac3f507099065631a6e2e54de0543ae5fc3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 2 Apr 2017 08:37:20 -0700 Subject: [PATCH 64/66] Admin navigation styling. --- e107_admin/newspost.php | 8 ++++---- e107_themes/bootstrap3/admin_style.css | 2 +- e107_themes/bootstrap3/admin_template.php | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index a5ba5d332..070390bd2 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -1118,14 +1118,14 @@ class news_admin_ui extends e_admin_ui
".NWSLAN_88." - ".$frm->select('newsposts', $this->_optrange(50, false), $pref['newsposts'], 'class=tbox')." + ".$frm->select('newsposts', $this->_optrange(50, false), $pref['newsposts'])."
".LAN_NEWS_91." - ".$frm->select('news_list_limit', $this->_optrange(50, false), $pref['news_list_limit'], 'class=tbox')." + ".$frm->select('news_list_limit', $this->_optrange(50, false), $pref['news_list_limit'])."
".LAN_NEWS_92."
".NWSLAN_87." - ".$frm->select('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'], 'class=tbox')." + ".$frm->select('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'])."
".NWSLAN_115." - ".$frm->select('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']), 'class=tbox')." + ".$frm->select('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']))."
".NWSLAN_116."