View Full Version : Arrange Sub-Forums in columns
tamarian
06-09-2005, 10:00 PM
Better alternatives to this hack:
3.6 plugin version by Cybernetec with more options:
https://vborg.vbsupport.ru/showthread.php?t=122996
3.5 plugin version by Atakan KOC: https://vborg.vbsupport.ru/showthread.php?t=118935
CSS/templates version by hpwilhelm:
https://vborg.vbsupport.ru/showthread.php?t=91299
Ported from 3.0.x.
What it does
This hack arranges sub-forums on the forum home into 2 columns, makeing large lists of sub-forums more presentable. You can see the before/after in the screenshots attached
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 includes/functions_forumlist.php
1. Find (there are two slightly different lines, differing by a space, the one in question is around line 552)
if (!isset($vbulletin->iforumcache["$parentid"]))
{
return $output;
}
Place this code below it:
$output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
$cols = 0;
2. Find
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
//sub-forum hack
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;
}
//end hack
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.
handling of sub-forums.
eXtremeTim
06-10-2005, 05:32 PM
Good work. I might play with it later.
alderwazeh
06-10-2005, 06:32 PM
very nice idea and end product but I didnt found the codes you mentioned in this template ?! May be it is for VB3.0.5 only since I am running 3.0.7 ? I dont know but i wish i could install that hack in any event
tamarian
06-10-2005, 06:42 PM
very nice idea and end product but I didnt found the codes you mentioned in this template ?! May be it is for VB3.0.5 only since I am running 3.0.7 ? I dont know but i wish i could install that hack in any event
This is for vB 3.5. You can get the 3.0.7 version from here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=63498
Erwin
06-10-2005, 10:45 PM
Good job. :)
TCattitude
06-10-2005, 11:33 PM
Nice!
This is a great mod for vb, any version.
Thanks :)
Neutral Singh
06-11-2005, 08:20 AM
** Aman Clicks Installed **
Excellent !! :) This will, perhaps, be the first modification in my forums, once the stable vB 3.5.0 is released. :) This mod should always have been a default option in vBulletin... makes the look of the forum so much professional and presentable.
Kudos, for sharing it first thing up !!
Snake
06-26-2005, 11:21 AM
That is sweet. Thank you.
taffy056
06-26-2005, 09:46 PM
Hi,
Thanks for sharing this hack :) One question about it though, how do I get the subforum list to show on 3 lines instead of two?
taffy
tamarian
06-26-2005, 09:50 PM
Hi,
Thanks for sharing this hack :) One question about it though, how do I get the subforum list to show on 3 lines instead of two?
taffy
edit this line:
if ($cols==3)
to:
if ($cols==4)
red_baron2000
06-26-2005, 10:02 PM
excellent mod sir :)
thank you .
Loki12
07-13-2005, 08:20 PM
It seems includes/functions_forumlist.php has changed in Beta 4... could anyone please help update this useful modification? ;)
tamarian
07-13-2005, 08:46 PM
It seems includes/functions_forumlist.php has changed in Beta 4... could anyone please help update this useful modification? ;)
The file itself has changed, but not the portions involved. Steps 1 and 2 will be the same.
Loki12
07-13-2005, 09:05 PM
The file itself has changed, but not the portions involved. Steps 1 and 2 will be the same.
I can't find this in the new file:
if (!empty($output))
{
$subforum = $splitter["$canpost"] . $subforum;
}
if ($depth < $vbulletin->options['subforumdepth'])
{
$output .= construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
}
}
}
return $output;
}
tamarian
07-13-2005, 09:10 PM
I can't find this in the new file:
Should be there around line 561
If you're using the editor's search function, try looking for the first line, some times the tabs and white space effect the results for mult-line search.
Loki12
07-13-2005, 09:27 PM
Should be there around line 561
If you're using the editor's search function, try looking for the first line, some times the tabs and white space effect the results for mult-line search.
Thanks, you're right! :) I edited instead with Wordpad, which worked better.
slank
07-22-2005, 02:30 PM
am gonna do this right now, had it for 3.0.7 and loved it, now will try it out on 3.5.4 :) cheers
ConqSoft
07-30-2005, 10:18 PM
Very nice. This should definately be in vBulletin as default.
Thanks
Boofo
07-30-2005, 10:25 PM
Please make a text file for this so others can download and have it in case of an upgrade or re-install.
And is there any way to set it to how many subforum columns you want? I tried this mod and it looked really bad as I had some long subforum names and it went to 3 columns that were not spaced apart evenly.
ConqSoft
07-30-2005, 10:34 PM
To change the number of columns, you should be able to just change this line:
if ($cols==3)
Change it to 2 for 1 column. 3 for 1 columns. 4 for 3 columns. Etc.
Hello,
Is it possible for us to make the <td> larger than what it is? I have 2 rows set, but it is cutting some of the names and starting a new line. I would prefer it didn't do that. How can this be modified so that it will allow larger forum names?
tamarian
08-04-2005, 09:00 PM
You can try a nowrap attribute.
Find this:
$output .= '<td width="50%">' . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
Replace with:
$output .= '<td width="50%" noWrap>' . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
Hello,
I new it was a simple edit. Thanks, it worked like a charm.
Boofo
08-04-2005, 09:36 PM
Again, please make a text file for this. ;)
tamarian
08-05-2005, 04:42 PM
Again, please make a text file for this. ;)
I thought there was one alread :)
Hello,
Not sure if that was a joke or not, so I figured I would respond. When i downloaded it, there wasn't anything that informed to use a "noWrap" function. (I was over-thinking this to the extreme and was looking for a way to set widths. lol)
tamarian
08-05-2005, 08:31 PM
Not sure if that was a joke or not, so I figured I would respond. When i downloaded it, there wasn't anything that informed to use a "noWrap" function. (I was over-thinking this to the extreme and was looking for a way to set widths. lol)
I think many are better off without the noWrap attribute, and it's only useful to those really need it. I don't use it, since it allows members with lower resolution to still be able to view the entire page without scrolling sideways.
Brinnie
08-10-2005, 08:07 AM
Hey, was there a plug in for this?
I thought I saw another version of this, but I may be wrong.
Not that I'm implying anything, I'm just trying to figure out if there's another one, so I can make a choice.
Brinnie
08-10-2005, 08:22 AM
To install, edit the file includes/functions_forumlist.php
1. Find
PHP Code:
foreach($vbulletin->iforumcache["$parentid"] AS $forumid)
Yea, dude...
I have 2 instances of that exact code.
Replace them both?!?!?
Brinnie
08-10-2005, 09:12 AM
Hi,
I applied this hack to RC2 and came out with this:
I don't know if it has anything to do with haveing multiple instnaces of that code or not, but I only replaced the first one. :)
tamarian
08-10-2005, 02:43 PM
Hey, was there a plug in for this?
I thought I saw another version of this, but I may be wrong.
Not that I'm implying anything, I'm just trying to figure out if there's another one, so I can make a choice.
There's a template/CSS version here:
https://vborg.vbsupport.ru/showthread.php?t=91299
tamarian
08-10-2005, 02:47 PM
Yea, dude...
I have 2 instances of that exact code.
Replace them both?!?!?
In the same file, functions_forumlist.php? There should be only one.
JirQUEST
08-16-2005, 10:33 AM
Hi,
I applied this hack to RC2 and came out with this:
I don't know if it has anything to do with haveing multiple instnaces of that code or not, but I only replaced the first one. :)
having the same exact problem as u.
TosaInu
08-20-2005, 08:44 PM
Neat.
:Judge:
10-08-2005, 09:10 PM
Thank You!
I did all your adjustments and had no trouble at all.
http://www.cecilcountyx.com/forums/index.php
NxTek
10-09-2005, 03:27 PM
having the same exact problem as u.I am as well with 3.5.0
tamarian
10-09-2005, 03:44 PM
I am as well with 3.5.0
Send me a PM containing your functions_forumlist.php file. There's probably and edit mistake.
Mr Chad
10-09-2005, 04:31 PM
nice, i needed this.
looking nice... installed
NxTek
10-12-2005, 04:03 PM
Send me a PM containing your functions_forumlist.php file. There's probably and edit mistake.
Will do. Thanks.
tamarian
10-12-2005, 04:56 PM
For those who had problems, note that for the first change, there two slightly different lines 277 and 552:
foreach ($vbulletin->iforumcache["$parentid"] AS $forumid)
foreach($vbulletin->iforumcache["$parentid"] AS $forumid)
The difference, is only a space after foreach :)
I've updated the first post to note this.
NxTek
10-12-2005, 05:20 PM
That worked great. Thanks for the update. :)
bhxtyrant
10-15-2005, 08:03 AM
Hey guys,I love this idea! looks much better then the default way of displying sub forums in my opinion.But is there a way to set up aplugin to perform this action?I know editing the code is simple and straight foward but i think a plugin would be much better for the new 3.5 :) not sure if it's possible but worth some thought.
Gaspanic
10-31-2005, 01:27 PM
Anybody got any idea's why mines just displaying the first subforum and none of the others?
http://www.bottleofbroon.co.uk/
Cheers.
Gaspanic
10-31-2005, 01:42 PM
Nevermind, fixed it :)
TheFocusElf
10-31-2005, 07:45 PM
This is a great mod -- for all perfectionists out there, and those who just demand their forums to look and feel nice; this mod is a must!
-W
dostborsa
11-13-2005, 04:56 PM
don't support 3.5.1 :(
tamarian
11-13-2005, 05:03 PM
don't support 3.5.1 :(
Why not? Working fine on my 3.5.1 test forum. I just edited the instructions to make it easier to find the code that needs changing, but it should work fine.
dostborsa
11-13-2005, 05:30 PM
Can't find " foreach($vbulletin->iforumcache["$parentid"] AS $forumid) " in the file includes/functions_forumlist.php
this is a first step :(
tamarian
11-13-2005, 05:37 PM
Can't find " foreach($vbulletin->iforumcache["$parentid"] AS $forumid) " in the file includes/functions_forumlist.php
this is a first step :(
What do you have in line 552?
dostborsa
11-13-2005, 05:41 PM
thanks for answer
line 522
Bulent Tekcan
11-13-2005, 05:54 PM
This hack for 3.5.x series.
You didn't find foreach($vbulletin->iforumcache["$parentid"] AS $forumid) this code of course.Becasue this code for 3.0.x series.
If your board 3.0.x series please see this https://vborg.vbsupport.ru/showthread.php?s=&threadid=63498 thread.
If your board 3.5.x series please read this page and first message.
Cheers
tamarian
11-13-2005, 06:00 PM
thanks for answer
line 522
And line 552?
tamarian
11-13-2005, 06:01 PM
This hack for 3.5.x series.
I think he is using 3.5.1. The problem is most likely in the editor search.
davidw
11-13-2005, 06:04 PM
* christianb subscribes to this thread
this is exactly what I need - I'll work on it later and install if it is a success :D
dostborsa
11-13-2005, 06:05 PM
And line 552?
attachment line 522
https://vborg.vbsupport.ru/attachment.php?attachmentid=37536
tamarian
11-13-2005, 06:08 PM
attachment line 522
https://vborg.vbsupport.ru/attachment.php?attachmentid=37536
I'm not interested in 522, it's 552 :)
Bulent Tekcan
11-13-2005, 06:09 PM
I think in Line 547....
I prefer use UltraEdit 32....Because some editors report different line number.
And easy way....Don't search line number.Press ctrl + F and put the data code here,than press search.
Bulent Tekcan
11-13-2005, 06:33 PM
Your forum look good now ;)
dostborsa
11-13-2005, 06:50 PM
I'm not interested in 522, it's 552 :)
Thank you very much for your help and for this property. I saw it wrongly due to my illness. Again thank you very much. :nervous:
Bulent Tekcan your thought was correct, the problem was coming from my software. Thank you very much again, your web site seems better than mine.
:D
rb290
11-16-2005, 02:42 AM
ummmm how do you even use sub forums ?
a hack for it anywhere for 3.5 ?
tamarian
11-16-2005, 02:44 AM
ummmm how do you even use sub forums ?
a hack for it anywhere for 3.5 ?
It's a standard feature of vBulletin. When you create a forum, and choose another forum as parent, it becomes a sub-forum.
davidw
11-16-2005, 10:39 AM
That was one of the many features of vbulletin that made me want to purchase it. :) I use subforums extensively.
pelican
11-18-2005, 02:23 AM
what's the difference between this and this -> ( https://vborg.vbsupport.ru/showthread.php?t=91299 )
tamarian
11-18-2005, 02:34 AM
what's the difference between this and this -> ( https://vborg.vbsupport.ru/showthread.php?t=91299 )
One uses templates, and one uses code. You'll be fine with either one.
rb290
11-22-2005, 01:04 AM
It's a standard feature of vBulletin. When you create a forum, and choose another forum as parent, it becomes a sub-forum.
ya i know how to create sub forums but how do you make it appear on the forums homepage like that up there
rb290
11-22-2005, 01:11 AM
nevermind I didnt read a section up there
shadowdancer36
12-02-2005, 10:25 PM
I can't get this hack to work..., I feel like an idiot. I followed the directions closely and it seems like the edit to the functions_forumlist.php file causes my site to come up blank.
I see you mention that it COULD be two instances of that code, but I only found one. Is it suppposed to be two?
tamarian
12-02-2005, 10:36 PM
I can't get this hack to work..., I feel like an idiot. I followed the directions closely and it seems like the edit to the functions_forumlist.php file causes my site to come up blank.
I see you mention that it COULD be two instances of that code, but I only found one. Is it suppposed to be two?
It's one instance, but there's another close match that tend to confuse people. For this reason I changed the instruction by listing 3 lines block to look for, instead of one line.
newfun
12-17-2005, 04:47 AM
How to move this text: Sub-Forums: out?
Smiry Kin's
12-17-2005, 06:03 PM
very usfull!
RetroDreams
12-19-2005, 08:30 PM
How to move this text: Sub-Forums: out?
Look in the "forumhome_forumbit_level2_post" template and remove the following:
$vbphrase[subforums]</strong>:
Tamarian, I really appreciate this modification as it brings order to an otherwise very busy category page.
I have two questions: I just LOVE your forum layout (your pic examples on the mod). It appears you mastered the tabbed look.... I am fairly new to php and coding...is this a vb style? How can one get the same tabbed look?
I found the answer to my second question.
tamarian
12-28-2005, 01:39 AM
is this a vb style? How can one get the same tabbed look?
It's the standard vb style, just some different colours, and using some old vB 1.x icons
dead7
01-12-2006, 02:43 PM
Working great on 3.5.2 -- Much obliged for this, organizes it all much better.
bada_bing
01-13-2006, 02:27 AM
WIll this work on 3.5.3 also any change of making this a plugin ?
bada_bing
01-13-2006, 03:37 PM
question how can I get me forum and subforums to look like your first example? I cant even get mine to look like that and im running vb 3.5.3 ?
bada_bing
01-14-2006, 03:53 AM
question how can I get me forum and subforums to look like your first example? I cant even get mine to look like that and im running vb 3.5.3 ?
Anyone ?
rages4calm
01-14-2006, 07:51 AM
Ok im getting a headache from hell doing this crap.
I followed all steps even with the new warnings added.
Im using 3.5.2
Made sure the forum was set to sub forum depth of 1... with the top two being 2.
i edited the php file and checked it 3 times.
When i uploaded the php file nothing changed at all.
hmm
so i set
Depth of Forums - Forum Home = 1
Depth of Forums - Forum Display = 1
Depth of Sub-Forums = 2
Ahh ha.. it works.. but.. my post counts and stats etc.. all gone.
so i put it back to
2
2
1
...
nope looks like my regular forum.
rages4calm
01-14-2006, 09:44 PM
uhh anyone?
bada_bing
02-03-2006, 02:54 PM
Support stinks for this hack looks like im not installing
David_R
02-21-2006, 06:20 PM
thanks for this addon.
David_R
02-21-2006, 06:26 PM
how is this hack different from Forums arranged in columns on forumhome by Xenon ?
sorry for hijacking the thread, but i found both the hacks doing same work :ermm: :ermm:
tamarian
02-22-2006, 01:05 AM
how is this hack different from Forums arranged in columns on forumhome by Xenon ?
sorry for hijacking the thread, but i found both the hacks doing same work :ermm: :ermm:
One is for forums, and one is for sub-forums.
alfaowner
03-11-2006, 11:33 PM
Just what I needed, I had the old one and was sooo happy when I found thisfor my v3.5.4 - Thanks again
bada_bing
03-15-2006, 07:22 PM
Nice hack installed on my other forum
iamem
04-10-2006, 04:30 AM
same works on vb3.5.3.. tried.
thanks a lot.
Nathan2006
05-06-2006, 02:10 PM
Thank you tamarian
Looking great!:D
Install
Holidazed
05-08-2006, 06:36 PM
There's a plugin version by Atakan KOC: https://vborg.vbsupport.ru/showthread.php?t=113484
The link you provided for the plugin version of this does not work. I do not want to edit the source code as it causes problems when I upgrade to newer versions of vbb.
How do I get the plugin version?
tamarian
05-08-2006, 07:01 PM
The link you provided for the plugin version of this does not work. I do not want to edit the source code as it causes problems when I upgrade to newer versions of vbb.
How do I get the plugin version?
Send a PM to Atakan KOC, it appears the thread was removed.
Pamela
06-25-2006, 12:30 AM
*clicks install*
Works perfectly! Thanks! :banana:
Pamela
06-25-2006, 12:41 AM
Works great...but I have one question...
Is there a way to have it ignore one or two forums entirely and not have their sub-forums listed? There are a couple of forums with subforums for staff and member's private journals that I'd prefer not to have listed on the main forum page (plus they have sooooo many sub-forums that take up too much space on the main forum page).
Anyone know how I can make the sub-forums of 2 forums not show up?
Thank you!!! :)
jailer
07-28-2006, 11:18 AM
This is great - thanks tamarian. One small thing. I've tried to fix myself but lost patience. In your two screenshots (as on my board) the underline is further away from the word than it should be. I'd like to get that back to nearer? I'm sure it's something to do with the valign, but I've tried baseline/bottom etc. Should the tr tag be closed? Can you work out how I can do this? Maybe even remove the underline altogether from that bit alone?
Really appreciate some help on this - other than this small niggle, it's perfect.
jailer
07-29-2006, 10:23 AM
Polite bump
jailer
07-30-2006, 11:53 AM
*clicks uninstall*
Liked it, but too flaky. If you don't have a full screen forum and the visitor has 1024X768, the spacing is way, way too wide. I altered it to make it look acceptable then the visitors with 800X600 got corrupt layouts.
I think there's a few mods or plug-ins to do this so I'll try a different one which will work with non-standard sized forum widths.
Anyone recommend one?
Stargesicht
08-04-2006, 03:15 PM
does it works with 3.6.0...
jw00dy
08-09-2006, 08:48 AM
Great Mod, thanks! *clicks install*
Serkan Yılmaz
08-09-2006, 01:36 PM
Valla bilgi için teşekkurler en sonunda bu eklentiyle bu sorunu çözdüm.Thank you
Wenchie
08-28-2006, 04:52 AM
does it works with 3.6.0...
Yes, it does.
If you already have it installed and you are upgrading to 3.6.0, you have to re-do the edits to: includes/functions_forumlist.php
But it works fine.
zooki
10-20-2006, 07:33 PM
Interesting thank you
napy8gen
02-07-2007, 04:28 PM
does this work for 3.6.4?
jw00dy
02-08-2007, 04:15 AM
Read the top where it says to use the one by cybernetics for 3.6.x
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.