diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 0ba6d9c5f..8267c952b 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -512,7 +512,7 @@ class pluginManager{ $text = " -
+
diff --git a/e107_admin/theme.php b/e107_admin/theme.php index 5d51f4254..829656ac9 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -42,7 +42,7 @@ e107::css("inline"," .admin-theme-options:hover { opacity:0.8; } -.admin-theme-title { font-size: 15px; overflow:hidden; padding-left:5px; white-space:no-wrap; width:200px; position:relative; top:-132px; } +.admin-theme-title { line-height: 18px; overflow:hidden; padding-left:5px; white-space:no-wrap; width:200px; position:relative; top:-132px; } .admin-theme-select {border:1px dotted silver;background-color:#DDDDDD;float:left } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index d25e813a2..f9c11d607 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1308,10 +1308,10 @@ class e_form { - $text = ''; + '; diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index b9c3f9205..74bdcf9c2 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -426,80 +426,16 @@ class themeHandler } } - function showThemes($mode = 'main') - { - global $pref; - $mes = e107::getMessage(); - $ns = e107::getRender(); - $tp = e107::getParser(); - $frm = e107::getForm(); - $srch = preg_replace('/[^\w]/','', vartrue($_GET['srch'])); - - echo "
"; - - if($mode == "main" || !$mode) // Show Main Configuration - { - foreach ($this->themeArray as $key=>$theme) - { - if($key == $pref['sitetheme']) - { - $text = $this->renderTheme(1, $theme); - } - } - echo "
\n"; - $ns->tablerender(TPVLAN_26.SEP.TPVLAN_33, $mes->render().$text); - } - - // Show Admin Configuration - if($mode == "admin") - { - - foreach ($this->themeArray as $key=>$theme) - { - if($key == $pref['admintheme']) - { - $text = $this->renderTheme(2, $theme); - } - } - echo "\n"; - $ns->tablerender(TPVLAN_26.SEP.TPVLAN_34, $mes->render().$text); - } - - // Show Upload Form - if($mode == "upload") - { - $this->renderUploadForm(); - } - - // Show All Themes - if($mode == "choose") - { - - $text = ""; - foreach ($this->themeArray as $key=>$theme) - { - $text .= $this->renderTheme(FALSE, $theme); - // print_a($theme); - } - $text .= "
 
"; - echo "\n"; - $ns->tablerender(TPVLAN_26.SEP.TPVLAN_39, $mes->render().$text); - - - } - - - if($mode == "online") - { - $e107 = e107::getInstance(); - $xml = e107::getXml(); - $mes = e107::getMessage(); - - // $mes->addWarning("This area is experimental."); - $from = intval(varset($_GET['frm'])); - $limit = 18; - // $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing + + function renderOnline() + { + $xml = e107::getXml(); + $mes = e107::getMessage(); + $frm = e107::getForm(); + $ns = e107::getRender(); + $from = intval(varset($_GET['frm'])); + $limit = 96; $file = "http://e107.org/feed?type=theme&frm=".$from."&srch=".$srch."&limit=".$limit; @@ -510,14 +446,9 @@ class themeHandler $xdata = $xml->loadXMLfile($file,true,false); $total = $xdata['@attributes']['total']; - $text = " - -
-
".$frm->search('srch', $srch, 'go', $filterName, $filterArray, $filterVal).$frm->hidden('mode','online')."
"; - $amount =$limit; - + /* if($total > $amount) { //$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode='.$_GET['mode'].'&frm=[FROM]'; @@ -527,19 +458,28 @@ class themeHandler $text .= "
".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."
"; } - - $text .= "
"; + */ // print_a($xdata); - //TODO use admin_ui including filter capabilities by sending search queries back to the xml script. - // XML data array. $c = 1; - + $text .= "\n"; } @@ -690,6 +735,7 @@ class themeHandler $preview = "".($theme['preview'] ? "" : "").""; $description = vartrue($theme['description'],''); $compat = (intval($theme['compatibility']) == 2) ? "".number_format($theme['compatibility'], 1, '.','')." Recommended!": vartrue(number_format($theme['compatibility'], 1, '.',''),'1.0'); + $price = ($theme['price'] > 0) ? " ".$theme['price']."" : "".Free.""; $text = ""; @@ -699,7 +745,7 @@ class themeHandler $text .= $website ? "" : ""; $text .= $theme['date'] ? "" : ""; $text .= $compat ? "" : ""; - + $text .= ""; $text .= $description ? "" : ""; @@ -894,43 +940,13 @@ class themeHandler $author = ($theme['email'] ? "".$theme['author']."" : $theme['author']); $website = ($theme['website'] ? "".$theme['website']."" : ""); - $preview = "".($theme['preview'] ? "" : "").""; + // $preview = "".($theme['preview'] ? "" : "").""; $main_icon = ($pref['sitetheme'] != $theme['path']) ? "" : E_32_TRUE; // $info_icon = ""; $info_icon = "".E_32_CAT_ABOUT.""; - $preview_icon = "".E_32_SEARCH.""; +// $preview_icon = "".E_32_SEARCH.""; $admin_icon = ($pref['admintheme'] != $theme['path'] ) ? "\n" : E_32_TRUE; - - - if($_GET['mode'] == 'online') - { - $d = http_build_query($theme,false,'&'); - $url = e_SELF."?src=".base64_encode($d); - $id = $frm->name2id($theme['name']); - $main_icon = " "; - $info_icon = "".trim(E_32_CAT_ABOUT).""; - - //XXX modal-Cache is currently enabled by default. Awaiting inclusion of data-cache feature. - // See here: https://github.com/twitter/bootstrap/pull/4224 - - } - - - - if(!in_array($theme['path'], $this->approvedAdminThemes)) - { - $admin_icon = ""; - } - - if($theme['name'] == 'bootstrap') - { - // print_a($theme); - } - // - // $thumbPath = (substr($theme['thumbnail'],0,4) == 'http') ? $theme['thumbnail'] : e_THEME.$theme['path'] ."/".$theme['preview'][0]; - // $thumbnail = ""; - if(substr($theme['thumbnail'],0,4) == 'http') { $thumbPath = $theme['thumbnail']; @@ -948,11 +964,53 @@ class themeHandler } $thumbnail = ""; - $preview_icon = "".E_32_SEARCH.""; + + + if($_GET['mode'] == 'online') + { + + $d = http_build_query($theme,false,'&'); + $url = e_SELF."?src=".base64_encode($d); + $id = $frm->name2id($theme['name']); + $LAN_DOWNLOAD = ($theme['price'] > 0) ? "Buy/Download" : "Download"; + + $main_icon = " "; + $info_icon = "".trim(E_32_CAT_ABOUT).""; + + if($theme['livedemo']) + { + $previewPath = $theme['livedemo']; + } + //XXX modal-Cache is currently enabled by default. Awaiting inclusion of data-cache feature. + // See here: https://github.com/twitter/bootstrap/pull/4224 + + } + + $preview_icon = "".E_32_SEARCH.""; + + + if(!in_array($theme['path'], $this->approvedAdminThemes)) + { + $admin_icon = ""; + } + + if($theme['name'] == 'bootstrap') + { + // print_a($theme); + } + // + // $thumbPath = (substr($theme['thumbnail'],0,4) == 'http') ? $theme['thumbnail'] : e_THEME.$theme['path'] ."/".$theme['preview'][0]; + // $thumbnail = ""; + + // $thumbnail .= ""; // Choose a Theme to Install. + + $price = ($theme['price'] > 0) ? " ".$theme['price']."" : "".Free.""; + + if(!$mode) { // styles NEED to be put into style.css @@ -972,11 +1030,14 @@ class themeHandler $borderStyle = 'well'; + $text = "
".$thumbnail."
".$main_icon.$admin_icon.$info_icon.$preview_icon."
-
".$theme['name']." ".$theme['version']."
+
".$theme['name']." ".$theme['version']." + ".$price." +
"; return $text; } @@ -1018,6 +1079,7 @@ class themeHandler $text .= ""; $text .= ""; + // $text .= ""; $text .= "
".TPVLAN_5.":".$website."
".TPVLAN_6.":".$theme['date']."
".TPVLAN_57.":".$compat."
Price:".$price."
Description:".$description."
".TPVLAN_7.":".strip_tags($theme['info'],'b')."
".LAN_CATEGORY.":".$theme['category']."
Price:".$price."
".TPVLAN_49.": "; $text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified"; diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index c515fcebf..189ba6705 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -203,9 +203,9 @@ img.S32:hover {} .adminlist .col-selection-cont { position: relative; float:right; } -div.e-search input[type='text'] { padding-left:25px } -div.e-search i { margin-right:-20px; margin-left:5px; margin-top:0px; z-index:100; position:relative; } -div.e-search { margin-bottom:-5px; margin-top:10px } +span.e-search input[type='text'] { padding-left:25px } +span.e-search i { margin-right:-20px; margin-left:5px; margin-top:-7px; z-index:100; position:relative; } +// span.e-search { margin-bottom:-5px; margin-top:10px } /******** SyS Messages / Message text formatting */ .s-message .s-message-title { height: 32px; background: 0 50% no-repeat; padding-left: 42px; line-height: 32px; }