vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=237869

forum/category collapse is possible ?
by netcommander
09 Mar 2010 08:39

1 Attachment(s)
hello
how can I collapsed some or any forums ? is it possible ?

Best regards

Marco van Herwaarden 10 Mar 2010 13:47

That could lead to problems for users who have turned off JavaScript as they will never be able to expand it.

netcommander 11 Mar 2010 07:03

thanks for answer Marco
but its not problem i'll change for any forum. my forum home page is very crowded.
i want to simplify home page
how can I do
best regards

netcommander 19 Mar 2010 09:04

any body is there ?
Please help

netcommander 17 May 2010 08:12

i've still waiting
is there any way ?
if is it possible i've want to one link on forum homepage and i dont want user dont see to subforum ..
best regards

hbombers 08 Nov 2012 22:13

If you want to default forum to be collapsed by default.. here is my code to do it for VB4

(NOTE: I borrowed the cookie editing javascript from here: http://www.quirksmode.org/js/cookies.html
Also NOTE: you'll need to change the category ids for c_catxx )


<script type="text/javascript">

//document.cookie = "vbulletin_collapse=c_cat22%0Ac_cat25%0Ac_cat21;host-only=true";
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}

var vbc = readCookie('vbulletin_collapse')

if (vbc) {
} else {
createCookie('vbulletin_collapse','c_cat22%0Ac_cat25%0Ac_cat21',363);
}
</script>


All times are GMT. The time now is 00:02.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.