Skrip Galeri Foto PHP dengan fitur pengunggah multi gambar, pengubah ukuran gambar, pemotong gambar, pemutar gambar, dan penyortir gambar.
Skrip Galeri Gambar PHP dengan fitur multi-unggah, potong, putar, dan penyortiran. Skrip ini telah dikembangkan untuk banyak unggahan gambar. Ini dapat digunakan tidak hanya untuk galeri gambar tetapi juga untuk unggahan multi-gambar untuk berbagai jenis proyek.
Gambar dapat dipotong, diputar sebelum diunggah. Itu dapat diurutkan dengan menyeret dengan mouse di komputer atau dengan menyeret dengan jari di perangkat seluler, dan informasi dapat ditambahkan untuk setiap gambar.
Alat javascript FileAPI digunakan untuk memotong, memutar, dan mengunggah gambar di sisi klien.
Gambar yang diunggah dapat disusun ulang nanti, gambar baru dapat ditambahkan di antaranya.
Setelah instalasi, tabel gambar dan tabel galeri sederhana yang terkait dengan tabel ini juga dibuat di database.
Untuk mengelola galeri gambar yang dibuat, templat halaman sederhana telah disiapkan.
Agar mudah diintegrasikan ke dalam proyek, telah dibuat desain sederhana menggunakan bootstrap.
Ketika diinstal, skrip ini secara otomatis membuat galeri seperti yang terlihat pada demonstrasi di direktori proyek. Ada 4 halaman di direktori proyek galeri ini. Halaman-halaman ini disiapkan sebagai templat dengan desain sederhana untuk kenyamanan pengembang.
mi-uploader.php : create and edit gallery, upload and edit images for admin or authorized users
gallery-man.php : gallery management for admin or authorized users
gallery-list.php: list of image galleries for all users
gallery-view.php: view images of gallery for all users
Anda dapat menggunakan halaman-halaman ini dengan memasukkannya secara tepat ke dalam proyek Anda dan menyempurnakan desainnya.
Ini disiapkan sebagai templat yang tersedia untuk dikembangkan untuk berbagai proyek.
Kode-kode tersebut ditulis sejelas dan sedapat mungkin dipahami. Penjelasan yang diperlukan telah ditambahkan ke metode. Pencatatan kesalahan dan mode debug telah ditambahkan untuk memudahkan menemukan kesalahan selama tahap pengembangan.
/project : Your project folder
/bootstrap-... : bootstrap files
/css : css files
/icons : icon files
/js : jquery files
mi-install.php : Install database tables and create CONFIG_FILE and DEFINITIONS_FILE (defined in the definitions0.php) files.
mi-session.php : php session management
mi-init.php : mysql connection
mi-final.php : close mysql connection
mi-footer.php : page footer
mi-navbar.php : navigation bar
mi-uploader.php : create and edit gallery, upload and edit images for admin or authorized users
gallery-man.php : gallery management for admin or authorized users
gallery-list.php : list of image galleries for all users
gallery-view.php : view images of gallery for all users
/migallery
definitions0.php: php definitions (default, you can change it manually)
definitions1.php: php definitions (Default definitions during setup. If you do not change the default paths, the db / definitions.php file will be created after installation.)
session.php : php session management
init.php : mysql connection
final.php : close mysql connection
uploader-thumb-existing.php : print existing thumbnails during gallery editing
uploader-thumb-template.php : thumbnail html template of browsed and added images
ajax-gallery-... : Ajax request files of gallery management
ajax-image-... : Ajax request files of image management
MIGallery.class.php : Main class of gallery and image management
Translator.class.php : Language translator class
FileAPI.class.php : File upload response class
Pagination.class.php : Pagination class
install-ajax-... : Ajax request files of installation
/css : css files
/js : javascript files
/plugins : some javascript plugins
/lang : language files
/xml : language xml files
/js : language js files
/db : The default directory for writable dynamic content. It can be changed during the installation.
config.php : After installation, config.php (default name, can be changed from the definitions0.php) file is created.
definitions.php : After installation, definitions.php (default name, can be changed from the definitions0.php) file is created.
error.log : Errors are written to this file.
/tmp : First, images are uploaded here and created full, slide, thumb and thumb_c sizes
/slide : slide size with aspect ratio
/thumb : thumbnail size with aspect ratio
/thumb_c : thumbnail size with cropped
/img : Then images move here
/slide
/thumb
/thumb_c
/xml : xml files of image informations. It was created to reduce database queries. Used in gallery-view.php file.
When the image is uploaded, first full size (not original size, maximum dimensions specified in the installation), thumbnail and slide images are created in the tmp directory.
After the gallery is saved, the gallery id is taken and a new folder with this name is created in img directory and the images are moved here.
For example, when the file named abcdef123456789.jpg is uploaded, it is moved to the tmp directory.
Let's say gallery info is inserted to database with 128 id. After that, the file is moved to the img/128/128-abcdef123456789.jpg folder.
If you want to turn on debug mode, set $config['debug'] = true; from CONFIG_FILE file.
Type {your_domain}/project/mi-install.php in the address line and install it.
Demo Langsung