PDA

View Full Version : Help to Add Collapse Button to VB5 Sub Forums Theme


seyed
09-15-2018, 03:43 AM
Unfortunately VB5 doesn't have Collapse Button for Sub Forums, is there anyway ( Mod or Hack ) to add a button to each sub forum title for opening and closing it ?

Thank you

noypiscripter
09-19-2018, 07:53 PM
Did you mean that the "Sub-Forums:" label will only be displayed by default and no list of sub-forums appear under it? Then when you click on the label, it will show the list of sub-forums? Then clicking it again hides the list?

seyed
09-19-2018, 08:48 PM
Yes exactly, VB4 has that feature by default .. VB5 is so incomplete ..

noypiscripter
09-21-2018, 06:14 PM
I'll add it to my todo list of mods. Watch out for it on my site.

delicjous
09-21-2018, 06:49 PM
So you mean a simple collapse like I implemented on my Forum (look at the sig, just click a category header) or should it be saved and stay collapsed when you click it? I allready have/ has it on my list :-) But that is as full as possible right now.

seyed
09-22-2018, 02:11 AM
I need the collapse button that exist on vb4 for vb5 ..

https://vborg.vbsupport.ru/attachment.php?attachmentid=157207&stc=1&d=1537589446

I don't understand why they removed it from vb5

seyed
09-22-2018, 02:16 AM
So you mean a simple collapse like I implemented on my Forum (look at the sig, just click a category header) or should it be saved and stay collapsed when you click it? I allready have/ has it on my list :-) But that is as full as possible right now.

I'll add it to my todo list of mods. Watch out for it on my site.

you already implemented that on your site
https://vborg.vbsupport.ru/attachment.php?attachmentid=157208&stc=1&d=1537589758

noypiscripter
09-22-2018, 06:29 AM
you already implemented that on your site
https://vborg.vbsupport.ru/attachment.php?attachmentid=157208&stc=1&d=1537589758
Your screenshot seems to be for the module collapse button which all or most modules have by default. I thought you were referring to adding the collapse button for forum directory listing which doesn't have it by default.

seyed
09-22-2018, 08:41 PM
Yes exactly my friend .. I want that button for the forum directory listing .. is this possible ?

noypiscripter
09-22-2018, 11:31 PM
delicjous said he already implemented it

delicjous
09-23-2018, 06:53 AM
If you implement the following code as script/ js file you could click the category-header (not the text) and the category collapse:

jQuery(document).ready(function () {
jQuery(".forum-list-container .forum-item").show();
jQuery("tr.subforum-list").show();
//toggle the componenet with class msg_body
jQuery("TR.category-header").click(function () {
jQuery(this).nextUntil(".forum-list-container .forum-item").fadeToggle(100);
jQuery(this).next("tr.subforum-list").fadeToggle(100);
jQuery(this).nextUntil("TR.category-header").fadeToggle(100);
});
});

You did not answer my question ;-) ... this code is not save the users setting of the collapsed/ uncollapsed categories. For that it must integrate with a module.