Blocks on top page with module for start page problem
  • 2008/11/7 15:13

  • piar

  • Just popping in

  • Posts: 22

  • Since: 2008/10/30

I am working in XOOPS 2.3.1.

I wanted to use module WF-Channel as my start page (because in that module you can select one of pages as default - so it can be used as start page of whole service).
I also wanted to have several blocks (from some another modules) only on that start page.

So in Preferences Main »» General Settings I set WF-Channel as 'Module for your start page' and in Blocks Administration I selected that several blocks as visible in 'Top Page'.

The result was that I didn't have that blocks visible on Top Page whereas they were on all other pages of WF-Channel module (so exactly on the contrary to what I wanted).

I've found some probable bug in file: class/theme_blocks.php.
In function: retrieveBlocks() there is a line:
$isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname );
I've changed it to:
$isStart = ( ($_SERVER['PHP_SELF'] == '/index.php' || $_SERVER['PHP_SELF'] == '/') && $xoopsConfig['startpage'] == $dirname );
and after that I got what I wanted.
My solution may be not perfect (it wouldn't problably work when you will have something like: http ://myserver.com/xoops/
instead of http ://myserver.com/) but it shows what is wrong in original function.

[Moved from XOOPS 2.2 bug reports: sailjapan]


Who's Online

59 user(s) are online (33 user(s) are browsing Support Forums)

Members: 0

Guests: 59



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