PDA

View Full Version : Collapsable forums on forum home


Pages : [1] 2

dabean
01-08-2002, 10:00 PM
This hack adds expansion and contraction support to the forum home page (index.php). The current version of this hack has been tested on vBulletin 2.3.2

Only supported browsers gain the ability to expand and collapse forum groups, non supported browsers do not gain anything, but no errors will be displayed.
Each users preference is saved to the database, additionally admins can select which forums are to be collapsed by default.


Browsers supported
Netscape6+/Mozilla0.6+
MS IE5+
Konqueror
Opera 7 support is included


Browsers unsupported
MS IE4 or earlier
Netscape 4 or earlier
Opera (version 6 and earlier)


Note: PHP 4.1.x or 4.2.x is required, PHP 4.0.x is now unsupported.

Instructions inside attachment.
Updated 4:18 PM 1/12/2002
- Packaged Post, Thread template Addon

Updated 7:53 PM 1/11/2002
- corrected installer

Updated 4:23 PM 1/11/2002
- Added DB support
- Added Per forum Collapsed Pref to admin cp

Updated 01/10/02 01:39am.
- Fixed missing line.

Updated 04/06/02 01:30am.
- Version 1.2
- PHP 4.1.x, 4.2.x support with or without register globals off.
- Performance tweeked javascript

Updated 06/06/02 11:20pm.
- Corrected templatecache bug

Updated 06/25/02
- Corrected formatting errors in readme

Updated 09/01/02
- vB 2.2.7 compatiblity statement, updated readme.

Updated 30/08/03
- vB 2.2.x and 2.3.x compatiblity statement, added new automatic testing script.

FAQ
Q: what exactly is Template_Option.txt?
A: Basically that exention was provided as a request to cover sites with the template modification that adds a "header" to each grouping.

Q: How do I show a forum depth greater than 2?
A: Open vB Admin cp set forum depth to your required level. Then create the additional templates. For template examples see https://vborg.vbsupport.ru/showthread.php?postid=250465#post250465

Q: Can sub-forums be collapsed?
A: Yes. See the above answer for example templates.

Q: XYZ doesn't work help.
A: Check that all the template changes required have been made, 99% of problems are due to incorrect template alteration. Also use the cx_test.php to automatically check your installation!

MarkB
01-09-2002, 09:52 PM
Do you have a demo?:)

TaP
01-09-2002, 10:01 PM
Sounds cool, but demo would be cool..

defnot
01-09-2002, 10:04 PM
i take this pic on the zip files..

DEMO

dabean
01-09-2002, 10:20 PM
No demo online, but a screenshot is included and the attached offline demo illustrates the hack.

StarBuG
01-09-2002, 10:37 PM
#1

This is great but doesn´t work!!
I have windows XP and the newest IE 6.0.2600
I have done all the steps in your installguide and I checked it THREE times!
But it still doesn´t work!
I have implemented the collabsable posts hack and this one works fine!
Maybe you forgott something??

#2
Question
Can u implemet a DB support for this hack so that it remebers the usersettings of each user and save it in the DB?

This would be verry usefull!

Greetings

StarBuG

dabean
01-09-2002, 11:44 PM
Originally posted by StarBuG
#1

This is great but doesn?t work!!
I have windows XP and the newest IE 6.0.2600
I have done all the steps in your installguide and I checked it THREE times!
But it still doesn?t work!
I have implemented the collabsable posts hack and this one works fine!
Maybe you forgott something??

#2
Question
Can u implemet a DB support for this hack so that it remebers the usersettings of each user and save it in the DB?

This would be verry usefull!

Greetings

StarBuG

Orginal release was missing 3 lines redownload and skip down to "Amendment from version 1.0" in the readme you just need to make that change to fix it. Also the method used to collapse the groups used is 99% different to the collapse post hack.


q2: Yes db support could be done, but adding it would make the hack more complex than I want to code/release.

Hmm changed my mind I might add this, it appears to be simpler than I first relised.

VirtueTech
01-09-2002, 11:48 PM
:) I was just working on this one myself. :)

StarBuG
01-09-2002, 11:51 PM
Hehe!!

Now it works!!

Thank you so much!!

But without DB support it isn?t very usefull cause after entering one forum and then come back to the index all forums are expand again!

Is there someone who can do the rest to make it REAL PERFEKT???


PLEASE!!! :D

Greetings

StarBuG

Martz
01-09-2002, 11:52 PM
I've also followed this to the last detail documented. 1 small fix, the name of the getbrowser.php file is getBrowser.php in the zip archive. On unix systems it can't find the file. Rename getBrowser.php to getbrowser.php and it gets further.

Tested on WinXP I.E 6.0.2600
and Win ME I.E 5.5


Very nice hack indeed, I hope the problems can be ironed out. :) Good work.

Edit just noticed update... :)

TaP
01-10-2002, 02:20 AM
DB support would be great :) Firefly and Bira where u at! :)

dabean
01-10-2002, 02:25 AM
DB is coming, just wait a few hours :). I just have to test it under IE5 and package the changes. Oh I want to get some production testing done before release.

SirSteve
01-10-2002, 04:57 AM
I too would love to have this for the forum home page as it works like Biras collapse/expand thread hack.

StarBuG
01-10-2002, 07:33 AM
dabean you are my man!!

I can?t wait to have the DB Support! :D

THX for all your hard work!!

StarBuG

Martz
01-10-2002, 08:06 AM
OK, I have this installed and working now, thanks for the update. Works great!

Lucky
01-10-2002, 09:03 AM
I will install this, but I think I will wait for DB support before doing so.

Great concept though.

Mark Hewitt
01-10-2002, 11:50 AM
What I would like to be able to do is with forums that have subforums to be able to put an x box beside them (and only them) which when clicked will display the sub forum too. If you see what I mean?

Inzagi
01-10-2002, 12:17 PM
Hi debean,

great hack but does this hack only work on "forum home" or also on normal forums (forumdisplay) ?

SirSteve
01-10-2002, 02:30 PM
Originally posted by Inzagi
Hi debean,

great hack but does this hack only work on "forum home" or also on normal forums (forumdisplay) ?

There is a hack out there by Bira that does the normal forums very well.

StarBuG
01-10-2002, 07:16 PM
Originally posted by Mark Hewitt
What I would like to be able to do is with forums that have subforums to be able to put an x box beside them (and only them) which when clicked will display the sub forum too. If you see what I mean?

There is already a subforums hack!
Not a shrink one but also very nice!

Have a look at:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=28478&highlight=subforums

Greetings

StarBuG

dabean
01-11-2002, 02:28 PM
Updated:
Preference is saved to the database, admins can select which forums are to be collapsed by default.

Redo the whole hack to upgrade new changes are marked new! and alterations from the previous version are in red.

Tarion
01-11-2002, 02:32 PM
thx for your great work i love this hack i will install it tonight :)

big thx

StarBuG
01-11-2002, 05:33 PM
WOW!!

WORKS PERFEKT!!!

BIG BIG THX!!!!!

One little thing:

If you start: cx_install.php

you get this error:

Parse error: parse error, expecting `','' or `';'' in c:\foxserv\www\board\admin\cx_install.php on line 127

Just want you to know :D

Greetings and thx for your very good work!

StarBuG

dabean
01-11-2002, 05:54 PM
Installer fixed, doh.

Martz
01-11-2002, 06:51 PM
Originally posted by dabean
Updated:
Preference is saved to the database, admins can select which forums are to be collapsed by default.

Redo the whole hack to upgrade new changes are marked new! and alterations from the previous version are in red.


Has the readme been updated? i redownloaded and it looks like the first version of it, the ammendment is missing also! :confused:

Thanks for any help, this is a great hack :)

dabean
01-11-2002, 07:05 PM
Originally posted by Martz



Has the readme been updated? i redownloaded and it looks like the first version of it, the ammendment is missing also! :confused:

Thanks for any help, this is a great hack :)

I downloaded the attachment it does have the changes so i presume your browser still has cached the old version.

StarBuG
01-11-2002, 07:37 PM
Also Netscape (the newest) don´t save the settings correctly
I have checked it with my Database!
For me the Forum always makes an entry when I collabs a categorie, but it doesn´t remove it when I expand!
I have checked it with 2 other PC´s from friends of mine and the Problem is the same!
It always remembers wich one is closed but doesn´t remove it from the db if u expand it
I don´t know why!
Maybe you forgott in the code that when you expand that the kategorie ID is removed from the DB?????
I have tried it over and over!

What do u think??

Greetings

StarBuG

jminiman
01-11-2002, 09:50 PM
Okay, I followed the instructions exactly, and forums home never changed. I selected one of my forums to be collapsed by default, and that didn't change anything.

Outside of what the readme prescribes, what else must I do to enable this to work? Where in admin CP do I turn it on globally? I just went into Forums--Edit to turn on collapsing for one forum.

SirSteve
01-11-2002, 10:20 PM
I get this error when trying to load the cx_install.php in the admin dir via the web browser:

Parse error: parse error, expecting `','' or `';'' in [removed]/forums/admin/cx_install.php on line 127

I did it manually though. Just thought you should know.

I am running IE 6 on Win XP.

StarBuG
01-11-2002, 10:35 PM
I mentioned this error befor and dabean has correct it! :D

Greetings

StarBuG

SirSteve
01-11-2002, 10:37 PM
It's working great! BUT, I have a popular template hack, the Forum Posts Threads Last Post Moderator repeats per forum (look here: http://www.sirstevesguide.com/vbportal/forums ) and it would be nice if it also cleared that table row when collapsed. My other hangup is the expand/collapse gif is smack agains the forum name, where is this bit so I can add a space after it so it looks nicer?

StarBuG
01-11-2002, 10:48 PM
forumhome_forumbit_level1_nopost is the template! :D

change it to:
<td colspan="6">$expandcontract& bsp;<a href="forumdisplay.php?s=$session[s

(without the space between & b ;))

and u have a space ;)

By the way: Your Forum doesn?t remember my settings also!

(You can delete my account! Just want to test it! ;))




Greetings

StarBuG

SirSteve
01-11-2002, 10:52 PM
Originally posted by StarBuG
forumhome_forumbit_level1_nopost is the template! :D

change it to:
<td colspan="6$expandcontract">& bsp;<a href="forumdisplay.php?s=$session[s
(without the space betweeb & and b)

By the way: Your Forum doesn?t remember my settings also!

(You can delete my account! Just want to test it! ;))


and u have a space ;)

Greetings

StarBuG

Thanks. I tried it but no go so I had to add a non-breaking space (&nbsp;) and it worked. :)

Now, about that other issue... ;)

It remembered my setting... ??

StarBuG
01-11-2002, 10:58 PM
First you read my post during I was editing it cause I made a typo! hehe

2nd: Try this:
close all categories
refresh
open one
refresh and look if it is still open!

I tried it and it was closed again! ;)

greetings

StarBuG

SirSteve
01-11-2002, 11:08 PM
hmm... you are correct. Like 1 out of 10 times it works...

StarBuG
01-11-2002, 11:15 PM
Can u please try it with netscape to?
For me it was the same problem!

Greetings

StarBuG

ps: I would change the graphics!
I have made my own ones and if anyone wants them I have attached them here! ;)

dabean
01-11-2002, 11:20 PM
Originally posted by jminiman
Okay, I followed the instructions exactly, and forums home never changed. I selected one of my forums to be collapsed by default, and that didn't change anything.

Outside of what the readme prescribes, what else must I do to enable this to work? Where in admin CP do I turn it on globally? I just went into Forums--Edit to turn on collapsing for one forum.

You need to have a forum depth set to at least 2.
This hack can only collapse forums that would normally appear on the forum home page.

SirSteve: I don't have that hack installed I will look it over and produce a extension to add collapse support for it, when I have time.

All: rapidly expanding/contracting groups will cause it to forget the setting because IE/Netscape queue HTTP requests wait for the background load to happen (notice that collapsing/expanding causes your progress bar to start loading something), Netscape 6 takes slightly longer than IE.. but settings are saved. One extension I would love to provide is a status icon to show the settings being saved but IE lacks support for assigning the onload event dynamically :(.

StarBuG
01-11-2002, 11:26 PM
If I understand u right dabean I have to wait longer so the changes can take effect!

If I collabs forums I can do it as fast as I can and a fast refresh doesn´t matter! It remembers the settings!
But the expand setting isn´t saved (I waited 30 seconds and the loadind was done long befor the refresh!)

Can u plz recheck your code or maybe recode the expand script so that it remembers it correctly!
I don´t think that this is a browser Problem:
a) netscape has the same problem
b) the collabs is working without any problems!

Greetings

StarBuG

Martz
01-11-2002, 11:33 PM
I have reinstalled this hack from scratch and it doesn't remember any of my settings. :(

Any advice? I'm sure tje zipfile in your first post is outdated, I can't see any differences between it and the one without saved settings.

StarBuG
01-11-2002, 11:37 PM
IF u find red code in your readme you have the right file!

But if not I have attached the right one!

Greetings

StarBuG

[Attachment removed - read dabeans reply!]

Martz
01-11-2002, 11:44 PM
Ahh thank you - this is a completly different file to the one in the first post!

I'll try this.

/me skips off to bodge the forums...

dabean
01-11-2002, 11:46 PM
arrg I'm stupid the readme dated before this post has a misplaced line, (i can only bliam lazyness, copy paste and doing html in notepad ;))

}
dostatesaveXP(itemID,1);

should read

dostatesaveXP(itemID,1);
}

This should fix the save problem.

Please do not use starbug's attachment as it contains this error, I have changed the name and fixed the above error in the attachment on the first post.

StarBuG
01-11-2002, 11:52 PM
You are great!!

This corrected the error!!

(By the way: The code to correct is in the forumhome_expandjscript template at the end! ;))

Thank you so much!

Now everything works fine!!

hehe

So it was good I have "beta" tested the hack ;)

Greetings

StarBuG

dabean
01-12-2002, 12:12 AM
hehe,starbug. I really need to work on packaging releases ;)

Steve, I've looked over the hack you have installed change the forumexp function in forumhome_expandjscript to read.

[change included in release]

jminiman
01-12-2002, 12:18 AM
Originally posted by dabean


You need to have a forum depth set to at least 2.
This hack can only collapse forums that would normally appear on the forum home page.


Done, but the collapse/expand icons don't show up as they should. What now?

jminiman
01-12-2002, 12:20 AM
Need to set the parent forums as categories--got it!

Martz
01-12-2002, 12:20 AM
Should the code look like this then?


for (i = 0; i < fitems.length; i++) {
fitems[i].style.visibility="hidden";
fitems[i].style.display="none";
}
dostatesaveXP(itemID,1);
}
}
//-->
</script>


As thats whats in the read me and in the text file. I see IE do the update, but it doesn't seem to take effect.

Thanks.

dabean
01-12-2002, 12:28 AM
Originally posted by jminiman


Done, but the collapse/expand icons don't show up as they should. What now?

Show up fine for me when I visited your site.. what browser you using?

jminiman
01-12-2002, 12:34 AM
I got them to show up, but I much prefer the look of parent forums acting as forums, rather than categories. Is there any way to somehow expand/collapse forums? Why were categories chosen to be collapsed, and not forums? Look at my site now . . . THIS is what I want to expand and collapse. It's much prettier, I think.

I love this look, but people complain that they want to see posted-to forums.

dabean
01-12-2002, 12:51 AM
jminiman: put the modifications in * forumhome_forumbit_level1_post
insted of * forumhome_forumbit_level1_nopost
then (the exact alteration is to add $expandcontract ).

martz: yes that looks correct.

jminiman
01-12-2002, 12:59 AM
Originally posted by dabean
jminiman: put the modifications in * forumhome_forumbit_level1_post
insted of * forumhome_forumbit_level1_nopost
then (the exact alteration is to add $expandcontract ).

martz: yes that looks correct.

Did that, and no plusses or minuses show up next to parent forums on forums home. Do note that I removed the on/off (check marks) from the parent forum bits on forums home, though I don't think that should matter.

Check out http://discuss.pocketnow.com

Update: just restored everything so the parent forums are showing what they should by default, and still no plusses or minuses.

Martz
01-12-2002, 01:03 AM
Still not working for me. :(

http://forums.utassault.net/index.php?s=

Isn't saving the settings, and I have double checked a lot of stuff.

jminiman
01-12-2002, 01:09 AM
Got it to work, AND I moved the expand/contract images over the left-most cells so it looks a lot tighter.

Check it out: http://discuss.pocketnow.com

You like? ;)

Great hack!

SirSteve
01-12-2002, 01:11 AM
Originally posted by dabean
hehe,starbug. I really need to work on packaging releases ;)

Steve, I've looked over the hack you have installed change the forumexp function in forumhome_expandjscript to read.


function forumexp(itemID) {
var fitems=new Array();
var i=0;
var csslevel =1;

if (document.implementation &&
document.implementation.hasFeature &&
document.implementation.hasFeature("CSS", "2.0")) {
// The browser claims to support CSS Level 2
// interface
csslevel=2;
}

if (document.getElementById('c'+itemID).style.visibil ity=='hidden') {
document.getElementById('c'+itemID).style.visibili ty="visible";
document.getElementById('c'+itemID).style.display="inline";
document.getElementById('e'+itemID).style.visibili ty="hidden";
document.getElementById('e'+itemID).style.display="none";
document.getElementById('f'+itemID+'z').style.visi bility="visible";
if (csslevel==1) {
document.getElementById('f'+itemID+'z').style.disp lay="inline";
} else {
document.getElementById('f'+itemID+'z').style.disp lay="table-row";
}
// build element collection using w3c dom level2 methods
while (document.getElementById('f'+itemID+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+i);
i++;
}

for (i = 0; i < fitems.length; i++) {
fitems[i].style.visibility="visible";
if (csslevel==1) {
fitems[i].style.display="inline";
} else {
fitems[i].style.display="table-row";
}
}
dostatesaveXP(itemID,0);
} else {
document.getElementById('c'+itemID).style.display="none";
document.getElementById('c'+itemID).style.visibili ty="hidden";
document.getElementById('e'+itemID).style.display="inline";
document.getElementById('e'+itemID).style.visibili ty="visible";
document.getElementById('f'+itemID+'z').style.visi bility="hidden";
document.getElementById('f'+itemID+'z').style.disp lay="none";

// build element collection using w3c dom level2 methods
while (document.getElementById('f'+itemID+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+i);
i++;
}
for (i = 0; i < fitems.length; i++) {
fitems[i].style.visibility="hidden";
fitems[i].style.display="none";
}
}
dostatesaveXP(itemID,1);
}




The other change is to find the template you added the the Forum Posts Threads Last Post Moderator repeats per forum to and alter
<tr align="center">
<td bgcolor="

to read
<tr id="f$forum[forumid]z" align="center">
<td bgcolor="


If that modification works I'll add it to the hack readme

Works great! Check it out:

http://www.sirstevesguide.com/vbportal/forums

dabean
01-12-2002, 01:16 AM
Martz: do you have phpmyadmin? to check that it is saving settings in the database.

SirSteve: cool :) and you need to add back the "function dostatesaveXP ()" found in the readme to the template.
It starts on
<!--
function dostatesaveXP (forumID, value) {

all the way down to

}

function forumexp(itemID) {

SirSteve
01-12-2002, 01:47 AM
It's getting irratating that the settings are not saving... Also, I noticed in the status bar there is no "Error" on the page until I click the expand/collapse graphic...

dabean
01-12-2002, 01:51 AM
sirsteve, the fix is in my post above.

Or replace forumhome_expandjscript with the attached file. This is only for people with the forum, post etc.. template hack.

SirSteve
01-12-2002, 02:03 AM
I tried the file but same thing. Although the "error" is gone from the status bar but it is still not saving my settings.

dabean
01-12-2002, 02:29 AM
sirsteve visited your site it works for me, apart from a minor display glitch which is fixed by adding $fhomeexpandstyle

[change included in release]

SirSteve
01-12-2002, 03:11 AM
hmm.... guess I will clear my cookies and see what happens. Thanks. I added that other part as suggested.

dabean
01-12-2002, 03:15 AM
SirSteve: I would recommend you redownload "forumhome_expandjscript2.txt" the version on your site does contain a small error, with out the update the hack may not from work correctly. (as of when I posted this)

SirSteve
01-12-2002, 03:16 AM
Cleared everything and tried it again and now it saved just 1 setting but none of the others. err....

SirSteve
01-12-2002, 03:23 AM
Ok, trying it now. Thanks.

dabean
01-12-2002, 03:30 AM
SirSteve: sorry about the previous post but use this attachment. I ment to attach it above :)

If you want to check that it is installed correctly then
http://yoursitehere/updateindex.php?fid=<forumid>&val=0 to expand a collapsed forum and http://yoursitehere/updateindex.php?fid=<forumid>&val=1 to collapse a forum.



[after edit Attachment removed now part of the hack.]

SirSteve
01-12-2002, 03:33 AM
That worked! BUT, when you collapse it, everything collapses correctly with the extra hack that is there (the Forum Posts Threads Last Post Moderator template hack/addition) but when you come back, that Forum Posts Threads Last Post Moderator row is there, but collapsed. I guess you have to see it for yourself to understand. Thanks again!

SirSteve
01-12-2002, 03:34 AM
I guess we are both typing at the same time. :) I will try the above.

SirSteve
01-12-2002, 03:37 AM
Ok, tried the new attachment and it's almost there. See post #65 above.

dabean
01-12-2002, 03:39 AM
I see the problem, I'll code up a fix over the evening for you.

After edit.
Code is now part of the hack release.

SirSteve
01-12-2002, 03:40 AM
Thanks. I'll check back tomorrow then. :)

dabean
01-12-2002, 03:47 AM
easier than it looked fix is above.

I will package this properly into the zip tomorrow however.

SirSteve
01-12-2002, 04:24 AM
That did it! Very cool and I (we) really appreciate your quick support on this!

:D

net ba
01-12-2002, 10:35 AM
The + and - images don't show up so I can't expand or contract it. I know its working though because when I set a forum to be contracted on Admin CP it contracted, I just couldn't open it manually. I am running windows 98 Second Edition and using version 5.50 of MSIE.

net.ba

dabean
01-12-2002, 02:09 PM
Originally posted by net ba
The + and - images don't show up so I can't expand or contract it. I know its working though because when I set a forum to be contracted on Admin CP it contracted, I just couldn't open it manually. I am running windows 98 Second Edition and using version 5.50 of MSIE.

net.ba

sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"


Hack has been repackaged to include optional addon.

Rose
01-12-2002, 04:56 PM
I'm getting a couple errors with this. :(

The first is in the cx_install - I looked and this looks slightly different from the error reported earlier.
Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/cx_install.php:1) in /home/simpson/public_html/admin/functions.php on line 1498
ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'




And the second is on my forum home page I get:
Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/getbrowser.php:57) in /home/simpson/public_html/admin/functions.php on line 1498
This is right above my header banner. :( I haven't messed with the functions.php.


Line 57 of the getbrowser.php is blank, so I deleted it leaving the "?>" as the last line. Reuploaded and reran the cx_install. But still errors. :(

Any help?

Rose
01-12-2002, 04:58 PM
Now I'm getting a database error. :(Database error in vBulletin Control Panel 2.2.1:
______________
Invalid SQL: ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'collapsed'

mysql error number: 1060

Date: Saturday 12th of January 2002 01:59:01 PM
Script: http://www.simpsonsboard.com/~simpson/admin/cx_install.php?step=2
Referer:
______________

I have the little icons next to the forum descriptions, and if I click on 'expand' the 'collapse' button will appear, but nothing changes other than the picture.

Shenlong
01-12-2002, 05:04 PM
this hack is a little corrupt, I was getting erros on the top saying stuff so I uninstalled the hack

Rose
01-12-2002, 05:45 PM
I think I'm with you, Shenlong. I had to uninstall so I could reopen the site. :s

SirSteve
01-12-2002, 06:05 PM
Follow the instructions, it works. Check it out at www.sirstevesguide.com/vbportal/forums

Rose
01-12-2002, 07:14 PM
Originally posted by SirSteve
Follow the instructions, it works. Check it out at www.sirstevesguide.com/vbportal/forums


As far as I know, I did follow the instructions, and rechecked them twice. :)

dabean
01-12-2002, 08:14 PM
The installation script makes all the important changes on its first run... rerunning it will throw a error. That is not important however, the error mysql error: Duplicate column name 'collapsed' does show that the installer worked.

Now as for the collapse not working check that the javascript contained in "forumhome_expandjscript" has been added to the page and that forumhome_level2_post does contain
<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">
and yes there should be two 'z''s (only in v1.11)

Master Ares
01-12-2002, 11:27 PM
Ok maybe I'm on crack here but I've followed everything to the letter within the 3b release at the start of those thread, and I get 1 of 2 errors depending on what I do with the jscript file.

1) if I use the one in the readme, when y ou hit + or - nothing happens. I see it zoom by with its call to the updatethread file but notta. This occurs on two different machine though both use IE6+ with XP.

2) if I use the one that adds the

document.getElementById('f'+itemID+'z').style.visi bility="visible";

line (in the template_options file included with the archive) then I get an error line 72 when I contract (object required) and at line 98 when I expand (object required). For the life of me I can't see the error so maybe you've run into it and I have yet to see this question asked in this thread which it may have but I have missed it :D

Anyways thanks for any help.

Site = http://forums.endlessfantasy.com

net ba
01-12-2002, 11:30 PM
Works like a charm

dabean
01-12-2002, 11:40 PM
Master Ares, for you forum setup you need to use the version in the read me and upon visiting your site it was obvious to me that your forumhome_level2_post template had not been altered to include... id="f$forum[parentid]z$z" $fhomeexpandstyle (hint <tr align="center"> where to put those bits is discribed in the readme. Additionally you need make that modification to the forumhome_level2_nopost template because you have level2 forums that don't contain posts.

Master Ares
01-12-2002, 11:45 PM
Hah I knew I missed something:-) Thanks muchly

Works perfectly now:-) Thanks again. I put the changes in the forumbit not forumhome section:-P

dabean
01-12-2002, 11:52 PM
Master Ares, easy enough mistake to make. ;)

Erwin
01-13-2002, 01:09 AM
Cool hack! Works like a charm! Easy to make mistakes with this one - follow the instructions CAREFULLY! :)

incursio
01-13-2002, 01:23 PM
It seems to work here, but unless I've botched the install, I may have found a bug.

Lets say I go to the forums home page, and close all the sections but 2 of them. That seems to have worked fine - it remembers it, even when I revisit the site. However, if I open up a new section, then visit one of the forums inside of that section, then reload the forums home page, only my original sections are left open (i..e the 3rd one is still closed). Any ideas?

incursio
01-13-2002, 01:29 PM
Another update. I've closed all the sections, then reloaded, and they are still closed. I open one, reload, they are all still closed.

dabean
01-13-2002, 03:15 PM
incursio, does it remeber setting for any section you open after collapsing it?

as a test try http://<yourforums>/updateindex.php?fid=<categoryid>&val=0 where categoryid is a forum you have collapsed. That should expand the the forum.

StarBuG
01-13-2002, 04:14 PM
I just can say:

Guys... THIS HACK WORKS GREAT!!!

Thank you so much dabean for coding it and for your GREAT support!!

Greetings

StarBuG

Martz
01-13-2002, 04:41 PM
Yup, it works great for me too!

5 Stars

incursio
01-13-2002, 07:15 PM
Originally posted by dabean
incursio, does it remeber setting for any section you open after collapsing it?

as a test try http://<yourforums>/updateindex.php?fid=<categoryid>&val=0 where categoryid is a forum you have collapsed. That should expand the the forum.

Yes, that works fine. I load the URL you mention above in one window, then refresh my forums home page in another, and all loads fine.

However, the problem is still there. Take a look:

http://www.wetcanvas.com/forums

Lucky
01-13-2002, 07:19 PM
Great hack!

Thanks.

dabean
01-13-2002, 08:04 PM
Originally posted by incursio


Yes, that works fine. I load the URL you mention above in one window, then refresh my forums home page in another, and all loads fine.

However, the problem is still there. Take a look:

http://www.wetcanvas.com/forums

Thats a old version of the hack.. and by the look of the javascript possibly the orginal db release.. download the latest "3b" release or alternatively.
Change
}
dostatesaveXP(itemID,1);
}

to
dostatesaveXP(itemID,1);
}
}


This problem was cured in later releases.

Sven
01-17-2002, 06:48 PM
Possible enhancement?

What about adding an option into the user's cp so they can pre-define which categories to collapse by default?

I really don't know how to code it and I appreciate the current capabilities - but due to the lack of IE to save the settings this would be a great option!

Shenlong
01-17-2002, 08:31 PM
figured id try again, this script doesnt work on v2.2.1, just tried it and a blank page is showing, heres my URLs

Index.PHP (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/index.txt)
Forum.PHP (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/forum1.txt)

dabean
01-17-2002, 09:48 PM
Originally posted by Shenlong
figured id try again, this script doesnt work on v2.2.1, just tried it and a blank page is showing, heres my URLs

Index.PHP (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/index.txt)
Forum.PHP (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/forum1.txt)

Upload getbrowser.php to your admin directory
Upload getforumview.php to your admin directory

Once you've done that it will work.. as there is nothing syntatically wrong the code.

Shenlong
01-17-2002, 10:27 PM
Hehe, I did, I did. Theres no error coming up, just the image isnt coming up, here is my templates too:

forumhome_expandjscript (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/template1.txt)
forumhome_expandcontract (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/template2.txt)

dabean
01-17-2002, 10:40 PM
Originally posted by Shenlong
Hehe, I did, I did. Theres no error coming up, just the image isnt coming up, here is my templates too:

forumhome_expandjscript (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/template1.txt)
forumhome_expandcontract (http://go.teleblaze.com/cgi-bin/redirect.cgi?link=http://teleblaze.com/misc/template2.txt)

and you have edited forumhome_forumbit_level1_nopost or forumhome_forumbit_level1_post and forumhome_forumbit_level2_post?

Shenlong
01-17-2002, 10:45 PM
aye aye matey! I have, images just wont show up, I will reupload and try again, I got all the files saved in a folder, and didn't even re-edit the templates to switch them back to normal

wait, i was supossed to edit forumhome_lvl_one_post?

the instructions only say nopost

Shenlong
01-17-2002, 10:49 PM
just for the record:

forumhome_forumbit_level1_nopost:

<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6">$expandcontract<a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
</tr>

forumhome_forumbit_level2_post:

<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">
<td bgcolor="{secondaltcolor}" valign="top"><img src="{imagesfolder}/$forum[onoff].gif" border="0" alt=""></td>
<td bgcolor="{firstaltcolor}" align="left"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont><b>$forum[title]</b></normalfont></a>
<br><smallfont>$forum[description]</smallfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$forum[replycount]</normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$forum[threadcount]</normalfont></td>
<td bgcolor="{secondaltcolor}"><smallfont>$forum[lastpostinfo]</smallfont></td>
<form><td bgcolor="{firstaltcolor}" valign="middle" align="right" nowrap>
<IMG align="absmiddle" SRC="{imagesfolder}/team.gif">
<SELECT NAME="newLoc" onChange="jumpPage(this.form.newLoc)" style="font-size: 7pt; background-color: #dfdfdf; font-family: Arial, Tahoma;" maxlength="20">
<OPTION VALUE="#">moderators</OPTION>
<OPTION VALUE="#">---------------------</OPTION>
$forum[moderators]</select></td></form></tr>

dabean
01-17-2002, 10:52 PM
level1_post should only be edited if you don't have parent forums as categories, which generally seems a rare configuration.

Shenlong
01-17-2002, 10:54 PM
NM i misunderstood, anyway, i guess this hack just wont work with 2.2.1, thanx for ur help anyway

dabean
01-17-2002, 11:10 PM
This hack will and does work with vb 2.2.1.

Shenlong
01-17-2002, 11:25 PM
apparently not for me

I gave u links to everyone of my files, posted my edited templates here, and if u looked through them and approved, not much more I can do to fix

dabean
01-17-2002, 11:49 PM
Shenlong : try this attached style, upload it as a NEW style and change your style to use it. Do not upload it on top of your existing style(s) as it will overwrite them.

Shenlong
01-18-2002, 01:07 AM
what shall I name it?

dabean
01-18-2002, 01:16 AM
Originally posted by dabean
Shenlong : try this attached style, upload it as a NEW style and change your style to use it. Do not upload it on top of your existing style(s) as it will overwrite them.

Anything

Sven
01-18-2002, 06:28 AM
Originally posted by Shenlong
apparently not for me


I installed it yesterday and it works perfect with 2.2.1!

Just a little annoying though that settings are not saved for users - that's why I asked for the enhancement on the previous page.

Dabean, any comment on this?

Shenlong
01-18-2002, 10:27 AM
Originally posted by dabean


Anything

so thats gonna help me? cool

dabean
01-18-2002, 02:10 PM
Originally posted by Sven

I installed it yesterday and it works perfect with 2.2.1!

Just a little annoying though that settings are not saved for users - that's why I asked for the enhancement on the previous page.

Dabean, any comment on this?

They should be saved if the hack is installed correctly..
have you uploaded updateindex.php to your forums directory?

When i visited your site I received a 404 page not found when requesting that file, suggesting it has not been uploaded.

Shenlong: The name that you give the provided style set is not important what is important is that when you view your site via the the provided style the collapse/expand buttons should appear.

Sven
01-18-2002, 02:56 PM
I feel like a little dumbass...
I uploaded it to the admin dir....

Now it's working, thx a lot ;)

Arsenik
01-20-2002, 06:31 PM
I installed the hack and works the way it was written for. Great job!

It would be very usefull if users could edit their user settings so that the forums status are remembered:

1- select if all the forums should be collapsed or expanded
2- select the categories they want collapsed or expanded
3- choose to use the default settings defined by the admin or not...

Since only the settings defined by the Admin for the default collapse/expand status of categories are remembered it would be nice if the users could edit their settings that way changes are remembered. Since changes arent remembered on the fly it would be a good way around the problem it seems.

dabean
01-20-2002, 11:27 PM
Originally posted by Arsenik
I installed the hack and works the way it was written for. Great job!

It would be very usefull if users could edit their user settings so that the forums status are remembered:

1- select if all the forums should be collapsed or expanded
2- select the categories they want collapsed or expanded
3- choose to use the default settings defined by the admin or not...

Since only the settings defined by the Admin for the default collapse/expand status of categories are remembered it would be nice if the users could edit their settings that way changes are remembered. Since changes arent remembered on the fly it would be a good way around the problem it seems.

Item 1., I'll consider it for a future version.
Item 2. how is this different to the current behaviour?
Item 3. ditto.

Both item 2 and 3 should be satisfied by hack as it exists currently when correctly installed.

Common installation errors are:
- updateindex.php not being uploaded to the forum directory.
- old version of the forumhome_expandjscript template.. not 100% sure why people are still having problems with this as the current zip contains a working version of the template.

Arsenik
01-21-2002, 02:22 AM
I was talking about the Users them selves and not only the Admin of the board. ;)

I mean have the members edit their options and be able to use the settings the Admin selected by default or just not to use it at all if they dont want to. And also have the members be able to select what category they want collapsed or expanded like the Admin but in their own user options and be keept in the db since Collapsing and Expanding the forums on the fly doesnt work well. (the changes arent remembered)

Right now the hack keeps in the db the settings the Admin selects but not what the Members select thats what i was wanting to say. My bad if i wasnt clear. :(

dabean
01-21-2002, 05:42 PM
Originally posted by Arsenik
I was talking about the Users them selves and not only the Admin of the board. ;)

I mean have the members edit their options and be able to use the settings the Admin selected by default or just not to use it at all if they dont want to. And also have the members be able to select what category they want collapsed or expanded like the Admin but in their own user options and be keept in the db since Collapsing and Expanding the forums on the fly doesnt work well. (the changes arent remembered)

Right now the hack keeps in the db the settings the Admin selects but not what the Members select thats what i was wanting to say. My bad if i wasnt clear. :(

Um no the users choice to expand or contract a forum is saved in the database with the hack as it exisits currently. This is in addition to admins being able to choose the forums to collapse by default. The the defaults are just that a user overridable default.

To make it clear exactly how this is achived I'll go through the function found in the current version line by line


function dostatesaveXP (forumID, value) {
var ifrm;
if (document.getElementById("colapser")) { <- does the iframe element exist?
// okay iframe exists
document.getElementById("colapser").setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value); <- set the iframe's SRC to load the preferance update.

document.getElementById("colapser").style.visibility="visible"; <- make iframe visible
document.getElementById("colapser").style.display="inline"; <- display iframe

document.getElementById("colapser").style.visibility="hidden"; <- make iframe invisible
document.getElementById("colapser").style.display="none"; <- hide iframe
} else { <- no iframe exists lets make one :)
ifrm = document.createElement("IFRAME"); <- create the iframe
ifrm.setAttribute("id","colapser"); <- set its unque identifier
ifrm.setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value); <- set the iframe's SRC to load the preferance update.
ifrm.style.width = 80+"px"; <- make the iframe small
ifrm.style.height = 30+"px"; <- make the iframe small
// ifrm.onload = hideframe; <- commented out, useless currently as IE doesn't support this
document.body.appendChild(ifrm); <- append the iframe into the document
document.getElementById("colapser").style.visibility="hidden"; <- make frame invisible
document.getElementById("colapser").style.display="none"; <- hide frame
}
}


Now for clarity the diference between display and visibility is display controls the box visiblity whilst visibility controls the element visiblity.. A display value of none with visibilty of visible would still leave the element visible, but out of "flow" with the other elements. Just like a display value of inline and visibility of hidden would hide the element but leave it's box behind leaving a empty "hole" in the page.

philphee
01-22-2002, 12:46 AM
dabean,

After I reread the instrustions and applied the changes specified to "forumhome_forumbit_level2_post" instead of "forumhome_forumbit_level1_post" it worked like a charm.

(Perhaps I should stop smoking crack :stupid: )

Thanks again for the great hack!!!

mvigod
01-30-2002, 02:46 AM
Just for clarity before I install this what exactly is Template_Option.txt in the instructions? What option does this refer to? Have no idea what you mean by

If you have the forum, post, threads, template hack

dabean
01-30-2002, 12:26 PM
Originally posted by mvigod
Just for clarity before I install this what exactly is Template_Option.txt in the instructions? What option does this refer to? Have no idea what you mean by



Basically that exention was provided as a request to cover sites with the template modification that adds a "header" to each grouping.
For a example Scroll back towards the begining somewhere around page 2 or 3 for posts by sirsteve.

mvigod
01-30-2002, 05:03 PM
Great hack!

Just installed it, followed the well written instructions and worked perfect on 2.2.1

I tested it on IE on the PC and it works fine...BUT...tried it on IE 5.0 on the Macintosh and when you collapse a forum all the forum titles, thread titles, descriptions and tables below the collapsed forum get squeezed to the left (take up maybe 30% of the left hand side of the table instead of running normally to fill the whole table left to right).

If you have a Mac with IE you can test it at my forum to see it.

http://www.rcuniverse.com

Any idea how to fix?

Also attached some images to match the default vbulletin style for anyone who wants them.

marc

dabean
01-30-2002, 06:04 PM
mvgod, would you mind attaching a screenshot as I'm sure the fix will be easy once I can see result. I unfortunatly don't have IE5 for mac.

mvigod
01-30-2002, 06:23 PM
here is a screenshot...

dabean
01-30-2002, 08:03 PM
Okay that is very strange.. try this version of forumhome_expandjscript to see if it fixes the problem.

[attachment removed didn't fix]

mvigod
01-30-2002, 09:09 PM
Tried it and same exact look...all the text below gets squished over to the left in the table same as before...gotta love the cross platform inconsistencies MS builds into their products.

Is it the javascript or the style sheet that is likely kicking the text over?

marc

dabean
01-30-2002, 09:31 PM
The CSS embeded in the javascript. It appears that IE MAC is interpreting the display property differently to IE WIN/UNIX and NS6/Moz/Konq :(. Is this version of IE5.0 or IE5.1? As the only solution appears to be reformating each cell using even more javascript or disabling the collapse function in IE5 MAC.

Oh well there is always undocumented features to play with is this any better?

mvigod
01-30-2002, 10:22 PM
Version 5.0 on the mac...do they even have a 5.1 on mac? I will check and upgrade if so...

Will try to test out macfix2 tonight sometime when the board "quiets" down a bit...

thanks,

marc

Gutspiller
02-01-2002, 02:34 AM
I added this hack and I didn't have any problems with the install, but it doesn't show any + or - signs next to the forum catagory name. Do I need to enable something? :confused:

mvigod
02-02-2002, 01:18 AM
Originally posted by Gutspiller
I added this hack and I didn't have any problems with the install, but it doesn't show any + or - signs next to the forum catagory name. Do I need to enable something? :confused:

Did you upload the gif images? Where did you upload them to? Make sure they are in the right place and they should come up.

over
02-13-2002, 11:19 AM
sweet hack :) cheers

LuBi
02-16-2002, 02:39 AM
I'm looking to do an expand and contract on my site. I run this hack already, where woul I find the code for a non php site to expand and contract? If it has to be php that's fine but I want it so when users click the icon or title the icon changes and a link list appears below the link/icon. Does anyone know where I could find such code?

mADmAX`
02-21-2002, 01:21 AM
Database error in vBulletin 2.2.2:

Invalid SQL: UPDATE user SET forumviewset='' WHERE userid='1' mysql error: Unknown column 'forumviewset' in 'field list'

mysql error number: 1054

Getting this error and I followed the steps exact. I see something about installing twice, I think I did my accident so if this is the problem, how to I reverse it?

dabean
02-21-2002, 05:14 PM
Using phpMyAdmin or a sql hack or even just mysql via the shell

run this query.
ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'

jminiman
02-22-2002, 01:30 AM
I have forums that are members of a category, which is beneath another category. So I have a structure like:

Category A
----Category C
---------Forum 1
----Category D
---------Forum 2
---------Forum 3

With this hack installed, BOTH Categories A, C, and D are collapsed on the forums home, and CANNOT be expanded. Clicking the little "+" does nothing. So, anything beneath category A can't be viewed. What template affects this? Is this a known bug? Are people able to have the above situation with no problems?

mADmAX`
02-22-2002, 02:33 AM
Thanks dabean that worked =)

dabean
02-22-2002, 03:07 AM
jminiman: Tested it does work, subject to creating the relivant level3 vb templates (not to do with this hack but vB its self).

Any/all templates you want the expansion/contraction buttons to appear in must contain "$expandcontract".

KISS
02-22-2002, 06:49 AM
Thanks worked great only thing I had was inside of whos online shows:

/vb/updateindex.php?&fid=45&val=0

As to where I am at. Did I miss something in the hack? Everything else seems to be working fine.

dabean
02-22-2002, 03:56 PM
You can fix that manually (complex/difficult not going to explain how).

Or use this hack.
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32849

jminiman
02-23-2002, 03:19 AM
dabean,

This is definitely one of my favorite hacks! Anyway, when I create the third tier templates, are they exact copies of the second-tier ones?

Originally posted by dabean
jminiman: Tested it does work, subject to creating the relivant level3 vb templates (not to do with this hack but vB its self).

Any/all templates you want the expansion/contraction buttons to appear in must contain "$expandcontract".

dabean
02-23-2002, 03:33 AM
jminiman: When I tested third and infact fourth tier templates I just made exact copies of the level 2 templates. So in answer to your question yes :)

s o r o k a
03-30-2002, 01:38 PM
perhaps you can help me, i installed the hack and I have the forum/posts/threads hack, and I think I did everything properly, but now when I expand or contract it, all that happens is that the forum/posts/threads expands or contracts. What have i done wrong?

Here is my forum: http://www.ti-arts.com/forums/index.php

dabean
03-30-2002, 02:40 PM
hmmm,

s o r o k a: The change needed to fix the hack is relatively tiny.

open up forumhome_expandjscript and change
while (document.getElementById('f'+itemID+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+i);
i++;
}

to

while (document.getElementById('f'+itemID+'z'+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+'z'+i);
i++;
}

s o r o k a
03-30-2002, 02:57 PM
hmmm... still no luck, I just thought I should mention that I changed index.php from the original

if (getViewSetting($forum['parentid'])==1) {
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
} elseif (getViewSetting($forum['parentid'])==2) {
$fhomeexpandstyle="";
}

to:

// auto collapse forums for user
if (getViewSetting($forum['parentid'])==1) {
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
} elseif (getViewSetting($forum['parentid'])==2) {
$fhomeexpandstyle="";
}

// auto collapse forums, post thing for user
if (getViewSetting($forum['forumid'])==1) {
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
} elseif (getViewSetting($forum['forumid'])==2) {
$fhomeexpandstyle="";
}

s o r o k a
03-30-2002, 04:11 PM
alright, i downloaded the most recent version, but now it minimizes fine, but when i maximize it only the forum/posts etc. show up.???

s o r o k a
03-30-2002, 04:17 PM
alright i figured out the problem, if anyone else is having this problem, it is because i teeny bit of code was left out in Template_Option. What is missing is a +'z' in the first while statement. I have included a new version that will work.


<script language="JavaScript" type="text/javascript">
<!--
function dostatesaveXP (forumID, value) {
var ifrm;
if (document.getElementById("colapser")) {
document.getElementById("colapser").setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value);
document.getElementById("colapser").style.visibility="visible";
document.getElementById("colapser").style.display="inline";
document.getElementById("colapser").style.visibility="hidden";
document.getElementById("colapser").style.display="none";
} else {
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("id","colapser");
ifrm.setAttribute("src", "updateindex.php?s=$session[sessionhash]&fid="+forumID+"&val="+value);
ifrm.style.width = 80+"px";
ifrm.style.height = 30+"px";
// ifrm.onload = hideframe;
document.body.appendChild(ifrm);
document.getElementById("colapser").style.visibility="hidden";
document.getElementById("colapser").style.display="none";
}
}

function hideframe() {
document.getElementById("colapser").style.visibility="hidden";
document.getElementById("colapser").style.display="none";
}

function forumexp(itemID) {
var fitems=new Array();
var i=0;
var csslevel =1;

if (document.implementation &&
document.implementation.hasFeature &&
document.implementation.hasFeature("CSS", "2.0")) {
// The browser claims to support CSS Level 2
// interface
csslevel=2;
}

if (document.getElementById('c'+itemID).style.visibil ity=='hidden') {
document.getElementById('c'+itemID).style.visibili ty="visible";
document.getElementById('c'+itemID).style.display="inline";
document.getElementById('e'+itemID).style.visibili ty="hidden";
document.getElementById('e'+itemID).style.display="none";
document.getElementById('f'+itemID+'z').style.visi bility="visible";
if (csslevel==1) {
document.getElementById('f'+itemID+'z').style.disp lay="inline";
} else {
document.getElementById('f'+itemID+'z').style.disp lay="table-row";
}
// build element collection using w3c dom level2 methods
while (document.getElementById('f'+itemID+'z'+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+'z'+i);
i++;
}

for (i = 0; i < fitems.length; i++) {
fitems[i].style.visibility="visible";
if (csslevel==1) {
fitems[i].style.display="inline";
} else {
fitems[i].style.display="table-row";
}
}
dostatesaveXP(itemID,0);
} else {
document.getElementById('c'+itemID).style.display="none";
document.getElementById('c'+itemID).style.visibili ty="hidden";
document.getElementById('e'+itemID).style.display="inline";
document.getElementById('e'+itemID).style.visibili ty="visible";
document.getElementById('f'+itemID+'z').style.visi bility="hidden";
document.getElementById('f'+itemID+'z').style.disp lay="none";

// build element collection using w3c dom level2 methods
while (document.getElementById('f'+itemID+'z'+i)!=null) {
fitems[i]= document.getElementById('f'+itemID+'z'+i);
i++;
}
for (i = 0; i < fitems.length; i++) {
fitems[i].style.visibility="hidden";
fitems[i].style.display="none";
}
dostatesaveXP(itemID,1);
}
}
//-->
</script>

hypedave
04-11-2002, 03:32 AM
okay I applied the hack and i dont see anything at all,
can someone hel pme out, i downloaded the files on the top page, after going through 10 pages, I am totally confused as to how to get this hack working, can anybody help me out

www.mindsights.com if you need to take a look

dabean
04-11-2002, 06:02 PM
hyperdave, firstly you have added the 2 new templates? and made the other template alterations.

hypedave
04-11-2002, 06:05 PM
yep I sure have, :bunny:

dabean
04-11-2002, 06:14 PM
Originally posted by hypedave
yep I sure have, :bunny:

good, now lets see where abouts in the code something has gone wrong.

does this line exisit?

eval("\$expandcontract = \"".gettemplate("forumhome_expandcontract")."\";");

hypedave
04-11-2002, 06:18 PM
im like half sleep
where should that coding exist

Tungsten
04-23-2002, 03:02 PM
Here are some more icons to replace the expand / collapse.gif images included with the original archive. I drafted them up for my site and was going to use them, but have switched back to some plain white ones for the time being.

Just my small contribution as a way of thanking dabean for this excellent hack. :D

TheComputerGuy
04-27-2002, 04:07 PM
Invalid SQL: UPDATE forum
SET
styleid='1', title='Military Firearms', description='Sponser of our Military Firearms forums',
active='1', displayorder='5', parentid='-1', parentlist='16,-1',
allowposting='1', cancontainthreads='0',
sponsorname='Tapco',sponsorimg='community.gif',
sponsorurl='http://www.tapco.com/departments.asp?dept=75&rc=GUNGAME',daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0', 'collapsed='0'
WHERE forumid='16'
mysql error: You have an error in your SQL syntax near ''collapsed='0'
WHERE forumid='16'' at line 12

I get that error when I try to put it to the collapse the forums...I get an error..any idea?

dabean
04-27-2002, 07:16 PM
Originally posted by TheComputerGuy
Invalid SQL: UPDATE forum
SET
styleid='1', title='Military Firearms', description='Sponser of our Military Firearms forums',
active='1', displayorder='5', parentid='-1', parentlist='16,-1',
allowposting='1', cancontainthreads='0',
sponsorname='Tapco',sponsorimg='community.gif',
sponsorurl='http://www.tapco.com/departments.asp?dept=75&rc=GUNGAME',daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0', 'collapsed='0'
WHERE forumid='16'
mysql error: You have an error in your SQL syntax near ''collapsed='0'
WHERE forumid='16'' at line 12


I get that error when I try to put it to the collapse the forums...I get an error..any idea?

remove the ' before collapsed

TheComputerGuy
04-27-2002, 07:56 PM
I get a java error, is there an idea on what is causing it...

www.gunandgame.com/forums

dabean
04-27-2002, 08:07 PM
Originally posted by TheComputerGuy
I get a java error, is there an idea on what is causing it...

www.gunandgame.com/forums

Have you changed the "forumhome_forumbit_level2_post" template as described by the readme?

TheComputerGuy
04-28-2002, 11:53 AM
I sure have made, went back and did everything twice

dabean
04-28-2002, 01:41 PM
Originally posted by TheComputerGuy
I sure have made, went back and did everything twice

hmmm, whilst I know one of your templates needs editing could you turn on template names? then attach a snippet of final page in particular something around..
<tr align="center">
<td rowspan="2" bgcolor=
as directly before that is the name of the template that will need editing.

TheComputerGuy
04-28-2002, 03:11 PM
This
TEMPLATE: forumhome_forumbit_level2_post -->
<tr align="center">
<td rowspan="2" bgcolor="#C3C3C3" colspan="2" align="left">
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td valign="top"><img src="aftermath/off.gif" border="0" alt=""></td>
<td><img src="aftermath/clear.gif" width="9" height="0" border="0" alt=""></td>
<td><a href="forumdisplay.php?forumid=59"><font face="verdana" size="1"><b>Forum News</b></font></a><br>
<font face="verdana" size="1">Stay updated with the information on the news, posted by the Admin</font></td>
</tr></table>
</td>
<td colspan="2" bgcolor="#C3C3C3"><font face="verdana" size="1"><b>Forum Info:</b></font></td>
</tr><tr>
<td bgcolor="#D7D7D7"><font face="verdana" size="1">
Posts: <b>18</b> | Threads: <b>17</b><br>
Moderators: <b>&nbsp;</b>
</font></td>
<td align="right" bgcolor="#D7D7D7"><font face="verdana" size="1">

dabean
04-28-2002, 03:32 PM
Originally posted by TheComputerGuy
This
[php]TEMPLATE: forumhome_forumbit_level2_post -->
<tr align="center">
<td rowspan="2" bgcolor="#C3C3C3" colspan="2" align="left">
<snip>

open up the "forumhome_forumbit_level2_post" template(s)
and change <tr align="center"> into
<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">


You will need to do this for each/every style.

FleaBag
04-29-2002, 01:37 PM
I just upgraded my board from version 2.2.4 to 2.2.5, and have started re-hacking. I cannot find the references made to code in the admin/index.php file? I've tried searching for single words of the lines of code, but no results are found! Has admin/index.php dramatically changed in this version?

FleaBag
04-29-2002, 02:15 PM
Now I am confused. I didn't do any of the admin/index.php file changes, but the hack works fine? Check www.gamerforums.com/board for an example. If the admin files aren't required what do they do? Thanks in advance.

dabean
04-29-2002, 04:45 PM
Originally posted by GamerForums
Now I am confused. I didn't do any of the admin/index.php file changes, but the hack works fine? Check www.gamerforums.com/board for an example. If the admin files aren't required what do they do? Thanks in advance.

This hack doesn't require any changes to be made to admin/index.php and never has. The only admincp file that this hack requires changes to is admin/forum.php.

FleaBag
04-29-2002, 05:26 PM
NOW I FEEL STUPID!!!

...I really should learn to read. Thanks mate.
Installed sucessfully on 2.2.5. :)

Khepri
05-11-2002, 06:31 PM
I LOVE this mod!!!

I have multiple levels on my forums and have modified my templates quite a bit so they will display like I want them to. The site is http://www.aephirsden.com/forum and when you see it you will see what happens... On my levels where there are the third level I show if you close the first level above it then it only closes what would have been forums under it, so when I have all the first level categories closed, the second level categories still show. I want to close everything under each first level...

I'm gonna be playing with my code to try to fix it but I don't know exactly how you have it working yet ;)

On a final note, I use Linux 2.2.19 and KDE 2.1.2 and my Konquerer will view the page, and when you close a section it covers the sub parts up with what appears to be the background color, but doesn't move them up. Also, if I collapse 2+ of them, then try to uncollapse any of them then it crashes the browser... Kind of a pain during the setup... But it's in now ;) The attached image is the screenshot of my forum currently when viewed under Konquerer.

Khepri

Webmasta XT
05-11-2002, 10:14 PM
nice hack, works great!!

dabean
05-12-2002, 03:23 AM
Originally posted by Khepri
I LOVE this mod!!!

I have multiple levels on my forums and have modified my templates quite a bit so they will display like I want them to. The site is http://www.aephirsden.com/forum and when you see it you will see what happens... On my levels where there are the third level I show if you close the first level above it then it only closes what would have been forums under it, so when I have all the first level categories closed, the second level categories still show. I want to close everything under each first level...

I'm gonna be playing with my code to try to fix it but I don't know exactly how you have it working yet ;)

On a final note, I use Linux 2.2.19 and KDE 2.1.2 and my Konquerer will view the page, and when you close a section it covers the sub parts up with what appears to be the background color, but doesn't move them up. Also, if I collapse 2+ of them, then try to uncollapse any of them then it crashes the browser... Kind of a pain during the setup... But it's in now ;) The attached image is the screenshot of my forum currently when viewed under Konquerer.

Khepri

The collapse problem is due to the html your templates.

Some of the problems you mention are directly related to kde 2.1.x, whilst others are a result of your html.

Finnally there is a problem (not exhibited on your site) with konq its self and the w3c defined function "hasfeature", which isn't fully supported by konq and pretty well unwork aroundable whilst most konquerer users spoof other browsers in the user agent string.

Khepri
05-12-2002, 03:45 AM
Originally posted by dabean


The collapse problem is due to the html your templates.



Any suggestions on how to modify either the templates or other code to make it collapse second and third levels when I perform the action from the first level.

Khepri

dabean
05-12-2002, 11:05 PM
Originally posted by Khepri


Any suggestions on how to modify either the templates or other code to make it collapse second and third levels when I perform the action from the first level.

Khepri

Firstly, the *no_post templates should be near uniform. That is "forumhome_forumbit_level2_nopost" should contain.

<tr id="f$forum[parentid]z$z" $fhomeexpandstyle class="cat">
<td colspan="6">
$expandcontract
<a href="forumdisplay.php?s=$session[s

inplace of
<tr id="cat">
<td colspan="6">
<a href="forumdisplay.php?s=$session[s


That "forumhome_forumbit_level3_post" contains.

<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">
in place of

<tr align="center">

Khepri
05-12-2002, 11:36 PM
Ok, did that... same results as what I had before. I'll leave the mod on that portion for now too. Check it out now at http://www.aephirsden.com/forum and go down to the main category of professions, you'll see sub cats, and forums only under the sub cats. If you collapse the main category professions, it hides the bars with the sub cats but leaves all the forums under the sub cats so you really can't tell which sub cat each of the forums is supposed to be under.

I had done this before which is what prompted me to look into this deeper initially.

Khepri

dabean
05-13-2002, 12:16 AM
Originally posted by Khepri
Ok, did that... same results as what I had before.


The first thing that hit me, is your still using the older javascript.

Khepri
05-13-2002, 04:15 AM
Ok, got the new jscript info in there. But it still does the same thing. Sorry about earlier, I thought I had the new script in there but when I took out the old it copied it, then pasted it in again. ::mumbles::

Khepri

dabean
05-13-2002, 03:44 PM
Khepri, the forumhome_forumbit_level2_nopost template needs to be modified.

so the first line reads

<tr id="f$forum[parentid]z$z" $fhomeexpandstyle class="cat">


then the forumhome_forumbit_level2_post template needs to be modified to remove the <smallfont>? before $expandcontract

As a example of what happens once said afterations are made, I've grep'd your index page and attached pre modified version to compare against.

Khepri
05-13-2002, 10:47 PM
Thanks a TON!!!

They work GREAT!

Khepri

VirtueTech
05-14-2002, 05:18 AM
I'm having some problems with this hack on 2.2.5 saving the preferences of a user. It does not write to the "forumviewset" field.

I have read through the readme and this thread looking for answer and I reinstalled. I have updateindex.php in my forums directory, and the other two files in my admin directory. I also made the changes for the Template_options.php

Any ideas?

dabean
05-15-2002, 01:30 AM
Originally posted by VirtueTech
I'm having some problems with this hack on 2.2.5 saving the preferences of a user. It does not write to the "forumviewset" field.

I have read through the readme and this thread looking for answer and I reinstalled. I have updateindex.php in my forums directory, and the other two files in my admin directory. I also made the changes for the Template_options.php

Any ideas?

Hmm, sounds like the installation is good.

Out of interest what happens when you manually collapse a forum by using the url:

updateindex.php?fid=<forumid>&val=1

CdaKnight
05-15-2002, 01:38 AM
I'm having problems getting mine to collapse. I hit the minus, and it doesn't close, Then I notice the javascript error go off in the corner.

the address is: http://forums.yosc.net/index.php

I installed it to the readme, and I updated/added the templates. And where do I add the stuff in the "Template_Options.txt" file go?

Thanks,
CDknight

dabean
05-15-2002, 01:55 AM
Originally posted by CdaKnight
I'm having problems getting mine to collapse. I hit the minus, and it doesn't close, Then I notice the javascript error go off in the corner.

the address is: http://forums.yosc.net/index.php

I installed it to the readme, and I updated/added the templates. And where do I add the stuff in the "Template_Options.txt" file go?

Thanks,
CDknight

Regarding the template_option, if you don't know what it is then you don't need it. It is provided strictly as option to collapse forums with a heavly modified style.

Moving on to the javascript error, you are not including the required javascript onto the page and acordingly need to modify the forumhome template to include $expandcontractscript. That is if the forumhome_expandjscript template is present. Both of which are discribed in the readme.

VirtueTech
05-15-2002, 03:43 PM
Originally posted by dabean

Hmm, sounds like the installation is good.

Out of interest what happens when you manually collapse a forum by using the url:

updateindex.php?fid=<forumid>&val=1

I get a blank screen. Seems like it worked.

My "forumviewset" is still set to the default " : " for my userid after I ran updateindex.php

I'm a bit confused here.

dabean
05-15-2002, 09:08 PM
Originally posted by VirtueTech


I get a blank screen. Seems like it worked.

My "forumviewset" is still set to the default " : " for my userid after I ran updateindex.php

I'm a bit confused here.

Okay, that explains things nicely.

The blank page you recieved means the file was unable to include one of its required files. For this getforumview.php needs to be in the admin directory eg ./admin/getforumview.php.

VirtueTech
05-15-2002, 10:16 PM
Originally posted by dabean


Okay, that explains things nicely.

The blank page you recieved means the file was unable to include one of its required files. For this getforumview.php needs to be in the admin directory eg ./admin/getforumview.php.

Sadly ... I have both "getforumview.php" and "getbrowser.php" in the /admin directory.

dabean
05-15-2002, 11:36 PM
Originally posted by VirtueTech


Sadly ... I have both "getforumview.php" and "getbrowser.php" in the /admin directory.

Hmm, find attached a debugging version of updateindex which will echo its output as it goes along. Please tell me the point at which it stops. To use this version remove the .test from the filename and replace the version of updateindex contained in the forum root, and then reattempt to manually collapse a forum as described in the post a further back.

VirtueTech
05-16-2002, 02:30 AM
Originally posted by dabean
Hmm, find attached a debugging version of updateindex which will echo its output as it goes along. Please tell me the point at which it stops. To use this version remove the .test from the filename and replace the version of updateindex contained in the forum root, and then reattempt to manually collapse a forum as described in the post a further back.

Ok here is what I got:

loading...
Warning: Cannot add header information - headers already sent by (output started at /web/pbc2/beta225/updateindex.php:3) in /web/pbc2/beta225/admin/functions.php on line 1544
included globalincluded requiredforumid or value was not set

Here is Function.php lines:

1543 if ($cookiedomain) {
1544 setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
1545 } else {
1546 setcookie($name, $value, $expire, $cookiepath, '', $secure);
1547 }

dabean
05-16-2002, 02:47 AM
Originally posted by VirtueTech


Ok here is what I got:

loading...
Warning: Cannot add header information - headers already sent by (output started at /web/pbc2/beta225/updateindex.php:3) in /web/pbc2/beta225/admin/functions.php on line 1544
included globalincluded requiredforumid or value was not set

<snipped function.php>

Bizare, what version of php?
and what value where you using for <forumid> in the url?

VirtueTech
05-16-2002, 02:50 AM
Originally posted by dabean


Bizare, what version of php?
and what value where you using for <forumid> in the url?

PHP Version 4.2.0

and

Forumid = 58

/updateindex.php?fid=58&val=1

dabean
05-16-2002, 02:59 AM
register globals are on?

VirtueTech
05-16-2002, 03:36 AM
Originally posted by dabean
register globals are on?

Yes: register_globals = On

Would this cause a problem:
; Magic quotes
magic_quotes_gpc = Off
magic_quotes_runtime= Off
magic_quotes_sybase = Off

VirtueTech
05-16-2002, 03:38 AM
FYI: Ok I tried it with quotes_gpc ON and it didn't work still.

VirtueTech
05-16-2002, 04:54 AM
Now I restarted my machine, ran updateindex.php again and now it says this:

loading...included globalincluded requiredforumid or value was not set

dabean
05-17-2002, 12:28 AM
Try this php4.2.0 tailored version of update index.

The correct result is to recieve the message "done".

Incorrect results will result in "error" being displayed, whilst semi incorrect results will echo back the values entered for forumid and val.

VirtueTech
05-17-2002, 01:22 AM
Originally posted by dabean
Try this php4.2.0 tailored version of update index.

The correct result is to recieve the message "done".

Incorrect results will result in "error" being displayed, whilst semi incorrect results will echo back the values entered for forumid and val.

Ok now it is writing to the DB but everytime I reload the forumhome the table is still expanded.

I get this on the return from updateindex.php that you sent in the above post for 4.2:

58|:done

dabean
05-17-2002, 01:51 AM
Originally posted by VirtueTech


Ok now it is writing to the DB but everytime I reload the forumhome the table is still expanded.

I get this on the return from updateindex.php that you sent in the above post for 4.2:

58|:done

Wow, I wasn't expecting that result... (the number portion).

Is this a new installation of the hack, or have you previously had this working under a older version of vbulletin?

Find attached a newer version of the getforumview.php file.. which hopefully should write correct data to the database.

VirtueTech
05-17-2002, 01:55 AM
Originally posted by dabean

Wow, I wasn't expecting that result... (the number portion).

Is this a new installation of the hack, or have you previously had this working under a older version of vbulletin?

Find attached a newer version of the getforumview.php file.. which hopefully should write correct data to the database.

It is started to install this hack on my database a ways back and never used it.

I installed the new getforumview.php and it is still showing the forumhome tables expanded.

VirtueTech
05-17-2002, 01:59 AM
Now this may be a bit unreadable because the code is in beta but here is one of the forumhome tables...keep in mind I am using the Template_options. hack too that adds the "Forum...Posts...Thread...Last Post" to each main section.


<P><table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#444444" width="1"><spacer type="block" width="1" height="1"></td>
<td height="20" bgcolor="#637B52" background="/images/fh_2.gif" width="84%" id="cat">&nbsp;&nbsp;<a href="forumdisplay.php?forumid=192"><b>PBC Sponsors Forums</b></a><br><font class="sf" color="#000000"></font></td>
<td width="37" height="20"><img src="/images/fh_3.gif" width="37" height="20"></td>
<td align="right" valign="middle" nowrap>&nbsp;<a href="#top"><img src="/images/fh_t.gif" border="0" hspace="2" width="34" height="11" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a href="#bottom"><img src="/images/fh_b.gif" border="0" hspace="2" width="34" height="11" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a name=></a> <div id="c192" style="display: inline;visibility: visible;"> <img alt="Collapse" title="Contract Category" src="/images/collapse.gif" onclick="forumexp('192')"></div>
<div id="e192" style="display: none;visibility: hidden;"> <img alt="Expand" title="Expand Category" src="/images/expand.gif" onclick="forumexp('192')"></div></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#444444" width="90%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr id="f192z" align="center">
<td bgcolor="#979797" background="/images/pb_bg6.gif" width="19"><font class="sf">&nbsp;</font></td>
<td bgcolor="#979797" background="/images/pb_bg6.gif" width="100%" valign="bottom" align="left"><font class="sf" color="#272727"><b>Forum</b></font></td>
<td bgcolor="#979797" background="/images/pb_bg6.gif" valign="bottom"><font class="sf" color="#272727"><b>Users</b></font></td>
<td bgcolor="#979797" background="/images/pb_bg6.gif" valign="bottom"><font class="sf" color="#272727"><b>Posts</b></font></td>
<td bgcolor="#979797" background="/images/pb_bg6.gif" valign="bottom" nowrap><font class="sf" color="#272727"><b>Threads</b></font></td>
<td bgcolor="#979797" background="/images/pb_bg6.gif" valign="bottom"><font class="sf" color="#272727"><b>Last Post</b></font></td>
</tr><tr id="f192z0" align="center">
<td bgcolor="#dedfdf" background="/images/b.gif" valign="top" width="19"><img src="/images/off.gif" border="0" alt="" width="17" height="21"></td>
<td bgcolor="#ECECEC" background="/images/b.gif" align="left" valign="top" width="100%">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" align="left" valign="top"><a href="forumdisplay.php?forumid=193"><font class="nf"><b>PaintballWatch.com</b></font></a></td>
<td width="10%" nowrap align="right" valign="top"><a href="search2.php?action=getlatest&forumid=193"> <img src="/images/pb_5.gif" border="0" width="11" height="11" hspace="2" alt="Read New Posts since Last Visit" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a href="newthread.php?action=newthread&forumid=193"><img src="/images/pb_7.gif" border="0" width="11" height="11" hspace=2" alt="Create a new Thread topic in this forum" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a href="member2.php?action=addsubscription&forumid=193"><img src="/images/pb_8.gif" border="0" width="13" height="11" hspace="2" alt="Subscribe to the Forum to receive updates when new posts are made." style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><font class="sf"></font></td>
</tr>
</table>
</td>
<td bgcolor="#dedfdf" background="/images/b.gif"><font class="sf">0</font>
<td bgcolor="#ECECEC" background="/images/b.gif"><font class="nf">56</font></td>
<td bgcolor="#dedfdf" background="/images/b.gif"><font class="nf">9</font></td>
<td bgcolor="#ECECEC" background="/images/b.gif" align="left" nowrap><font class="sf"><a href="showthread.php?goto=lastpost&forumid=193"><img src="/images/lastpost.gif" border=0 alt="Go to last post" width="13" height="14" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a> 04-10-02 <font class="sf" COLOR="#444444">10:14 PM</font><br><font class="sf">by <a href="member.php?action=getinfo&find=lastposter&forumid=193">urza</a></font></font></td>
<!-- <td bgcolor="#dedfdf"><font class="sf"></font></td> -->
</tr><tr id="f192z1" align="center">
<td bgcolor="#dedfdf" background="/images/b.gif" valign="top" width="19"><img src="/images/off.gif" border="0" alt="" width="17" height="21"></td>
<td bgcolor="#ECECEC" background="/images/b.gif" align="left" valign="top" width="100%">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" align="left" valign="top"><a href="forumdisplay.php?forumid=194"><font class="nf"><b>XPaintball.com</b></font></a></td>
<td width="10%" nowrap align="right" valign="top"><a href="search2.php?action=getlatest&forumid=194"> <img src="/images/pb_5.gif" border="0" width="11" height="11" hspace="2" alt="Read New Posts since Last Visit" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a href="newthread.php?action=newthread&forumid=194"><img src="/images/pb_7.gif" border="0" width="11" height="11" hspace=2" alt="Create a new Thread topic in this forum" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a><a href="member2.php?action=addsubscription&forumid=194"><img src="/images/pb_8.gif" border="0" width="13" height="11" hspace="2" alt="Subscribe to the Forum to receive updates when new posts are made." style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><font class="sf"></font></td>
</tr>
</table>
</td>
<td bgcolor="#dedfdf" background="/images/b.gif"><font class="sf">0</font>
<td bgcolor="#ECECEC" background="/images/b.gif"><font class="nf">62</font></td>
<td bgcolor="#dedfdf" background="/images/b.gif"><font class="nf">11</font></td>
<td bgcolor="#ECECEC" background="/images/b.gif" align="left" nowrap><font class="sf"><a href="showthread.php?goto=lastpost&forumid=194"><img src="/images/lastpost.gif" border=0 alt="Go to last post" width="13" height="14" style="filter:alpha(opacity=70);-moz-opacity:0.7" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a> 04-09-02 <font class="sf" COLOR="#444444">10:55 PM</font><br><font class="sf">by <a href="member.php?action=getinfo&find=lastposter&forumid=194">zman2005</a></font></font></td>
<!-- <td bgcolor="#dedfdf"><font class="sf"></font></td> -->
</tr> </td></tr></table>
</td></tr></table>

dabean
05-17-2002, 02:10 AM
The html looks roughly correct.

When you look at the raw user table in say phpmyadmin does the "forumviewset" column for your? userid have a entry like "57|1:" if it doesn't please try this debugging version of getforumview.php which will output details to help in cureing this bug.

VirtueTech
05-17-2002, 02:37 AM
The numbers in "forumviewset" look like this: 59|:192|:

I ran the debugging getforumview.php and ran updateindex.php manually and it output this:

65Array ( [59] => [192] => ) done

However, it did not set any value to "forumviewset" so now it is blank.

pirotess
05-18-2002, 11:12 PM
I'm having similar problems to Virtuetech on my board at http://www.shadowedsoul.com/forums.

The interesting thing to me is the hack works perfectly after following along with all the updates to files you've given as of now for 4.2.0 installs when Im not logged in. As soon as I log in I start getting page errors like this when I try to expand or contract.

Line: 563
Char: 1
Error: Object expected
Code: 0
URL: http://www.shadowedsoul.com/forums/index.php?s=<sessionID>

When I manually call

/updateindex.php?fid=6&val=0

and

/updateindex.php?fid=6&val=1

the hack works properly, it just doesnt work when Im trying to click my expand and contract buttons.

Henry-RS
05-27-2002, 09:44 PM
It didn't work for me...

Can you supply me with the mysql code that will undo the changes that were made to the database with the cx_install.php file?

dabean
05-27-2002, 10:44 PM
Originally posted by pirotess
Line: 563
Char: 1
Error: Object expected
Code: 0
URL: http://www.shadowedsoul.com/forums/index.php?s=<sessionID>


the hack works properly, it just doesnt work when Im trying to click my expand and contract buttons. [/B]

That error idicates that the javascript is not being included. Compare the source output of logged in and not logged in to check that is in both cases.


I am aware of some problems still lingering with this hack and php 4.2.x so will be releasing a new version of the complete hack by the end of the week to correct these issues.

Henry-RS:
The SQL is
ALTER TABLE forum DROP collapsed
ALTER TABLE user DROP forumviewset

VirtueTech
05-27-2002, 11:57 PM
Thanks Dabean....I'll be anxiously awaiting your next post

pirotess
05-28-2002, 12:11 PM
Originally posted by dabean

That error idicates that the javascript is not being included. Compare the source output of logged in and not logged in to check that is in both cases.


I am aware of some problems still lingering with this hack and php 4.2.x so will be releasing a new version of the complete hack by the end of the week to correct these issues.


Yep looking at the two sources the javascript is in one but not the other which is interesting since I thought they would both generate off the same templates and php files.

EDIT: Figured out my problem. I slipped up and put my code above the } in the

if ($bbuserinfo['userid']==0) {
eval("\$unregwelcomemessage = \"".gettemplate('forumhome_unregmessage')."\";");
}

addition to index.php. Thanks for the lead that helped me track this down.

dabean
06-03-2002, 11:35 PM
Updated the zip to include PHP 4.1.x and 4.2.x support.
Also tested this new version on vb2.2.6.

This hack can now safely be used with register globals turned off and has been tested accordingly.

To update from a older version just upload the new files. updateindex.php, getbrowser.php and getforumview.php.

There is no need to re-run the installer, however the installer can now remove the database changes.

Test configurations where
- Apache 1.3.23 + PHP 4.2.0 (freebsd)
- Apache 1.3.17 + PHP 4.1.1 (redhat7)
- IIS5.1 + PHP 4.2.1 (winxp)

VirtueTech
06-04-2002, 01:06 AM
Thanks for your time and effort. It works great!

ManagerJosh
06-05-2002, 05:37 PM
Just wondering but does this hack apply to sub forums on listed on the main site? I know that it works for Main Forums but it appears in the pictures not to work on subforums to display sub-sub forums on the main page.

dabean
06-06-2002, 03:34 AM
Originally posted by ManagerJosh
Just wondering but does this hack apply to sub forums on listed on the main site? I know that it works for Main Forums but it appears in the pictures not to work on subforums to display sub-sub forums on the main page.

Not sure what your asking for, am I to assume your enquiring about if a forum depth greater than 2 is supported on the index?

If so then yes it can work upto N levels deep, where N is the value you set for depth, subject to creating the additional sub level templates.

ManagerJosh
06-06-2002, 07:50 AM
Does your hack support a forum depth greater than 2 on the index?

dabean
06-06-2002, 07:40 PM
Originally posted by ManagerJosh
Does your hack support a forum depth greater than 2 on the index?

Yes, but the additional sub level templates need to be created as they are not included with vb.

dabean
06-06-2002, 09:20 PM
Hmm there is a minnor bug in previous zip file.

$templatesused=',forumhome_expandcontract,forumhom e_expandjscript';

should be

$templatesused.=',forumhome_expandcontract,forumho me_expandjscript';

The zip has been updated accordingly now.

Christoff
06-08-2002, 08:04 PM
Help!

On server that my forum is, there is php 4.0.6.
Is there any chance to make this hack working on it?
Pliz help me!

dabean
06-09-2002, 07:46 PM
If you want to modify the hack to work with 4.0.x change all references of $_GET to $HTTP_GET_VARS in updateindex.php.

Christoff
06-09-2002, 11:48 PM
I've changed that but still.... there is no sign of those icons + and - next to forum names :((
I've got 2,2,4 and i'll upgrade it... i hope it will work after...

dabean
06-09-2002, 11:56 PM
Originally posted by Christoff
I've changed that but still.... there is no sign of those icons + and - next to forum names :((
I've got 2,2,4 and i'll upgrade it... i hope it will work after...

You need to make the template modifications mentioned in the readme.

globalwin
06-19-2002, 07:48 PM
I get this error when inserting it into the db..

SQL-query: [Edit]

ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL
ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'
MySQL said: You have an error in your SQL syntax near 'ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'' at line 2

The automated file thing cX_install.php doesnt work...

dabean
06-19-2002, 08:37 PM
Originally posted by globalwin
I get this error when inserting it into the db..

SQL-query: [Edit]

ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL
ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'
MySQL said: You have an error in your SQL syntax near 'ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'' at line 2


The automated file thing cX_install.php doesnt work...

The error you've posted looks suspiciously like a phpmyadmin error message, so what is wrong with cx_install.php?

As stated in the readme you can either manually change the database or use cx_install to do it for you.

As for the error you've reported you need to put a semi-colon at the end of the first line.

FleaBag
06-20-2002, 10:11 AM
Working great on 2.2.6. I did notice though in the install guide it mentioned 'add the bits in red', but there were no red bits. Maybe it's just me though. :)

Birdie501
06-25-2002, 12:49 PM
Hi,

it works for me. But if i contract the forums in one category only the category is shown. That is ok, but if i reload the page it is still contracted but now there are also the headlines like Forum, Date, Posts, etc... under the category.?

If i expand it and contract it again it is without that headlines?

How to fix that?
Thanks! :cross-eyed:

dabean
06-25-2002, 02:03 PM
Originally posted by Birdie501
Hi,

installed it, works fine, but what does this mean?

now
find the template you added the the Forum Posts Threads Last Post Moderator repeats per forum to and alter
<tr align="center">
<td bgcolor="

to read
<tr id="f$forum[forumid]z" align="center">
<td bgcolor="

which template???

That instruction is contained in the "template_option" file which is only to be used when you've modified the display to repeat the "forum, posts... etc" header for each group of forums. Now depending on how you've done that modification the template will be either forumhome_forumbit_level1_nopost or forumhome_forumbit_level2_nopost. If you are not using a template mod to repeat the header carrying out the instructions in template_option WILL stop the hack from working correctly.

Birdie501
06-25-2002, 02:04 PM
upps i just edited my post! :-)

dabean
06-25-2002, 02:08 PM
The solve the problem you have modify forumhome_forumbit_level1_nopost to include the fragment you pasted.

Birdie501
06-25-2002, 02:15 PM
yes but how to do that? can give more details? Thanks!

dabean
06-25-2002, 03:14 PM
Originally posted by Birdie501
yes but how to do that? can give more details? Thanks!

As mentioned in the template_option instructions...

template: forumhome_forumbit_level1_nopost
find and alter
<tr align="center">
<td bgcolor="

to read
<tr id="f$forum[forumid]z" $fhomeexpandstyle align="center">
<td bgcolor="


You also need to have made all of the other changes mentioned in the file.

Birdie501
06-25-2002, 03:36 PM
ok this is my template:


<tr align="middle">
<td valign="center" bgColor="#d3e5fa" colSpan=5>&nbsp</td>
</tr>

<tr id="cat">

<TD bgcolor="#1960CA" background="{ imagesfolder }/cat_backing.gif" colSpan=10 align=center align=middle valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="15%" valign="middle">
$expandcontract
<img src="{ imagesfolder }/cat_image.gif" width="23" height="15" align="absmiddle">
</td>
<td width="70%" align="center" valign="middle">
<b><img src="{ imagesfolder }/cat_sideleft.gif" width="30" height="15" align="middle"></b>

<a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]">
<normalfont color="#FFFFFF"><b>$forum[title]</b></normalfont></a>
<img src="{ imagesfolder }/cat_sideright.gif" width="30" height="15" border="0" align="middle">


</td>
<td width="15%" valign="middle">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr id="f$forum[forumid]z" align="center">
<td background="{ imagesfolder }/col_backing.gif" width="5%"><smallfont>&nbsp;</smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" width="65%" align="left"><smallfont color="{tableheadtextcolor}"><b>Forum</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="{tableheadtextcolor}"><b>Beitr?ge</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="{tableheadtextcolor}"><b>Themen</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" nowrap><smallfont color="{tableheadtextcolor}"><b>Letzter Beitrag</b></smallfont></td></tr>




What is wrong?
As i said before: if i ctract it, it is ok and i can only see the category!
but if i reload the page you see the category and this part:


<td background="{ imagesfolder }/col_backing.gif" width="5%"><smallfont>&nbsp;</smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" width="65%" align="left"><smallfont color="{tableheadtextcolor}"><b>Forum</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="{tableheadtextcolor}"><b>Beitr?ge</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="{tableheadtextcolor}"><b>Themen</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" nowrap><smallfont color="{tableheadtextcolor}"><b>Letzter Beitrag</b></smallfont></td></tr>


???

dabean
06-25-2002, 03:55 PM
Originally posted by Birdie501

What is wrong?



<tr id="f$forum[forumid]z" $fhomeexpandstyle align="center">
<td background="{ imagesfolder }/col_backing.gif" width="5%"><smallfont>&nbsp;</smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" width="65%" align="left"><smallfont color="#EEEEFF"><b>Forum</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="#EEEEFF"><b>Beitr?ge</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif"><smallfont color="#EEEEFF"><b>Themen</b></smallfont></td>
<td background="{ imagesfolder }/col_backing.gif" nowrap><smallfont color="#EEEEFF"><b>Letzter Beitrag</b></smallfont></td></tr>


Your missing a $fhomeexpandstyle in there (highlighted), which um should be in the instructions.

Birdie501
06-25-2002, 04:06 PM
aaarrggh, that was it sorry!!!! I read it that much but couldn't find it?
Sorry and thanks for this nice hack!

fixer
06-28-2002, 12:14 PM
ok

i have 2 styles

templeats are created in both of them.
it works great in one style while gives (error on page) in the defult style.

dabean
06-29-2002, 03:50 PM
Originally posted by fixer
ok

i have 2 styles

templeats are created in both of them.
it works great in one style while gives (error on page) in the defult style.

error? a javascript error?

You need to make sure $expandcontractscript appears in your "forumhome" template. Details of where it should be are included in the readme.

fixer
06-29-2002, 08:22 PM
yes it is.

i am sure of that.

the $expandcontractscript appears in forumhome template for the both styles at the same place.

dabean
06-30-2002, 09:54 PM
Originally posted by fixer
yes it is.

i am sure of that.

the $expandcontractscript appears in forumhome template for the both styles at the same place.

hmm the "forumhome_expandjscript" template exists in both styles?

If it does could you supply me a url to your forums or attach the output of your index page.

69-FLy-gUy
07-06-2002, 07:49 AM
Ok. I am having a little problem with this hack..

I tried installing it on my forums.. and it doesn't show the + or - sign.... I can manually collapse it from the admin panel... but i can't get the + or - image to show in order to click on it. i am running 2.2.6.. the images are in the images folder...

The only thing i can think of is it may be because i have an image as my category backing.. (kind of like these forums) is there any way i can get this to work?

fixer
07-06-2002, 12:19 PM
Originally posted by dabean


hmm the "forumhome_expandjscript" template exists in both styles?

If it does could you supply me a url to your forums or attach the output of your index page.


here is the output of my index page.

dabean
07-07-2002, 02:17 AM
fixer: your using the javascript contained in "template_option.txt" when you should be using the javascript contained in the main readme :).

69-FLy-gUy: you've modified the "forumhome_forumbit_level1_nopost" template as required? refer to the readme to see what modifications are nessesary. As you'll have altered that line it won't look exactly as shown in the readme.

69-FLy-gUy
07-07-2002, 09:08 AM
thanks it worked. sorry for wasting your time.

fixer
07-07-2002, 11:47 AM
it works so fine now

thanx

Timmmmmy
07-14-2002, 05:43 PM
Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'1','test','','1','1','-1',
'','1','1','30','','',
'0','1','1','1','1','1',
'0','1','1','0','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136


thats the error i get, This hack didnt work at all for me, i get that error when i try to add another forum.

This all started when i went thru with the altering templates, the index and /admin/forum.php files to what the readme said then i went to run the installer, it wouldnt do anything just kinda look, id lick install and it would just sit there, id click uninstall and it would just sti there so i added the install stuff manually thu phpmyadmin.

I uninstalled everything and I still cant add forums, any thoughts would be nice thanks

dabean
07-14-2002, 10:45 PM
Originally posted by Timmmmmy
Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'1','test','','1','1','-1',
'','1','1','30','','',
'0','1','1','1','1','1',
'0','1','1','0','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136


thats the error i get, This hack didnt work at all for me, i get that error when i try to add another forum.

This all started when i went thru with the altering templates, the index and /admin/forum.php files to what the readme said then i went to run the installer, it wouldnt do anything just kinda look, id lick install and it would just sit there, id click uninstall and it would just sti there so i added the install stuff manually thu phpmyadmin.

I uninstalled everything and I still cant add forums, any thoughts would be nice thanks

Assuming you are after uninstallation, then the colum count in that query doesn't match you need to remove the last entry, which will read " ,'$collapsed' " in fact the whole before and after for that line is in the readme. Now coming on to the installer which/what version of php are you using and could you clarrify "just sit there"? does it not progress past the first step?

Graphics
07-15-2002, 04:36 PM
I have vb 2.2.6 and when i searched for if ($forum['cancontainthreads']==1) {
$tempext = '_post';
} else {
$tempext = '_nopost';
} It wasn't found in index.php

Timmmmmy
07-15-2002, 04:45 PM
sorry, i click on it, it says at the bottom going to step 2, but doesnt do anything. I had to manually enter the sql data, and ive removed them too. The same thing happens when i go to uninstall it.
Thanks

Timmmmmy
07-15-2002, 04:50 PM
Thanks, i thought i had taken everything out, I removed ",'$collapsed' " from the /admin/forum.php and it worked.

dabean
07-16-2002, 05:42 PM
Originally posted by Graphics
I have vb 2.2.6 and when i searched for if ($forum['cancontainthreads']==1) {
$tempext = '_post';
} else {
$tempext = '_nopost';
} It wasn't found in index.php

Assuming your index.php is unmodified lines 305 to 309 will contain those lines.

Originally posted by Timmmmmy
sorry, i click on it, it says at the bottom going to step 2, but doesnt do anything. I had to manually enter the sql data, and ive removed them too. The same thing happens when i go to uninstall it.
Thanks

Installer and the hack will fail to work correctly on php older than 4.0.x, PHP 4.1.x or 4.2.x is required for succesful installation.

carpman
07-26-2002, 02:07 PM
template_option.txt
What are these setting for?

I have it working, except it won't remember settings?

I have all but one forum catagory to be collapse as standard, tried in IE5.5 NS6.01 Mozilla 0.9.9 Galeon 1.2.0

many thanks

dabean
07-26-2002, 04:19 PM
Originally posted by carpman
template_option.txt
What are these setting for?


Optional additional code, generally if you don't know what its for you don't need it.


I have it working, except it won't remember settings?


Random guess upload update_index.php to your forums directory.

carpman
07-26-2002, 04:57 PM
Originally posted by dabean


Optional additional code, generally if you don't know what its for you don't need it.



Random guess upload update_index.php to your forums directory.


thanks for reply.

If someone told me what they are for i could make my own mind up?


I have uploaded updateindex.php, this is the one that came in the zip file!!!

dabean
07-26-2002, 05:53 PM
Originally posted by carpman
If someone told me what they are for i could make my own mind up?


Quoting the readme, "If you have the forum, post, threads, template hack now please read Template_Option.txt"


I have uploaded updateindex.php, this is the one that came in the zip file!!!

Yes updatedateindex is the correct filename, I couldn't remeber the exact name, and this "problem" has been reported many times before in 99% of the cases its the result of a file not being uploaded.

Next, up have you uploaded getforumview.php to your admin directory. If you have then open updateindex.php?fid=<forumid>&val=1
- you should see the word "done" appear
- no results a file isn't uploaded (reread the instructions)
- error means your not a logged in user.

carpman
07-26-2002, 08:55 PM
Originally posted by dabean


Next, up have you uploaded getforumview.php to your admin directory. If you have then open updateindex.php?fid=<forumid>&val=1
- you should see the word "done" appear
- no results a file isn't uploaded (reread the instructions)
- error means your not a logged in user.

Thanks for reply, yes i had doon all that and when i ran above it came back ok.

When ever i view forum and changed expand contract my setting are never remembered?

dabean
07-26-2002, 09:14 PM
Originally posted by carpman


Thanks for reply, yes i had doon all that and when i ran above it came back ok.

When ever i view forum and changed expand contract my setting are never remembered?

url?

carpman
07-27-2002, 07:12 AM
Thanks for reply and help,

http://www.carpchat.co.uk/index.php

dabean
07-27-2002, 08:36 PM
Originally posted by carpman
Thanks for reply and help,

http://www.carpchat.co.uk/index.php

if you have, phpmyadmin installed, what is the current contents of the "forumviewset" field, after you try to expand a category.

Erwin
07-27-2002, 09:16 PM
There's no way of making this compatible with Opera, is there... just wondering.

dabean
07-27-2002, 09:24 PM
Originally posted by Erwin
There's no way of making this compatible with Opera, is there... just wondering.

No, and until a version of Opera is released with W3C DOM level 1 and level support 2 support will be impossible.

carpman
07-28-2002, 06:26 AM
Originally posted by dabean


if you have, phpmyadmin installed, what is the current contents of the "forumviewset" field, after you try to expand a category.

Ok i have a test user account which did read 1|1:
after chaging forum expand state it changed to
1|1:4|1:9|2:

after freshing page and or going into forum and retuning to main forum page, changing expand state it stayed the same, and forum catagory expand state always returns to default setting


My admin account stayed the same at
1|2:9|1:20|1:13|1:<forumid>|1:4|1:

It seems to enter 1st data but does remeber it or replace it?

thanks for help

Erwin
07-28-2002, 06:32 AM
Is there a way to make a link where when it is clicked ALL forums are expanded or contracted?

dabean
07-28-2002, 04:52 PM
Originally posted by carpman


It seems to enter 1st data but does remeber it or replace it?

thanks for help

That fact fact that the hack is storing the data has me puzzled.

My gut feeling is that another hack is somehow conflicting with this one.

To test this theory I've attached modified version a one file which would cure such a problem. This file is direct replacement for the existing one in the zip file.


Originally posted by Erwin
Is there a way to make a link where when it is clicked ALL forums are expanded or contracted?

This is possible but would require exentsive modification to how the hack works.