vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Cyb - Sub-Forum Manager (https://vborg.vbsupport.ru/showthread.php?t=122996)

TheMilkCarton 03-16-2007 04:48 AM

For those wanting it in forumdisplay.. Just change the "Depth of Forums - Forum Display" option to 1.

However,
This doesn't quite display correctly if you have "Act as a Forum" set to "No" for the subforum when you have:

Parent Forum -> Child Forum -> Subforum (that only acts as a category) -> More Subforums -> Threads.

If you have a setup like this, adding the $forumid to "Exclude Forum" in the Subforum Manager doesn't work either... and I'm not sure why.

I included an image of how it doesn't display correctly. Attachment 61912
Notice that it uses the "tcat" class, and also has the collapse button which is not needed since nothing will be displaying under it.

Fixing these few things is simple:

Open forumhome_forumbit_level1_nopost and find:
Code:

<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

Replace with:
Code:

<tbody>
    <tr>
        <td class="<if condition="!in_array($forumid, array(X,Y,Z))">tcat<else />alt1</if>" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

Where X, Y, and Z are the $forumid's of the subforums that are Category Only and displaying incorrectly.

Now for getting rid of the collapse button.

In the same template find:
Code:

<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
and replace with:
Code:

<if condition="!in_array($forumid, array(X,Y,Z))"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a></if>
again where X,Y,Z are the $forumid's that aren't displaying correctly. Note: If you ever change your Forumdisplay depth back to 2, you should delete this conditional, or you won't be able to collapse/expand your Subforums.

It should now look like this:Attachment 61913

Not done yet! If you want to fix that column spacing, add the $forumid of that subforum to the "Forum Exclude" in the Subforum Manager. The columns will now space the same as Subforum (Act as forum) in the attached pictures.

I haven't tested this thoroughly, but I haven't had problems either.

If it's not working, make sure the $forumid's you are using are the actual $forumid's of the subforum.. i.e. "Test Subforum (Category Only)" in the images.

------------------------------------------
Also, if ALL of the subforums you have are "Category Only" you may want to get rid of the table with the Forum, Last Post, Threads, and Posts for that forum, since it won't display post counts, etc.

To do this go to forumdisplay.

Find:
Code:

<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions[showmoderatorcolumn]">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>

and replace with
Code:

<if condition="!in_array($forumid, array(X,Y,Z))"><thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions[showmoderatorcolumn]">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead></if>

This time, X, Y, and Z are the forums that contain the category only subforums, i.e. "Test Child Forum" in the attached images. They will NOT be the same $forumid's that you used in the other steps. It should look like this afterward: Attachment 61915

I'm pretty sure with all this info, Cybernetec may be able to incorporate this into the product?? :) It would be easy to add 2 more Exclude boxes for the 2 conditionals I added above, right?

Edit: For some reason "Exclude Forums" doesn't work at all on my forum... It just makes the columns closer together.. does this happen for anyone else?

Edit: Nevermind. I understand what the Exclude is for now. I thought it HID the subforums entirely. It just gets rid of the column formatting. :)

Bree 03-16-2007 07:06 PM

*Installed* That was one of the easiest things I've ever done!! Now I feel stupid for putting if off so long LOL I guess I just kinda got it in my head that the cooler the hack the harder it will be to install... apparently that is not the case! Thanks a bunch!! Always, Bree (3.6.5)

mgurain 03-20-2007 05:10 AM

I have a forum which has about 10 subforums,

Is it possible to "hide those subforums only" not other subforums from the forumhome?

But in forumdisplay it will show them.

It would be greate if I only need to specifiy the parent forum to do that.

This will be helpfull.

Thanks in advance,,

Mecho 03-28-2007 09:50 AM

Is it possible that i disable Posts Count just for one section ???

Thanks

RENDY81 03-30-2007 04:08 AM

install thanks

notrious 04-03-2007 03:57 AM

Great Excelent Super

rating 11/10

Mecho 04-03-2007 11:40 PM

Quote:

Originally Posted by Mecho (Post 1214349)
Is it possible that i disable Posts Count just for one section ???

Thanks


any idea !?!

YabbaDabba 04-04-2007 03:31 AM

Still woking great on my vB 3.6.4. Many thanks.

Suggestion:

Support for more than one sub-forum level.


Category
Sub-forum A (threads/posts)
Sub-forum B
Sub-sub-forum 1 (threads/posts)
Sub-sub-forum 2 (threads/posts)
Sub-forum C (threads/posts)

Valter 04-04-2007 03:35 AM

I'll update this hack soon anyway... please be patient.

Mecho 04-04-2007 04:29 PM

Quote:

Originally Posted by Cybernetec (Post 1219432)
I'll update this hack soon anyway... please be patient.


Sure and thanks for all ur activities and support https://vborg.vbsupport.ru/external/2007/04/14.gif


All times are GMT. The time now is 10:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01904 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete