vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   forum/category collapse is possible ? (https://vborg.vbsupport.ru/showthread.php?t=237869)

netcommander 03-09-2010 06:39 AM

forum/category collapse is possible ?
 
1 Attachment(s)
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;ho st-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>


All times are GMT. The time now is 12:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01256 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete