Добрый день, уважаемые.
Статья о том, как адаптировать шаблоны dle 8.x в dle 9.0. Для того, чтоб адаптировать шаблоны CMS DateLife Engine с версий 8.x до версий 9.x Вам нужно будет проделать следующие действия:
1. И так, начнем со стилей. Открываем файл /templates/{THEME}/css/engine.css и там в любое место вставляйте:
Code
/* ======= ========== === Информ ационное о коно загру зки AJAX * /
#loading-layer {
display:none;
font-family:Verdana;font-size:11px;
background:#000;padding:10px;
text-align:center;border:1px solid #000;
color:#FFF;
border-radius:5px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
}
Тут же находим
и из этих стилей удаляем:
Code
opacity: 0.95;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=95) progid:DXImageTransform.Microsoft.Shadow(color=#cacaca, direction=135, strength=3)";
filter: alpha(opacity=95, enabled=1) progid:DXImageTransform.Microsoft.Shadow(color=#cacaca, direction=135, strength=3);
Так же удаляем этот кусок кода:
Code
/* ==================== Уведомление о получении новых PM */
#newpm {
position: absolute;
width: 400px;
padding: 4px;
background-color: #fdfdfd;
border: 1px solid #bbbbbb;
font-family: verdana;
color: #757575;
line-height: 135%;
}
#newpmheader {
padding-left: 5px;
padding-right: 5px;
padding-top: 2px;
height: 20px;
color: #ffffff;
font-weight: bold;
background-color: #4972D3;
font-family: verdana;
cursor: move;
}
#newpm a {
background: transparent;
color: #4d6a8a;
text-decoration: none;
}
#newpm a:hover {
background: transparent;
color: #4d6a8a;
text-decoration: underline;
}
Опускаемся еще ниже и удаляем такие стили:
Code
.highslide-html-content {
display: none;
}
и
.highslide-footer {
height: 11px;
}
.highslide-footer .highslide-resize {
float: right;
height: 12px;
width: 11px;
background: url(../dleimages/resize.gif);
}
.highslide-resize {
cursor: nw-resize;
}
А теперь в самый низ данного файла вставляем:
Code
/* ==================== Автозаполнение облака тегов */
.autocomplete-w1 { position:absolute; top:0px; left:0px; margin:8px 0 0 6px; /* IE6 fix: */ _background:none; _margin:0; }
.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; }
.autocomplete .selected { background:#F0F0F0; }
.autocomplete div { font-size: 11px;font-family: verdana;padding:2px 5px; white-space:nowrap; }
.autocomplete strong { font-weight:normal; color:#3399FF; }
/* ==================== Быстрый поиск на сайте */
#searchsuggestions { border-width:1px; border-color:#919191; border-style:solid; width:300px; background-color:#5c9ccc; font-size:10px; line-height:14px; }
#searchsuggestions a { padding:5px;display:block; background-color:#ffffff; clear:left; height:70px; text-decoration:none; }
#searchsuggestions a:hover { background-color:#fdd08b; color:#ffffff; }
#searchsuggestions a span.searchheading { background: #5c9ccc; display:block; font-weight:bold; padding:5px; color:#ffffff; }
#searchsuggestions a:hover span.searchheading { color:#ffffff; }
#searchsuggestions a span {color:#555555; }
#searchsuggestions a:hover span { color:#0000; }
#searchsuggestions span.seperator { float:right; padding-right:15px; margin-right:5px;}
#searchsuggestions span.seperator a { background-color:transparent; display:block; height:auto; color:#ffffff; }
#searchsuggestions span.notfound { padding:5px;background-color:#ffffff; display:block; height:auto; color:#00000; }
/* ==================== Диалоговые и всплывающие окна jQuery UI */
.ui-helper-clearfix:after {
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
}
.ui-helper-clearfix {
display: inline-block;
}
* html .ui-helper-clearfix {
height: 1%;
}
.ui-helper-clearfix {
display: block;
}
.ui-icon {
background-repeat: no-repeat;
display: block;
overflow: hidden;
text-indent: -99999px;
}
.ui-widget {
font-family: Tahoma, Lucida Sans, Arial, sans-serif;
font-size: 11px;
}
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
font-family: tahoma, Arial, sans-serif;
font-size: 11px;
}
.ui-widget-content {
background: #fcfdfd 50% bottom repeat-x;
border: 1px solid #a6c9e2;
color: #222222;
}
.ui-widget-content a {
color: #222222;
}
.ui-widget-header {
background: #5c9ccc url(../images/ui-bg_gloss-wave.png) 50% 50% repeat-x;
border: 1px solid #4297d7;
color: #ffffff;
font-weight: bold;
}
.ui-widget-header a {
color: #ffffff;
}
.ui-state-default, .ui-widget-content .ui-state-default {
background: #dfeffc url(../images/ui-bg_glass_85.png) 50% 50% repeat-x;
border: 1px solid #c5dbec;
color: #2e6e9e;
font-weight: bold;
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
color: #2e6e9e;
text-decoration: none;
}
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus {
background: #d0e5f5 url(../images/ui-bg_glass_75.png) 50% 50% repeat-x;
border: 1px solid #79b7e7;
color: #1d5987;
font-weight: bold;
}
.ui-state-hover a, .ui-state-hover a:hover {
color: #1d5987;
text-decoration: none;
}
.ui-state-active, .ui-widget-content .ui-state-active {
background: #f5f8f9 50% 50% repeat-x;
border: 1px solid #79b7e7;
color: #e17009;
font-weight: bold;
}
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
color: #e17009;
text-decoration: none;
}
.ui-widget :active {
outline: none;
}
.ui-state-error {
background: #fef1ec 50% 50% repeat-x;
border: 1px solid #cd0a0a;
color: #cd0a0a;
}
.ui-widget-header .ui-icon {
background-image: url(../images/ui-icons.png);
}
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {
background-image: url(../images/ui-icons_h.png);
}
.ui-icon-close {
background-position: -80px -128px;
}
.ui-icon-closethick {
background-position: -96px -128px;
}
.ui-button .ui-button-text {
display: block;
line-height: 1.4;
}
.ui-button-text-only .ui-button-text {
padding: .4em .8em;
}
input.ui-button {
padding: .4em 1em;
}
.ui-button-set {
margin-right: 7px;
}
.ui-button-set .ui-button {
margin-left: 0;
margin-right: -.3em;
}
button.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
.ui-dialog {
overflow: hidden;
padding: .2em;
position: absolute;
width: 300px;
}
.ui-dialog .ui-dialog-titlebar {
padding: .5em 1em .3em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 16px .2em 0;
}
.ui-dialog .ui-dialog-titlebar-close {
height: 18px;
margin: -10px 0 0 0;
padding: 1px;
position: absolute;
right: .3em;
top: 50%;
width: 19px;
}
.ui-dialog .ui-dialog-titlebar-close span {
display: block;
margin: 1px;
}
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus {
padding: 0;
}
.ui-dialog .ui-dialog-content {
background: none;
border: 0;
overflow: hidden;
padding: .5em 1em;
position: relative;
zoom: 1;
}
.ui-dialog .ui-dialog-buttonpane {
background-image: none;
border-width: 1px 0 0 0;
margin: .5em 0 0 0;
padding: .3em 1em .5em .4em;
text-align: left;
}
.ui-dialog .ui-dialog-buttonpane button {
cursor: pointer;
float: right;
line-height: 1.4em;
margin: .5em .4em .5em 0;
overflow: visible;
padding: .2em .6em .3em .6em;
width: auto;
}
.ui-dialog .ui-resizable-se {
bottom: 3px;
height: 14px;
right: 3px;
width: 14px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
Все, со стилями закончили. Теперь можно перейти к шаблонам. 2. Открываем файл /templates/{THEME}/addcomments.tpl ищем там:
Code
onclick="doAddComments();return false;"
и удаляем его. 3. Открываем файл /templates/{THEME}/addnews.tpl ищем там:
Code
<input type="text" name="tags " value="{tags}"
и заменяем его на:
Code
<input type="text" id="tags" name="tags" value="{tags}" autocomplete="off"
4. Открываем /templates/{THEME}/login.tpl ищем там:
Code
onclick="javascript: showBusyLyer()"
и
Code
onsubmit="javascript :showBusyLayer()"
и удаляем их. 5. Открываем /templates/{THEME}/main.tpl ищем там:
Code
onsubmit="javascript: showBusyLayer()"
и удаляем его.
Ищем:
Code
<input name="story" type="text" class="s_field"
заменяем на:
Code
<input id="story" name="story" type="text" class="s_field"
6. Открываем /templates/{THEME}/preview.css и перед
вставляем:
Code
.title_spoiler img {
margin:0;
padding:0;
}
7. Создаем в директории /templates/{THEME]/ файл preview.tpl и вставляем в него:
Code
[short-preview]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl11.gif" width="20" height="30" alt="" /></td>
<td align="left" valign="top" class="abl12"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="abl121">
<tr>
<td width="110" align="left" class="dateitm">[day-news]{date}[/day-news]</td>
<td width="20" height="30"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left"><span class="category">[ {link-category} ] •</span><span class="ntitle"> [full-link]{title}[/full-link]</span><span class="category"> {approve}</span></td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl13.gif" width="20" height="30" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl21.gif" width="20" height="42" alt="" /></td>
<td align="left" valign="top" class="abl22"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="42" align="left" valign="top" class="abl221"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="90" height="34">{rating}</td>
<td align="left" class="serv">{favorites} [edit]Редактировать новость[/edit]</td>
</tr>
</table></td>
<td width="430" align="right" valign="top" class="abl222"><table width="376" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="360" align="right" class="slink">Опубликовал: {author} | Просмотров: 81 | [com-link]Комментарии ({comments-num})[/com-link] </td>
<td width="16" height="18"><img src="{THEME}/images/spacer.gif" width="16" height="1" alt="" /></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl23.gif" width="20" height="42" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl31.gif" width="20" height="5" alt="" /></td>
<td><img src="{THEME}/images/spacer.gif" width="1" height="5" alt="" /></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl33.gif" width="20" height="5" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left" valign="top" class="news">{short-story}[edit-date]<br /><br /><span class="copy"><i>Новость отредактировал <font color="red"><strong>{editor}</strong></font> - {edit-date}</i></span>[edit-reason]<div class="quote">Причина: {edit-reason}</div>[/edit-reason]<br />[/edit-date]</td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl31.gif" width="20" height="5" alt="" /></td>
<td><img src="{THEME}/images/spacer.gif" width="1" height="5" alt="" /></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl33.gif" width="20" height="5" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl41.gif" width="20" height="40" alt="" /></td>
<td align="right" valign="top" class="abl42">[full-link]<img src="{THEME}/images/dlet_bttn_rmore.gif" width="170" height="40" border="0" alt="" />[/full-link]</td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl43.gif" width="20" height="40" alt="" /></td>
</tr>
</table>
[/short-preview]
[full-preview]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl11.gif" width="20" height="30" alt="" /></td>
<td align="left" valign="top" class="abl12"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="abl121">
<tr>
<td width="110" align="left" class="dateitm">[day-news]{date}[/day-news]</td>
<td width="20" height="30"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left"><span class="category">[ {link-category} ] •</span><span class="ntitle"> {title}</span></td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl13.gif" width="20" height="30" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl21.gif" width="20" height="42" alt="" /></td>
<td align="left" valign="top" class="abl22"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="42" align="left" valign="top" class="abl221"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145" height="34" align="left" class="serv">{favorites} [edit]Редактировать новость[/edit]</td>
<td align="left"> </td>
</tr>
</table></td>
<td width="430" align="right" valign="top" class="abl222"><table width="376" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="360" align="right" class="slink">Опубликовал: {author} | Просмотров: 81 | [com-link]Комментарии ({comments-num})[/com-link] </td>
<td width="16" height="18"><img src="{THEME}/images/spacer.gif" width="16" height="1" alt="" /></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl23.gif" width="20" height="42" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl31.gif" width="20" height="5" alt="" /></td>
<td><img src="{THEME}/images/spacer.gif" width="1" height="5" alt="" /></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl33.gif" width="20" height="5" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left" valign="top" class="news">{full-story}[tags]<br /><br /><div class="border">Ключевые теги: {tags}</div>[/tags][edit-date]<br /><br /><span class="copy"><i>Новость отредактировал <font color="red"><strong>{editor}</strong></font> - {edit-date}</i></span>[edit-reason]<div class="quote">Причина: {edit-reason}</div>[/edit-reason][/edit-date]</td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left"><br />{rating}<br /></td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left" valign="top" class="stext"><div align="center">{pages}</div>
[group=5]<div class="scriptcode">Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь. Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.</div>[/group]
<br />
<div class="border"><strong>Другие новости по теме:</strong></div>
<ul>{related-news}</ul><br /></td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl31.gif" width="20" height="5" alt="" /></td>
<td><img src="{THEME}/images/spacer.gif" width="1" height="5" alt="" /></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl33.gif" width="20" height="5" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl41.gif" width="20" height="40" alt="" /></td>
<td align="right" valign="top" class="abl42">[print-link]<img src="{THEME}/images/dlet_bttn_print.gif" width="170" height="40" border="0" alt="" />[/print-link]</td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl43.gif" width="20" height="40" alt="" /></td>
</tr>
</table>
[/full-preview]
[static-preview]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl01.gif" width="20" height="30" alt="" /></td>
<td align="left" valign="top" class="abl02"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="abl121">
<tr>
<td width="40" height="30"><img src="{THEME}/images/spacer.gif" width="40" height="1" alt="" /></td>
<td align="left" class="ntitle">{description}</td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl13.gif" width="20" height="30" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl51.gif" width="20" height="30" alt="" /></td>
<td align="left" valign="top" class="abl22"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" class="abl221"> </td>
</tr>
</table></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl53.gif" width="20" height="30" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="left" valign="top"><span class="news">{static}</span></td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top" class="abl31"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
<td align="center" valign="top" class="stext">{pages}</td>
<td width="20" align="right" valign="top" class="abl33"><img src="{THEME}/images/spacer.gif" width="20" height="1" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl31.gif" width="20" height="5" alt="" /></td>
<td><img src="{THEME}/images/spacer.gif" width="1" height="5" alt="" /></td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl33.gif" width="20" height="5" alt="" /></td>
</tr>
<tr>
<td width="20" align="left" valign="top"><img src="{THEME}/images/dlet_abl41.gif" width="20" height="40" alt="" /></td>
<td align="right" valign="top" class="abl42">[print-link]<img src="{THEME}/images/dlet_bttn_print.gif" width="170" height="40" border="0" alt="" />[/print-link]</td>
<td width="20" align="right" valign="top"><img src="{THEME}/images/dlet_abl43.gif" width="20" height="40" alt="" /></td>
</tr>
</table>
[/static-preview]
8. Создаем в директории /templates/{THEME]/ файл profile_popup.tpl и вставляем в него:
Code
<table width="100%">
<tr>
<td width="100" style="padding:4px;">Полное имя:</td>
<td>{fullname} </td>
<td rowspan="6" valign="top" align="right"><img src="{foto}" border="0" /></td>
</tr>
<tr>
<td style="padding:4px;">Группа:</td>
<td>{status}</td>
</tr>
<tr>
<td style="padding:4px;">Дата посещения:</td>
<td>{lastdate}</td>
</tr>
<tr>
<td style="padding:4px;">Дата регистрации:</td>
<td>{registration}</td>
</tr>
<tr>
<td style="padding:4px;">Публикаций:</td>
<td>{news_num} [ {news} ]</td>
</tr>
<tr>
<td style="padding:4px;">Комментариев:</td>
<td>{comm_num} [ {comments} ]</td>
</tr>
</table>
9. Теперь в директорию /templates/{THEME}/images/ закидываем изображения:
Code
ui-bg_glass_75.png
ui-bg_glass_85.png
ui-bg_gloss-wave.png
ui-icons.png
ui-icons_h.png
Картинки взять из стандартного дизайна 9.0
Вот и все.