1
xXMaartenXx
Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long

When i click on a category with a lot of downloads. My page is to width because the number of next pages is shown from first page to the last one.

So when i put more links in it. My site is getting Wider and wider.

SOme 1 know this problem?


I want something like this ----> Pages: 1 2 3 .. 27 >>

And not ----> (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 »

2
xXMaartenXx
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long

thanks for the support

3
karedokx
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 8:09

  • karedokx

  • Quite a regular

  • Posts: 319

  • Since: 2004/7/1 6


what module in specific you're refering above?

i'm still in a learning phase in XOOPS too. looking at the XOOPS NEWS, it has the page 1 2 3 .. 300 feature.

4
Beejay
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 8:10

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


Quote:

xXMaartenXx wrote:
thanks for the support


Your welcome

5
Anonymous
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 8:30

  • Anonymous

  • Posts: 0

  • Since:


Look for renderNav in the code.

If you want to determine how many figures should be displayed before the tree dots (ex.: 5):

$xoopsTpl->assign('pagenav'$pagenav->renderNav(5));


Sample above is an example for news/article.php. Default value if not set is 4.

6
Shine
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 9:00

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


Quote:

francis wrote:
Look for renderNav in the code.

If you want to determine how many figures should be displayed before the tree dots (ex.: 5):
$xoopsTpl->assign('pagenav'$pagenav->renderNav(5));

Sample above is an example for news/article.php. Default value if not set is 4.


Within the mydownloads and mylinks module this provided piece of code doesn't work. There isn't a pagerenderNav. Also the code is different.
viewcat.php.
$xoopsTpl->assign('page_nav', $page_nav);
Simply put:
$xoopsTpl->assign('page_nav', $page_nav->renderNav(5));
gives an error.

What should be the correct piece of code for these modules?

Grtz., Shine

7
rowdie
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 11:27

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


The mylinks and mydownloads modules were made before the pagenav class became available.

The correct code for mylinks is as follows:
mylinks/viewcat.php around line 154
$counter 1;
    
$currentpage = ($max $show);
    
$offset 4;
        while ( 
$counter<=$linkpages ) {
            
$mintemp = ($show $counter) - $show;
            if (
$counter == $currentpage) {
                
$page_nav .= "($counter) "
;
            } elseif ( (
$counter $currentpage-$offset && $counter $currentpage $offset ) || $counter == || $counter == $linkpages ) {
                if ( 
$counter == $linkpages && $currentpage $linkpages $offset ) {
            
$page_nav .= '... ';
        }
                
$page_nav .= "$cid&min=$mintemp&orderby=$orderby&show=$show'>$counter ";
        if ( 
$counter == && $currentpage $offset ) {
            
$page_nav .= '... ';
        }
            }
            
$counter++;
        }


And for mydownloads the correct code is:
mydownloads/viewcat.php around line 171

$counter 1;
    
$currentpage = ($max $show);
    
$offset 4;
    while ( 
$counter<=$downpages ) {
        
$mintemp = ($show $counter) - $show;
        if (
$counter == $currentpage) {
        
$page_nav .= "($counter) "
;
        } elseif ( (
$counter $currentpage-$offset && $counter $currentpage $offset ) || $counter == || $counter == $downpages ) {
            if ( 
$counter == $downpages && $currentpage $downpages $offset ) {
            
$page_nav .= '... ';
        }
        
$page_nav .= "$cid&min=$mintemp&orderby=$orderby&show=$show'>$counter ";
        if ( 
$counter == && $currentpage $offset ) {
            
$page_nav .= '... ';
        }
        }
        
$counter++;
    }


I've used an offset of 4. Try changing the number until you get an offset you like
e.g. $offset = 2;

Rowd

8
Shine
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long
  • 2005/2/10 15:05

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


@ Rowdy

Many thanks for the handedout snippets,.......this works like a charm.

Grtz., Shine

9
xXMaartenXx
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long

Thanks!

It`s working great!

10
xXMaartenXx
Re: Pages: (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...... Is to long

nice

But if i click on ex. page 40 i see again 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...................

can i trim that pages to?

Thanks

Login

Who's Online

150 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 150


more...

Donat-O-Meter

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

Latest GitHub Commits