ENpaginator Elegant Navi Paginator for Everyone, Every site

ENpaginator (Standalone) Documentation

You're reading documentation about ENpaginator (Elegant Navigate Paginator) - Standalone version (please check WordPress plugin version if you're using WordPress). In this documentation, basically we cover the installation & use of ENpaginator script and FAQ to common problems and issues.

We encourage you to read this documentation if you are experiencing any difficulties before use contact solution, because this documentation is going to help you fastest resolve any common problem.

Get Started

Because ENpaginator is a PHP script, so we need an already installed PHP web-host that working well to use ENpaginator. We have 2 simple solutions to run ENpaginator:


LITE version

ENpaginator is designed to run without server database / installation. You only need to upload ENpaginator folder to your site host, and run your/path/to/ENpaginator/index.php on browser. Then you'll go straight to ENpaginator's config page where you may build your pagination.

CAUTION this version does not provide any authetication level, everyone may still access your ENpaginator's config page if they know the URL. So you MUST rename/delete the index.php file after finish the creation of pagination.


ACP Package (Admin Control Panel)

With this package, in the first run, ENpaginator requires you to create the "admin" account. This step is really very simple, it takes some seconds to finish. After this step, there's only you can access ENpaginator's config page.


Please contact your web-host provider for FTP upload information.


CAUTION if you're looking for a Wordpress plugin, let check ENpaginator: Wordpress plugin.


Install ENpaginator on site

Once you have set favorite options successfully (by clicking Save button), you must still do 2 more steps to apply the pagination into your websites. These steps is still simple & easy to finish.

1. Include ENpaginator-generator.php into any file/page you want to show paginations. Read more below.

include_once('./path/to/your/directory/ENpaginator/ENpaginator-generator.php');

2. Declare an instance of ENpaginator class, then show out the pagination with your favorite options. Read more in Codex section.

$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category.php', 7, 50);
//$ENpaginator->ENpaginator($pagination_link, $currentPage, $totalPages);

Build favorite configs

Go to ENpaginator's config page by typing http://www.yoursite.com/path/to/your/ENpaginator/index.php in the address bar of browser then press enter key. Let's start the game!

Take a quick look into ENpaginator's builder layout below:

ENpaginator: Builder layout and functions
Reset configs
Use thif function if you want to reset pagination configs to default
Save button
  • Save your modified changes to current pagination
  • Be careful if you're having an existing pagination, changes will be affected immediately
Preview button
  • Preview changes by you only
  • Should use this function before "Save" if you're having an existing pagination
Enable/Disable with 1 click
You may easily enable / disable layout's features with 1 click only
Disable pagination
  • This function gives you ability to enable/disable pagination
  • Or you do not want to show pagination but keep all configs for future use

More details about ENpaginator features and functions

Layout
Square shape Check this option if you want to use page numbers with square buttons; uncheck to use with circle shape
Round corners if choose to use square buttons, this checkbox gives ability to round the corners
Show Line-Bar Show the line-bar on Top/Bottom (or Both) of page numbers
Fix Button Size For some reason, you would like to fix the size of pagination, let check this option.
By default, this checkbox is not unsticked: we use Normal Size with Responsive Mode, the size of pagination changed dynamically, depend on browser's size.
Disable Go-to Custom Page Unstick this checkbox, to give visitors an ability of going to custom page number
Disable Next-Previous buttons For some reason, you hate the Next/Previous buttons, stick this checkbox to hide them
How many pages listed from current page number The numbers of page you would like to list from current page number
Styling options
Color Set There are 49 available color-sets in ENpaginator for you to choose. But if wanna use your own colors, let drag the pointer to left direction, back to custom position.
Page Numbers Typography Style your pagination's button numbers with 650+ Google fonts
Previous Button label The text you would like to show in Previous Button
Next Button label The text you would like to show in Next Button
Next & Previous Typography Style your pagination's Next&Previous buttons with 650+ Google fonts
Title of Go-to Custom Page on Hovering When visitors move mouse over current page number, ENpaginator shall show this message as tooltip
Message of Go-to Custom Page When visitors click in current page number, ENpaginator shall show this message in prompt box
Message of Invalid Number Page If visitors enter the wrong page numbers, ENpaginator shall show this error
Animation All animations made with CSS3, some browser verions do not understand these CSS3 properties

Codex

With ENpaginator's builder, you may create the elegant pagination, but you may also control the output better if for some reason, you wanna create many paginations on the same page, by using some built-in API functions below:

ENpaginator($href, $currentPage = 1, $totalPages, $pageLabel = 'page', $bRewrite = false)

$href structure link for the paginations, this parameter is required for each pagination you would like to create

$currentPage current page number

$totalPages total pages of pagination

$pageLabel ENpaginator is going to use this parameter for detecting page, if this parameter is not assigned or is an empty string, then default value (page) shall be used

$bRewrite in the case you would like to set $href as a directory structure, set this parameter is true

Return: string

This method is the fastest solution to create a string of pagination with options your established in the builder. Let's review some examples:


Examples

Fastest way to create a string of pagination
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category.php?id=4', 3, 10);

Fastest way with custom $pageLabel
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category.php?id=4', 3, 10, 'p');

Fastest way with $bRewrite is true
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category/id/4', 3, 10, '', true);

GetSource($href = '', $currentPage = 1, $totalPages = 0)

$href structure link for the paginations, this parameter is required for each pagination you would like to create

$currentPage current page number

$totalPages total pages of pagination

Return: string

In the cases you would like to show out more than 1 pagination, this method is great for this task, just show the paginations as many as you wish. Let's check some examples below.

CAUTION this method requires you must show out the first pagination by ENpaginator method; or firstly you must setup some necessary options to have the pagination works properly.


Examples

Create another paginations after using ENpaginator method
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category.php?id=4', 3, 10);

// show 1 more pagiation with navigate buttons hidden & align center
$ENpaginator->Set('NUMBERS_ALIGN', 'center');
echo $ENpaginator->GetSource('category.php?id=4', 3, 10);





Create pagination with different color after using ENpaginator method
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
echo $ENpaginator->ENpaginator('category.php?id=4', 3, 10, 'p');

// show 1 more pagiation with different color
$ENpaginator->Set('COLOR', 'olive');
echo $ENpaginator->GetSource('category.php?id=4', 3, 10);

Use GetSource() for first pagination
include_once( './your/ENpaginator/PSZ-APP-generator.php' );
$ENpaginator = new ENpaginator();
$ENpaginator->Setup('category.php?id=4', 3, 10);

// hide navigate buttons
$ENpaginator->Set('PAGE_NAV', false);

// make number buttons on right side
$ENpaginator->Set('NUMBERS_ALIGN', 'right');

// set color is red
$ENpaginator->Set('COLOR', 'red');

// create first pagination with GetSource
echo $ENpaginator->GetSource('category.php?id=4', 3, 10);

Setup($href, $currentPage = 1, $totalPages = 10, $pageLabel = 'page', $bRewrite = false)

$href structure link for the paginations, this parameter is required for each pagination you would like to create

$currentPage current page number

$totalPages total pages of pagination

$pageLabel ENpaginator is going to use this parameter for detecting page, if this parameter is not assigned or is an empty string, then default value (page) shall be used

$bRewrite in the case you would like to set $href as a directory structure, set this parameter is true

Return: none

This method is called directly if you would like to show the first pagination by GetSource(). Let's review above example: Use GetSource() for first pagination


Set($option, $value)

$option name of option you would like to set

$value value of option

Return: none

This method is only way to control the pagination. Let's check the configuration table below:

Option (string) Value How to use?
PAGE_NAV (boolean): true or false Hide or show the navigate buttons
NUMBERS_ALIGN (string): 'left', 'center', 'right' This option usually goes along with PAGE_NAV to align the number buttons
COLOR (string): 'black', 'lime', 'green', 'emerald', 'teal', 'cyan', 'cobalt', 'indigo', 'violet', 'pink', 'magenta', 'crimson', 'red', 'orange', 'amber', 'yellow', 'brown', 'olive', 'steel', 'mauve', 'taupe', 'gray', 'dark', 'darker', 'darkBrown', 'darkCrimson', 'darkMagenta', 'darkIndigo', 'darkCyan', 'darkCobalt', 'darkTeal', 'darkEmerald', 'darkGreen', 'darkOrange', 'darkRed', 'darkPink', 'darkViolet', 'darkBlue', 'lightBlue', 'lightRed', 'lightGreen', 'lighterBlue', 'lightTeal', 'lightOlive', 'lightOrange', 'lightPink', 'grayDark', 'grayLight', 'grayLighter' Change the colour of nagiation, we only have 49 preset colors to choose
SIZE (string): 'smaller', 'small', 'large', 'larger' Set the fixed size of pagination
ANIMATION (string): 'pszFlipV', 'pszFlipH', 'pszRotate', 'pszPulse', 'pszFloat', 'pszBounce', 'pszFadeIn', 'pszFadeOut' Set a CSS3 animation for a pagination
LINK (string) Change the link of pagination ($href)
PAGE_LABEL (string) Change the $pageLabel of pagination

Localization

ENpaginator's Localization is really very simple & easy. You even do not need any tool except a text editor, because ENpaginator uses PHP language files for showing the text. ENpaginator has a default language file (en.php) in languages folder, you may translate all strings to other languages easily & quickly.

For more new other strings, it's also easy, just follow our instructions in ENpaginator's Multilingual support to manage ENpaginator's languages better.


FAQ

Contact us if you have any problem.

THE END