You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 85 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Page Number Like 1 2 [3] 4 ... 56 57 [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Mantoya
Nuke Cadet
Nuke Cadet


Joined: Jul 03, 2005
Posts: 3


PostPosted: Sun Jul 03, 2005 5:52 am Reply with quoteBack to top

Haii... everyone..!!

Can you created the page number for phpnuke 7.x news modules like this :

« Previous 1 2 [3] ... 13 Next »

exp : Page 3 currentpage

Example code i get from ipbforum for you trying :
Code:
/*-------------------------------------------------------------------------*/
    // Build up page span links               
    /*-------------------------------------------------------------------------*/
   
   function build_pagelinks($data)
   {
      global $ibforums, $skin_universal;

      $work = array();
      
      $section = ($data['leave_out'] == "") ? 2 : $data['leave_out'];  // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10
   
      $work['pages']  = 1;
      
      if ( ($data['TOTAL_POSS'] % $data['PER_PAGE']) == 0 )
      {
         $work['pages'] = $data['TOTAL_POSS'] / $data['PER_PAGE'];
      }
      else
      {
         $number = ($data['TOTAL_POSS'] / $data['PER_PAGE']);
         $work['pages'] = ceil( $number);
      }
      
      
      $work['total_page']   = $work['pages'];
      $work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;
      
   
      if ($work['pages'] > 1)
      {
         $work['first_page'] = $skin_universal->make_page_jump($data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL'])." (".$work['pages'].")";
         
         for( $i = 0; $i <= $work['pages'] - 1; ++$i )
         {
            $RealNo = $i * $data['PER_PAGE'];
            $PageNo = $i+1;
            
            if ($RealNo == $data['CUR_ST_VAL'])
            {
               $work['page_span'] .= "&nbsp;<b>[{$PageNo}]</b>";
            }
            else
            {
               
               if ($PageNo < ($work['current_page'] - $section))
               {
                  $work['st_dots'] = "&nbsp;<a href='{$data['BASE_URL']}&amp;st=0' title='{$ibforums->lang['ps_page']} 1'>&laquo; {$ibforums->lang['ps_first']}</a>&nbsp;...";
                  continue;
               }
               
               // If the next page is out of our section range, add some dotty dots!
               
               if ($PageNo > ($work['current_page'] + $section))
               {
                  $work['end_dots'] = "...&nbsp;<a href='{$data['BASE_URL']}&amp;st=".($work['pages']-1) * $data['PER_PAGE']."' title='{$ibforums->lang['ps_page']} {$work['pages']}'>{$ibforums->lang['ps_last']} &raquo;</a>";
                  break;
               }
               
               
               $work['page_span'] .= "&nbsp;<a href='{$data['BASE_URL']}&amp;st={$RealNo}'>{$PageNo}</a>";
            }
         }
         
         $work['return']    = $work['first_page'].$work['st_dots'].$work['page_span'].'&nbsp;'.$work['end_dots'];
      }
      else
      {
         $work['return']    = $data['L_SINGLE'];
      }
   
      return $work['return'];
   }


How can i creat this page number code in my index.php news modules ?!!

p/s Sorry my language is very bad... Smile
Find all posts by MantoyaView user's profileSend private message
lost3
Lieutenant
Lieutenant


Joined: Aug 16, 2004
Posts: 163


PostPosted: Sun Jul 03, 2005 6:16 am Reply with quoteBack to top

there's already something similar to this i'm not sure if you know.. if you haven't seen it let me know and i'll send it to you because i dont' know where i found it

send me a private message if i don't reply here because i might nto see it
Find all posts by lost3View user's profileSend private message
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Sun Jul 03, 2005 6:21 am Reply with quoteBack to top

goto this link:

http://www.nukekorea.net/modules.php?name=Forums&file=viewtopic&t=1465&highlight=pagenum

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Mantoya
Nuke Cadet
Nuke Cadet


Joined: Jul 03, 2005
Posts: 3


PostPosted: Sun Jul 03, 2005 6:33 am Reply with quoteBack to top

Xyberian wrote:
goto this link:

http://www.nukekorea.net/modules.php?name=Forums&file=viewtopic&t=1465&highlight=pagenum


Ops...!! I cannot like this :

<= [ 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 ] =>

I want creat like this :

« Previous 1 ... 9 10 11 [12] 13 ... 93 Next »

If current page = 12

Image

or

Image


Last edited by Mantoya on Sun Jul 03, 2005 6:47 am; edited 1 time in total
Find all posts by MantoyaView user's profileSend private message
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Sun Jul 03, 2005 6:35 am Reply with quoteBack to top

That's a pagination. You can change a little bit in the routine to achive what you want. Making like pagination style is simple.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.326 Seconds - 275 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::