brainless
Проверенные
- Сообщения
- 175
- Реакции
- 101
- Баллы
- 8,145
Шаблон dark_taigachat_chatbox меняем наа есть возможность сделать кнопочку, что бы его свернуть или развернуть?
Код:
<xen:require css="dark_taigachat.css" />
<xen:require css="bb_code.css" />
<xen:require js="js/dark/taigachat.js?{xen:raw $taigachat.js_modification}" />
<div class="section<xen:if is="{$taigachat.alt}"> sectionMain nodeList taigachat_alt </xen:if><xen:if is="{$taigachat.reverse}"> taigachat_reverse<xen:else /> taigachat_normal</xen:if><xen:if is="{$taigachat.popup}"> taigachat_popup</xen:if>" id='<xen:if is="{$taigachat.alt} OR !{$taigachat.sidebar}">taigachat_full<xen:else />taigachat_sidebar</xen:if>'>
<xen:if is="!{$taigachat.alt}">
<div class="<xen:if is="{$taigachat.sidebar}">secondaryContent<xen:else />primaryContent</xen:if>">
<xen:else />
<div>
</xen:if>
<xen:if is="{$taigachat.sidebar}">
<xen:if is="{$taigachat.alt}">
<div id="ctrl-dark-chat-expanded" class="estPD_info_block" style="display:block;">
<div class="estPD_top_collapser estPD_collapser">
<span class="estPD_ctrl_span">Закрыть чат [-]</span>
</div>
<div class="estPD_info_block_content">
<div class="taigachat_alt taigachat_reverse" id="taigachat_full">
<div>
<p align="left"><a class="estPD_chat_title" href="chat/">Чатик</a> <a href="/threads/224577/" style="font: 8px; color: #336699;">(как пользоваться чатом)</a> </p>
<div class="nodeInfo categoryNodeInfo categoryStrip">
<div class="categoryText">
<h3 class="nodeTitle"><a href="{xen:link '{$taigachat.route}'}">{xen:phrase dark_shoutbox} (<span id="taigachat_count">0</span>)</a></h3>
<xen:if is="{$taigachat.motd}"><blockquote class="nodeDescription baseHtml"><span id="taigachat_motd">{xen:raw $taigachat.motd}</span></blockquote></xen:if>
<a href="{xen:link 'taigachat/motd'}" data-cacheOverlay="false" class="OverlayTrigger" style="display:none"></a>
</div>
</div>
<xen:else />
<h3><a href='{xen:link '{$taigachat.route}'}'>{xen:phrase dark_shoutbox} (<span id="taigachat_count">0</span>)</a>
<xen:if is="{$taigachat.motd}"><blockquote><span id="taigachat_motd">{xen:raw $taigachat.motd}</span></blockquote></xen:if>
<a href="{xen:link 'taigachat/motd'}" class="OverlayTrigger" style="display:none"></a>
</h3>
</xen:if>
</xen:if>
<xen:if is="{$taigachat.popup}">
<blockquote class="taigachat_motd"><span id="taigachat_inchat">(<span id="taigachat_count">0</span> {xen:phrase dark_users_in_chat})</span> <span id="taigachat_motd">{xen:raw $taigachat.motd}</span></blockquote>
<a href="{xen:link 'taigachat/motd'}" class="OverlayTrigger" style="display:none"></a>
</xen:if>
<xen:if is="!{$taigachat.reverse}">
<xen:include template="dark_taigachat_controls">
<xen:map from="$taigachat" to="$taigachat" />
</xen:include>
</xen:if>
<div id='taigachat_box' class='<xen:if is="{$taigachat.thumbzoom}">taigachat_thumbzoom</xen:if>'<xen:if is="{$taigachat.sidebar}"> style='height: {xen:raw $taigachat.height}px'</xen:if>><ol></ol></div>
<xen:if is="{$taigachat.reverse}">
<xen:include template="dark_taigachat_controls">
<xen:map from="$taigachat" to="$taigachat" />
</xen:include>
</xen:if>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ctrl-dark-chat-collapsed" class="estPD_info_block_collapsed" style="display:none;">
<span class="estPD_ctrl_span">Открыть чат [+]</span>
</div>
<script type='text/javascript'>
$(function () {
var collapsed = false;
try {
if ($.getCookie('dark-chat-collapsed') == 'yes') {
$('#ctrl-dark-chat-expanded').css('display', 'none');
$('#ctrl-dark-chat-collapsed').css('display', 'block');
collapsed = true;
}
} catch (e) { }
if (!collapsed) {
$('#ctrl-dark-chat-expanded').css('display', 'block');
$('#ctrl-dark-chat-collapsed').css('display', 'none');
}
$('div.estPD_collapser').live('click', function () {
$.setCookie('dark-chat-collapsed', 'yes');
$('#ctrl-dark-chat-expanded').animate({
opacity: 0
}, 250, function () {
$(this).css('display', 'none');
$('#ctrl-dark-chat-collapsed').css('opacity', 0);
$('#ctrl-dark-chat-collapsed').css('display', 'block');
$('#ctrl-dark-chat-collapsed').animate({
opacity: 0
}, 1).animate({
opacity: 1
}, 250);
});
});
$('div.estPD_info_block_collapsed').live('click', function () {
$.setCookie('dark-chat-collapsed', 'no');
$('#ctrl-dark-chat-collapsed').animate({
opacity: 0
}, 250, function () {
$(this).css('display', 'none');
$('#ctrl-dark-chat-expanded').css('opacity', 0);
$('#ctrl-dark-chat-expanded').css('display', 'block');
$('#ctrl-dark-chat-expanded').animate({
opacity: 0
}, 1).animate({
opacity: 1
}, 250);
});
});
});
var taigachat_autorefresh = true;
var taigachat_maxrefreshtime = parseInt("10", 10) || 10;
var taigachat_limit = parseInt("50", 10) || 50;
var taigachat_sidebar = true;
var taigachat_autorefresh = <xen:if is="{$visitor.user_id} OR {$taigachat.canPost}">true<xen:else />false</xen:if>;
var taigachat_limit = parseInt("{xen:raw $taigachat.limit}", 10) || 50;
var taigachat_speed = <xen:if is="{$taigachat.speed}">true<xen:else />false</xen:if>;
var taigachat_activity_newtab = <xen:if is="{$taigachat.activity_newtab}">true<xen:else />false</xen:if>;
var taigachat_newtab = <xen:if is="{$taigachat.newtab}">true<xen:else />false</xen:if>;
var taigachat_ignorehide = <xen:if is="{$taigachat.ignorehide}">true<xen:else />false</xen:if>;
var taigachat_speedurl = "{$taigachat.speedurl}";
var taigachat_url = "{xen:link 'taigachat/list.json'}";
var taigachat_url_activity = "{xen:link 'taigachat/activity.json'}";
var taigachat_url_post = "{xen:link 'taigachat/post.json'}";
var taigachat_url_savecolor = "{xen:link 'taigachat/save-color.json'}";
var taigachat_sidebar = <xen:if is="{$taigachat.sidebar}">true<xen:else />false</xen:if>;
var taigachat_timedisplay = "{$taigachat.timedisplay}";
var taigachat_canModify = <xen:if is="{$taigachat.canModify}">true<xen:else />false</xen:if>;
var taigachat_canModifyAll = <xen:if is="{$taigachat.canModifyAll}">true<xen:else />false</xen:if>;
var taigachat_canBan = <xen:if is="{$taigachat.canBan}">true<xen:else />false</xen:if>;
var taigachat_showAlert = <xen:if is="{$taigachat.showAlert}">true<xen:else />false</xen:if>;
var taigachat_focusedRefreshTime = parseInt("{xen:raw $taigachat.focusedrefreshtime}", 10) || 10;
var taigachat_unfocusedRefreshTime = parseInt("{xen:raw $taigachat.unfocusedrefreshtime}", 10) || 10;
var taigachat_tabUnfocusedRefreshTime = parseInt("{xen:raw $taigachat.tabunfocusedrefreshtime}", 10) || 10;
<xen:if is="{$taigachat.canColor}">taigachat_customColor = "{$taigachat.color}";</xen:if>
jQuery.extend(XenForo.phrases,
{
dark_ignored: "{xen:jsescape {xen:phrase dark_ignored}}",
dark_banned_successfully: "{xen:jsescape {xen:phrase dark_banned_successfully}}",
dark_unbanned_successfully: "{xen:jsescape {xen:phrase dark_unbanned_successfully}}",
dark_new_chat_message: "{xen:jsescape {xen:phrase dark_new_chat_message}}"
});
</script>
Потом добавляем в dark_taigachat.css 3 класса
Код:
.estPD_top_collapser{font-size:11px;color:#6d3f03;background-color:#bfdff5;padding-top:4px;padding-bottom:4px;border-top-left-radius:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topleft:5px;-khtml-border-top-left-radius:5px;border-top-right-radius:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;-khtml-border-top-right-radius:5px;text-align:center;cursor:pointer;height:14px}.estPD_ctrl_span{margin-right:8px;float:right}.estPD_info_block
.estPD_info_block_content{background-color:#f0f7fc;padding:8px;border-color:#bfdff5;border-top-style:none;border-right-width:1px;border-right-style:solid;border-bottom-width:1px;border-bottom-style:solid;border-left-width:1px;border-left-style:solid;border-bottom-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;-khtml-border-bottom-left-radius:5px;border-bottom-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;-khtml-border-bottom-right-radius:5px}
.estPD_info_block_collapsed{font-size:11px;color:#6d3f03;background-color:#ececec;padding:4px
6px;margin-top:20px;margin-bottom:5px;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;position:relative;cursor:pointer;text-align:center;height:14px}