1
andy1234
Show right block in custom module
  • 2007/1/6 22:36

  • andy1234

  • Just popping in

  • Posts: 7

  • Since: 2007/1/4 9


Hi everybody,

I am playing with XOOPS and very impressed so far - it is far better from the development point than joomla or drupal. I have added a new simple module with the basic index.php:

<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 0;
?>
there will be the main content
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>

I assume that it should not show the right block, however, it shows it even with the 'zero" option of the $xoopsOption['show_rblock']

How can I switch the right (left) block on/off for the custom module?

Also, is there a list of all the xoopsOptions with some explanation?

Thanks

Andy

2
Quest
Re: Show right block in custom module
  • 2007/1/6 22:52

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


The easiest way I know to do it is the default XOOPS way. In this case put edit your MyPage module creation and replace the 0 with a 1.
Now go into your administration/system/blocks
Find the blocks you have set to the right column and make sure they are not set to be viewed on your module page.

Note: If each of your right blocks are set to be viewed on All Pages (this includes your Mypage module page). You will have to take them off of the view on All Pages and select the modules you wish them viewed on excluding your custom Mypage module.

Quest

3
andy1234
Re: Show right block in custom module
  • 2007/1/6 22:59

  • andy1234

  • Just popping in

  • Posts: 7

  • Since: 2007/1/4 9


I guess it will work. What will happen with the "empty" right block? Will it still take some space on the page or the central block will be extended to the right?

Also, what is the purpose of this statement $xoopsOption['show_rblock'] = 0;
?

4
Quest
Re: Show right block in custom module
  • 2007/1/6 23:07

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Your center block should expand, and there will be no right column as long as there is no block set active to be viewed on the page.

Basically from what little I know, that option is what tells the XOOPS cms to do exactly what it is you want to do. Show or Not show the right or left column areas. So when it is in the code and at the setting it should be at =1 then the column will automagically disappear and the center column expand when there is no blocks in the (in this case) right column.

Quest

5
andy1234
Re: Show right block in custom module
  • 2007/1/6 23:27

  • andy1234

  • Just popping in

  • Posts: 7

  • Since: 2007/1/4 9


Thank you for help, but I still cannot figure out how this statement works (I mean $xoopsOption['show_rblock'])

If I change it (1 or 0) and update the module accordingly, it makes no changes on the page. If there some modules on the right block, it shows them anyway.

Is there a good explanation of all the options somewhere?

6
Dave_L
Re: Show right block in custom module
  • 2007/1/7 1:15

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You didn't say which XOOPS version you're using, and that behavior varies with the version.

I doubt there's documentation on that, at least that's current.

In XOOPS 2.0.14, and possibly later 2.0.x versions, $xoopsOption['show_rblock'] is used in include/xoops13_header.php and footer.php. include/xoops13_header.php is conditionally included by header.php. So you might try setting $xoopsOption['show_rblock'] before including header.php, rather than after it.

7
iHackCode
Re: Show right block in custom module

and also. it can depend on your theme..

if your theme does not have a conditional for the $xoops_showrblock variable then it will always show.

for example (some code from the default theme)
<{if $xoops_showrblock == 1}>

      <
td id="rightcolumn">
        <!-- 
Start right blocks loop -->
        <{foreach 
item=block from=$xoops_rblocks}>
          <{include 
file="default/theme_blockright.html"}>
        <{/foreach}>
        <!-- 
End right blocks loop -->
      </
td>

      <{/if}>
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

112 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 112


more...

Donat-O-Meter

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

Latest GitHub Commits