1
bjuti
Module as start page pagination doesn't work
  • 2010/4/16 16:10

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Hi there

Is this a bug? I've found on few sites running on Xoops 2.4.4 and earlier a bug that pagination doesn't work.

At first I tought that it's coz url rewrite maybe coz of smartsection, but on one site I have no url rewrite and using news module.

So pagination doesn't work. It works when go straight on /modules/news/.

Try it yourself: http://www.bjuti.info and try pagination on front page.

When you click on eg. page 2. the link is http://www.mysite.com/index.php?start=10&storytopic=0 instead of http://www.mysite.com/modules/news/index.php?start=10&storytopic=0

Any solution? Tnx!

2
trabis
Re: Module as start page pagination doesn't work
  • 2010/4/16 19:02

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi,
Do you have cache on news module?

If you want your pagination to open modules/news.... you have to edit news/index.php around line 220
$pagenav = new XoopsPageNav($totalcount$xoopsOption['storynum'], $start'start''storytopic='.$xoopsOption['storytopic']);
        
//hack start
        
$pagenav->url XOOPS_URL '/modules/news/index.php?start=';
        
//end of hack


3
bjuti
Re: Module as start page pagination doesn't work
  • 2010/4/16 21:03

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Tnx, it works.

I do have cache on news module.

This hack work on news module. What about other modules? Is there any other solution on global level?

4
trabis
Re: Module as start page pagination doesn't work
  • 2010/4/16 23:05

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You may try to hack header.php around line 74
$_SERVER['REQUEST_URI'] = substr(XOOPS_URLstrlen($url)) . '/modules/' $xoopsConfig['startpage'] . '/index.php';
    
//start hack
    
$_SERVER['PHP_SELF']= $_SERVER['REQUEST_URI'];
    
//end of hack

5
mboyden
Re: Module as start page pagination doesn't work
  • 2010/4/17 17:29

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


Another "solution" might be to have a home page with the latest news in detail block with a very long list of news. Then any links takes you to the news module where you can paginate easily. Doesn't require any hacking. One of the things I've run into more than once is trying to be more complicated than I need to be.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

6
bjuti
Re: Module as start page pagination doesn't work
  • 2010/4/18 10:39

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


I had that block solution, but that's not what I want. This is global XOOPS issue (AFAIK), so my opininion that it should be placed on the core level, or maybe I'm wrong (it happens sometimes :o) )

Login

Who's Online

247 user(s) are online (215 user(s) are browsing Support Forums)


Members: 0


Guests: 247


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