mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Merge pull request #1990 from yesszus/patch-12
Update e107_handlers/theme_handler.php
This commit is contained in:
@@ -91,7 +91,7 @@ class themeHandler
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mes->addError("Could not change site theme."); // TODO LAN
|
$mes->addError(TPVLAN_86);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -516,7 +516,7 @@ class themeHandler
|
|||||||
// check for cURL
|
// check for cURL
|
||||||
if(!function_exists(curl_init))
|
if(!function_exists(curl_init))
|
||||||
{
|
{
|
||||||
$mes->addWarning("cURL is currently required to use this feature. Contact your webhosting provider to enable cURL"); // TODO LAN?
|
$mes->addWarning(TPVLAN_79);
|
||||||
}
|
}
|
||||||
|
|
||||||
// auth
|
// auth
|
||||||
@@ -662,7 +662,7 @@ class themeHandler
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mes->addInfo("No Themes found which match your search criteria");
|
$mes->addInfo(TPVLAN_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
$indicators = '<ol class="carousel-indicators col-md-6 span6">
|
$indicators = '<ol class="carousel-indicators col-md-6 span6">
|
||||||
@@ -686,16 +686,6 @@ class themeHandler
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function showThemes($mode = 'main')
|
function showThemes($mode = 'main')
|
||||||
{
|
{
|
||||||
global $pref;
|
global $pref;
|
||||||
@@ -828,8 +818,8 @@ class themeHandler
|
|||||||
$website = ($theme['website'] ? "<a href='".$theme['website']."' rel='external'>".$theme['website']."</a>" : "");
|
$website = ($theme['website'] ? "<a href='".$theme['website']."' rel='external'>".$theme['website']."</a>" : "");
|
||||||
$preview = "<a href='".SITEURL."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
$preview = "<a href='".SITEURL."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||||
$description = vartrue($theme['description'],'');
|
$description = vartrue($theme['description'],'');
|
||||||
$compat = (intval($theme['compatibility']) == 2) ? "<span class='label label-warning'>".number_format($theme['compatibility'], 1, '.','')."</span><span class='text-warning'> Recommended!</span>": vartrue(number_format($theme['compatibility'], 1, '.',''),'1.0');
|
$compat = (intval($theme['compatibility']) == 2) ? "<span class='label label-warning'>".number_format($theme['compatibility'], 1, '.','')."</span><span class='text-warning'> ".TPVLAN_78."</span>": vartrue(number_format($theme['compatibility'], 1, '.',''),'1.0');
|
||||||
$price = (!empty($theme['price'])) ? "<span class='label label-primary'><i class='icon-shopping-cart icon-white'></i> ".$theme['price']."</span>" : "<span class='label label-success'>Free</span>";
|
$price = (!empty($theme['price'])) ? "<span class='label label-primary'><i class='icon-shopping-cart icon-white'></i> ".$theme['price']."</span>" : "<span class='label label-success'>".TPVLAN_77."</span>";
|
||||||
|
|
||||||
|
|
||||||
$text = "<table class='table table-striped'>";
|
$text = "<table class='table table-striped'>";
|
||||||
@@ -839,9 +829,9 @@ class themeHandler
|
|||||||
$text .= $website ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>" : "";
|
$text .= $website ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>" : "";
|
||||||
$text .= $theme['date'] ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_6."</b>:</td><td style='vertical-align:top'>".$theme['date']."</td></tr>" : "";
|
$text .= $theme['date'] ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_6."</b>:</td><td style='vertical-align:top'>".$theme['date']."</td></tr>" : "";
|
||||||
$text .= $compat ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_57."</b>:</td><td style='vertical-align:top'>".$compat."</td></tr>" : "";
|
$text .= $compat ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_57."</b>:</td><td style='vertical-align:top'>".$compat."</td></tr>" : "";
|
||||||
$text .= "<tr><td style='vertical-align:top; width:24%'><b>Price</b>:</td><td style='vertical-align:top'>".$price."</td></tr>";
|
$text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_75."</b>:</td><td style='vertical-align:top'>".$price."</td></tr>";
|
||||||
|
|
||||||
$text .= $description ? "<tr><td style='vertical-align:top; width:24%'><b>Description</b>:</td><td style='vertical-align:top'>".$description."</td></tr>" : "";
|
$text .= $description ? "<tr><td style='vertical-align:top; width:24%'><b>".LAN_DESCRIPTION."</b>:</td><td style='vertical-align:top'>".$description."</td></tr>" : "";
|
||||||
|
|
||||||
|
|
||||||
// $text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_49."</b>:</td>
|
// $text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_49."</b>:</td>
|
||||||
@@ -853,7 +843,7 @@ class themeHandler
|
|||||||
|
|
||||||
if(vartrue($theme['category']))
|
if(vartrue($theme['category']))
|
||||||
{
|
{
|
||||||
$text .= "<tr><td><b>Category</b></td><td>".$theme['category']."</td></tr>";
|
$text .= "<tr><td><b>".LAN_CATEGORY."</b></td><td>".$theme['category']."</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -869,11 +859,11 @@ class themeHandler
|
|||||||
<td class='well' style='vertical-align:top'>
|
<td class='well' style='vertical-align:top'>
|
||||||
<table class='table table-striped table-bordered' style='margin-left:0px;margin-right:auto' >
|
<table class='table table-striped table-bordered' style='margin-left:0px;margin-right:auto' >
|
||||||
<tr>";
|
<tr>";
|
||||||
$itext .= ($mode == 1) ? "<td class='fcaption' style='text-align:center;vertical-align:top;'>Default</td>" : "";
|
$itext .= ($mode == 1) ? "<td class='fcaption' style='text-align:center;vertical-align:top;'>".TPVLAN_55."</td>" : "";
|
||||||
$itext .= "
|
$itext .= "
|
||||||
<th class='fcaption'>Title</th>
|
<th class='fcaption'>".LAN_TITLE."</th>
|
||||||
<th class='fcaption'>Requirements</th>
|
<th class='fcaption'>".TPVLAN_78."</th>
|
||||||
<th class='fcaption' style='text-align:center;width:100px'>Menu Preset</th>
|
<th class='fcaption' style='text-align:center;width:100px'>".TPVLAN_54."</th>
|
||||||
</tr>\n";
|
</tr>\n";
|
||||||
|
|
||||||
foreach ($theme['layouts'] as $key=>$val)
|
foreach ($theme['layouts'] as $key=>$val)
|
||||||
@@ -1004,7 +994,7 @@ class themeHandler
|
|||||||
{
|
{
|
||||||
|
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
$mes->addDebug("Rendering Theme Config");
|
$mes->addDebug(TPVLAN_87);
|
||||||
|
|
||||||
$this->loadThemeConfig();
|
$this->loadThemeConfig();
|
||||||
|
|
||||||
@@ -1090,7 +1080,7 @@ class themeHandler
|
|||||||
$d = http_build_query($theme,false,'&');
|
$d = http_build_query($theme,false,'&');
|
||||||
$url = e_SELF."?src=".base64_encode($d);
|
$url = e_SELF."?src=".base64_encode($d);
|
||||||
$id = $frm->name2id($theme['name']);
|
$id = $frm->name2id($theme['name']);
|
||||||
$LAN_DOWNLOAD = ($theme['price'] > 0) ? "Buy/Download" : "Download";
|
$LAN_DOWNLOAD = ($theme['price'] > 0) ? LAN_PURCHASE."/".LAN_DOWN_THEME : LAN_DOWN_THEME;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if($this->mp->hasAuthKey())
|
if($this->mp->hasAuthKey())
|
||||||
@@ -1129,7 +1119,7 @@ class themeHandler
|
|||||||
$previewPath = $theme['livedemo'];
|
$previewPath = $theme['livedemo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$price = (!empty($theme['price'])) ? "<span class='label label-primary pull-right'>".$theme['price']."</span>" : "<span class='label label-success pull-right'>".Free."</span>";
|
$price = (!empty($theme['price'])) ? "<span class='label label-primary pull-right'>".$theme['price']."</span>" : "<span class='label label-success pull-right'>".TPVLAN_76."</span>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user