View Full Version : Arrange Sub-Forums in columns
tamarian
04-04-2004, 10:00 PM
There's also a vB 3.5 version here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=82845
What it does
This hack arranges sub-forums on the forum home into 2 (or more) columns, makeing large lists of sub-forums more presentable. You can see it in action on my forums here:
Demo
http://forum.lowcarber.org
Note:
1. You need to enable sub-forum display on the forum home from your vB admin panel
2. This hack is for the forum home page, not forum display.
To enable sub-forums on the forum home page
1. Go to your forum Admin panel
2. Click vBulletin Options
3. Select "Forum Listings Display Options" from the drop down list
4. In "Depth of Sub-Forums" replace 0 with 1
Installation
To install, edit the file functions_forumlist.php (in the includes directory)
1. Find
foreach($vbulletin->iforumcache["$parentid"] AS $forumid)
Place this code above it:
$output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
$cols = 0;
2. Find
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
if (!empty($output))
{
$subforum = $splitter["$canpost"] . $subforum;
}
if ($depth < $vbulletin->options['subforumdepth'])
{
$output .= construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
}
}
}
return $output;
}
Replace with
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
if ($depth < $vbulletin->options['subforumdepth'])
{
$cols++;
if ($cols==3)
{
$cols = 1;
$output .= "</tr><tr>";
}
$output .= '<td width="50%">' . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
}
}
}
if ($cols ==1) $output.="<td> </td></tr></table>";
else $output.="</tr></table>";
return $output;
}
To put them in 3 columns, instead of t2, just edit this line "if ($cols==3)" to "if ($cols==4)" and change this line:
$output .= "<td width=\"50%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "";
To this:
$output .= "<td width=\"33%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "";
Template modification (optional)
As this hack will list the sub-forums in a table, the font used is not effected by the <div> tag for subforums, which will cause the default font to be used instead of smallfont.
To use smallfont for sub-forum names, edit the "forumhome_subforumbit_post"
Change (this is the whole template)
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
To:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>
And for those who want to edit or remove the "Sub-forum" word, just remove (or edit, if you just want to change it) "<strong>$vbphrase[subforums]</strong>:" from the "forumhome_forumbit_level2_post" template
Screen shots, before/after
diettalk
04-05-2004, 09:36 PM
Works great.. thanks.
Tradjick
04-05-2004, 10:10 PM
Excellent superb idea! :)
Would it be possible to determine the screen resolution from the visitor? Depending on whether to display the subforums the default or your hacked way??? I could need this because I have 7 subforums including 70 sub-sub forums.
Vb-Hispano
04-05-2004, 11:19 PM
nice idea ;)
thanks good job
INSTALLED
sabret00the
04-05-2004, 11:40 PM
screenshot?
Fi_InCogNiTo
04-05-2004, 11:47 PM
I made the changes, but nothing happens. It doesn't arrange my forums in sub-columns like on your site=\
It just looks the same as standard vB3 subforums.
I'm 100% sure I made the changes correctly.
EDIT: Maybe this conflicts with the category image or the Forums arranged in columns on forumhome hacks?
tamarian
04-05-2004, 11:51 PM
screenshot?
http://forum.lowcarber.org/
tamarian
04-05-2004, 11:55 PM
I made the changes, but nothing happens. It doesn't arrange my forums in sub-columns like on your site=\
It just looks the same as standard vB3 subforums.
I'm 100% sure I made the changes correctly.
Hmm, that's weird. Are you sure you saved your changes? Refreshed the page?
Fi_InCogNiTo
04-05-2004, 11:56 PM
Sorry, edited the post... look again =D
Here is what that hack changed.. (attached)
Itworx4me
04-06-2004, 12:01 AM
Sorry, edited the post... look again =D
Here is what that hack changed.. (attached)
Just an FYI
This hack that you have here isn't for this one in this thread. They are two separate hacks.
Fi_InCogNiTo
04-06-2004, 12:03 AM
I know they are 2 seperate hacks. Im asking if it will conflict with this hack because I have both installed and this is not working for me ;)
tamarian
04-06-2004, 12:09 AM
Sorry, edited the post... look again =D
Here is what that hack changed.. (attached)
That might be it, I don't have those other hacks installed.
I haven't checked in details the code for the other hack, but they do seem incompatible, as one lists the forums as columns, and this one lists the sub-forums as columns. Having both working together may make it look quite confusing, as it would be hard to tell, which is a forum, and which is a sub-forum :)
Fi_InCogNiTo
04-06-2004, 12:12 AM
OK, thanks for the reply =D
Nice hack btw
/me wishes he could install
Buczilla
04-06-2004, 12:21 AM
Nice work :)
sabret00the
04-06-2004, 12:22 AM
http://forum.lowcarber.org/
ooooh good thing i saw that, i thought this was xenons hack but for forumdisplay rather than forumhome
Itworx4me
04-06-2004, 12:38 AM
anyway to make this hack selectable in the forum setup? I don' t want all my sub forums showing on the forumhome. Would be nice to have a option to choose if you can select which forums this will work in.
Red Blaze
04-06-2004, 01:14 AM
I honestly see no changes and I don't have that hack Fi_InCogNiTo has. Am I missing something?
tamarian
04-06-2004, 01:41 AM
I honestly see no changes and I don't have that hack Fi_InCogNiTo has. Am I missing something?
If you tried it on the forum in your profile, I think the problem is that you need to enable display of sub-forums from your admin panel :)
Red Blaze
04-06-2004, 01:58 AM
Do you mean this only affects forum home (index page)? If that's the case then I don't really need this. lol
But a good one for those that do have subs in forum home. :)
tamarian
04-06-2004, 02:06 AM
Do you mean this only affects forum home (index page)? If that's the case then I don't really need this. lol
Yes :)
Floris
04-06-2004, 08:22 AM
Once we apply the update further on this year on vbulletin.nl THIS will be one of the few hacks we WILL install most likely. It helps us organize quite a lot!! This looks amazing.
My absolute goal is to have a icon that reads subs.. and when pressed on has a drop down like in the postbit for username, for subforums (if any).
joeychgo
04-06-2004, 09:01 AM
did do anything!!!!!!
Im lost. Im sre I did as you instructed -- I have attached the file you said to edit, maybe you can see something I cant, im still very new at this...
surfhog
04-06-2004, 01:52 PM
yup I tried this as well and did not work for me either.
joeychgo
04-06-2004, 11:23 PM
any ideas on what the problem is?
tamarian
04-06-2004, 11:54 PM
any ideas on what the problem is?
I think the problem is that you don't have sub-forum display enabled on your forum home.
There seem to be a misunderstanding that this hack is for forum display, but it is for forum home. If you do not display sub-forums on the forum home, then this hack won't work.
I'll add a comment to the first post, to make this clear.
joeychgo
04-07-2004, 12:52 AM
Are you saying it not working cause I have a VBA homepage?
-- If so, isnt there a simple way to alter it?
tamarian
04-07-2004, 01:01 AM
Are you saying it not working cause I have a VBA homepage?
-- If so, isnt there a simple way to alter it?
No, what I'm saying is that you have sub-forum listing disabled in your control panel.
You just need to enable it, to see the sub-forums in columns on the forum homepage. :)
joeychgo
04-07-2004, 01:03 AM
OK -- cool, now how do I do that? Im a newbie remember... :)
tamarian
04-07-2004, 01:16 AM
OK -- cool, now how do I do that? Im a newbie remember... :)
1. Go the Admin panel
2. Click vBulletin Options
3. Select "Forum Listings Display Options" from the drop down list
4. In "Depth of Sub-Forums" replace 0 with 1
Save, and you should be set.
Fi_InCogNiTo
04-08-2004, 02:38 AM
Hey, once I changed the options like you said, it works now. Thanks a bunch ;)
Nj?rd Eriksson
04-08-2004, 06:46 AM
Awesome. Works great for me. Thanks for this one.
Nj?rd Eriksson
04-08-2004, 07:13 AM
@tamarian:
Okay, for some or other reason the subforums don't align nicely when the forum description doesn't fill a whole line (it seems to work on your site, though.)
What could the issue be? Do you have a fix for this?
GamerJunk.net
04-08-2004, 12:39 PM
Awesome hack I love it!
tamarian
04-08-2004, 10:23 PM
@tamarian:
Okay, for some or other reason the subforums don't align nicely when the forum description doesn't fill a whole line (it seems to work on your site, though.)
What could the issue be? Do you have a fix for this?
Yes, it looks like some HTML is messed up. Click on view source, and see where the width is getting screwd up. This hack essentially adds 2 TD's of 50% width each.
tamarian
04-09-2004, 09:42 PM
I just added a little note on how to fix the font size for sub-forums. A minor template edit.
draculanowaday
04-10-2004, 04:27 AM
thanks
/me installed
obsidian
04-26-2004, 02:36 PM
Whats the easiest way to remove the "Sub-Forums:" text. I am trying to remove some of the vertical space that each forum takes up and that is unnecessary in my opinion. I can not seem to find where it comes from though :)
tamarian
04-26-2004, 02:54 PM
Whats the easiest way to remove the "Sub-Forums:" text. I am trying to remove some of the vertical space that each forum takes up and that is unnecessary in my opinion. I can not seem to find where it comes from though :)
Remove "<strong>$vbphrase[subforums]</strong>:" from the "forumhome_forumbit_level2_post" template
obsidian
04-26-2004, 03:35 PM
Great hack....Thanks for the help
ph03nIX
04-29-2004, 10:58 PM
Hi!
I was in the middle of installing it when I came across a problem. For some reason CuteHTML cannot find this code:
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
if (!empty($output))
{
$subforum = $splitter["$canpost"] . $subforum;
}
if ($depth < $vboptions['subforumdepth'])
{
$output .= construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
}
}
}
}
return $output;
}
What could be the reason for this? It had never had a problem before finding code that was there. Has the code changed or something?
Thanks :)
tamarian
05-04-2004, 11:37 PM
Hi!
What could be the reason for this? It had never had a problem before finding code that was there. Has the code changed or something?
What version of vB are you using?
Smike
05-05-2004, 07:37 AM
Great hack ! thx
Erwin
05-11-2004, 11:45 AM
No need any template changes for smallfont. :)
In functions_forumlist.php, in the code you added, replace:
$output .= "<td width=50%>" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
with
$output .= "<td width=50%><span class=smallfont>" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</span></td>";
You basically put the <span class=smallfont> </span> in the php file rather than the template. Why not? You've put the <td> tags there already. This way, you don't have to modify the template.
GamerJunk.net
05-23-2004, 11:17 PM
How would I stop this from doing it to certain forums?
what would the coding be? I want it for all my forums except ID46 because that forum is going to have over 100 sub forums lol
tamarian
05-25-2004, 03:04 AM
How would I stop this from doing it to certain forums?
what would the coding be? I want it for all my forums except ID46 because that forum is going to have over 100 sub forums lol
Should be easy to do with a hard coded if statement just berfore the subforum stuff.
Post in the request forum, and I (or anyone else is welcome) can take a crack at it. I just don't to confuse others at to which code to use :)
Michael2
05-25-2004, 09:28 PM
Installed, thanks! I do have one question...
Rather than having the sub-forums in two columns, how can I have them all in the same column? Something like this...
http://www.veggieboards.com/exchange/cats.gif
tamarian
05-25-2004, 09:40 PM
Installed, thanks! I do have one question...
Rather than having the sub-forums in two columns, how can I have them all in the same column? Something like this...
http://www.veggieboards.com/exchange/cats.gif
That should be easy, and you don't even need this hack to do it :) Just use <br \> as a seperator instead of a comma.
That would be in the "forumhome_subforumseparator_" templates.
Thank you for a great hack btw!!
Now i just have one simple questions, how can I remove the header like you have done on the demo site?
See screenshot
( for some reason I cannot upload gif files to this forum btw )
tamarian
05-25-2004, 11:03 PM
Thank you for a great hack btw!!
Now i just have one simple questions, how can I remove the header like you have done on the demo site?
See screenshot
( for some reason I cannot upload gif files to this forum btw )
https://vborg.vbsupport.ru/showpost.php?p=505643&postcount=38
:)
https://vborg.vbsupport.ru/showpost.php?p=505643&postcount=38
:)
Thank you! :D , this was exactly what i was looking for! *installed*
Michael2
05-26-2004, 01:13 AM
That should be easy, and you don't even need this hack to do it :) Just use <br \> as a seperator instead of a comma.
That would be in the "forumhome_subforumseparator_" templates.
Duh! *lol* I guess that was too obvious! Thanks!
Shoebuddy
05-27-2004, 01:03 AM
Great Hack :banana:
How can I change the icon infront of the subforum list and make the subforum list bold?
Aurous
05-27-2004, 04:03 AM
Thanks, exactly what I was looking for!
Installed
tamarian
05-27-2004, 01:20 PM
Great Hack :banana:
How can I change the icon infront of the subforum list and make the subforum list bold?
To change the icons, just upload the images you want as subforum_old.gif and subforum_new.gif replacing what's there.
For bold or any other HTML you can do something like what Erwin suggested here:
https://vborg.vbsupport.ru/showpost.php?p=511372&postcount=43
Or through templates and/or CSS
alfaowner
06-01-2004, 10:35 PM
Superb hack, worked first time, its transformed my web site, I so appreciate these easy and very efective additions. Thank you coder!
AO
Lee Wilde
06-06-2004, 08:13 PM
Hi, I don't have need for this hack at present, however I just wanted to say what an attractive site you have. Colours/layout...all very nice. Well done.
EvilCrow
06-16-2004, 11:31 PM
OMG.... I love this... Thanks I've been looking for this for ages!!!!
Not only clicks install, also kiss's the person that did it... (No I'm not gay, just happy)
There is a slight rendering issue with Mozilla. Some of the subforums displayed in columns will occasionally lose underlining. I suspect this can be resolved rather easily with CSS. I see it both on the forums I run and on the hack author's forums using Moz 1.5.
This isn't a problem in IE 6.
Very nice hack, btw.
tamarian
06-27-2004, 06:33 PM
There is a slight rendering issue with Mozilla. Some of the subforums displayed in columns will occasionally lose underlining. I suspect this can be resolved rather easily with CSS. I see it both on the forums I run and on the hack author's forums using Moz 1.5.
This isn't a problem in IE 6.
Very nice hack, btw.
Could you post a screenshot for this?
I don't doubt that this might be the case, but hopefully the screenshot will help some of the HTML guru here recognize the problem and post a solution for it. In which case, I'll gladly update the instructions acordingly :)
Here's the screenshot. I've thought about it a bit, and I think it doesn't have anything to do with the hack, but either rendering in Mozilla (because I can scroll up and down and the problem can disappear or reappear in different places) or the css.
The Realist
06-28-2004, 05:47 PM
Working fine.
Thanks
tamarian
06-28-2004, 06:12 PM
Here's the screenshot. I've thought about it a bit, and I think it doesn't have anything to do with the hack, but either rendering in Mozilla (because I can scroll up and down and the problem can disappear or reappear in different places) or the css.
Yes, I've noticed that before. It's just the undelining of the links, right? So it's not the table cells or width... I'm not sure what's causing that, I've written it off as an old mozilla bug.
Right, just the underlining of the links. I only fretted about it because the audience for my forums skew toward people with less experience with the Internet, and I try to maintain a consistent (and clear) interface. Your hack certainly helps with the clear, and by adjusting the CSS a bit, I don't have much problems with the underlining now.
tamarian
06-29-2004, 12:56 AM
by adjusting the CSS a bit, I don't have much problems with the underlining now.
Let me know what changes you've made to your CSS, I might implement those, just to make things better for my users with older moz browsers :)
Bulent Tekcan
07-03-2004, 12:19 AM
It is not work in 3.0.2 ... :disappointed: :disappointed:
Any idea ?
Bulent Tekcan
07-04-2004, 01:02 PM
Any idea for that ??? Or any trick ?
tamarian
07-04-2004, 02:25 PM
It is not work in 3.0.2 ... :disappointed: :disappointed:
Any idea ?
I have not installed 3.0.2 yet, so I'm not sure. But the file has not changed in this update, so I think it should work fine.
Did you enable sub-forums as explained in the first post?
Visibility
07-06-2004, 01:28 AM
Nice work, tamarian. Really cleaned up a messy layout, and seems to work fine in 3.0.3.
Thanks.
tamarian
07-07-2004, 01:50 AM
seems to work fine in 3.0.3.
That's great to hear, thanks for letting me know, as I may not upgrade for a while.
Lonny
07-07-2004, 10:11 AM
I followed all te instructions and for some reason I get it displayed only in 1 column...
Here is the code that I have there
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
//sub-forum hack
if ($depth < $vboptions['subforumdepth'])
{
$cols++;
if ($cols==3)
{
$cols = 1;
$output .= "</tr><tr>";
}
$output .= "<td width=50%>" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
}
}
}
}
$output.="</tr></table>";
return $output;
// end sub-forum hack
}
Lonny
07-07-2004, 11:00 AM
works ok now thanks anyway :) Excellent hack!!!
platnum
07-09-2004, 02:19 PM
Working on my 303 board.
2 thumbs up! Thanks :D
Just installed it on 3.0.3 Works great so far....
jancarlo
07-25-2004, 08:55 AM
@ tamarian
cannot be had the modification in a txt? who has Mac does not succeed to copy in php code.
thanks
jancarlo
tamarian
07-25-2004, 11:45 AM
@ tamarian
cannot be had the modification in a txt? who has Mac does not succeed to copy in php code.
thanks
jancarlo
Sure, try this.
jancarlo
07-25-2004, 11:55 AM
thanks much kind one :D
ciao
jancarlo
CMerritt
07-28-2004, 04:46 PM
Should be easy to do with a hard coded if statement just berfore the subforum stuff.
Post in the request forum, and I (or anyone else is welcome) can take a crack at it. I just don't to confuse others at to which code to use :)
Was this ever figured out as a possible option? I also have one main forum that I'd to exclude, while showing the others with subforums as this hack lists them. Thanks for your help.
-C
RetroDreams
07-29-2004, 02:49 PM
Has anyone successfully ported this to work alongside Xenon's hack?
chrisvonc
07-30-2004, 10:39 AM
Can this be adapted for catagories on the forumhome?
ivanmcp
07-30-2004, 06:24 PM
Simple yet very effective. Thanks for that.
I installed it on my 3.0.3 forum and it works fine. Only issue - I could not find second lot of code in my template as included in here, but after performing a search on just a first line of code, I found the whole block.
socals
08-21-2004, 02:06 AM
@tamarian:
Okay, for some or other reason the subforums don't align nicely when the forum description doesn't fill a whole line (it seems to work on your site, though.)
What could the issue be? Do you have a fix for this?
I ran into this same problem on my website. The first level of sub-forums was correct, but I also have sub-forums on my 2nd level and they didn't work correctly here.
I changed the <td width=50%> to <td width=200> instead and it works everywhere.
Using depth settings of 2,1,1.
(I've since changed to a depth of 2,2,1 so it wouldn't matter anymore)
Drache
09-01-2004, 12:19 PM
does this work with vb 3.03?
Visibility
09-01-2004, 01:15 PM
It's working for me on 3.03
Drache
09-01-2004, 09:08 PM
Sweet hack. this is what i've been looking for. I love it. 1 request.
Is it possible to make it so that each sub forum display differen't image? like different picture. possible? if so how do i do it?
Jimboj79
11-05-2004, 09:40 AM
Excellent thanks :)
Guest190829
11-05-2004, 09:48 PM
Execellant work tamarian
SaN-DeeP
11-06-2004, 09:00 AM
i like the way sub-forums are displayed using this hack :)
Can you also tell me how to change the forums -> under categories to get displayed like same changing some bits of this hack ?
Regards,
Blam Forumz
11-06-2004, 02:00 PM
/me installs
ResaleBroker
01-01-2005, 10:48 PM
Great Mod. Works great on our 3.03 board. Thanks!
sbryan
01-02-2005, 10:10 AM
does this hack give an option for users to disable it if they dont like it?
lanc3lot
01-02-2005, 03:01 PM
Hello:)
Can we remove the word : "Sub-Forums:" ?
See an example here: http://www.gamers.gr/board/index.php? (its says sub-forums !)
Thnx in advance :)
oxi_action
01-05-2005, 12:57 PM
This hack should work in 3.0.4? i tried but not working...!
tamarian
01-06-2005, 12:42 PM
This hack should work in 3.0.4? i tried but not working...!
I'm not sure, I have not installed 3.0.4 yet and may take me a while. Hopefully someone else can tell us if there are any needed changes.
lanc3lot
01-18-2005, 12:45 AM
With 3.0.5 ?:D
I just prepare my board to go there, anybody test it?
lanc3lot
01-19-2005, 12:18 PM
Just to report, its working ok to 3.0.6 also:)
Those of you who like to have valid XHTML should replace:
$output .= "<td width=50%>" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
with:
$output .= "<td width=\"50%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
when editing functions_forumlist.php
The previous method can cause 100's of XHTML errors if you have large forums.
tamarian
01-24-2005, 05:14 PM
The previous method can cause 100's of XHTML errors if you have large forums.
Nice catch. Original updated.
tamarian, you added the fix before I changed it again, my previous post was edited for the correct syntax as although the other method I posted worked, the one showing now is the correct way to do it :)
Sorry to mess you about :)
lanc3lot
01-24-2005, 08:27 PM
Can someone tell what u gain with this last addon?:)
tamarian
01-24-2005, 08:34 PM
tamarian, you added the fix before I changed it again, my previous post was edited for the correct syntax as although the other method I posted worked, the one showing now is the correct way to do it :)
Sorry to mess you about :)
No problem, re-applied.
tamarian
01-24-2005, 08:36 PM
Can someone tell what u gain with this last addon?:)
It's just more XHTML standard compliant. No need to worry about if you don't want to change it, you'll be fine.
tamarian I'm still getting a couple of errors on the XHTML compliance test, I've managed to track it back to this column hack.
<tr valign="top"></tr>
"end tag for "tr" which is not finished"
Any ideas?
It seems to be something to do with having uneven numbered subforums as I get two occurences of this and have 2 lots of uneven numbered subforums.
tamarian
01-24-2005, 09:50 PM
tamarian I'm still getting a couple of errors on the XHTML compliance test, I've managed to track it back to this column hack.
<tr valign="top"></tr>
"end tag for "tr" which is not finished"
Any ideas?
It seems to be something to do with having uneven numbered subforums as I get two occurences of this and have 2 lots of uneven numbered subforums.
Try this:
if ($cols ==1) $output.="<td> </td></tr></table>";
else $output.="</tr></table>";
Instead of this:
$output.="</tr></table>";
This should add an empty cell to odd numbered sub-forums.
Let me know if it passes, and I'll add it to the original.
Exactly same error, no change at all :(
Wouldn't it need to be inside the foreach loop?
tamarian
01-24-2005, 10:09 PM
Wouldn't it need to be inside the foreach loop?
No, it's only for the last subforum for each parent forum. If the last sub-forum is odd, it adds an empty cell to complete the TR.
Why not post the errors, and someone might spot it for us.
I can't validate my own main page, since I'm sure it will stop the validation too early due to too many XHTML errors :)
Line 279, column 493: end tag for "tr" which is not finished
...lign="center" ><tr valign="top"> </tr></table></td><td width="50%"><img class
Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
Another possibility is that you used an element (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete
Thats the complete error, notice that the <tr> is still immediately terminated, there is no blank cell in there.
I'm pretty sure it's not the odd number of columns causing this now, it seems as if it's related to some subforums having subforums of their own.
Lonny
02-01-2005, 12:40 PM
Doesn't work on 3.0.6
Doesn't work on 3.0.6
Yes it does. I have 3.0.6 on my site with this hack and it works fine. Check your install if it isn't working.
The Dok
03-10-2005, 05:44 PM
Is there a way to have the icon for the subforums to change color if there is a new post within that specific subforum, or some other indication of a new post?
I'm going to install it when I get home tonight but this would be kinda cool if it is possible. If not, still a great hack.
tamarian
03-10-2005, 05:51 PM
Is there a way to have the icon for the subforums to change color if there is a new post within that specific subforum, or some other indication of a new post?
It will do that by default, using the subforum status icons.
The Dok
03-10-2005, 06:18 PM
Alright... thats cool. I'll install it tonight at home. Thanks for the quick reply.
The Dok
03-11-2005, 12:26 AM
Installed and it's doing great. Thanks for it.
David_R
04-03-2005, 07:22 AM
hack screws the 3 colums displayed, works proper with 2 colums of sub-forums
ZacUSNYR
04-04-2005, 09:53 PM
clicked install - no problems with 3.0.7
absoluthum
04-06-2005, 02:00 PM
Works perfect, thanks!
This works great! I would recommend it to anyone who wants a more professional looking setup for their VBulletin forum.
Alex Norton
04-11-2005, 03:03 AM
I agree with the other members who state how great this hack is! It's much better than the standard version.
7mSeni
04-11-2005, 07:53 AM
does it works with vBulletin 3.0.7 ?
Alex Norton
04-11-2005, 04:55 PM
Yes it does.
Samira
04-15-2005, 07:10 AM
Just wanted to post this ...
In Mozilla it will put a weird space under the word between the underline for links to sub-forums.
Changing the template code from:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>
to:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <span class="smallfont"><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</span></a>
Will fix that. :) Just a matter of moving the <span> tag.
*clicks install*
htscpl
04-25-2005, 10:48 AM
Very nice ** clicks install ** Thanks!
b65ran
06-05-2005, 06:06 PM
Thanks for this hack. This is what I was looikg for. Can anybody tell how to add space between sub-forums. Please look at the attachment.
i installed it and not working. i changed the 0 to 1 in vb options and did the template and file changes.
my forums are still looking same / standard.
what could be wrong?
tamarian
06-05-2005, 08:00 PM
Thanks for this hack. This is what I was looikg for. Can anybody tell how to add space between sub-forums. Please look at the attachment.
In this line:
$output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
You can change the zero in cellspacing and/or cellpadding until it's spcaed enough for your style.
tamarian
06-05-2005, 08:02 PM
i installed it and not working. i changed the 0 to 1 in vb options and did the template and file changes.
my forums are still looking same / standard.
what could be wrong?
Not sure. Double check your steps.
yellowchaser
06-05-2005, 09:42 PM
Beautiful ! Thanks for this great hack. **Clicks Install**
Not sure. Double check your steps.
i even quadtripple checked them.
everything is right.
b65ran
06-06-2005, 10:50 AM
In this line:
You can change the zero in cellspacing and/or cellpadding until it's spcaed enough for your style.
Thank you tamarin.
tamarian
06-06-2005, 11:21 AM
i even quadtripple checked them.
everything is right.
What's your forum url?
<a href="http://www.beastclub.com.au/forums/" target="_blank">http://www.beastclub.com.au/forums/</a>
tamarian
06-06-2005, 03:25 PM
http://www.beastclub.com.au/forums/
You forum does not contain any sub-forums. So the hack is working, but it has no sub-dorums to arrange :)
You have categories, and forums under those categories. So for category "Garage", it contains a forum called "Mechanical". If the "mechanical" forum had sub-forums, sich as "old motors" and "new motors", those two would become sub-forums.
isnt this hack to view the whole system like yours?
because each forum has smaller subforums inside?
dsboyce8624
06-06-2005, 04:54 PM
I have the same thing, is there a way to change the categories to forums, but not allow posting to them. I'd really like to use this, but I don't want threads in the top level.
Dennis
tamarian
06-06-2005, 04:59 PM
isnt this hack to view the whole system like yours?
because each forum has smaller subforums inside?
Yes, if you have sub-forums, they will look like mine. But your forum has no sub-forums.
For a quick test, create two new test forums, and choos the "Errors & Problems" as a parent, in the parent field. Then look at the main page, you will have the 2 new test forums listed like my sub-forums.
There is another hack, to arrange forums (not sub-forums) in a similar way. Check it out:
https://vborg.vbsupport.ru/showthread.php?t=59958
tamarian
06-06-2005, 05:00 PM
I have the same thing, is there a way to change the categories to forums, but not allow posting to them.
Check Xenon's hack:
https://vborg.vbsupport.ru/showthread.php?t=59958
dsboyce8624
06-06-2005, 05:02 PM
Check Xenon's hack:
https://vborg.vbsupport.ru/showthread.php?t=59958
Well, I changed one of the cats to a forum just for fun, attached is what happens.
I just checked the "Act as Forum" button. Could this be because of my custom skin?
dsboyce8624
06-06-2005, 05:08 PM
Check Xenon's hack:
https://vborg.vbsupport.ru/showthread.php?t=59958
This will give me:
Cat Header
:laugh: Subforum :laugh: Subforum
:laugh: Subforum :laugh: Subforum
:laugh: Subforum :laugh: Subforum
With space between of course? His picture isn't very easy to look at.
tamarian
06-06-2005, 05:18 PM
dsboyce, you might want to create some shell-forums under the existing categories, then put the actual forums of that category as children of that new shell forum.
Before:
-- Category name
---- Forum 1
---- Forum 2
After:
--- Category name
------ Shell forum
--------- Forum 1
--------- Forum 2
dsboyce8624
06-06-2005, 05:27 PM
dsboyce, you might want to create some shell-forums under the existing categories, then put the actual forums of that category as children of that new shell forum.
Before:
-- Category name
---- Forum 1
---- Forum 2
After:
--- Category name
------ Shell forum
--------- Forum 1
--------- Forum 2
Good idea, I'll give it a try.
Thanks for being so responsive.
EDIT:That worked, now I just have to figure out how to name them, since it'll be:
cat
--Shell
----Forum
----Forum
And the Cats are already named.
Any ideas on how to handle this?
i dont get it
so how do i do subforums?
i thought they are already sub forums under each main forum title?
dsboyce8624
06-06-2005, 05:42 PM
Okay I created a non-posting forum under the first two cats and called it categories, didn't know you could have multiple forums with the same name.
So here's what I did to resolve categories instead of parent forums:
Under each top category I created a new forum with posting turned off, then moved the child forums under it.
Like so:
Existing Category (Top Level with act as forum off)
--New Forum (With posting off, but act as forum on)
----Moved Exiting Child Forums
Hope this helps if others have the same problem.
Dennis
so do i have to make the each main forum before the subforums, a subforum?
dsboyce8624
06-06-2005, 06:07 PM
so do i have to make the each main forum before the subforums, a subforum?
If your top level are Categories (Act as Forum is off) then you need to add a new Forum under that (I recommend turning off posting) and move the subs under the one you just created. Look at my site to see what I did.
Some are still the old way because I'm working on it now.
i see what you done but i dont get it still?
where do i move the subs into? they are already under the categories that act as no forum. do i have to set them to act as no forum too?
im so confused
dsboyce8624
06-06-2005, 06:17 PM
i see what you done but i dont get it still?
where do i move the subs into? they are already under the categories that act as no forum. do i have to set them to act as no forum too?
im so confused
You can try to change them to act as forums and make them closed. I tried that but it messed things up. I added a NEW forum under each of the ones that were acct as forum=NO and put the child forums in it.
Kind of adding a top forum, since you don't have a top one, you have a category.
so i have to re-add all the sub forums from scratch?
dsboyce8624
06-06-2005, 06:36 PM
so i have to re-add all the sub forums from scratch?
No, on the config for each forum, you move it under the new top forum you made.
so i have to make a new category, and then just move them sub forums back into it. and delete the old categories?? is that right?
dsboyce8624
06-06-2005, 06:48 PM
so i have to make a new category, and then just move them sub forums back into it. and delete the old categories?? is that right?
Nope. Make a new FORUM under the caegories you have (I called mine "Categories") then move the sub forums under it.
Like this:
Existing Category
--New Forum <---you added this
----Existing Child Forums <---and moved these under it
tamarian
06-06-2005, 06:51 PM
Yes, just what Dennis said. That should do it.
a yeh, kind of get ya. il try that. thanks.
dsboyce8624
06-06-2005, 06:56 PM
Yes, just what Dennis said. That should do it.
It actually worked out pretty good. I wonder why converting the existing categories to forums broke it though?
tamarian
06-06-2005, 07:00 PM
It actually worked out pretty good. I wonder why converting the existing categories to forums broke it though?
Because the main category was lost, so it was category-less :)
If you created a new catgory, then made the old catgory to be it's child, then made that old category to a forum, it would have worked. It wasn't really broken though, it just doesn't look as good as under a category.
dsboyce8624
06-06-2005, 07:02 PM
Because the main category was lost, so it was category-less :)
If you created a new catgory, then made the old catgory to be it's child, then made that old category to a forum, it would have worked. It wasn't really broken though, it just doesn't look as good as under a category.
So if I did that--^ then dumped the top category, would that work?
tamarian
06-06-2005, 07:11 PM
So if I did that--^ then dumped the top category, would that work?
No, it will "work", but I'm sure you won't like the look. :)
vktechnology
06-06-2005, 07:22 PM
Is it possible to make couter to count sub forums..it will look like directory style
something like
Computer (5)- Software (2) - Hardware (1)
- services(4) - Products (8)
tamarian
06-06-2005, 07:46 PM
Is it possible to make couter to count sub forums..it will look like directory style
something like
Computer (5)- Software (2) - Hardware (1)
- services(4) - Products (8)
You mean display the sub-forums, and then a number next to them, indicating how many sub-sub-forums that sub-forum contain?
Might help if you draw the hierarchy as a tree, then the forum listing output using the names from the hierarchy. (make sure the counts match what's in the tree, otherwise it can get really complicated with all the possibilities) :)
tamarian
06-10-2005, 05:55 PM
This hack has been ported to vB 3.5 beta:
https://vborg.vbsupport.ru/showthread.php?threadid=82845
Megareus Rex
06-21-2005, 08:47 PM
I havent looked through the thread, but I figure I'll ask anyways :P
Is there a way to set it so members can choose to turn this feature on/off in their CP? I think this'd be good for the most part, but a lot of our devout members don't like how it looks.
tamarian
06-21-2005, 08:55 PM
I havent looked through the thread, but I figure I'll ask anyways :P
Is there a way to set it so members can choose to turn this feature on/off in their CP? I think this'd be good for the most part, but a lot of our devout members don't like how it looks.
No. It would require more hacking to do this, especially since it's not per usergroup, but per user.
Ducky_05
06-26-2005, 06:52 AM
For anyone who did everything correctly and still don't see ++++, as I did at first, Change the "2 2 1" to "1 1 1". Worked for me!
OFFSHORE DAN
07-02-2005, 01:30 AM
I did the mod. Now my other stuff disapeared?
www.curiocollectibles.com
Please help
OFFSHORE DAN
07-02-2005, 01:34 AM
Opps I think I got it!
OFFSHORE DAN
07-02-2005, 02:38 AM
I still can not get ride of the Sub-Forums word I removed
<strong>$vbphrase[subforums]</strong>:
and it is still there.
1nf3rn0
07-02-2005, 07:22 AM
I still can not get ride of the Sub-Forums word I removed
<strong>$vbphrase[subforums]</strong>:
and it is still there.
ok bro...i got this to work--->>>>forumhome_forumbit_level2_post
that should do ya bro!...if not, you might want to clerar your cache and check again, otherwise edit all the templates that are forum bit level 2 post, level 1 no post and level 2 no post
OFFSHORE DAN
07-02-2005, 06:34 PM
Ok I will try that.
slim cutty
07-12-2005, 08:47 AM
For some reason I received a can't save cookies error
when I tried to enter all forums. I believe something is wrong with the code...(I say this because its easy to install I put it on about 4 times)
it showed error on line 600 something in forum_displaylist
? Don't know what that was about so I uninstalled this and everything worked again.... is there still any assistance on this?
tamarian
07-12-2005, 11:13 AM
For some reason I received a can't save cookies error
when I tried to enter all forums. I believe something is wrong with the code...(I say this because its easy to install I put it on about 4 times)
it showed error on line 600 something in forum_displaylist
? Don't know what that was about so I uninstalled this and everything worked again.... is there still any assistance on this?
There shouldn't be a file named forum_displaylist, you might have applied the changes to wrong file. What version are you running, and what was the exact error?
slim cutty
07-12-2005, 06:57 PM
I meant to say...
functions_forumlist.php
I've uninstalled it.... maybe a conflict with code.. I don't know..
but unable to save cookies showed and was showing that there was conflict around line 600 something...
anyway... hack is cool and makes things look organized... wish I could use it
tamarian
07-12-2005, 07:18 PM
I meant to say...
functions_forumlist.php
I've uninstalled it.... maybe a conflict with code.. I don't know..
but unable to save cookies showed and was showing that there was conflict around line 600 something...
anyway... hack is cool and makes things look organized... wish I could use it
The hack has nothing to do with cookies. Did the error say anything about headers being sent? Sometmes this is cause by editors adding things PHP don't like :)
slim cutty
07-13-2005, 06:09 AM
yes it did... it said
unable to save cookies, header already sent...
what could that mean? It only did that when adding the bottom portion of this hack... man oh man I hope its nothing major... been working 3 weeks on my board
slim cutty
07-13-2005, 08:49 AM
Okay I feel stupid now..lol (I am a newb)
the problem was coming from another hack... the Rules and User Agreement Hack... major cookies problem..lol
thanks for all the help dude...highly I highly appreciate it
kregger
07-16-2005, 09:21 PM
Man that looks better! hehe Thanks! Those subforums were getting on my nerves when they were all jumbled up.
Craig
Gutspiller
07-28-2005, 06:59 PM
Where do I go to change the size of the commas between the sub forums if I don't apply this hack?
tamarian
07-28-2005, 07:10 PM
Where do I go to change the size of the commas between the sub forums if I don't apply this hack?
Not sure what you mean by the size of the comma, but you can check the subforum separator template.
Sports.N.Cards
08-05-2005, 04:55 PM
Thanks a ton
ma7room
08-19-2005, 11:31 PM
thanks man 100%. :rolleyes:
hotwheels
08-30-2005, 09:08 AM
Nice hack.....for those reading this, it is worth the time.
Hotwheels
yj_enquirer
08-31-2005, 01:46 PM
just installed... clicked install..
and yep.. forums are looking less cluttered now.. makes it look rather professional.. thanks m8!
somasimple
09-07-2005, 10:32 AM
Thanks, it worked great!
mustang_lex
09-09-2005, 05:06 PM
Beautiful job. Works great and got rid of the dumb Sub Forums title
Omega Prime
09-09-2005, 05:58 PM
Any know how this could be done for vB3.5? I'm hoping a plugin can be done for this :)
tamarian
09-10-2005, 02:09 AM
Any know how this could be done for vB3.5? I'm hoping a plugin can be done for this :)
There is a 3.5 version, but it's not a plugin. Click on my profile to see the link to it.
There's also a CSS template hack for this for 3.5, you'll find the link posted in the 3.5 version.
Stargesicht
10-04-2005, 02:44 PM
Sorry for my bad englisch.
I have a problem with this fine Mod.
2 Lines looks super, but when i get three lines, the third line ist too wirde riht.
Look at the screenshot...
I need the vB - Version 3.0.8. Is this the Porblem???
tamarian
10-04-2005, 03:01 PM
Sorry for my bad englisch.
I have a problem with this fine Mod.
2 Lines looks super, but when i get three lines, the third line ist too wirde riht.
Look at the screenshot...
I need the vB - Version 3.0.8. Is this the Porblem???
No problem with 3.0.8
To fix the column width for 3, change this:
$output .= "<td width=\"50%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "";
To this:
$output .= "<td width=\"33%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "";
Stargesicht
10-04-2005, 04:02 PM
Thank you very much. It works fantastic...
osariase
10-06-2005, 04:33 PM
I did what was instructed and my forums changed but not like you have yours am I missing something?
picture of my forums display below
tamarian
10-06-2005, 05:40 PM
I did what was instructed and my forums changed but not like you have yours am I missing something?
picture of my forums display below
Undo the changes, and re-apply the steps. There was a minor code change.
richiepearce
12-03-2005, 08:51 AM
I am trying to add this mod to my forum but cannot find the first line of code to be changed. I have added my file, can someone please take a look for me and advise what needs to be changed.
Many Thanks,
Richie :nervous:
tamarian
12-03-2005, 10:22 AM
I am trying to add this mod to my forum but cannot find the first line of code to be changed. I have added my file, can someone please take a look for me and advise what needs to be changed.
Many Thanks,
Richie :nervous:
I see it at line 520. Please delete the file you uploaded.
Chris M
12-03-2005, 10:51 AM
Please do not upload vBulletin files :)
Chris
richiepearce
12-05-2005, 09:13 AM
Please do not upload vBulletin files :)
Chris
OK, sorry, forgot that was not allowed. Thanks for highlighting the line for me. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.