Helpful Information
 
 
Category: vBulletin 3.0 Beta Releases
Threaded Forum Views

Threaded Forum Views (Version 1.8)

Threaded Forum Views will allow the user to display an individual forum or search results in a fully threaded manner. To enable this support the user selects Enable from the new Threaded Forum Views section within Edit Options in the User CP. In addition to the Enable/Disable setting the user may also select Compact or Expanded modes as well as the number of characters to be displayed in the thread/post titles.

A minor oversight/bug is corrected by release of 1.1. A class="inlineimg" has been added to the <img> tags in order to make sure the line spacing is proper. The prior releases relied on the fact that the <img> tag was automatically assigned vertical alignment in the main CSS.

A bug involving unregistered users has been fixed with the release of version 1.2.

Version 1.3 corrects a template error.

Version 1.4 is verified to work with RC3 and corrects template name errors.

Version 1.5 is verified to work with RC4 and has some minor cleanup.

Version 1.6 corrects an error when announcements are used. This version also includes updated graphics that perform well with either light or dark backgrounds.

Version 1.7 limits the number of posts displayed in a thread in the Forum Display based on the Thread Age Cutoff. This is of value for active boards where threads can get very long over an extended period of time. No filtering is done on search results at this time. Also included as part of the graphics is an updated "new post" image to match vb3 Gold.

Version 1.7.1 fixes a minor template error dealing with the display of the date & time of the post. The only change from the prior release is to the 'threadedbit' template.

NEW: Version 1.8 supports limiting the number of posts in both Forum Display and in Search Results. Additionally, the code has been modified so that the number of places that depend on the new field names has been reduced. This should help reduce installation errors.

Features:
Functionality controlled via the Users CP.
Supports 2 display modes. Single line or Dual line.
Supports variable title lengths.
Works with the display of forums and search results.
Indicates which posts have been read and which are new.
Indicates which posts have attachments.
Handles Sticky posts - limits the thread to the opening post.
Displayed results may be sorted using the existing tools provided by forumdisplay.php
Tested with vBulletin 3.0.0 GOLD.

Caveats:
Some of the Administrator functions (such as thread maintenance on deleted threads) are not available while in this mode. While doing administrative tasks the Admin should disable Threaded Forum Views.

Feedback & Support:
If you have any problems or questions please post them on vb.org. I will be happy to help in any way I can - though I am definitely no expert at PHP.

Miscellaneous:
This is currently running on my live board.

To update existing users it is necessary to manually run an UPDATE query. I used
UPDATE userfield SET field5='Enable',field6='Compact',field7='30' where field5='';
to set the default values.

Also, a new field has been added to the search parameters. Because of this it is neccessary to erase the existing cached searches. This can be done using the following query
delete from search;

It is also possible to turn Threaded Forum Views on for guest users by setting the appropriate values into the $bbuserinfo fields in sessions.php.

Screen shots and directions for making the necessary modifications to the files and templates are attached as are the 5 new graphics in the ZIP file.

just installed it on my board
www.bimmer.info/forum

Great work man!

one thing is that "30" should be somethign we can change through the CP, i think.. or at least in the config.php. for those who dont know, that's how many characters of the reply sentence are shown in the forum view.


so far, no bugs :)

This is great - it's all I'v ever missed at vB2.
Still it could be even more compact, maybe?!

just installed it on my board
www.bimmer.info/forum

Great work man!

one thing is that "30" should be somethign we can change through the CP, i think.. or at least in the config.php. for those who dont know, that's how many characters of the reply sentence are shown in the forum view.


so far, no bugs :)

Lots of little things on the "to do " list. This is one of them.

I've still go to learn how to do things like adding the CP stuff. But yes, it really should be in there.

This is great - it's all I'v ever missed at vB2.
Still it could be even more compact, maybe?!

Compact in what sense? The code or the display portion? Either is certainly possible. Right now the display is tuned to my preferences and will allow a fair depth in the thread before running out of room side-to-side. The height spacing was set so the posts don't run too close together - again based on my preference and monitor settings (1280 x 1024).

Nice idea :)! The screenshots look great.

This has been upgraded to allow customization via the ACP. A new screenshot along with an updated ZIP are in the 1st post.

Morris, it's ok, I meant the display portion, which would be good if as an option would be suited for 800 px monitors as well, because 40% of all users still have those old ones. Possible to think about that?

Morris, it's ok, I meant the display portion, which would be good if as an option would be suited for 800 px monitors as well, because 40% of all users still have those old ones. Possible to think about that?

Perhaps the latest version, which supports the one line "compact" mode would be better. It also allows the title length to be adjusted. I've added a new screenshot of that.

I'm thinking of moving the Compact Mode control from the ACP to the user as I believe that they really should be able to decide the layout and not force it to be system wide.

Great - it could be controled from CP and if admin allows - from every users settings.
The one line mode could coexist as an option besides the one you've allready made,

thanks for great programming, Marco

Here's the "final" version. All control is now accomplished via the Edit Options section of the User CP. Each user can turn on Threaded Forum Views or not as they desire. Nor is coupled to the Thread Display Mode. This wouund up being so straightforwad that it sure would be nice if VB would incorporate something like this in a 3.x release.

Morris, you gotta fight for it - because it's good, and I know what I'm talking about!

Thanks man, what else are you planning to code for vb2? Maybe we should work together?

Release of version 1.2 corrects a bug involving unregistered users. The fix is contained in the zip file included with the first post and involves a slight modification to sessions.php. This is now running live on my site with RC2.

Thansk tgmorris really good

First of all, thank you very much to Tom for developing this hack. This is something that should have been included as a basic functionality in VB3.

A couple of questions:
Would it be difficult to modify it a litle bit so that the member's name appears after the title instead of in front?

Would it be feasible to display unread links in bold and read links in normal font?

Is is possible to be able to integrate an option in the "quick links" menu to be able to toggle the view on and off in addition to seetting the default view in the user CP?

Thanks again for creating this Tom. Great job.

First of all, thank you very much to Tom for developing this hack. This is something that should have been included as a basic functionality in VB3.

A couple of questions:
Would it be difficult to modify it a litle bit so that the member's name appears after the title instead of in front?

Would it be feasible to display unread links in bold and read links in normal font?

Is is possible to be able to integrate an option in the "quick links" menu to be able to toggle the view on and off in addition to seetting the default view in the user CP?

Thanks again for creating this Tom. Great job.
#1 is just a simple template mod.

#2 is a fairly minor code change.

#3 can be done but would be different than how all the other User CP stuff works.

Version 1.4 of Threaded Forum Views has been released for vb3 RC3.

Thanks. It's getting better and better.
You should propose to include it in the 3.1 version ...

Thanks. It's getting better and better.
You should propose to include it in the 3.1 version ...
Thanks for the compliment. I've contacted the staff on that possibility. Whether it will ever happen or not is almost anybody's guess.

Thanks for the compliment. I've contacted the staff on that possibility. Whether it will ever happen or not is almost anybody's guess. Yes, congratulations! :) I made my own hack, but yours is better. Still I have a few problems. 1) I couldn't decipher this bit in the instructions: "Find the call to "fetch_trimmed_title" in 2 places and add ", $bbuserinfo['field7']" to the argument list." What do you mean exactly? 2) There are some odd vertical spaces between some of the posts when in "Compact" mode?!?

EDIT: Oh yeah, it would be nice if you could switch between the two modes from the forumdisplay (like you can when you are reading a thread). Perhaps an idea for 1.5 ;)

Oh, another idea for future versions: Make it expandable so it only has the first post in the thread until you click on an icon.

Yes, congratulations! :) I made my own hack, but yours is better. Still I have a few problems. 1) I couldn't decipher this bit in the instructions: "Find the call to "fetch_trimmed_title" in 2 places and add ", $bbuserinfo['field7']" to the argument list." What do you mean exactly? 2) There are some odd vertical spaces between some of the posts when in "Compact" mode?!?

EDIT: Oh yeah, it would be nice if you could switch between the two modes from the forumdisplay (like you can when you are reading a thread). Perhaps an idea for 1.5 ;)
I guess I'll need to clarify that a bit more in the instructions. All that's being done is adding the second argument to the fetch_trimmed_title function. The 2nd argument controls how many characters are being displayed in the title.

Can you send/post a screen shot of the vertical spacing problem and with which browser?
Oh, another idea for future versions: Make it expandable so it only has the first post in the thread until you click on an icon.
As far as making it expandable that's not a bad idea. But, at least to me, that capability sort of exists already by using the hybrid/threaded modes in the standard release. How best to accomplish this will take a bit of thought...

Why have this function:

function getbgclass()
{
global $bgcounter;
if ($bgcounter++%2 == '0')
{
return 'alt2';
}
else
{
return 'alt1';
}
}


There is already a global declared called $bgclass and a function in functions.php to toggle it between two background colors.

// ###################### Start altbgclass #######################
// reads in $bgclass and returns the alternate table class
// $alternate allows us to have multiple classes on one page without them overwriting each other
function exec_switch_bg($alternate = 0)
...


Also instead of refererncing field names throughout the code, making it more likely that errors will creep in when those field numbers do not match in individual installs, you can assign those values to constant defines in "init.php" which allows you to access the information via these constants in the other codes edits. This lowers the chance of errors being introduced while the hack is being installed.

Why have this function:

function getbgclass()
{
global $bgcounter;
if ($bgcounter++%2 == '0')
{
return 'alt2';
}
else
{
return 'alt1';
}
}


There is already a global declared called $bgclass and a function in functions.php to toggle it between two background colors.

// ###################### Start altbgclass #######################
// reads in $bgclass and returns the alternate table class
// $alternate allows us to have multiple classes on one page without them overwriting each other
function exec_switch_bg($alternate = 0)
...


Also instead of refererncing field names throughout the code, making it more likely that errors will creep in when those field numbers do not match in individual installs, you can assign those values to constant defines in "init.php" which allows you to access the information via these constants in the other codes edits. This lowers the chance of errors being introduced while the hack is being installed.

Thanks for the tips. Knowledge comes with experience and I've only been using vb for 2 months and am still learning my way around.

Perhaps when vb does the code for this feature it will be cleaner (he said with hope in his voice ;)).

Please clarify this:

Indent the next 2 "if" statements after which add the closing brace to the above "else" clause:
VVVVVVVVVVVVVVVV
}
^^^^^^^^^^^^^^^^

Locate the end of the file.

Insert BEFORE the closing comments
because I get these:

Parse error: parse error, expecting `')'' in /pub/home/includes/init.php on line 829
Parsing functions.php Time before: 1075677229.6479 Memory Before: 497KB Time after: 1075677229.6759 Time taken: 0.027982950210571 Memory After: 1,147KB
Processing sessions.php Time before: 1075677229.677 Memory Before: 1,152KB
Fatal error: Call to a member function on a non-object in /pub/home/includes/sessions.php on line 171

Please clarify this:
All that's being done is to close the newly added 'else' part of the conditional. The indenting of the 2 existing statements, while not really necessary, preserves the formatting.

The other way to look at it is that we're wrapping those 2 existing if statments in the 'else' portion of a new if ... else statment.

Hope that clarifies things a bit.

It does not. Just explain it via code, not the words - they doen't seem to help and the code is messed up ...

BTW - There's a patch that needs to be applied to RC2/RC3 to fix a bug dealing with setting default values in the User CP.

Refer to http://www.vbulletin.com/forum/showthread.php?t=93562 for instructions.

Morris, that is not the problem. I can't really understand this place in your instruction and if you want more fans of your hack, please re-write that place in a more detailed way. Don't write 2 lines next and 10 lines down - it's no good, just cut the code ...

Morris, that is not the problem. I can't really understand this place in your instruction and if you want more fans of your hack, please re-write that place in a more detailed way. Don't write 2 lines next and 10 lines down - it's no good, just cut the code ...
OK, now I understand :). I've made that section a bit more clear and uploaded the new zip.

Thanks, I'll start them installing on a clean version.
It took me 25 min ... I hope this time it will be more luck.

Time for me to contribute my 2/100 of a buck.

I've been lobbying Jelsoft for two years or more about delivering the OPTION of a threaded display at the forum level (forumdisplay.php). Back in October of 2001, vB developer "Freddie" stated that "threading" was going to be implemented in the next major vB release, which was expected to be out in Q1 of 2002.

Needless to say, it was pretty disappointing to see the half-baked implementation of "threading" [sic] that Jelsoft finally released nearly two years later.

This hack is a godsend. And it's getting better with each incremental release.

I'm not going to argue with anybody about whether "threaded views" are old-fashioned, or whether "flat views" are "better". The objective here is CHOICE. This hack allows vB3.X to finally offer users a CHOICE about how they wish forums to be displayed. And I think we can all agree that "choice = good".

My hat's off to Tom for finishing what Jelsoft only started. This should *definitely* be integrated into the core vB product. Should've been there ages ago. Tom's hack is good. It delivers on its promise. It is well documented, and Tom's support has been both prompt and professional.

Regards,

Bill

That said, here's my suggestion for v 1.7 of this delightful hack. It originated with some feedback from one of my users.

Currently, threads are always displayed *in their entirety*. This causes some minor problems when someone resurrects an old, long thread. The thread (with 50-100 individual posts or more) pops to the top of the page, and one must scroll down through the ancient material to find the one new post appended at the bottom (or somewhere in the middle).

This is especially problematic if the long thread is "sticky" -- since you ALWAYS have to do this scrolling. And doubly so if you have vB Options set to show sticky threads on ALL pages of a forum -- rather than just on the FIRST page.

I would like to see "Threaded Forum Views 1.7" take the other user-specified display options into account. That is, if I've asked to see only messages "from the last two days", then truncate the threads shown in forumdisplay.php acordingly -- much like WebBBS 5.12 does now. Let "Page 2" show the next two days, and "Page 3" show the two days before that.

I understand that this will cause some longer threads to appear in fragments -- in different locations. But when I click on a specific thread, the WHOLE thread is visible in the "threaded mode" showthread.php from Jelsoft. That provides me access to the parts of the thread that *aren't* on the 2-day forumdisplay.php output.

The biggest strength of WebBBS was in the virtually infinite personal choices it offered to each user in terms of customizing the display according to one's individual preferences. I would like to see "threaded Forum Views" become even more "WebBBS-like" in how it handles threads that span long time periods and many, many messages.

Bill

That said, here's my suggestion for v 1.7 of this delightful hack. It originated with some feedback from one of my users.

Currently, threads are always displayed *in their entirety*. This causes some minor problems when someone resurrects an old, long thread. The thread (with 50-100 individual posts or more) pops to the top of the page, and one must scroll down through the ancient material to find the one new post appended at the bottom (or somewhere in the middle).

This is especially problematic if the long thread is "sticky" -- since you ALWAYS have to do this scrolling. And doubly so if you have vB Options set to show sticky threads on ALL pages of a forum -- rather than just on the FIRST page.

I would like to see "Threaded Forum Views 1.7" take the other user-specified display options into account. That is, if I've asked to see only messages "from the last two days", then truncate the threads shown in forumdisplay.php acordingly -- much like WebBBS 5.12 does now. Let "Page 2" show the next two days, and "Page 3" show the two days before that.

I understand that this will cause some longer threads to appear in fragments -- in different locations. But when I click on a specific thread, the WHOLE thread is visible in the "threaded mode" showthread.php from Jelsoft. That provides me access to the parts of the thread that *aren't* on the 2-day forumdisplay.php output.

The biggest strength of WebBBS was in the virtually infinite personal choices it offered to each user in terms of customizing the display according to one's individual preferences. I would like to see "threaded Forum Views" become even more "WebBBS-like" in how it handles threads that span long time periods and many, many messages.

Bill
Let me say that I agree with you 100% on this. That said, it may be beyond my vb and PHP abilities to make these changes. Yet with such changes it would be a really 1st class hack ;)

Since the basic modification was so ridiculously simple to do hopefully Jelsoft will chose to fold it, along with the other changes, in to 3.1.

I'll finish by saying that I do plan to continue thinking about the best way to deal with the existing problems of long threads, etc.

Let me say that I agree with you 100% on this. That said, it may be beyond my vb and PHP abilities to make these changes. Yet with such changes it would be a really 1st class hack ;)

Perhaps Darryl Burgdorf's Perl code in WebBBS 5.12 could provide some clues as to the requisite logic?

However limited you feel your abilities are, Tom, mine are infinitely more humble.


Since the basic modification was so ridiculously simple to do hopefully Jelsoft will chose to fold it, along with the other changes, in to 3.1.

I seriously doubt that Jelsoft will EVER take threaded displays seriously.

EVERY time the issue has been raised, the discussion devolves into a debate about "which view is BETTER". They've never grasped that the issue is CHOICE.

In 1.6 instructions are updated too or they are as misty as before? ;)

In 1.6 instructions are updated too or they are as misty as before? ;)

As a vB/PHP hacker, I have to classify myself as "painfully amateur".

v 1.5 documentation was sufficiently clear & precise that even *I* could follow without assistance. ;)

In 1.6 instructions are updated too or they are as misty as before? ;)
The instruction (as misty as they may be :cheeky:) are the same except for the update on the template change. There's also a new set of images that perform better on dark backgrounds.

The instruction (as misty as they may be :cheeky:) are the same except for the update on the template change. There's also a new set of images that perform better on dark backgrounds.

I was just getting ready to install this when I noticed on the VBulletin site that GOLD will be released late next week.

I'm going to hold off until GOLD is released and you smart guys know whether or not it works with it. I just follow the instructions.

Thanks again for creating this hack. I kow a lot of people will install it.

The files have been updated to allow the user to limit not only the number of threads but also the number of posts based on Thread Age Cutoff dates. The updated files (version 1.7) have also been verified to work with vb3 Gold.

The files have been updated to allow the user to limit not only the number of threads but also the number of posts based on Thread Age Cutoff dates. The updated files (version 1.7) have also been verified to work with vb3 Gold.
I will be giving this a test run, as this sort of functionality is the only way I would ever concider allowing threaded view on my own forums.

#1 is just a simple template mod.

#2 is a fairly minor code change.

#3 can be done but would be different than how all the other User CP stuff works.Hmmm... I just finished reading through this thread, and I ave a couple thoughts before I delve too far into this.
Is is possible to be able to integrate an option in the "quick links" menu to be able to toggle the view on and off in addition to seetting the default view in the user CP?
When viewing a thread you have a dropdown menu to change the layout. But then when in a forum, you don't have this option. To me, that seems a little inconsistent. I would love to see a user (even guest) be able to select what view they wanted, just as they can with thread view.

So, to sum up my thought, a dropdown menu to change the views in the forumdisplay (much like the thread display) and also keep the option to modify the view in the cp.

*EDIT* Oh yeah, I can't seem to open the zip. Says it's corrupted or incomplete. :ninja:

Try disabling any firewall protection you might be using.

Try disabling any firewall protection you might be using.mmm, I'm not even sure how I would do that. lol
I'll try. I guess it's good to know know to turn it on and off.
*EDIT* well, I turned off the firewall, and I still get an errored zip. I will try and fidget around...
*NOTHER EDIT LOL*
Ok, got it. Thanks for the firewall tip, I forgot it was even enabled. And I learned something new. Cheers!

Just an FYI. Version 1.8 will be out shortly. This will add the capability to limit what's displayed in search results as well. That way a thread with 1000 posts in it may only wind up display 10-15 depending on how far back the search went.

I've also changed things so that the $bbuserinfo['fieldX'] stuff needs to be dealt with in one place. This reduces the chance for mistakes when applying the mod to a more mature implementation.

The "final" version of Threaded Forum Views has been released for vb3 Gold. Thanks to everybody that has installed and helped test this hack. I still wish Jelsoft would pick up the concept of this and run with it in the next release.

Hello Tom,

I tried to install your hack in vB 3.0.3 and gave up when the mods to functions_threadedmode.php didn't match your installation instructions.

Have you tried the hack with this version of vB? Any tips? Is anyone with a better handle on this interested in installing this hack for me on a pay to play basis?

Thanks,

Jeff

Sorry, I haven't had time to look at 3.0.3 yet.

Works with 3.0.3 just fine, the bit with the functions_threadedmode you just skip over the first two 'Find' parts, the lines beginning with ## don't seem to exist in 3.0.3 like they did in 3.0.0.

However just skip over them, make the rest of the changes and it works just dandy.

-K

Great work! Any plans on a support for vb3.5?

Thanks

Great work! Any plans on a support for vb3.5?

ThanksI've just started looking at 3.5.

I'd like to think it can be done using hooks but I'm beginning to think that's not the case. :(

I see, well a hack for 3.5 would be greatly appreciated. I am sure it can be done in some way... Keep us updated :)

Thanks once again!

Hello, any update on the 3.5 support?

Thanks :)

Hello, any update on the 3.5 support?

Thanks :)

I have it done, and I have tg's permission to post the new version for 3.5.1... soon as I figure out how (and do a bit more verification of the instructions) *grins*

However I have it implemented and it seems to work well. Hopefully I'll have it posted soon.

-K

I have it done, and I have tg's permission to post the new version for 3.5.1... soon as I figure out how (and do a bit more verification of the instructions) *grins*

However I have it implemented and it seems to work well. Hopefully I'll have it posted soon.

-K

Wow this is great news for me!! Please let me know as soon as possible when the hack is made available or if you wish to e-mail me directly?

Thanks Michael










privacy (GDPR)