1
Tr0nc3k
Hide Blocks @ Forum
  • 2005/1/3 9:00

  • Tr0nc3k

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


Hi,

I would like to hide all the blocks (right and left) when users access the forum (modules/newbb) so only the forum and the header and footer are displayed.

I've tried with $xoopsOption['show_rblock'] = 0; in the newbb/index.php file, but it doesn't seem to work (the right block is still displayed).

I'm running XOOPS v2.0.7.3.

2
Mithrandir
Re: Hide Blocks @ Forum

Set the blocks to not appear in the Newbb module?

3
Tr0nc3k
Re: Hide Blocks @ Forum
  • 2005/1/3 11:52

  • Tr0nc3k

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


Hmm, how do I do this? Manually within the template or via an option in the .php files?

4
Mithrandir
Re: Hide Blocks @ Forum

Administration Menu -> System Admin -> Blocks -> edit block

5
Tr0nc3k
Re: Hide Blocks @ Forum
  • 2005/1/3 12:56

  • Tr0nc3k

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


Hmm, I don't think you understood me. :)

I would like to hide all the left blocks (left side) only with the forum (newbb) module.

Here's the example site: http://gw.tr0n.org/.

So when a user selects Forum from the left menu, only the forum should be displayed without the left side with the blocks and menus.

I can't set the blocks to appear everywhere but the Forum module.

There is an option $xoopsOption['show_lblock'] = 0 but it doesn’t seem to work.

6
Mithrandir
Re: Hide Blocks @ Forum

Many themes are hard-coded to show the left column regardless of whether there are any blocks in that column.
I presume there is a reason for it, but I don't know it.

7
karuna
Re: Hide Blocks @ Forum
  • 2005/1/3 13:22

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


maybe u can modify the theme to achieve this.

just like this
<{if <{$xoopsModule}> == "newbb"}>



...



<{/if}>

i forgot if the <{$xoopsModule}> variable exist or i spell it correctly.

8
Tr0nc3k
Re: Hide Blocks @ Forum
  • 2005/1/3 13:39

  • Tr0nc3k

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


Hmm, that could work but I don't think the $XoopsModule variable is returned or accesible in the theme.html.

EDIT: Nope, can't get any info about the currently used module. Or I'm doing something wrong.

Man, I didn't know it was so dificult to just disable a block in a module.

9
Tr0nc3k
Re: Hide Blocks @ Forum
  • 2005/1/3 13:48

  • Tr0nc3k

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


Ok, finally! It's all in the $xoops_pagetitle variable.

<{if $xoops_pagetitle != "Forum"}>
            
            
            <{foreach 
item=block from=$xoops_lblocks}> 
            <
table class="left_block_table" cellpadding="0" cellspacing="0">
              <
tr
                <
td class="left_block_title" align="left" >&nbsp;<{$block.title}>td>
              tr>
              <
tr>
                <
td align="left" valign="top" class="left_block_content" ><{$block.content}>td>
              tr>
            table>
              
            <{/foreach}> 
            
           <{/if}>

10
rowdie
Re: Hide Blocks @ Forum
  • 2005/1/3 13:48

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Quote:

Mithrandir wrote:
Many themes are hard-coded to show the left column regardless of whether there are any blocks in that column.
I presume there is a reason for it, but I don't know it.


This includes the default theme. I've been intending to look for a workaround but haven't got around to it yet

Rowd

edit: I haven't been working on the site that needs it lately, and I forgot about the issue actually.

Login

Who's Online

206 user(s) are online (165 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits