klarkus

Projects

Generic Pager is a class that can be used to browse listings of entries split into multiple pages. It takes as parameters the total number of list entries, the limit of entries to display per page, and the number of the current page. The class can generate an HTML list with links to browse the listing pages, optionally with links to the previous, next, first, and last pages. The text labels and the CSS classes of the links are configurable.

Extended Generic Pager provides pagination of data listings from arrays, CSV, or MySQL. It takes as parameters the total number of list entries, the limit of entries to display per page, and the number of the current page. It generates an HTML list with links to browse the listing pages, optionally with links to the previous, next, first, and last pages. The text labels and the CSS classes of the links are configurable.

Form Saver is a PHP class which fills form inputs with submitted values. It can capture the output of the current page with a form template to extract the list of inputs, process and extract the values of a just-submitted form, and alter the form template to insert submitted input values. The processed form template is output to show the form filled with the submitted values.

PunyPNG PHP API compresses images using the PunyPNG Web service. It sends HTTP requests to upload one or more image files to the PunyPNG Web services API Web server so it can compress them. It can download the images compressed by PunyPNG individually or in a group in a .zip archive. The downloaded images are stored in a configurable download directory.

Data Validator is a class to validate a set of values based on a list of rules. It supports the following validation orders: sequence (fields validated sequentially), all-at-once, and both (using a dependencies model). It can embed different user-defined validation rules libraries (a default built-in library is provided).

Dragdrop.js is a Javascript package which implements drag-n-drop functionality in a browser. It supports moving an element horizontally, vertically, and in both directions, snap-to-grid functionality, limitation of the moving distance, and registering of user-defined functions on start, move, and stop. It has been tested in IE 6.0, FireFox 17, Chrome 22, and Safari 5.1.1.

JsonRpcPhp is a class that sends HTTP requests to a given JSON RPC server to call a specified function, passing any additional parameters. It can also send multiple JSON RPC requests and return the results of all calls. Another class can process server requests by registering a given object of service class and dispatching requests to be handled by that object.

JS Measurer measures a webpage's width and height interactively. It lets the user define an area in the page by dragging the mouse pointer. The object renders the area outline as the mouse moves, showing the width and height of the area in pixels, as well the coordinates of the top-left corner of the area. A bookmarklet is also available, so this object can be used as a link placed, for instance, in the browser toolbar.

URL Router is a PHP class that can match URLs with routes for controllers and actions. It takes the definition of one or more routes with string expressions that define patterns to match given URLs. It supports a special route pattern syntax that allows defining how to extract the name of the controller and action from the URL. The class returns an array with the details of the matched route.

Slideshow.js is an object that creates slide shows from HTML list elements using animations. The user can play and pause the animation, and go to the next or previous slide using buttons. It provides options to define if the slideshow will automatically play, control the animation speed, show play buttons, etc.

Event.js handles events in a browser-independent manner. It can add or remove callback functions which are called when an event happens on a given page element. It can also stop propagating a given event from inside an event handler, and prevent a page element event from being handled by the default handler.

Magnifier.js is a JavaScript library that provides a magnifying glass effect for images. It has zoom in / out functionality using the mouse wheel, support for user defined functions for thumbnail entering, moving and leaving, and image zooming events, and can display loading text while a large image is loading, and switch to the lens once it has loaded.

Select2D.js is an object that transforms an HTML <select> into a 2D table. It can automatically layout the table with a configurable number of columns or rows. Users can select multiple options by using the Ctrl key or Shift and click and dragging over the options in the table. By default the original form select input is hidden but it may be made visible for debugging purposes.