View Full Version : Collapsable forums on forum home
carpman
07-29-2002, 08:14 AM
Originally posted by dabean
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.
works a treat :)
many thanks
PeterNRG
08-01-2002, 08:14 AM
Instead of contracting all the forums to just the category titles, it would be cool if you could also contract to just the category + forum titles (so without the forum descriptions, and maybe the moderators)
I think the forum descriptions are only needed for new visitors. Once you are a regular visitor to a board, you don't really read the forum descriptions anymore, thus they take up a lot of space, which forces the (lazy) user to scroll more :).
What do you think? It would be a cool addition to this hack IMHO.
dabean
08-01-2002, 07:36 PM
Originally posted by PeterNRG
Instead of contracting all the forums to just the category titles, it would be cool if you could also contract to just the category + forum titles (so without the forum descriptions, and maybe the moderators)
I think the forum descriptions are only needed for new visitors. Once you are a regular visitor to a board, you don't really read the forum descriptions anymore, thus they take up a lot of space, which forces the (lazy) user to scroll more :).
What do you think? It would be a cool addition to this hack IMHO.
The extremely simple and lazy way. :rambo:
template: forumhome_expandcontract
<div id="c$forum[forumid]" style="$divcollapse"><img alt="Collapse" title="Contract Category" src="{imagesfolder}/collapse.gif" onclick="forumexp('$forum[forumid]')" /><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]">$forum[title]</a>
<br>$forum[description]</div>
<div id="e$forum[forumid]" style="$divexpand"><img alt="Expand" title="Expand Category" src="{imagesfolder}/expand.gif" onclick="forumexp('$forum[forumid]')" /><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]">$forum[title]</a>
</div>
template: forumhome_forumbit_level1_nopost
<tr class="cat">
<td colspan="6">$expandcontract</td>
</tr>
:banana:
carpman
08-06-2002, 09:04 AM
I have been playing about with adding sub catagories to some of my forum catagories, however this does not work with this hack.
Sub catagory does not collapse with main catagory and the forums in the sub catagory do not have collapse contact options.
If you understand what i am talking about, is it possible to acheive this?
cheers
dabean
08-06-2002, 06:09 PM
Originally posted by carpman
I have been playing about with adding sub catagories to some of my forum catagories, however this does not work with this hack.
Sub catagory does not collapse with main catagory and the forums in the sub catagory do not have collapse contact options.
If you understand what i am talking about, is it possible to acheive this?
cheers
Seeing as this question pops up regularly I've added a FAQ
Qouting from it..
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/show...0465#post250465
Q: Can sub-forums be collapsed?
A: Yes. See the above answer for example templates.
carpman
08-06-2002, 07:20 PM
cheers, i will give it a go
DarkDraco07
08-13-2002, 10:12 AM
Parse error: parse error, expecting `']'' in /home/darkneme/public_html/forums/index.php(435) : eval()'d code on line 4
what does this mean?????
DarkDraco07
08-13-2002, 09:46 PM
can someone help???
dabean
08-13-2002, 11:25 PM
Originally posted by DarkDraco07
Parse error: parse error, expecting `']'' in /home/darkneme/public_html/forums/index.php(435) : eval()'d code on line 4
what does this mean?????
Parse errors mean that your code is just plain wrong and cannot/will not run.
To fix the error you need to look at what is wrong with line(s) mentioned, which in these cases are lines 435 and 4?
The PHP interpreter is trying to help you fix this by telling you what it expected to find ( '] ).
The problem and the solution is unique to your index.php, I would assume due to mispasting from the readme.
If you don't know what you did wrong or can't find the problem then you need to revert index.php (just index.php not the db) to the backup version you should have taken before attempting to make the modifications required by this hack. Then re-add the changes this hack requires.
When the readme is followed to the letter this hack will and does work "out of the box" so to speak.
DarkDraco07
08-14-2002, 09:41 AM
i uninstalled and reinstalled it 3 times, i couldnt have messed up 3 times
DarkDraco07
08-14-2002, 09:55 AM
i just tried again, i even replaced my index.php with the original file and it still shows the error
DarkDraco07
08-14-2002, 10:23 AM
MY FORUMS HAVE BEEN CURRUPTED AHHHHHHHHHHHHHHHH
i unistalled every step, took out and unedited template, took out the tables, unedited the file AND IT STILL SHOWS THE ERROR!!!
dabean
08-14-2002, 04:30 PM
Originally posted by DarkDraco07
MY FORUMS HAVE BEEN CURRUPTED AHHHHHHHHHHHHHHHH
i unistalled every step, took out and unedited template, took out the tables, unedited the file AND IT STILL SHOWS THE ERROR!!!
Paste the full error message.
Paste the contents of the line(s) mentioned in the error message. If as a suspect the line is some like eval("\$blahblah = \"".gettemplate('sometemplate')."\";"); Paste the contents of the template named too.
And do you still get a parse error when using the default stock index.php supplied with vB?
DarkDraco07
08-14-2002, 05:12 PM
error
Parse error: parse error, expecting `']'' in /home/darkneme/public_html/forums/index.php(380) : eval()'d code on line 4
line 4
$templatesused='forumhome_birthdaybit,error_noperm ission,forumhome_pmloggedin,forumhome_welcometext, forumhome_logoutcode,forumhome_newposts,forumhome_ todayposts,forumhome_logincode,forumhome_loggedinu ser,forumhome_loggedinusers,forumhome_lastpostby,f orumhome_moderator,forumhome_forumbit_level1_nopos t,forumhome_forumbit_level1_post,forumhome_forumbi t_level2_nopost,forumhome_forumbit_level2_post,for umhome,forumhome_unregmessage';
line 380
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
dabean
08-14-2002, 05:31 PM
Originally posted by DarkDraco07
line 380
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
Please paste the contents of
"forumhome_forumbit_level1_nopost",
"forumhome_forumbit_level2_post" &
"forumhome_forumbit_level2_nopost"
DarkDraco07
08-14-2002, 07:46 PM
forumhome_forumbit_level1_nopost
<tr id="cat">
<td bgcolor="{ categorybackcolor}" colspan=" 7">
<a href="forumdisplay.php?s=$session[s
essionhash]&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 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}"><normalfont>$count</normalfont></td>
<td bgcolor="{ firstaltcolor}"><smallfont>$forum[lastpostinfo]</smallfont></td>
<form><td bgcolor="{ secondaltcolor}" 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>
forumhome_forumbit_level2_nopost
<tr id="cat">
<td bgcolor="{ categorybackcolor}"><smallfont> </smallfont></td>
<td bgcolor="{categorybackcolor}" colspan="7">
<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>
DarkDraco07
08-14-2002, 08:33 PM
o wait, there was a space between a variable in the template, THANK YOU SO MUCH FOR POINTING THAT OUT!!!!
I LOVE YOU :banana:
dabean
08-14-2002, 09:00 PM
<snipped> figured out the error I see.
herby
09-01-2002, 02:25 PM
Hello,
Anyone installed this on 2.2.7?
I've tried and it does not seem to work. No errors. The forum display just remains as is.
The only thing I can see that might be the problem is that
global $bbforumview;
is no longer in the index.php for 2.2.7
Hence, will these lines below that still be there, as per the hack instuctions?
// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack
Thanks in advance.
Herby
dabean
09-01-2002, 05:53 PM
Originally posted by herby
Hello,
Anyone installed this on 2.2.7?
I've tried and it does not seem to work. No errors. The forum display just remains as is.
The only thing I can see that might be the problem is that
global $bbforumview;
is no longer in the index.php for 2.2.7
Hence, will these lines below that still be there, as per the hack instuctions?
// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack
Thanks in advance.
Herby
Tested and works on vB 2.2.7. Whilst the line "global $bbforumview;" has been removed from vB 2.2.7 you do still need to add
// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack
Below what remains from the large location fragment.
If your not sure what I mean by this then the readme's inside the zip have been updated to reflect 2.2.7.
herby
09-01-2002, 06:18 PM
Thanks.
I've pretty much followe the instructions to the letter, but no joy on the collapsing.
>> http://iafma.org/gm/forums/
Where are the obvious places to look under the hood?
Thanks,
Herby
dabean
09-01-2002, 07:20 PM
Originally posted by herby
Thanks.
I've pretty much followe the instructions to the letter, but no joy on the collapsing.
>> http://iafma.org/gm/forums/
Where are the obvious places to look under the hood?
Thanks,
Herby
define more clearly what's wrong with the collapsing?
1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?
Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.
I would look at your site but the registration system requiring multiple accounts put me off.
herby
09-01-2002, 07:40 PM
1. No + - icons?
All solution steps checked.
I've just PMed a temp username/pass
Many thanks,
Herby
Originally posted by dabean
define more clearly what's wrong with the collapsing?
1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?
Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.
I would look at your site but the registration system requiring multiple accounts put me off.
dabean
09-01-2002, 08:10 PM
Originally posted by herby
1. No + - icons?
All solution steps checked.
Many thanks,
Herby
Okay all required templates seem to exist on the defualt template set. So I'd now suggest that a code modification hasn't been made.
Firstly what PHP version?
Secondly does
// expand collapse hack
require('./admin/getbrowser.php');
require('./admin/getforumview.php');
$BrowserDOM=GetBrowserDOM2();
$templatesused.=',forumhome_expandcontract,forumho me_expandjscript';
// end expand collapse hack
Exist?
now does
global $BrowserDOM, $collapsedstate;
Exist?
does
if ($BrowserDOM==True) {
eval("\$expandcontractscript = \"".gettemplate('forumhome_expandjscript')."\";");
}
Exist?
Is getbrowser.php in your admin directory?
What is the output of phpinfo.php (included in the vBulletin archive)?
If you don't want to post the output of phpinfo then PMing it is fine.
herby
09-01-2002, 09:29 PM
Oops!
Running PHP Version 4.0.6
Will get that upgraded and see what happens.
Thanks,
Herby
dabean
09-01-2002, 09:36 PM
Originally posted by herby
Oops!
Running PHP Version 4.0.6
Will get that upgraded and see what happens.
Thanks,
Herby
Open getbrowser.php change
function GetBrowserDOM2() {
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$htuagent = trim($_SERVER['HTTP_USER_AGENT']);
into
function GetBrowserDOM2() {
global $HTTP_SERVER_VARS;
if (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$htuagent = trim($HTTP_SERVER_VARS['HTTP_USER_AGENT']);
Which should make it work.
herby
09-01-2002, 09:53 PM
Perfect. That did the trick.
I assume that after upgrading to the latest version PHP, I have to reverse the above again?
Cheers,
Herby
PS How can I make the forums collapsed by default?
dabean
09-01-2002, 10:42 PM
Originally posted by herby
Perfect. That did the trick.
I assume that after upgrading to the latest version PHP, I have to reverse the above again?
Cheers,
Herby
PS How can I make the forums collapsed by default?
No, you don't need to undo the change $HTTP_SERVER_VARS is still supported on 4.1.x and 4.2.x. The reason I choose use $_server was to encourage upgrading to 4.1.x or newer.
Collapsing forums by default can be done in your admin cp by selected "collapsed" for the parent forum. Currently forums can't be collapsed based on usergroups.
herby
09-01-2002, 10:58 PM
I was getting the mysql 1054 error when navigating the forums.
Running the following seems to have cured that.
ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'
However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...
Database error in vBulletin Control Panel 2.2.7:
Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'
mysql error number: 1054
dabean
09-01-2002, 11:03 PM
Originally posted by herby
I was getting the mysql 1054 error when navigating the forums.
However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...
Database error in vBulletin Control Panel 2.2.7:
Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'
mysql error number: 1054
The installer is designed for php 4.1.x or newer to.
You need to run "ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL" to add the additional field to the database.
herby
09-01-2002, 11:09 PM
Magic. Fixed.
Looks like we're all set now. Very nice hack. We have a ton of forums and this makes it much easier for users to navigate.
Thank you very much from the time and effort to help a passing stranger in the night. Keep up the good work.
Herby
Buddha
09-02-2002, 11:35 PM
i've installed this hack without any problems at all, and then i installed the 'seperate categories' from the 'design and tweak your frontpage'. it installed fine as well, however now, my collapsed catergories also has the additional tablerow which has forum / posts/ threads/ last post/ moderator.
(see attached image)
would you happen to know what i can do to get rid of this tablerow? i liked it better the other way where you only see the category table.
if you need to see any of the template code, let me know.
thanks.
dabean
09-03-2002, 12:56 AM
Originally posted by Buddha
i've installed this hack without any problems at all, and then i installed the 'seperate categories' from the 'design and tweak your frontpage'. it installed fine as well, however now, my collapsed catergories also has the additional tablerow which has forum / posts/ threads/ last post/ moderator.
(see attached image)
would you happen to know what i can do to get rid of this tablerow? i liked it better the other way where you only see the category table.
if you need to see any of the template code, let me know.
thanks.
The "template_option.txt" file included in the main zip contains rough details of the changes you need to make.
FleaBag
09-03-2002, 01:27 AM
Removed this from my board. It's a fab hack, I just have no real use for it.
Buddha
09-03-2002, 12:21 PM
thanks dabean... will sift through it then.
*edit*
finally got it! lol. thanks for all the help bud! i love this hack btw.
dabean, there's a hack by bira that lets you contract and expand postings in a thread, but it doesn't work with Gecko or Konqueror. Maybe you could help us with your own version?
Hi !
Thanks for your hack ! It is really neat !
But I have a little problem :)
The hack itself works fine, so far ... the only problem i have: the user settings are not stored ... so yeah ...
Could you please take a look ?
_http://forum.cdrsoft.cc/temp2
Thanks !
dabean
09-12-2002, 03:08 AM
Originally posted by N.B.
Hi !
Thanks for your hack ! It is really neat !
But I have a little problem :)
The hack itself works fine, so far ... the only problem i have: the user settings are not stored ... so yeah ...
Could you please take a look ?
_http://forum.cdrsoft.cc/temp2
Thanks !
Tested Mozilla 1.1 and IE6 winxp can't replicate on supplied url. Are you waiting a few seconds between each click, whilst the status is updated in the background?
Yes I know this is a pain but until ms fix a few problems with IE there is no way I can offer a reliable "status" message saying when your setting has been saved.
BetaMax
09-16-2002, 05:36 PM
I have installed this hack. Great hack I gotta say but I am running into a problem with it.. I have 3 levels of forums. When they are all expanded it looks fine.. but once I collapse all of the 3 deep forums, my 1/2 deep forums lose the cellspacing information on half the table..
For example.. Here is how it looks normally:
http://www.visionappraisal.com/images/forum/expanded.jpg
and this is how it looks when I collapse the 3 deep forum:
http://www.visionappraisal.com/images/forum/collapsed.jpg
You notice the cellspacing missing? It is like that for any 1/2 deep forums. But once I open a 3 deep forum it looks normal. Is this something with the Hack or did I mess up a template somewhere?
Any help would be appreciated..
phpinfo: v 4.4.2
mysql: v3.23.52
P.S. The forums are running on a local network not accessable to the internet for the time being while we wait for our new web server, so the forums cannot be accessed. If you need template information, please let me know and I will post it.
BetaMax
09-16-2002, 07:08 PM
You can disregard my previous post. I restored my default templates and re applied the hack and my other changes.. it seemed to fixed it.
[email protected]
vbmenu_register("postmenu_300032", true);
09-17-2002, 01:16 AM
So what's the status of this hack? Is it reliable? Sounds great, but want to make sure I'm not heading for problems.
havefun
09-19-2002, 07:36 PM
thanks 4 your great hack!
had no problems installing it :bunny:
lg, havefun
groovesalad
10-01-2002, 09:00 PM
Unfortunately this hack doesn't work. Installed it, but all it does is give me working + & - signs that don't actually collapse the forums. Oh well.
groovesalad
10-01-2002, 09:07 PM
and this doesn't make any sense whatsoever:
template: forumhome_forumbit_level1_nopost
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" $fhomeexpandstyle align="center">
<td bgcolor="
dabean
10-01-2002, 09:52 PM
Originally posted by groovesalad
and this doesn't make any sense whatsoever:
template: forumhome_forumbit_level1_nopost
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" $fhomeexpandstyle align="center">
<td bgcolor="
That section of template is from the "template_option" addition which is completely optional infact the fragment won't exist unless you a specific template mod.
Coming back to"it doesn't work". What exactly doesn't work? and in what browser?
Firstly check that "$expandcontractscript" exists within the "forumhome" template. Secondly check the "forumhome_expandjscript" template exists within your current style. Details of both items can be found in the readme.
groovesalad
10-02-2002, 04:18 AM
You can check it out if you'd like. I think I did everything correct.
http://www.groove-salad.com
dabean
10-02-2002, 03:49 PM
Originally posted by groovesalad
You can check it out if you'd like. I think I did everything correct.
http://www.groove-salad.com
You haven't modified your "forumhome_forumbit_level2_post" template.
groovesalad
10-02-2002, 11:30 PM
Originally posted by dabean
You haven't modified your "forumhome_forumbit_level2_post" template.
The fact that you could figure that out just by looking at my site makes you a god!
:) Thanks man
adriandaz
11-02-2002, 03:34 PM
I installed this, and now I cant see any forums :( please help.
Forums at: http://forums.downage.org - you said my code was ok, maybe its my templates, see mok to me though :(
adriandaz
11-02-2002, 05:02 PM
ahh, got it to work abit, but it wont collapse it all now :(
Mithan
11-26-2002, 06:36 AM
I installed this hack, you can view it at http://dynamic5.gamespy.com/~ac2hq/forum/ and pick the Mithantest style from the front page (you dont need to register).
Im using Internet Explorer 6.0, but the settings will not save, so everytime I enter a forum and leave, its reset back to the expanded view, which makes it pretty much useless for me.
Now, is this the problem that IE users have? And is there any possible fix that will make it save? I have read this thread, but it has gotten so large...
Thanks.
dabean
11-26-2002, 06:49 PM
Originally posted by Mithan
I installed this hack, you can view it at http://dynamic5.gamespy.com/~ac2hq/forum/ and pick the Mithantest style from the front page (you dont need to register).
Im using Internet Explorer 6.0, but the settings will not save, so everytime I enter a forum and leave, its reset back to the expanded view, which makes it pretty much useless for me.
Now, is this the problem that IE users have? And is there any possible fix that will make it save? I have read this thread, but it has gotten so large...
Thanks.
updateindex.php needs to be in your forum's home directory.. e.g. http://dynamic5.gamespy.com/~ac2hq/forum/
The updateindex file is responsible for saving the collapsed/expanded state.
Mithan
11-26-2002, 07:34 PM
Works great now, thanks a lot :)
Courage
11-26-2002, 09:41 PM
Hmm I'm running 2.2.8 on http://www.softnews.ro/forum
I just installed this hack. It os OK, but it does not save any changes (collapsed forums)
Can you take a look ?
Please.
http://www.softnews.ro/forum/updateindex.php?fid=1&val=1
http://www.softnews.ro/forum/updateindex.php?fid=1&val=0
Gives me a blank html...
Erwin
11-26-2002, 09:51 PM
This is still my favorite hack. :) Great for organizing my forumhome.
Colon33
12-22-2002, 07:07 AM
Does this hack work for 2.2.9? Has anyone tested it?
naunun
01-02-2003, 09:39 PM
Originally posted by Colon33
Does this hack work for 2.2.9? Has anyone tested it?
YES! Just installed it yesterday after doing a PHP upgrade on the server. Worked like a charm without a hitch!
Surprised myself . . . only been playing with vBulletin for a few days and this was my first hack!!! The instructions are excellent. If you read them carefully, you shouldn't have a problem. Thanks to dabean for providing it!
naunun
01-04-2003, 11:38 PM
Note: intotheunknown (who originally wrote the previous message) is now naunun. Sorry for any confusion :)
drownedspirit
01-08-2003, 05:53 AM
i've tried installing this but it turns out a blank page. my index page turns out blank. did anyone had this error too?
please help i am new to this stuff,
Does the "[vB v2.2.7] Collapsable forums on forum home" hack also work on the 2.2.6 version - cause I don't wanna update my 2.2.6 until v3 is released. THANX :-)
Zero Complex
02-10-2003, 04:16 AM
would be nice if it memorized what forums you had minimized and all. So if you never really read those forums on a certain site, it'd just automatically minizmize them each visit or somethin =\
Erwin
02-10-2003, 05:37 AM
Originally posted by Zero Complex
would be nice if it memorized what forums you had minimized and all. So if you never really read those forums on a certain site, it'd just automatically minizmize them each visit or somethin =\
Uh - it does memorize which forums you have minimized and which one you have maximized. You just have to be a registered member of the site. The settings for each member is saved in the database. Guests do not have this capacity because of this.
Zero Complex
02-12-2003, 10:14 PM
i haven't installed it, just didnt read that in the features
dabean
02-13-2003, 02:24 AM
Originally posted by Zero Complex
i haven't installed it, just didnt read that in the features
Quoting the first post on the thread and the hack database entry...
Each users preference is saved to the database
Serge
02-16-2003, 04:55 PM
Ok I tried to install this hack and I got this error
Parse error: parse error in /home/surrix/public_html/forums/index.php on line 383
Could someone please help me out as to where I messed it up?
Serge
02-16-2003, 06:41 PM
After further invistation my index.php is not corrupted and it seems to be having problems with this block of code.
// expand collapse hack
if ($BrowserDOM==True) {
__if ((!isset($z)) or ($depth==1)) {
____$z=0;
__} else {
____$z++;
__}
__// get state of collapse
__if ($forum[parentid]==-1) {
___$collapsedstate=$forum['collapsed'];
__}
__// auto collapse forums based on forum setting
__if ($collapsedstate==1) {
___$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
__} else {
___$fhomeexpandstyle="";
__}
__// auto collapse forums for user
__if (getViewSetting($forum['parentid'])==1) {
___$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
__} elseif (getViewSetting($forum['parentid'])==2) {
___$fhomeexpandstyle="";
__}
__// display correct item (this can not be simplified into the block above
__// due to CSS2 defining special display values for tables, eg display:table-row;)
if ($collapsedstate==1) {
___$divexpand = "display: inline;visibility: visible;";
___$divcollapse = "display: none;visibility: hidden;";
} else {
___$divexpand = "display: none;visibility: hidden;";
___$divcollapse = "display: inline;visibility: visible;";
}
if (getViewSetting($forum['forumid'])==1) {
___$divexpand = "display: inline;visibility: visible;";
___$divcollapse = "display: none;visibility: hidden;";
__} elseif (getViewSetting($forum['forumid'])==2) {
___$divexpand = "display: none;visibility: hidden;";
___$divcollapse = "display: inline;visibility: visible;";
__}
__eval("\$expandcontract = \"".gettemplate("forumhome_expandcontract")."\";");
}
// end expand collapse hack
The line it says it has a problem with is
if ((!isset($z)) or ($depth==1)) {
I just recentally upgraded to version 2.3.0 of vbulletin but with what they said they changed this shouldn't be the problem.
Sliderx
03-09-2003, 04:28 AM
hello a have instal that hack but i haven't all the line what i want to be collapse
you can see my test board here (http://sliderx.no-ip.com/hokkaidofc)
and if in the anwser of dabean i join in a txt a copy of my templates :
forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post
thx for the futur answer of my problem
Baptizer
03-15-2003, 05:09 PM
How do I uninstall this? For example, I have backups of the two php files and I can remove the addded templates(and remove the edits to the other templatews), however, because I ran the cx_install.php file to add to my database, do i need to run a command to remove the stuff that was added?
Edit: Also, does this add any queries? Does it have the potential to slow down the loading times at all? just curious.
great hack...works perfectly!
XP Kid 86
04-28-2003, 11:37 PM
ok well first off .. the hack works ....
but
Problem 1 .. (view image) .. the whole bar is clickable .. i want just the text to be can i fix that?
Problem 2 .. (view image) you can't see the thigny cuz its well black and so is the background .. is that fixable ...
I think thtas alll the problems
cnczone
05-19-2003, 02:37 AM
Does it work with 2.3.0 ?
Splitfyre
06-22-2003, 10:59 PM
Waiting to find out if it works fine on 2.30 before installing.
dabean
06-23-2003, 10:09 AM
Works fine with 2.3.0
raxafarian
07-13-2003, 10:37 PM
thank you!
installed on vb2.3, no probs with install.
jackomo
07-25-2003, 05:38 PM
hey guys,
my forum doesn't contain the
'forumhome_forumbit_level3_post' template.
should i create a new one?
If so, how do i create it under Forum Home Page Templates?
jackomo
07-26-2003, 02:01 PM
Hey guys,
How do i get this working in the sub-sub forums?
This is my structure...
Main Category
|
Sub Category
|
Sub Category <- How do i get the (+/-) here?
|
All Postable Forums
Please help...
dabean
07-26-2003, 05:07 PM
Main Category <??
Sub Category < level1_nopost
Sub Category <- level2_post or nopost, depending on if you have the subcategory as postable.
All Postable Forums < level3_post
Each category template that needs to have the expand contract icons by adding $expandcontract, also the standard level2 modifications need to be made.
As an example a complete level2_nopost template would look like.
<tr class="cat" id="f$forum[parentid]z$z" $fhomeexpandstyle>
<td bgcolor="{categorybackcolor}"><smallfont> </smallfont></td>
<td bgcolor="{categorybackcolor}" colspan="5">
$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>
The complete level3_post template would then look like.
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>
<td bgcolor="{firstaltcolor}"><smallfont>$forum[moderators]</smallfont></td>
</tr>
Extra templates are added by clicking "add template" inside the admincp. Custom templates are always placed at the top of the templates list under "custom templates".
This hack in no way alters vB behavour in that area.
jackomo
07-26-2003, 06:16 PM
ok...i understand how it works now...
This i what im trying to do....
Main Category (level 1 no post)
|
Sub Category (level 2 no post)
|
Sub Category (level 3 no post)<- How do i get the (+/-) here?
|
All Postable Forums (level 4 post)
I created the Level 3 no post template and the level 4 post template but it still doesn't work.
The new templates i created don't show up under the Forum Home Page templates with the others, they appear at the very top under custom templates.
Any ideas?
dabean
07-26-2003, 06:31 PM
Place the contents of the level2_nopost template in post 327 inside your level3_nopost template.
The new templates will not show up under "Forum Home Page templates", as only the templates included with vB by default appear there.
jackomo
07-26-2003, 06:34 PM
Yes, that's what i did...it still doesn't work....
When i put the code in the level2_nopost, it works like a charm.
when i put the code in the new level3_nopost i created, it doesn't work.
dabean
07-26-2003, 06:55 PM
Today at 08:34 PM jackomo said this in Post #330 (https://vborg.vbsupport.ru/showthread.php?postid=420839#post420839)
Yes, that's what i did...it still doesn't work....
When i put the code in the level2_nopost, it works like a charm.
when i put the code in the new level3_nopost i created, it doesn't work.
Define doesn't work.
The level3 template doesn't appear?
The plus minus symbols don't appear but the level3 template does?
The level4 template doesn't appear?
jackomo
07-26-2003, 07:08 PM
i created both level3_no post and level4_post templates and they appear under the custom templates.
These 2 templates were not there before, i only had level 1 and level 2, so i added them.
When i go back into the forums and click through each category, i see the templates, but no (+/-) symbols at the third level.
Example...
Canada (Category 1) - level 1 no post - i can see this page.
|
Computers (Category 2) - level 2 no post - i can see this page.
|
Hardware (Category 3) - level 3 no post - i can see this page but no (+/-) next to it.
|
Part 1, Part2,...(Postable forums) - level 4 post - i can see this page but it does not collapse
dabean
07-26-2003, 07:14 PM
Define "click through each category", as this hack only applies to the main index page. It does not apply to any of the sub views inside forumdisplay.
jackomo
07-26-2003, 07:34 PM
Well, when the main page comes up you will see Canada as a main category then Computers as a sub-category under it.
When i click on Computers, there is another sub-category called Hardware under that.
Hardware contains a bunch of parts that i would like to collapse.
Is this possible with your hack?
dabean
07-26-2003, 07:41 PM
Today at 09:34 PM jackomo said this in Post #334 (https://vborg.vbsupport.ru/showthread.php?postid=420855#post420855)
Well, when the main page comes up you will see Canada as a main category then Computers as a sub-category under it.
When i click on Computers, there is another sub-category called Hardware under that.
Hardware contains a bunch of parts that i would like to collapse.
Is this possible with your hack?
If when you click on the category the url changes from index.php to forumdisplay.php then no.
This hack was designed for cases where lots of forums are required to be display on the home page.
Most of the installations using forums 3 or more levels deep with this hack alter the "depth of forums" setting to show all the required forums on the index page.
vBulletin Options > Forums Home Page Options > Depth of Forums
jackomo
07-26-2003, 07:52 PM
aahh...ok...the URL does change to forumdisplay.php
I changed the forum depth to 3 as you suggested.
Now the (+/-) appears...
Ok....well, thanks for all your help i really appreciate it.
Sorry to have wasted your time.
jackomo
07-27-2003, 02:44 PM
Hey Dabean,
How hard would it be to change this chack to work with Forum Display?
dabean
07-27-2003, 03:35 PM
Just copy paste the existing code into the correct places inside forumdisplay.php. No further template modifications are required.
Find
function makeforumbit($forumid,$depth=1,$permissions='') {
global $DB_site,$bbuserinfo,$iforumcache,$ipermcache,$imo dcache,$session,$accesscache,$usergroupdef,$noperm s;
global $showlocks,$hideprivateforums,$showforumdescriptio n,$forumdisplaydepth,$dateformat,$timeformat,$foru mshown,$enableaccess;
global $bbforumview;
Below add
// expand collapse hack
global $BrowserDOM, $collapsedstate;
// end expand collapse hack
Find
if ($forum['cancontainthreads']==1) {
$tempext = '_post';
} else {
$tempext = '_nopost';
}
Below add
// expand collapse hack
if ($BrowserDOM==True) {
if ((!isset($z)) or ($depth==1)) {
$z=0;
} else {
$z++;
}
// get state of collapse
if ($forum[parentid]==-1) {
$collapsedstate=$forum['collapsed'];
}
// auto collapse forums based on forum setting
if ($collapsedstate==1) {
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
} else {
$fhomeexpandstyle="";
}
// auto collapse forums for user
if (getViewSetting($forum['parentid'])==1) {
$fhomeexpandstyle="style=\"visibility:hidden; display:none;\"";
} elseif (getViewSetting($forum['parentid'])==2) {
$fhomeexpandstyle="";
}
// display correct item (this can not be simplified into the block above
// due to CSS2 defining special display values for tables, eg display:table-row;)
if ($collapsedstate==1) {
$divexpand = "display: inline;visibility: visible;";
$divcollapse = "display: none;visibility: hidden;";
} else {
$divexpand = "display: none;visibility: hidden;";
$divcollapse = "display: inline;visibility: visible;";
}
if (getViewSetting($forum['forumid'])==1) {
$divexpand = "display: inline;visibility: visible;";
$divcollapse = "display: none;visibility: hidden;";
} elseif (getViewSetting($forum['forumid'])==2) {
$divexpand = "display: none;visibility: hidden;";
$divcollapse = "display: inline;visibility: visible;";
}
eval("\$expandcontract = \"".gettemplate("forumhome_expandcontract")."\";");
}
// end expand collapse hack
Find:
$forumbits=makeforumbit($forumid, 1, $permissions);
Above add:
// expand collapse hack
$fviewcache=BuildViewSettingCache(); // create cache
// end expand collapse hack
Find
if ($forumshown==1) {
eval("\$forumdisplay[forumslist] = \"".gettemplate('forumdisplay_forumslist')."\";");
} else {
$forumdisplay['forumslist']='';
}
Change it to:
if ($forumshown==1) {
// expand collapse hack
if ($BrowserDOM==True) {
eval("\$expandcontractscript = \"".gettemplate('forumhome_expandjscript')."\";");
}
// end expand collapse hack
eval("\$forumdisplay[forumslist] = \"".gettemplate('forumdisplay_forumslist')."\";");
} else {
$forumdisplay['forumslist']='';
}
Alter:
require('./global.php');
into:
// expand collapse hack
require('./admin/getbrowser.php');
require('./admin/getforumview.php');
$BrowserDOM=GetBrowserDOM2();
$templatesused.=',forumhome_expandcontract,forumho me_expandjscript';
// end expand collapse hack
require('./global.php');
jackomo
07-27-2003, 04:01 PM
ok...made the changes to forumdisplay.php as you said and the (+/-) didn't show up.
so, i edited the forumdisplay_forumbit_level1_nopost, by adding the "$expandcontract" and the (+/-) shows up but it doesn't work.
so, i edited the forumdisplay_forumbit_level2_post, by changing to "<tr id="f$forum[parentid]z$z" $fhomeexpandstyle align="center">"
When i put my mouse over the (+/-), it says there is an error on the page.
jackomo
07-28-2003, 01:59 PM
We have a winner!
I got it working...
i forgot to edit the forumdisplay template
I added the "$expandcontractscript" to the forumdisplay template and it is working perfect now.
Thanks for all your help....
StarBuG
08-18-2003, 05:51 PM
One BIG question!
Will this hack be converted to fit into vBB 3.0????
That would be so awesome!!!!
Greetings
StarBuG
dabean
08-18-2003, 06:57 PM
A vB 3.0 version may be released at some point after vB 3 RC1. I haven't yet decided if I'll wait until vB 3.0 final before releasing.
StarBuG
08-19-2003, 07:25 AM
You are the greatest!!
Can hardly wait till RC1!
Greetings
Star
ps: Did you noticed after you released the hack it spreat over thousands of boards and was also rewritten for many other forum softwares hehe!!!
poetic
08-24-2003, 02:31 PM
this dosnt work with 2.3.2 or something the + and - are there and i click it the - changes to a - but the forum doesnt collpaseis there anyone who can make it work please
poetic
08-30-2003, 07:20 PM
come on please someone im really stuck
dabean
08-30-2003, 09:11 PM
The attached file will test your installation for correctness, including template modifications.
The file will explain what actions you need to take to correct any problems.
MaDCaT75
08-30-2003, 10:55 PM
omg like the coolest thing evar!
Papino
09-05-2003, 01:09 PM
hi debean, sorry but i'm able to get it working
by using the new testfile, it seems strange, but no errors occured
http://forum.rts-games.it/admin/cx_test.php
sorry again
thx
y2krazy
10-25-2003, 09:55 PM
Is there a way to use this script for other non-vB pages? Or is this script simply for vB-only pages...?
What I'm asking is if this script is available to use seperate from the vBulletin forum pages, and if so, where can it be found?
Thanks,
y2krazy
Mathiau
10-28-2003, 06:48 PM
Anyone have this running on 2.3.2 successfully?
please check my site - u cans ee my error - i went over all the code but could not really locate where i went wrong..
The "Testing" should look like the Main forum, but is not :(
http://200.12.238.21/ppcf/index.php
i tried deleting the categorya nd redoing it but no go - help please!
Deska
01-18-2004, 04:46 PM
Any update for vB3 yet?
SVTBlackLight01
01-19-2004, 04:02 AM
Any update for vB3 yet?
Which version? Isn't this a vb3 feature?
Zachery
01-19-2004, 04:20 AM
Any update for vB3 yet?
Standard vB3 feature :)
coolmile
02-04-2004, 04:20 AM
work great now... visit my site at http://www.tarantulas.us
John Diver
03-18-2004, 02:30 PM
Can this hide specific forums within a category?
I want to allow members to hide forums as well as categories
Thanks
cnczone
05-05-2004, 03:51 AM
me tooo
CFF RA's
12-24-2005, 04:52 PM
Okay, here is my issue. I followed the instructions right down to the letter and now not only do the collapsable not appearing but the entire forums are appearing, all you see is the Who's Online and the Private Message bar.
I'm running version 2.3.7
Thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.