Babyforum Posted April 12, 2014 Share Posted April 12, 2014 Здравствуйте. Есть ли возможность ограничить количество отображаемых подфорумов, например до 10? Знаю как ограничить по количеству символов, а нужно именно по количеству самих подфорумов. За подсказку буду безмерно благодарен. Link to comment Share on other sites More sharing options...
siv1987 Posted April 12, 2014 Share Posted April 12, 2014 Стандартно - нет. Link to comment Share on other sites More sharing options...
Babyforum Posted April 12, 2014 Author Share Posted April 12, 2014 Это я уже понял :) Не подскажите как нестандартно? Link to comment Share on other sites More sharing options...
newbie Posted April 12, 2014 Share Posted April 12, 2014 http://community.invisionpower.com/files/file/3991-rsyvarth-hide-forums/http://community.invisionpower.com/files/file/4551-remove-forums-from-board-index/http://community.invisionpower.com/files/file/5879-remove-forums-from-board-index-user-control/ 1 Link to comment Share on other sites More sharing options...
Babyforum Posted April 12, 2014 Author Share Posted April 12, 2014 Немножко не то, но всё равно спасибо. Link to comment Share on other sites More sharing options...
siv1987 Posted April 12, 2014 Share Posted April 12, 2014 Ну как вариант, можно скрыть часть подфорумов через css если блок больше определенного размера. Внешний вид -> %шаблон% -> Список форумов -> boardIndexTemplateВ самый низ добавить: <script type="text/javascript"> $$('ol.subforums').each(function(elem){ if(elem.getHeight() > 60){ elem.addClassName('fhide'); var a = new Element('a', {'class': 'fclick', href: '#'}).update("Показать"); elem.insert({before: a}); a.observe('click', function(e){ e.stop(); var sub = $(this).next('.subforums'); sub.toggleClassName('fhide'); $(this).update(sub.hasClassName('fhide') ? 'Показать' : 'Скрыть'); }); } }); </script> В ipb_styles.css добавить стили .fhide{ height: 50px; overflow: hidden; } .fclick{ padding-left: 22px; text-decoration: underline; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now