PHP Classes

Simple Image Gallery: Present and manage a gallery of images

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 62%Total: 4,943 All time: 549 This week: 488Up
Version License Categories
mygallery 1.0.0GNU General Publi...HTML, Graphics, Content management
Description 

Author

This package provides means to create, manage and present a gallery of images.

It uses only the image files on a given directory and sessions to store information about the image galleries being presented to each user. Therefore it does not require a SQL database.

This package classes provide functions to:

- List the images in a given gallery directory
- Authenticate the administrator user
- Handle image uploads using HTML forms
- Delete images
- Generate the gallery HTML pages
- Generate pages to display images in full size

Picture of Gabor Delczeg
Name: Gabor Delczeg <contact>
Classes: 1 package by
Country: Hungary Hungary
Age: 124
All time rank: 5984 in Hungary Hungary
Week rank: 195 Up3 in Hungary Hungary Up

Details

0x01. WARNING! The gallery use only own risk! This is the 1.0Alpha version, maybe not right working! I. Install Copy the all dirs and files into your Gallery directory, there will you use it. mkdir images/ directory Add write permission for your webserver to images/ directory. (or simple add write perm. for others) II. Config Set your website paths. Gallery cells properties can you set in the $cellprop array. Username and password of administrator can you set in "$my_user" and "$my_passw" variables. Number of images on page "$img_num_on_page" variable Number of images in line "$img_num_in_line" variable Footer width in "$footer_width" variable Link style in "$linkclass" variable Maximum width of thumbnail images in gallery.source.class.php -> $th_max variable in pixels Maximum width of big picture in gallery.source.class.php -> $orig_max variable in pixels III. Public Methods $Gallery = new MyGallery(); $Gallery->Dummy( $Data ); The Dummy() method only print any data (string, array, etc.) $Gallery->GetImgList( $img_path ); The GetImgList method scan the images folder and put name of thumbnail images in $_SESSION array. And during the browsing process the class use this array for display gallery. $Gallery->MyHeader( "Website <title> tag contents", "body background", "mygallery.css" ); No comment! $Gallery->Login( $_POST['MyGalleryUser'], $_POST['MyGalleryPassw'], $my_user, $my_passw, $site_path ); No Comment! $Gallery->UploadForm( $img_fullpath, $site_path, $_GET['upload'], $all_types ); This method display the upload form and make, copy the images. For images making use gd2! When you not use gd2, than must be change imagecreatetruecolor() function in the gallery.source.class.php, _make_thumbnail() method for imagecreate(). $Gallery->DeleteImg( $img_fullpath, $site_path ); No Comment! $Gallery->ShowGallery( $_SESSION['mygallery']['imglist'], $img_num_in_line, $img_num_on_page, $cellprop, $link, $site_imgpath ); Display the gallery. $Gallery->Bigpic( $img_fullpath, $site_imgpath, $cellprop ); Show big picture. $Gallery->MyFooter( "MyGallery v1.0 footer text", "footer", $footer_width ); Display the footer text. (not required) IV. Know bugs. No bugs! I think.... :)

  Files folder image Files (6)  
File Role Description
Files folder imageincludes (3 files)
Plain text file index.php Example The sample index file
Plain text file mygallery.css Data Stylesheet
Accessible without login Plain text file readme.txt Doc. Short introduction

  Files folder image Files (6)  /  includes  
File Role Description
  Plain text file config.include.php Conf. Configuration file
  Plain text file gallery.class.php Class Main Class
  Plain text file gallery.source.class.php Class Source Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,943
This week:0
All time:549
This week:488Up
User Ratings User Comments (1)
 All time
Utility:75%StarStarStarStar
Consistency:72%StarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:88%StarStarStarStarStar
Tests:-
Videos:-
Overall:62%StarStarStarStar
Rank:880
 
Excellent
15 years ago (kishore kumar)
80%StarStarStarStarStar