Loading...
 
Skip to main content

CloseModuleBoxesJSHack

create lib/closeboxes.js using following code:

Copy to clipboard
function setsectionstate(foo, def, img) { var status = getCookie(foo, "menu", "c"); if (null === status) { status = "c"; } /*you may open specific modules by default, for main menu for example*/ /*if (foo == "mod-YOURMODULENAME") {*/ /* status = "o";*/ /*} */ if (status == "o") { show(foo); if (img) src = "o" + img; } else if (status != "c" && def != 'd') { show(foo); if (img) src = "o" + img; } else /*if (status == "c")*/ { hide(foo); if (img) src = img; } if (img) document.getElementsByName(foo + 'icn')[0].src = document.getElementsByName(foo + 'icn')[0].src.replace(/[^\\\/]*$/, src); }


then include as script after tiki-js.js in header.tpl... it overwrites setsectionstate function of tikilib

boxes should be closed now after reload in browser, other things should work as expected (maybe the fo and ofo images are a bit weird)


Page last modified on Monday 31 July 2006 20:11:51 GMT-0000