マルチ画像アップローダー、画像リサイザー、画像クロッパー、画像回転機能、および画像ソーター機能を備えた PHP フォト ギャラリー スクリプト。
マルチアップロード、トリミング、回転、並べ替え機能を備えた PHP イメージ ギャラリー スクリプト。このスクリプトは、複数の画像をアップロードするために開発されました。画像ギャラリーだけでなく、さまざまな種類のプロジェクトの複数画像のアップロードにも使用できます。
画像はアップロード前にトリミング、回転できます。パソコンではマウス、モバイル端末では指でドラッグすることで並べ替えることができ、画像ごとに情報を追加することができます。
FileAPI JavaScript ツールは、クライアント側での画像のトリミング、回転、アップロードに使用されます。
アップロードした画像は後で並べ替えたり、画像の間に新しい画像を追加したりできます。
インストール後、画像テーブルと、このテーブルに関連付けられた単純なギャラリー テーブルもデータベースに作成されます。
作成した画像ギャラリーを管理するために、簡易的なページテンプレートを用意しました。
プロジェクトに組み込みやすいように、ブートストラップを使用してシンプルな設計が行われています。
このスクリプトをインストールすると、デモに見られるように、プロジェクト ディレクトリにギャラリーが自動的に作成されます。このギャラリーのプロジェクト ディレクトリには 4 ページあります。これらのページは、開発者の利便性を考慮したシンプルなデザインのテンプレートとして用意されています。
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
これらのページをプロジェクトに適切に組み込んだり、デザインを改善したりして使用できます。
さまざまなプロジェクトに開発できるテンプレートとして用意されています。
コードは可能な限り明確かつ理解しやすく書かれています。メソッドには必要な説明を追加しました。開発段階でエラーを見つけやすくするために、エラー ログとデバッグ モードが追加されました。
/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.
ライブデモ