PDA

View Full Version : forum/category collapse is possible ?


netcommander
03-09-2010, 06:39 AM
hello
how can I collapsed some or any forums ? is it possible ?

Best regards

Marco van Herwaarden
03-10-2010, 11:47 AM
That could lead to problems for users who have turned off JavaScript as they will never be able to expand it.

netcommander
03-11-2010, 05:03 AM
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
03-19-2010, 07:04 AM
any body is there ?
Please help

netcommander
05-17-2010, 06:12 AM
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
11-08-2012, 09:13 PM
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;hos t-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_cat 25%0Ac_cat21',363);
}
</script>