Author Topic: [MOD] Universal Paging Class v1.1.2  (Read 76222 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Universal Paging Class v1.1.2
« 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 package.
3. Unpack and replace includes/paging.php with the new one.

I added alternative way to show number of pages (reference)
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
1.1.1 (2010-09-06)
    - it's now PHP5 compatible
1.1
    - Added optional "manual input form" feature
1.0
    - First release
« Last Edit: December 08, 2010, 02:26:43 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [MOD] Universal Paging Class v1.1
« Reply #1 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
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Josef Florian

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #2 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
    • running v1.7.6 with MOD: SortImageAsYouLike / Cooliris Slideshow
    • with © removal
    • i have problems with:
actually no[/list]

Offline Hein

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #3 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

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Universal Paging Class v1.1
« Reply #4 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
Danke Harald




Offline Hein

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #5 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  :(

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #6 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
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sau4scr

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #7 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\

thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Universal Paging Class v1.1
« Reply #8 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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline sau4scr

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #9 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'?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Universal Paging Class v1.1
« Reply #10 on: May 01, 2006, 05:24:00 AM »
Nothing related to this topic - that's for sure ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline sau4scr

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #11 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...

Offline Alex_Ok

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #12 on: June 24, 2006, 07:00:15 AM »
Хороший модуль но есть проблема!

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

Как это можно исправить?


Offline WoD

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Universal Paging Class v1.1
« Reply #14 on: September 30, 2006, 10:46:44 AM »
The hole webpage does not seem to work :/
Plz, can someone repost the required package?
thx:)