Coder Social home page Coder Social logo

single_item_pagination's Introduction

Single item pagination

A Zenphoto plugin to provide extra functionality for numbererd pagelist of single gallery items (single image, album and Zenpage news article and pages). Similar to the standard template function printPagelistWithNav() or Zenpage's printZenpagePagelistWithNav(): Example: prev 1 2 3 4 next

Put the file in your /plugins folder and modify your theme to use it.

Usage

a) On your theme's image.php:

Add the function printPrevNextItemPageListWithNav('image') to replace the standard single image prev/next (getPrevImageURL()/getNextImageURL()) to print a numbered page list of the image within the current album.

b) On your theme's image.php or album.php:

Add the function printPrevNextItemPageListWithNav('album') to add an extra navigation to acccess the prev/next albumson the same level if you are within an album. This is an extended usage to standard template functions like getPrevAlbumURL() and getNextAlbumURL().

c) On your theme's news.php within is_NewsArticle():

Add the function printPrevNextItemPageListWithNav('article') to replace the standard single article prev/next (printPrevNewsLink()/printNextNewsLink()).

d) On your theme's pages.php:

Add the function printPrevNextItemPageListWithNav('page') This has no standard equivalent function and lets you move through all the pages on the same level.

Requirements c) und d): Theme with Zenpage plugin support and the Zenpage plugin being enabled.

single_item_pagination's People

Contributors

acrylian avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

single_item_pagination's Issues

Fatal error "album" mode

Using printPrevNextItemPageListWithNav('album') on album.php or image.php I get this error:
USER ERROR: Invalid album instantiation: Gallery object does not exist. in .../zp-core/class-album.php on line 1210 trigger_error called from Album->_albumCheck (class-album.php [1210]) from Album->__construct (class-album.php [1181]) from printPrevNextItemPagelistWithNav (single_item_pagination.php [225]) from include (album.php [39]) from include (index.php [130]) from index.php [23]

Debugging

album.php

Fatal error: Call to a member function getFileName() on a non-object in .../zp-core/template-functions.php on line 2062

image.php

printPrevNextItemPageListWithNav('album')
does not show prev/next albums, only images from the album you're in.

news.php

Fatal error: Call to a member function getNumImages() on a non-object in .../zp-core/template-functions.php on line 1905

pages.php

Fatal error: Call to a member function getNumImages() on a non-object in .../zp-core/template-functions.php on line 1905

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.