PDA

View Full Version : Expand/Collapsable Columns


Chexbox
08-19-2001, 02:51 AM
Hey,
My name is Isaac and I am new here so please son't scold me if
I post something stupid. I am trying to start a website, but I don't
have enough money to buy vBulletin Board yet.

Once I buy it in a month, I want this hack but I want to know if it can be done before I through my money away.

(1) Could I be able to put an expandable and collapsable script
on the forum so that the Categories have a + or - sign image on them and then when you press the + the category collapses but when you press the minus it expands.
I don't think I explained it very well, so here is an example and a clarification
http://www.wonko.com
The columns on the side do exactly what I want the categorys to do: expand and collapse without having to reload the page.


I have taken out what I think is the javascript code that does this:

<script language=javascript type="text/javascript">
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function menuClick(menu){
var foo=document.all[menu.sourceIndex+3].style;
if (foo.visibility=='hidden') {
foo.display='inline';
foo.visibility='visible';
document.all[menu.sourceIndex+1].src='images/arrow-down.gif'
setCookie('sideboxes[' + menu.id + ']', '1', 'Friday, 16-Jan-2037 00:00:00 GMT')
} else {
foo.display='none';
foo.visibility='hidden';
document.all[menu.sourceIndex+1].src='images/arrow-right.gif'
setCookie('sideboxes[' + menu.id + ']', '0', 'Friday, 16-Jan-2037 00:00:00 GMT')
}
}
function menuHighlight(menu){
//menu.style.color='yellow';
}
function menuUnHighlight(menu){
//menu.style.color='#000000';
}
function openNewsBox() {
window.open('newsbox.php', 'NewsBox', 'width=150, height=400, left=0, top=0, toolbar=no, menubar=no, status=no, location=no, scrollbars=no, resizable=yes');
}
function userInfo() {
box = document.whoisonline.members;
destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
</script>



It even stores a cookie so that the categories would be in the same position the visitor left it when they returned.
Here are the images that would look good:

Chexbox
08-19-2001, 02:52 AM
and the next image:

Chexbox
08-19-2001, 10:22 PM
Damn, 28 views and no replys :mad: . I guess it's a waste of time since I didn't buy the damn BB. I just want to know if it's possible.

If it is then I'll learn PHP and hack it myself.
Otherwise, I'm not buying anything.

Steve Machol
08-19-2001, 10:26 PM
Hmmm...well I'm one of those '28 views' and the only reason I didn't respond is because I didn't know the answer. I would assume that almost anything can be done by hacking, but I really can't say how to do it, or how easy or difficult it would be.

Sorry to disappoint you. :(

Wayne Luke
08-19-2001, 11:20 PM
It is possible... However the current framework would have to be changed to be able to handle this sort of layout.

Chexbox
08-20-2001, 01:08 AM
Okay, I see how it can be done now. It is quite easy actually. I think it should work, I'm not 100% sure though.

When I get some money to buy a bulletin board in a month or 4 I can set it up and show everyone how I think it should work, I think. Support wont go unappreciated.

SirSteve
10-26-2001, 03:52 AM
I am also interested in this hack.

floleb7
10-26-2001, 11:22 AM
<a href="http://www.vbulletin-france.com/board/showthread.php?s=&threadid=984" target="_blank">http://www.vbulletin-france.com/boar...=&threadid=984</a>