1
otisredding
Showing right blocks that only show for certain modules
  • 2006/5/10 20:49

  • otisredding

  • Just popping in

  • Posts: 7

  • Since: 2005/8/25


Hey folks. Thanks in advance for any help.

Trying to wrap some html content in xoops, but I can't get my right blocks to show. The right blocks are not visible in all pages, and I assume that's why they're not showing.

Any way to get the wrapped content to show them?

<?php
include("/path/to/mainfile.php");
$xoopsOption['show_rblock'] = 1;
include(XOOPS_ROOT_PATH."/header.php");
?>
my html here
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>

Thanks again,
Carmine

2
bluenova
Re: Showing right blocks that only show for certain modules

I've never been able to get php blocks to work, but I'll give this post a bump for you.

3
otisredding
Re: Showing right blocks that only show for certain modules
  • 2006/5/25 13:00

  • otisredding

  • Just popping in

  • Posts: 7

  • Since: 2005/8/25


Figured out a hack to make it work, so thought I'd post it here for others to find.

Before including header.php, just force your page to "pretend" it's a module that does show the right hand side. Like so:

<?php
include(XOOPS_ROOT_PATH."/mainfile.php");
// hack! we pretend to be the wfsection module so the right blocks show
$moduleid = 2;
include(XOOPS_ROOT_PATH."/header.php");
?>

my custom html...

<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>

There you are.

4
Quest
Re: Showing right blocks that only show for certain modules
  • 2006/5/25 14:23

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Interesting... Pretend to be a module. Wow! I wouldn't of thought of that in a million years.

I was wondering if replacing the <?php> and <?>

with

<php> and </php> might work. I know that in other instances within html docs this must be done.

Quest

5
script_fu
Re: Showing right blocks that only show for certain modules

Well now what a neat lil trick. Will this have any bad effects that anyone can think of?

Login

Who's Online

130 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 130


more...

Donat-O-Meter

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

Latest GitHub Commits