PDA

View Full Version : Miscellaneous Hacks - Cobo - Subforum Hidden (hides specific subforums from forum)


Cobo
10-23-2011, 10:00 PM
Description

This modification is used to hide specific subforums from listing on your forum (forumhome) while leaving others displaying. In practice, on your boards you have a couple sections with a lot of subforums like the news and announcements area or community help area and it's starting to clutter your forum. But you do not want to hide all the subforums using the forum listing display options, all you need to do is enter the IDs of the subforums you wish not to display and it will hide them from the forum. So when you click on the category or sub category, they will appear as normal child categories, not as sub forums listing under the category.

*refer to screenshot below if unclear*

Requirements

- Forum display listing options to be enabled (e.x. 2, 1, 1).

Install/Upgrade

1. Download and import the product (overwrite if upgrading).

2. Navigate to the following path:

Admin Control Panel -> Styles & Templates -> Style Manager -> Your Style -> Forum Home Templates

3. Open up both forumhome_subforumbit_nopost and forumhome_subforumbit_post and add the following if condition (in green) surrounding all the code within it.


<if condition="in_array($forumid, $subforum_hidden) == false">
Your Existing Code
</if>


While doing these changes vBulletin may have detected a template error warning, ignore it, just click "continue" to save the template (there is no error).

(refer to the appendix to view my files if unclear)

4. Edit the Cobo - Subforum Hidden options in the vBulletin options area of the administrative control panel and enjoy!

Appendix

forumhome_subforumbit_nopost


<if condition="in_array($forumid, $subforum_hidden) == false">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].png" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
</if>



forumhome_subforumbit_post


<if condition="in_array($forumid, $subforum_hidden) == false">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].png" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
</if>



Revision Log

1.0.0
- Initial release.

EddyMaxx
10-24-2011, 08:14 PM
Can't see any screenshot.

Cobo
10-25-2011, 04:33 AM
Can't see any screenshot.

Screenshots added, I took three screenshots. One of the boards, one of the forums via the administrative control panel and one via the vBulletin options. Should show a clear example of what this modification does.

The reason it was created is because I found countless posts picked up by Google asking how to hide specific sub forums, this is the ultimate solution to that problem for 3.8.x.

BirdOPrey5
10-25-2011, 10:17 AM
I would strongly suggest going forward you include installation instructions in a text file and include it in a zip file so when a user downloads they have all the instructions in one place.

Cobo
10-25-2011, 05:59 PM
I would strongly suggest going forward you include installation instructions in a text file and include it in a zip file so when a user downloads they have all the instructions in one place.

Thanks for the suggestion, I'll be sure to do that for any further releases. For now they will need to follow the instructions on the thread and then download the product.

bartek24m
12-02-2011, 03:18 PM
good job ! Installed

MentaL
12-03-2011, 04:43 PM
You ripped my forum category names lol.

Cobo
01-15-2012, 05:22 AM
I am considering releasing a more up-to-date version of this. I've done some tweaking to this modification. None the less, enjoy.

Cobo
04-06-2012, 02:59 PM
I am now developing a newer version of this modification with a few improvements. I will post the upgrade shortly. For all those that marked it as installed I appreciate the support.

Gladius2007
04-14-2012, 09:37 PM
This is just what I need, when do you expect to release the update?