pView is a PHP Script that provides an easy way to manage an online picture gallery. The idea is simple: just put the images into a new directory and a new gallery is created. Each gallery can also contain subgalleries. The pictures may be commented. There is an access control mechanism to limit access to folders.
Here is a demo.
This first screenshot shows a gallery containing just sub-galleries, shown as folders.
The following screenshot shows a gallery containing pictures, where they are shown as thumbnails.
This last screenshot shows the detail of an image.
There are also administration pages, for which there are no screenshots here.
Features of pView:
- Extremely easy to use: The image content of a folder is dynamically shown as an HTML page
- Comments may be added for each picture through the galleries’ management page (protected with a login)
- Possibility to navigate through the galleries/folder
- Each picture is supported in 3 sizes: original size (i.e. 2272×1704), full screen (i.e. 800×600) and thumbnail (i.e. 320×240), so pView can also be used for digital picture archiving.
- Browsing between the pages inside a gallery (the number of pictures per page can be changed in the config)
- Access control of the folder: possible to define a login/password for selected galleries
- Users’ management page: create, delete users and change their passwords
- The design of the galleries is done through a generic html template that can be changed. In addition, if an html template is present in a particular folder, it will be used instead of the default template (customization of particular galleries)
- For those who have access to a bash shell: automatic generation of the thumbnails through a shell script
::3. Important Files
Inside the pView folder:
- index.php: default browsing page
- admin.php: galleries’ administration page, password protected, with link to the users’ administration page
The PHP pView script requires:
- PHP version 4 or 5 (latest stable recommended).
At the present time, the gd library for php is not needed.
The automatic thumbnails generation script (bash) requires:
- net-pbm (tested with version 9.12-r4, gentoo linux)
- libjpeg (tested with version 6b-r3, called just jpeg on gentoo linux)
- 5a. For those without shell access on the server
(if you don’t know what is a shell then this section is for you)
- Download the source (http://pview.extrabright.com), in zip or tar.gz format
- Unpack it using your favorite unpack utilitie (i.e. on Windows Winzip, on Mac OS X Stuffit, on Unix/Linux tar or unzip)
- Change the administrator password in the configuration page conf.php using a text editor
- Upload the pview folder per ftp on the web server
- Make sure from your ftp client that the folder albums/_comments has write permissions for all (user, group and other)
- 5b. For those who have a shell access
You can proceed as for 5a or take advantage of the shell. In that case you have to:
- Download the source as for 5a. (http://pview.extrabright.com)
- Unpack it inside your web folder
$ cd /to/web/folder
$ tar xvzf /path/to/pview-*.tgz
- Change the administrator password
$ cd pview
$ nano conf.php
- Check that there is a write permission for all on the albums/_comments directory:
$ cd albums
$ chmod 777 _comments
You are done. You can create a new gallery as in point 6. In addition you can use a bash script in order to create automatically the medium and thumbnail-sized image (optionally change the sizes inside the script to fit your needs):
$ cd /path/to/picview
$ ./createthumb_camera path/to/your/new/gallery/foler
or for phone pictures (original about 640×480):
$ ./createthumb_phone path/to/your/new/gallery/foler
Don’t hesitate to write me an e-mail for bug reports: Pajai
You are done. In order to create a new gallery take a look at section 6. Skip point 5b.
::6. Creation of a New Gallery
- Simply create a new folder somewhere inside the album tree
- Upload your pictures: _sma.jpg for the thumbnail, _med.jpg for the full screen version and (optionnaly if you want to store the original hi-resolution format with pView) .jpg for the original size
You are done.
- If you want, you can later add comments, change the title of the gallery or restrict the access using the admin page.