4images Forum & Community

4images Issues / Ausgaben => Feedback & Suggestions => Topic started by: V@no on October 20, 2002, 07:18:14 AM

Title: Number of "previous" and "next" pages displayed in site
Post by: V@no on October 20, 2002, 07:18:14 AM
where I can change the code to show 5 pages, no metter what page is currently opened.
for ex. right now if I have 20 pages and my settings set to show only 5 pages. I open page number 7, it will show numbers from 2 to 12, witch r actualy 11 pages showed.
so, I want set 5 numbers to show, it would be showed from number 5 to 9.
where do I change it? (and what :wink: )
Title: Number of "previous" and "next" pages di
Post by: Jan on October 21, 2002, 08:56:19 AM
Settings: "Number of "previous" and "next" pages displayed in site navigation"

Jan
Title: Number of "previous" and "next" pages di
Post by: V@no on October 22, 2002, 12:37:15 AM
yes, Jan, they r there, but u as I said, when u set it to 5 and u open page number 7 it will show u 5 page numbers on left side (previous) and 5 numbers on right side, so all together it will show u 11 pages
Title: Number of "previous" and "next" pages di
Post by: Jan on October 22, 2002, 07:54:18 AM
Ok, whats the problem? Set it to 2.

Jan
Title: Number of "previous" and "next" pages di
Post by: V@no on October 23, 2002, 12:05:34 AM
hehe.
well, actualy, all I wanted is to see 5 numbers all the time if pages count more then 5, if I just set right now to 2, on first page I'll see 2 numbers.
well, it's not really important, I thought its easy to fix. but nm then.
Title: Number of "previous" and "next" pages di
Post by: V@no on December 30, 2002, 05:21:39 AM
here is an example what I was talking about:
http://haunter.student.utwente.nl/Terrarevolution/galleries/search.php?search_user=*
Sry, Vraxor, I use your site for the example...
now, change "pictures per page" to 4 and go to page over 16.
At the gallery settings Vraxor set to show 16 pages,
but actualy it shows twice more when u r on page over 16.
so, is ther a way keep exact amount of pages, no metter on witch page u r at?
thx.
Title: Number of "previous" and "next" pages di
Post by: V@no on December 30, 2002, 11:23:17 AM
It took me whole night to figure this out...gonna nee go to work in 30 min...
Probably there is an easier way to do so, but...
if someone need it here is the modified function from /includes/paging.php:
Code: [Select]
 function get_paging() {
    $html = "";
    if ($this->total_pages > 1) {
      $page_back = $this->page - 1;
      $page_next = $this->page + 1;

      if ($page_back > 0) {
        $html .= "<a href=\"".$this->link_args."page=1\" class=\"paging\">".$this->paging_firstpage."</a>&nbsp;&nbsp;";
        $html .= "<a href=\"".$this->link_args."page=$page_back\" class=\"paging\">".$this->paging_back."</a>&nbsp;&nbsp;";
      }
      $page_num2 = $this->range / 2;
      $page_num3 = $this->range;
      $page_left = 1;
      for ($page_num = 1; $page_num <= $this->total_pages; $page_num++){
      if ($page_num3) {
      if ($page_left) {
      if (($page_num >= $this->page - ($this->range - $page_num2)) || ($page_num > $this->total_pages - $this->range && $this->page > $this->total_pages - $this->range )) {
     
          if ($this->page == $page_num) {
          $page_left--;
          $page_num2--;
          $page_num3--;
            $html .= "<b class=\"pagingon\">$page_num</b>&nbsp;&nbsp;";
          }
          else {
          $page_num2--;
          $page_num3--;
            $html .= "<a href=\"".$this->link_args."page=$page_num\" class=\"paging\">$page_num</a>&nbsp;&nbsp;";
          }
        }
      }else{
      if ($page_num <= $this->page + ($this->range - $page_num2)) {
   
          if ($this->page == $page_num) {
            $html .= "<b class=\"pagingon\">$page_num</b>&nbsp;&nbsp;";
          }
          else {
          $page_num2--;
          $page_num3--;
            $html .= "<a href=\"".$this->link_args."page=$page_num\" class=\"paging\">$page_num</a>&nbsp;&nbsp;";
          }
        }
}
}
}
      if ($page_next <= $this->total_pages) {
        $html .= "<a href=\"".$this->link_args."page=$page_next\" class=\"paging\">".$this->paging_next."</a>&nbsp;&nbsp;";
        $html .= "<a href=\"".$this->link_args."page=$this->total_pages\" class=\"paging\">".$this->paging_lastpage."</a>";
      }
    }
    return $html;
  }
Title: Re: Number of "previous" and "next" pages displayed in site
Post by: ashfaq on November 07, 2009, 04:46:13 AM
I want to show Next and Previous buttons with page numbers at home page new added wallpapers, plz help me how to do this ?
Title: Re: Number of "previous" and "next" pages di
Post by: david.kissinger3 on December 27, 2009, 11:24:00 AM
HELLO , I WANT TO SHOW THE NEW PREVIOUS &THE NEW PAGES, AT THE HOMEPAGE, PLEASE HELP ME HOW TO DO THIS.

 Fitness Plan
Title: Re: Number of "previous" and "next" pages displayed in site
Post by: GaYan on February 22, 2010, 04:52:39 AM
hmmm.. i have a tut which was published by sir kurt
that works pertty fine ;)

http://www.4homepages.de/forum/index.php?topic=7294.msg124362#msg124362

chk this out !  :wink: