1
nachenko
Showing the right block in the worng place: Top page wrong detection
  • 2007/10/11 11:30

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Hi!

I found sometihng that could not be considered a bug, but just wrong behavior of the theme engine.

Suppose you config a block to be shown on top page and ONLY on top page. Suppose your top page is some module's top page, News module for example.

So you open the page and you have News front page and the block. You click on some category's name to see all articles in a category.

Block is still there.

You click on an article.

Block is NOT there.

???

I think the problem is this: News uses index.php for both showing the front page and the category index page, with leads XOOPS engine into confusion on "what is the front page".

I'm trying to find the code that controls this and change it, but this is a part of XOOPS i've never touched and I don't find the stuff.

This is the site:

http://www.anince.es

Thank you

2
nachenko
Re: Showing the right block in the worng place: Top page wrong detection
  • 2007/10/11 11:36

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Forget it, i found the line:

file class/theme_blocks.php , Line 60

Quote:

$isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname );


Replace with:

Quote:

$isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname && !$_GET);


Fix is simple, just check $_GET object does not exist. If we are in the start module, opening index.php file and there is no $_GET stuff, we must be in the start page. A bit dirty, but it works.

Login

Who's Online

237 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 237


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