ОПИСАНИЕ: Очень удобная фишка. Свертывание категорий - отличный способ позволить пользователям выбирать сви любимые части форума, и скрывать остальные. Данный хак использует куки и потому помнит предпочтения пользователя.
СТИЛЬ: только proSilver
УСТАНОВКА:
1 - СКАЧАТЬ collapsible-categories.zip
2 - Скопировать файлы из архива:
/collapsible-categories/collapse-icon.png в /phpBB/styles/prosilver/theme/images/
/collapsible-categories/jquery.cookie.js в /phpBB/styles/prosilver/template/
/collapsible-categories/jquery.collapse.js в /phpBB/styles/prosilver/template/
3 - HTML правка
Открыть: /styles/prosilver/template/overall_header.html
Найти:
Код: Выделить всё
<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
Код: Выделить всё
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<!-- If the above line is already present, don't add it again -->
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.collapse.js"></script>
Найти:
Код: Выделить всё
<!-- BEGIN forumrow -->
Код: Выделить всё
<div class="forumlist">
Код: Выделить всё
<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
</ul>
Код: Выделить всё
</div>
Код: Выделить всё
<ul class="topiclist forums">
Код: Выделить всё
<!-- IF SCRIPT_NAME eq 'index' --><div class="trigger active"></div><!-- ENDIF -->
<div class="collapsethis">
Код: Выделить всё
<!-- IF forumrow.S_LAST_ROW -->
</ul>
Код: Выделить всё
</div>
Код: Выделить всё
<!-- END forumrow -->
Код: Выделить всё
</div>
Открыть: /styles/prosilver/theme/common.css
Найти:
Код: Выделить всё
.clear {
display: block;
clear: both;
font-size: 1px;
line-height: 1px;
background: transparent;
}
Код: Выделить всё
.trigger {
background: url("{T_THEME_PATH}/images/collapse-icon.png") no-repeat;
width: 32px;
height: 17px;
cursor: pointer;
float: right;
position: relative;
z-index: 9998;
margin-top: -21px;
}
.active {background-position: left top;}
.inactive {background-position: left bottom;}
Открыть: /styles/prosilver/template/forumlist_body.html
Найти:
Код: Выделить всё
<!-- END forumrow -->
</div>
Код: Выделить всё
<script type="text/javascript">
$(".forumlist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}
});
</script>