vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Exclude CERTAIN sub forums from showing on ForumHome (https://vborg.vbsupport.ru/showthread.php?t=111231)

Xplorer4x4 03-24-2006 07:37 AM

Exclude CERTAIN sub forums from showing on ForumHome
 
I want to exclude some sub forum from showing on my forum home. The forum set up is like this:
Catgorey
-Forum
-5 Sub Forums

I want to exclude these 5 sub forums from showing. Any help is greatley apreciated.

Freesteyelz 03-24-2006 07:46 AM

I have my settings in (Admin CP) vBulletin Options --> Forum Listings Display Options:

Depth of Forums - Forum Home = 2
Depth of Forums - Forum Display = 2
Depth of Sub-Forums = 0

My sub-forums only display when the parent forum link is clicked.

Xplorer4x4 03-24-2006 07:48 AM

See the hting is I want all sub forums listed on all forums except one particular forum. Sorry if I was not clear enough, I am in zombie mode tonight. :p

Freesteyelz 03-24-2006 08:05 AM

That may be achievable using a "forumid" conditional. Let me experiment on the idea and I'll get back to you soon...

Xplorer4x4 03-24-2006 08:07 AM

Ok thanks I tried modifying forumhome_level1_nopost(forgive me if thats slightly off but you knwo what i mean) and forum_level2 no post and couldnt quite figure it out. I would much apreciate this.

Thanks.

merk 03-24-2006 08:11 AM

Try modifying forumhome_subforumbit_post or nopost with a conditional surrounded by it.

The issue will be if there are more subforums there will be a stray comma.

Freesteyelz 03-24-2006 08:34 AM

Try this in forumhome_forumbit_level2_post:

Find this or something similar to:
Code:

                <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
And replace it with:
Code:

<if condition="in_array($forumid, array(x))">
<else />
                <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</if>

Change the "x" to the forumid you want the sub-forums hidden. To add more parent forums just add ", y, z".

Remember to enable show sub-forums in Admin CP.

Xplorer4x4 03-24-2006 09:24 AM

That did it! Thank you very much, perhpas you can help me with one more small template edit:
PHP Code:

<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="0" width="100%">
<
tbody>
<
tr>
    <
td class="tcat">
        
Notice from the ADMINS!</td><td align="right"><a href="http://www.domsforums.net/profile.php?do=editoptions">Click Here To Disable Marquee</A>
    </
td>
</
tr>
</
tbody><tbody id="collapseobj_forumhome_welcomepanel" style="">
    <
tr>
        <
td class="alt1" align="center" width="100%">
       <if 
condition="!is_member_of($bbuserinfo, 3)"> <marquee>$vboptions[fhx2h]</marquee></if><if condition="is_member_of($bbuserinfo, 3)"><font size="6">
<
MARQUEE>PLEASE CHECK YOUR EMAIL FOR THE LINK TO ACTIVATE YOUR ACCOUNTIT MUST THEN BE APROVED BY AN ADMIN BEFORE YOU CAN POST!!!</MARQUEE></font></if>

        </
td>
    </
tr>
</
tbody>
</
table

I need to put both sentences " Notice from the ADMINS! and Click Here To Disable Marquee" on one line and have the disable text to the right. However that code adds an exta column on the end of the marque. This should be a VERY simple fix

Freesteyelz 03-24-2006 10:43 AM

I'm glad it worked. :)

The "Admin" row consists of 2 columns where the marquee row has only 1. So you'll need to add a "colspan" in your bottom <td> tag like so:

Code:

<td class="alt1" align="center" width="100%" colspan="2">
See if that helps.

Xplorer4x4 03-24-2006 10:55 AM

Thank you, very much! It worked. I knew it was something to do with collum span, but I am getting better with tbales. Just one small thing as I am such a perfectionist.

I can;t get the "Notice from the ADMINS!" text to center.:(

Again thank you for your help and here is what I have tired:

PHP Code:

<table class="tborder" algin="center" border="0" cellpadding="6" cellspacing="0" width="100%">
<
tbody>
<
tr>
    <
td class="tcat" algin="center">
        
Notice from the ADMINS!</td>
    <
td class="tcat" align="right"><a href="http://www.domsforums.net/profile.php?do=editoptions">Click Here To Disable Marquee</A>
    </
td>
</
tr>
</
tbody>
<
tbody id="collapseobj_forumhome_welcomepanel" style="">
    <
tr>
        <
td class="alt1" align="center" width="100%" colspan="2">
       <if 
condition="!is_member_of($bbuserinfo, 3)"> <marquee>$vboptions[fhx2h]</marquee></if><if condition="is_member_of($bbuserinfo, 3)"><font size="6">
<
MARQUEE>PLEASE CHECK YOUR EMAIL FOR THE LINK TO ACTIVATE YOUR ACCOUNTIT MUST THEN BE APROVED BY AN ADMIN BEFORE YOU CAN POST!!!</MARQUEE></font></if>

        </
td>
    </
tr>
</
tbody>
</
table


Freesteyelz 03-24-2006 11:14 AM

It's probably because you misspelled "align". right now I see 2 "algin". :)

I'll check back later today. It's 3:14am here. :)

Xplorer4x4 03-25-2006 12:26 AM

Yeah I was in zombie mode last night to. That did work but it didnt center it as much as i would like. It was more like it tabbed it out then anything.

Mr Chad 03-25-2006 01:23 AM

nice

Xplorer4x4 03-25-2006 01:29 AM

Quote:

Originally Posted by chatbum
nice

Don't you mean "Is there any where to make a profile field prefilled?" because thats what the subcription email says. ;) Regardless it serves no relavance.

Freesteyelz 03-25-2006 02:30 AM

You won't be able to center the Admin text exactly if there's a left and right <td> tag in the same row. The reason is that the right column is taking up a bit of space. What's being centered is the left column only; which is relative to the size of your screen.

One way to achieve what you want is to use just one <td> in the row and separate the Admin text and link with "&nbsp;&nbsp;" or left-padding. The other is to use absolute positioning with CSS.

Xplorer4x4 03-25-2006 03:10 AM

Could you possibly show me? :$ I tried the "&nbsp;&nbsp;" but it would take me like 50 of them to achieve the alignments i want. :(

I really cant thank you enough for taking so much time on this. You have been a great help.

Freesteyelz 03-25-2006 05:23 AM

Change:

Code:

<table class="tborder" algin="center" border="0" cellpadding="6" cellspacing="0" width="100%">
<tbody>
<tr>
    <td class="tcat" algin="center">
        Notice from the ADMINS!</td>
    <td class="tcat" align="right"><a href="http://www.domsforums.net/profile.php?do=editoptions">Click Here To Disable Marquee</A>
    </td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_welcomepanel" style="">
    <tr>
        <td class="alt1" align="center" width="100%" colspan="2">
      <if condition="!is_member_of($bbuserinfo, 3)"> <marquee>$vboptions[fhx2h]</marquee></if><if condition="is_member_of($bbuserinfo, 3)"><font size="6">
<MARQUEE>PLEASE CHECK YOUR EMAIL FOR THE LINK TO ACTIVATE YOUR ACCOUNT. IT MUST THEN BE APROVED BY AN ADMIN BEFORE YOU CAN POST!!!</MARQUEE></font></if>

        </td>
    </tr>
</tbody>
</table>

To this:

Code:

<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="0" width="100%">
<tbody>
  <tr>
      <td class="tcat" align="center">
        <ul class="txtspacer">
          <li>Notice from the ADMINS!</li>
          <li><a href="http://www.domsforums.net/profile.php?do=editoptions" title="Disable Marquee">Click Here To Disable Marquee</a></li>
        </ul>
      </td>
  </tr>
</tbody>
<tbody id="collapseobj_forumhome_welcomepanel">
  <tr>
      <td class="alt1" align="center" width="100%" colspan="2">
        <if condition="!is_member_of($bbuserinfo, 3)"><marquee>$vboptions[fhx2h]</marquee></if><if condition="is_member_of($bbuserinfo, 3)"><span style="font-size:15px"><marquee>PLEASE CHECK YOUR EMAIL FOR THE LINK TO ACTIVATE YOUR ACCOUNT. IT MUST THEN BE APROVED BY AN ADMIN BEFORE YOU CAN POST!!!</marquee></span></if>
      </td>
  </tr>
</tbody>
</table>

In your Main CSS add this in the Additional CSS Definitions:

Code:

ul {
  margin:0;
  padding:0;
  }
ul.txtspacer li {
  margin:0;
  padding-left:10px;
  display:inline;
  }

I've adjusted the code just a bit. To add more space just change the "10px" to whatever you want. :)


All times are GMT. The time now is 11:13 AM.

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.01151 seconds
  • Memory Usage 1,785KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete