4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 20, 2005, 09:55:12 PM

Title: [MOD] Universal Paging Class v1.1.2
Post by: V@no on March 20, 2005, 09:55:12 PM
This is replacement for the default includes/paging.php that works exactly the same but could be used for anything, not only for images. (If u are not going to do your own changes in 4images code, then probably dont bother reading "How To Use" section )

-------- [ Installation ] --------
1. Backup original includes/paging.php
2. Download this (http://gallery.vano.org/file18dl) package.
3. Unpack and replace includes/paging.php with the new one.

I added alternative way to show number of pages (reference (http://www.4homepages.de/forum/index.php?topic=2323.0))
for that u'll need just change $this->alt = 1; inside the file.

If u want show input form where visitor can manualy enter the page number they want to see, change these lines in the file:
Code: [Select]
     $this->form = $form; //(true, false or $form) - show the form where visitor can manualy enter the page they want to enter.
      $this->formjs = $formjs; //(true, false or $formjs) - include JS input validation, to ensure that the entered page is valid.



--------- [ How To Use ] ----------

I'll try explain it by an example :

Code: [Select]
 $cat_num_all = 10;
  $cat_perpage = 4;
  $cat_page = 2;
  $link_arg = $site_sess->url(ROOT_PATH."categories.php");
  $text = "Found {total_cat_images} categories(s) on {total_pages} page(s) .Displayed: category {first_page} to {last_page}.";
  $page_text = "cat_page";
  $extra = "categories";
  include(ROOT_PATH.'includes/paging.php');
  $getpaging = new Paging($cat_page, $cat_perpage, $cat_num_all, $link_arg, $text, $page_text, $extra);
  $offset = $getpaging->get_offset();
  $site_template->register_vars(array(
    "cat_paging" => $getpaging->get_paging(),
    "cat_paging_stats" => $getpaging->get_paging_stats()
  ));

this is not working example, so dont bother trying it ;)  

if u are familuar a little bit with 4images code, then u might see, that all this is almost the same as the default, exept three new variables that being send to Paging class:
$getpaging = new Paging($cat_page, $cat_perpage, $cat_num_all, $link_arg, $text, $page_text, $extra, $style);
if u leave those variables empty (or just wont add them to the code), paging will use the default settings.

In $text variable u can specify text that u'd like to show in the templates by {cat_paging_stats}
U can use the same {..} tags as in $lang['paging_stats'] in your /lang/<yourlanguage>/main.php

In $page_text  u can specify name of "page" for the link address. In this example it will change current page when in the address add cat_page=XX . If u leave it empty it will generate links to the pages by using page=XX. This is neccery if u want use more then one paging at the same page, for example if u want add paging for list of categories and still have paging for images.

$extra needs only if u want after open "next" page it "jumps" to the part of page, name of witch matching with $extra. $extra will be added into "pages" link as #$extra.
in this example the link would be:
categories.php?cat_page=XX#categories

$style set style of paging displayed. If not set, will use class="paginginput" and class="pagingbutton"
You can either replace in style.css:
Code: (style.css) [Select]
.button {with:
Code: (style.css) [Select]
.button, .pagingbutton {
and
Code: (style.css) [Select]
.logininput {with
Code: (style.css) [Select]
.logininput, .paginginput {

or add in style.css something like this:
Code: (style.css) [Select]
.paginginput {
  background-color: #ffffff;
  font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #0f5475;
  font-size: 11px;
}

.pagingbutton {
  font-family:  Tahoma,Verdana,Arial, Helvetica, sans-serif;
  background-color: #003366;
  color: #fcdc43;
  font-size: 11px;
  font-weight: bold;
}



-------- [ Version history ] --------
1.1.2 (2010-12-08)
    - applied bug fix: [1.7 - 1.7.9] Security fix for path disclosure in paging.php (http://www.4homepages.de/forum/index.php?topic=28481.0)
1.1.1 (2010-09-06)
    - it's now PHP5 compatible
1.1
    - Added optional "manual input form" feature
1.0
    - First release
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Vincent on August 20, 2005, 11:40:00 AM
Hello V@no
is it possibel to use this paging system with the comments!
i would like to have a paging on this site
http://www.foto-kocher.com/soldpubl.php

i have installed this MOD to do it
http://www.4homepages.de/forum/index.php?topic=7848.0

sincerly
vincent
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Josef Florian on August 21, 2005, 06:58:56 PM
Hallo!

Ich habe das Universal Paging Class 1.1 erfolgreich installiert da ich auch das Comments Paging aktiviert habe. Nur ist es jetzt beim Paging der üblichen Seitenanzeige für normale Bilderanzeige so das immer dieser Submit-Button "Go" angezeigt wird. Kann ich den irgendwie auch wieder entfernen lassen.Anbei habe ich einen Screenshot von jetzt, und wie es nachher aussehen soll!

Mit Bestem Dank im Vorraus!

Josef-Florian
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Hein on September 11, 2005, 07:12:12 PM
Hi Vano,

i have installed this nice MOD of you in Version 1.0.

Now i have also installed the memberlist-MOD 1.7 of Nicky. All works fine and the memberlist (number is definied in the memberlist.php) was correct shown but the user_paging from nicky is not running - it looks so:

Gefunden: 0 Benutzer auf 0 Seite(n). Angezeigt: Benutzer 0 bis 0.

Is ist possible this error is an corruption with the universal paging class mod?

May you help me? I am looking for the errow now a lot of days and can´t find it... :cry:

Thank you so much for a reply and sorry for my bad english... :oops:

Hein
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Jan-Lukas on October 18, 2005, 01:17:20 AM
selbe Problem, konnte auch noch nichts dazu finden.
und wenn es in Englisch wo gestanden hat, dann hab ich es leider übersehen

Gefunden: 0 Benutzer auf 0 Seite(n). Angezeigt: Benutzer 0 bis 0.

gruss Harald
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Hein on October 18, 2005, 08:58:03 AM
Hallo Jan-Lukas,

ich habe auch immer noch nichts gefunden  :( aber wenigstens festgestellt, dass es komischerweise in anderen Browsern funktioniert. Es geht z.B. mit älteren IE-Versionen oder auch mit neueren Netscape-Versionen. Wieso ist mir aber völlig unklar...

Ansonsten funktioniert die Paging-Class überall.

Gruss Hein

i have also found the problem until today. But I see now, it´s func in older IE-veriosns and in netscape for instance. But i don´t know why  :(
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mawenzi on November 10, 2005, 05:49:14 PM
version 1.1 is a nice small addon with the "manual input form" feature ...  :D
thanks V@no
Title: Re: [MOD] Universal Paging Class v1.1
Post by: sau4scr on May 01, 2006, 02:23:35 AM
V@no

I installed the Search Stats on my site and realized it looked funny and then noticed I missed the step to install this new paging thing. After installing this it still did not look right and does not include the sort by ability.

Any ideas on what could be wrong?

viewed at: www.photographybyweston.com/gallery/search_stats.php (http://www.photographybyweston.com/gallery/search_stats.php)\

thanks
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on May 01, 2006, 03:43:21 AM
the problem has nothing to do with this mod, you must have missted something else in that mod.
Title: Re: [MOD] Universal Paging Class v1.1
Post by: sau4scr on May 01, 2006, 04:28:06 AM
I honestly do not think I missed anything. I redid it a second time and got the same result. What would it of been that I 'missed'?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on May 01, 2006, 05:24:00 AM
Nothing related to this topic - that's for sure ;)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: sau4scr on May 01, 2006, 10:40:05 PM
Nothing related to this topic - that's for sure ;)

So I'm taking it you won't help out in this forum thread...
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Alex_Ok on June 24, 2006, 07:00:15 AM
Хороший модуль но есть проблема!

Опять же поисковые роботы ходят по линкам {keywords} на странице details  пополняя тем самым общий список статистики  на странице search_stats.php

Как это можно исправить?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: nfprehn on July 25, 2006, 10:27:50 PM
V@no, could you re-post the package, please.  The link does not seem to work.

Many thanks!!! :D
Title: Re: [MOD] Universal Paging Class v1.1
Post by: WoD on September 30, 2006, 10:46:44 AM
The hole webpage does not seem to work :/
Plz, can someone repost the required package?
thx:)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on September 30, 2006, 07:51:05 PM
file attached.
Title: Re: [MOD] Universal Paging Class v1.1
Post by: WoD on October 01, 2006, 01:42:58 PM
Thanks a lot V@no!! :)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Neo777 on January 17, 2007, 11:14:27 PM
The download-link is dead.

How can I now get the file?

greetings
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mawenzi on January 17, 2007, 11:23:54 PM
@ Neo777
... use the download-link from the bottom of the first post ...
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Neo777 on January 17, 2007, 11:32:30 PM
Thanks!

I was just blind. Sorry  :cry:
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Tino23 on October 27, 2007, 04:54:15 PM
Zusätzlich müssen aber noch zwei Einträge in der style.css gemacht werden!

.pagingbutton {
  font-family:  Tahoma,Verdana,Arial, Helvetica, sans-serif;
  background-color: #deine Farbe;
  color: #deine Farbe;
  font-size: 11px;
  font-weight: bold;
}

.paginginput{
 font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #deine Farbe;
  font-size: 11px;
}
Title: Re: [MOD] Universal Paging Class v1.1
Post by: thunderstrike on February 29, 2008, 05:13:38 AM
I edit paging class for ACP. ;)

// Step 1

1 - In admin folder - create new folder: includes (no edit CHMOD :!:)
2 - In admin/includes - create new file: admin_paging.php .

Add:

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *


 *             File: paging.php                                           *
 *     File Version: 1.1.2                                                *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *

 *    Scriptversion: 1.7.9                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH'))
{
  die(
"Security violation");
}
if (!
class_exists("Paging"))
{
  class 
Paging
  
{
    var 
$page,$page1,$offset,$perpage,$num_rows_all,$link_args;
    var 
$first,$last,$total_pages,$config,$desc,$next,$back,$extra,$query,$form,$formjs;

//    function Paging($page = 1, $perpage = 0, $num_rows_all = 0, $link_args = "", $text = "", $extra = "", $page_text = "", $style = "", $page1 = 0, $form = false, $formjs = false)
    
function Paging($page 1$perpage 0$num_rows_all 0$link_args ""$text ""$extra ""$page_text ""$style ""$page1 0$form true$formjs true)
    {
      global 
$lang$config;

  
//-------- Config ------------
  //Change $this->alt to 1 if u want display number of pages not more then u set in the settings, no metter on witch page u are.
  //by default if u have 20 pages, for example, and in the settings set to show only 10, it will actualy show u 20 pages when u go to 10th page.
      
$this->alt 1;
      
$this->form $form//(true, false or $form) - show the form where visitor can manualy enter the page they want to enter.
      
$this->formjs $formjs//(true, false or $formjs) - include JS input validation, to ensure that the entered page is valid.
  //------- End Config ---------

      
if (!isset($lang['gotopage'])) $lang['gotopage'] = "Go to page:";
      if (!isset(
$lang['pagebutton'])) $lang['pagebutton'] = "Go";
  
/*
      if (!isset($lang['gotopage'])) $lang['gotopage'] = "";
      if (!isset($lang['pagebutton'])) $lang['pagebutton'] = "Go to page";
  */
      
$this->style = ($style) ? $style "paging";
      
$this->extra = ($extra) ? "#".$extra "";
      
$this->page_text = ($page_text) ? $page_text "page";
      
$this->desc = ($text) ? $text $lang['paging_stats'];

      
$this->page = (int)$page;
      
$this->perpage = (int)$perpage;
      
$this->num_rows_all = (int)$num_rows_all;

      
  if ($this->page <= 0)
      {
        
$this->page 1;
      }
      if (
$this->perpage <= 0)
      {
        
$this->perpage 1;
      }
     
      if (!
$this->num_rows_all)
      {
        
$this->total_pages 0;
      }
      elseif (
$this->num_rows_all <= $this->perpage)
      {
        
$this->total_pages 1;
      }
      elseif (
$this->num_rows_all $this->perpage == 0)
      {
        
$this->total_pages $this->num_rows_all $this->perpage;
      }
      else
      {
        
$this->total_pages ceil($this->num_rows_all $this->perpage);
      }

      if (
$this->page $this->total_pages)
      {
        
$this->page 1;
      }

      if (!
$this->num_rows_all)
      {
        
$this->first 0;
      }
      else
      {
        
$this->first $this->perpage $this->page $this->perpage 1;
      }

      if (!
$this->num_rows_all)
      {
        
$this->last 0;
      }
      elseif (
$this->page == $this->total_pages)
      {
        
$this->last $this->num_rows_all;
      }
      else
      {
        
$this->last $this->perpage $this->page;
      }

      
$this->offset $this->perpage $this->page $this->perpage;

      
$link_args preg_replace("/&".$this->page_text."=[0-9]*/"""$link_args);
      
$link_args preg_replace("/".$this->page_text."=[0-9]*&/"""$link_args);
      
$this->link_args basename($link_args);
      
$query "";
      if (
strpos($this->link_args'?') !== false)
      {
        if (
$this->form)
        {
          
$query substr(strrchr($this->link_args,"?"), 1);
        }
        
$this->link_args .= "&amp;";
      }
      else
      {
        
$this->link_args .= "?";
      }
      if (
$query)
      {
        
$query explode("&"str_replace("&amp;""&"$query));
        foreach (
$query as $key)
        {
          if (
$val substr(strrchr($key,"="), 1))
          {
            
$name substr($key,0,(strlen($key)-strlen(strrchr($key,"="))));
          }
          else
          {
            
$name $key;
          }
          
$this->query .= "<input type=\"hidden\" name=\"".$name."\" value=\"".$val."\">\n";
        }
      }

      
$this->paging_next $lang['paging_next'];
      
$this->paging_back $lang['paging_previous'];
      
$this->paging_lastpage $lang['paging_lastpage'];
      
$this->paging_firstpage $lang['paging_firstpage'];
      
$this->range $config['paging_range'];
    }

    function 
get_paging()
    {
      
$html "";
      if (
$this->total_pages 1)
      {
        
$page_back $this->page 1;
        
$page_next $this->page 1;
        if (
$this->form)
        {
          
$js = ($this->formjs) ? " onSubmit=\"if (!page.value || page.value < 1 || page.value > ".$this->total_pages.") return false;\"" "";
          
$html .= "<form action=\"".substr($this->link_args,0,(strlen($this->link_args)-strlen(strrchr($this->link_args,"?"))))."\" method=\"GET\"$js style=\"margin:0px;\"/>\n".$this->query;
        }
        if (
$this->alt)
        {
          if (
$page_back 0)
          {
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=1".$this->extra."\" class=\"".$this->style."\">".$this->paging_firstpage."</a>&nbsp;&nbsp;";
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_back.$this->extra."\" class=\"".$this->style."\">".$this->paging_back."</a>&nbsp;&nbsp;";
          }
          
$page_num2 ceil($this->range 2);
          
$page_num3 $this->range;
          
$page_left 1;
          if ((
$this->page $page_num2) > 0)
          {
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".(($this->page $this->range $page_num2) ? $page_num2 : (($this->page <= ($this->total_pages $page_num2)) ? $this->page $this->range $this->total_pages $this->range $page_num2 1)).$this->extra."\" class=\"".$this->style."\">...</a>&nbsp;&nbsp;";
          }
          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=\"".$this->style."on\">".$page_num."</b>]&nbsp;&nbsp;";
                  }
                  else
                  {
                    
$page_num2--;
                    
$page_num3--;
                    
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_num.$this->extra."\" class=\"".$this->style."\">".$page_num."</a>&nbsp;&nbsp;";
                  }
                }
              }
              else
              {
              if (
$page_num <= $this->page + ($this->range $page_num2))
              {

                  if (
$this->page == $page_num)
                  {
                    
$html .= "[<b class=\"".$this->style."on\">".$page_num."</b>]&nbsp;&nbsp;";
                  }
                  else
                  {
                    
$page_num2--;
                    
$page_num3--;
                    
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_num.$this->extra."\" class=\"".$this->style."\">".$page_num."</a>&nbsp;&nbsp;";
                  }
                }
              }
            }
          }
          
$page_num2 ceil($this->range 2);
          if ((
$this->page $page_num2) <= $this->total_pages)
{
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".(($this->page $page_num2 <= $this->total_pages $this->range) ? (($this->page $page_num2) ? $this->range $page_num2 $this->page $this->range) : $this->total_pages $page_num2 1).$this->extra."\" class=\"".$this->style."\">...</a>&nbsp;&nbsp;";
          }
          if (
$page_next <= $this->total_pages)
{
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_next.$this->extra."\" class=\"".$this->style."\">".$this->paging_next."</a>&nbsp;&nbsp;";
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$this->total_pages.$this->extra."\" class=\"".$this->style."\">".$this->paging_lastpage."</a>";
          }
        }
        else
        {
          if (
$page_back 0)
          {
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=1".$this->extra."\" class=\"".$this->style."\">".$this->paging_firstpage."</a>&nbsp;&nbsp;";
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_back.$this->extra."\" class=\"".$this->style."\">".$this->paging_back."</a>&nbsp;&nbsp;";
          }
          for (
$page_num 1$page_num <= $this->total_pages$page_num++)
          {
            if (
$page_num >= ($this->page $this->range) && $page_num <= ($this->page $this->range))
            {
              if (
$this->page == $page_num)
              {
                
$html .= "<b class=\"".$this->style."on\">".$page_num."</b>&nbsp;&nbsp;";
              }
              else
              {
                
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_num.$this->extra."\" class=\"".$this->style."\">".$page_num."</a>&nbsp;&nbsp;";
              }
            }
          }
          if (
$page_next <= $this->total_pages)
          {
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$page_next.$this->extra."\" class=\"".$this->style."\">".$this->paging_next."</a>&nbsp;&nbsp;";
            
$html .= "<a href=\"".$this->link_args.$this->page_text."=".$this->total_pages.$this->extra."\" class=\"".$this->style."\">".$this->paging_lastpage."</a>";
          }
        }
        if (
$this->form)
        {
          global 
$lang;
          
$html .= "&nbsp;".$lang['gotopage']."&nbsp;<input type=\"text\" size=\"2\" name=\"page\" value=\"\" class=\"paginginput\" />\n<input type=\"submit\" value=\"".$lang['pagebutton']."\" class=\"pagingbutton\" />\n</form>";
        }
      }
      return 
$html;
    }

    function 
get_offset()
    {
      return 
$this->offset;
    }

    function 
get_paging_stats()
    
{      

      
$search_array = array(
        
"{total_cat_images}",
        
"{total_pages}",
        
"{first_page}",
        
"{last_page}"
      
);
      
$replace_array = array(
        
$this->num_rows_all,
        
$this->total_pages,
        
$this->first,
        
$this->last
      
);
      
$this->desc str_replace($search_array$replace_array$this->desc);
      return 
$this->desc;
    }
  } 
//end of class
}
?>

Title: Re: [MOD] Universal Paging Class v1.1
Post by: alekinna on March 09, 2008, 10:16:45 PM
Hello V@no and others!
I must say: it's perfect forum!!! I had found here many useful mods and installed them without any problems. All was so clearly!
Thanks a lot for your great work!

P.S. sorry for my English
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Nicky on March 10, 2008, 10:18:23 AM
hello alekinna,

thank you for your statement in name for V@no because he was not online since november 2006
we do not know what happend to him :(
Title: Re: [MOD] Universal Paging Class v1.1
Post by: alekinna on March 10, 2008, 11:54:09 AM
I belive he is all right! I saw him active in the internet.
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Nicky on March 10, 2008, 11:59:07 AM
huuuuuuuuuuuuuuuuuuuuuh...

where did you saw it that he is active?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mantra on March 19, 2008, 06:43:31 PM
yes mis him so much
Title: Re: [MOD] Universal Paging Class v1.1
Post by: rockboy_62 on June 04, 2008, 09:41:31 AM
i want use this mod in the home page.possible?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mawenzi on June 04, 2008, 01:23:42 PM
@rockboy_62

... I think you need paging on home/index page only if you want to show e.g. all new images ...
... if so, it is possible and there is a MOD for this ...
... if not so, I have no clue for what you need paging on home/index page ...
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Sunny C. on October 01, 2008, 03:31:56 PM
Sorry, aber ich habe das nicht so richtig verstanden!
Was genau bewirkt diese modifikation?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: KurtW on October 01, 2008, 04:18:39 PM
Quote
Sorry, aber ich habe das nicht so richtig verstanden!
Was genau bewirkt diese modifikation?

paging für alles mögliche, z.B. Paging in Mod:PMv3   :wink:

Gruß
Kurt
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mawenzi on October 01, 2008, 04:30:17 PM
... die ursprüngliche Paging Class in 4images zeigt nur wie folgt an ...  
Quote
Gefunden: 30 Bild(er) auf 2 Seite(n). Angezeigt: Bild 1 bis 16
...
1 2 >> letzte Seite>>

... willst du nun dieses Paging auch für Kommentare, Dateien, PMs o.ä. verwenden, so stößt du hier an Grenzen ...
... da immer nur von Bildern die Rede ist (eigentlich auch der Sinn einer Galerie ... ) ...
... mit V@no's Universal Paging Class wird diese Einschränkung nun behoben ...
... und wenn du die Modifikation zur Limitierung der Kommentare pro Detailseite installiert hast ...
... dann kannst du statt dem o.g. Paging z.B. folgendes anzeigen lassen ...
Quote
Gefunden: 30 Kommentar(e) auf 5 Seite(n). Angezeigt: Kommentar 1 bis 5
...
1 2 3 4 5 >> letzte Seite>>

... analog gilt es dann für Dateien, PMs u.s.w. ....
... in des Version 1.1 ist dann noch ein Eingabefeld zum direkten Anspringen der Seite hinzugekommen ...

once again ... thanks V@no ... ;)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Sunny C. on October 01, 2008, 04:42:35 PM
Achso,

super klasse Teil, danke dir!
Title: Re: [MOD] Universal Paging Class v1.1
Post by: cch on July 21, 2009, 04:07:14 PM
Hi V@no

When I use this mod my Category list changes. If I set the no to 20 cats per page, if there are 25 cats then it doesn't put the remaining 5 onto a new page it puts them into a new column???

Any ideas???
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on July 21, 2009, 04:15:20 PM
I'm quiet sure that has nothing to do with this mod. Must be something you did wrong with categories per page mod....
Title: Re: [MOD] Universal Paging Class v1.1
Post by: GaYan on September 27, 2009, 02:48:47 PM
can i use this to make a pagination system for new images ? :S

is it possible ?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on September 27, 2009, 08:05:28 PM
yes
Title: Re: [MOD] Universal Paging Class v1.1
Post by: GaYan on September 28, 2009, 03:39:02 PM
tnx sir.can u plz hlp me around sir. im new to php, which file Should i edit, where can i find the php codes related to new image displaying, Thankz in advance :|
Title: Re: [MOD] Universal Paging Class v1.1
Post by: GaYan on September 30, 2009, 05:18:47 PM
hey...any 1 intrested :S can any1 help me pls :S
Title: Re: [MOD] Universal Paging Class v1.1
Post by: hsammak on October 27, 2009, 02:38:30 PM
How do you change the the arrow ' » ' for the next button to say ' Next Page ' and the same for Previous Page also?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on October 28, 2009, 12:02:21 AM
Hello and welcome to 4images forum.

In lang/<your language>/main.php:
$lang['paging_next'] = "&raquo;";
$lang['paging_previous'] = "&laquo;";
$lang['paging_lastpage'] = "Last page &raquo;";
$lang['paging_firstpage'] = "&laquo; First page";
Title: Pagination
Post by: cch on December 10, 2009, 10:08:31 PM
Hi guys

I'm using V@no's version of Paging.php and I want to remove the [ ] around each page number, remove First Page & Last Page and remove the Go To Page option.

Is this possible please?

Thank you

(http://i48.tinypic.com/1z23nev.jpg)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on December 11, 2009, 02:15:56 AM
Remove "go to":
replace
    function Paging($page = 1, $perpage = 0, $num_rows_all = 0, $link_args = "", $text = "", $extra = "", $page_text = "", $style = "", $page1 = 0, $form = true, $formjs = true)
with:
    function Paging($page = 1, $perpage = 0, $num_rows_all = 0, $link_args = "", $text = "", $extra = "", $page_text = "", $style = "", $page1 = 0, $form = false, $formjs = false)


Remove []:
replace (two instances):
                    $html .= "[<b class=\"".$this->style."on\">".$page_num."</b>]&nbsp;&nbsp;";
with:
                    $html .= "<b class=\"".$this->style."on\">".$page_num."</b>&nbsp;&nbsp;";


remove first/last:
remove (two instances):
            $html .= "<a href=\"".$this->link_args.$this->page_text."=1".$this->extra."\" class=\"".$this->style."\">".$this->paging_firstpage."</a>&nbsp;&nbsp;";
and
            $html .= "<a href=\"".$this->link_args.$this->page_text."=".$this->total_pages.$this->extra."\" class=\"".$this->style."\">".$this->paging_lastpage."</a>";
Title: Re: [MOD] Universal Paging Class v1.1
Post by: cch on December 11, 2009, 03:55:39 PM
Thank you V@no, a couple more things, before the first pagination page when it shows, how do I add some text "More Results" and the >> how do I change them to Graphics which I have ready?
Title: Re: [MOD] Universal Paging Class v1.1
Post by: surferboy on April 24, 2010, 02:29:21 AM
Hi -

Great MOD. easy to install,

for newcomers who might be reading this first, I would recommend you install the Paging For Comments Mod, topic 5830.0 first, and get the code positioned in the details.html template where you want it and then install this MOD afterwards and it is like magic, transforming a scullery maid into cinderella.

Not that I'm inferring V@no is a Fairy Godmother or anything.... :)  He's more like a Titan or PHP God ...

Thanks,

Brian

and now to tackle the display all comments MOD installation.
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Holzwurm on May 09, 2010, 12:39:35 AM
Hallo zusammen,

ich bastel jetzt schon seit 2 Tagen herum und bekomme kein Ergebnis zu meinem Problem.

Bei mir werden keine Zahlen als Seiten angezeigt, nur ...  ...    << >> Letzte Seite

Wie bekomme ich denn Zahlen statt der Punkte ? Version 1.7.7    http://www.fotofreunde-niederrhein.de/?path=start

Wäre für einen Denkanstoss sehr dankbar.

Gruß Hubert
Title: Re: [MOD] Universal Paging Class v1.1
Post by: V@no on May 09, 2010, 01:13:42 AM
you have this error message:
Quote
Notice: Use of undefined constant Paging - assumed 'Paging' in /is/htdocs/******/www/gallery/includes/paging.php  on line 27
This error is not from original mod, so whatever you've changed was wrong ;)
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Holzwurm on May 09, 2010, 01:44:33 PM
Hi,

danke für die Antwort, eigentlich meine ich das hier (Printscreen)

Gruß Hubert

Hi,

thank you for your answer, I mean as the enclosed printscreen.

kind regards

Hubert
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Holzwurm on May 10, 2010, 09:28:52 PM
Hat denn niemend eine Idee?

Grüße Holzwurm
Title: Re: [MOD] Universal Paging Class v1.1
Post by: mawenzi on May 10, 2010, 09:45:17 PM
... aus dem Screen ist schwerlich der Fehler zu extrahieren ...
... schon mal mit 'nem Backup und 'ner neuen MOD-Installation versucht ...
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Holzwurm on May 11, 2010, 03:05:26 PM
Danke für die Antwort,

mit einer Neuinstallation hab ich es noch nicht versucht, werde es aber gleich mal machen.

Danke

Hubert
Title: Re: [MOD] Universal Paging Class v1.1
Post by: Abu Abdullah on September 06, 2010, 11:21:53 PM
i think we need to add forward slash "/" to the line 115 and 116 for compatibility with v1.7.8

search for
Code: [Select]
$link_args = ereg_replace("&".$this->page_text."=[0-9]*", "", $link_args);
$link_args = ereg_replace($this->page_text."=[0-9]*&", "", $link_args);

replace with
Code: [Select]
$link_args = preg_replace("/&".$this->page_text."=[0-9]*/", "", $link_args);
$link_args = preg_replace("/".$this->page_text."=[0-9]*&/", "", $link_args);
Title: Re: [MOD] Universal Paging Class v1.1.1
Post by: V@no on September 07, 2010, 12:48:47 AM
It is v1.7.8 compatible, but anyhow I've updated to v1.1.1 which is now fully PHP5 compatible.

P.S.
besides the forward slashes, ereg_replace also has to be replaced by preg_replace ;)
Title: Re: [MOD] Universal Paging Class v1.1.1
Post by: Abu Abdullah on September 07, 2010, 03:52:29 AM
thank you V@no  i edited my post :)
Title: Re: [MOD] Universal Paging Class v1.1.1
Post by: x23piracy on December 07, 2010, 05:05:31 PM
Hi,

what about that Security fix?
http://www.4homepages.de/forum/index.php?topic=28481.msg153746#msg153746 (http://www.4homepages.de/forum/index.php?topic=28481.msg153746#msg153746)

I cannot find the line to replace.


Greetz X23
Title: Re: [MOD] Universal Paging Class v1.1.1
Post by: Jan-Lukas on December 07, 2010, 05:25:18 PM
dito
Title: Re: [MOD] Universal Paging Class v1.1.2
Post by: V@no on December 08, 2010, 02:27:10 PM
Download v1.1.2
Title: Re: [MOD] Universal Paging Class v1.1.2
Post by: x23piracy on December 08, 2010, 02:52:51 PM
Hi,

Download v1.1.2

 :thumbup: thx


Greetz X23