Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Questions > Released vBulletin Hack


Please Register to get full access to the forums.
Post New Thread  Reply



#1   07-25-2007, 01:55 PM
Ville will become famous soon enough Join Date: Jul 2007 Posts: 29 Location: North Texas
Removing threads display from a forum to create a hybrid "sub-forum container"


I was asking if there is a way to remove thread display from a forum without converting it into a category. I then answered my own question. Here's the tip:

I made initially a dirty hack for this; I added a few conditionals to FORUMDISPLAY to exclude thread listing, icon key, and forum rules from the one forum where I don't want them to be displayed. But then I discovered that changing just one line in forumdisplay.php would do the trick, mostly. I changed the line
Code:
if ($foruminfo['cancontainthreads'])
around line 438 to
Code:
if (($foruminfo['cancontainthreads']) AND ($foruminfo['forumid'] != 13))
This turns thread display, and the legend off for the forum that I want to only display the sub-forums (the number "13" represents the forum ID that you would see when viewing the forum normally, in my example it is "13", like so: http://community.zjournal.com/forumdisplay.php?f=13).

The $foruminfo['cancontainthreads'] variable that controls the thread display is set in the Forum Manager by "Act as Forum", but turning it off turns the forum into a category which won't list the total number of posts in the sub-forums, or show the most recent message title in the sub-forums like a regular forum does.

After the above addition the key for "Forum Contains New Posts", "Forum Contains No New Posts", and "Forum is Closed for Posting" is still displayed. Since I have replaced the sub-forum graphics with custom graphics in the "sub-forum container forum" that key is now irrelevant, and I took it out in FORUMDISPLAY template around lines 468..489 by locating "<!-- icon key -->"; it has an opening conditional "<if condition="$show['threadslist']">" and the corresponding "<else />" little ways down in the code. I then added the following immediately after the "<else />":
Code:
<if condition="$foruminfo[title] != 'Columnists'">
.. and closed the conditional by placing "</if>" immediately before "<!-- / icon key -->".

"Columnists" is the name of the sub-forum container forum in my example, i.e. z/Journal Mainframe Community > Mainframe Forums > Columnists, and it's forum ID is "13".

The end-result is a category-like forum, or a forum-like category which is works well as a container for sub-forums.

My example can be seen here (it's the forum I created this hack for).
--------------------
Check out LinkResource.com and My.Galagzee.com :-)

Last edited by Ville; 07-26-2007 at 12:49 PM. Reason: Converted a question into a hack/mod
Quote   |  
Post New Thread  Reply
vBulletin Setup > vBulletinSetup Information > vBulletin Questions > Released vBulletin Hack


Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing "Powered by PhotoPost" Brandon vBulletin Questions 2 09-19-2007 06:30 AM
Greatest forum ever ".vbulletinsetup" x3 Thanks Katie hunter Testimonials 7 06-06-2007 04:48 AM
How can I change the forum description text to "justify" ? Dan@TT vBulletin Questions 2 02-17-2007 03:02 PM
"users online in the past 24 hrs" is missing from my forum aj8690 vBulletin Questions 2 12-22-2006 08:44 PM


All times are GMT -6. The time now is 12:35 PM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions, vBulletin Skins, Styles, Templates
vBulletin Hacks / Modifications, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory