gwhitcher / cakephp-photo-gallery
PhotoGallery plugin for CakePHP.
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=5.4
- cakephp/cakephp: ~3.0
Requires (Dev)
This package is not auto-updated.
Last update: 2025-01-18 20:13:46 UTC
README
Developed by: George Whitcher
Installation
You can install this plugin into your CakePHP application using composer.
-
The recommended way to install composer packages is: composer require gwhitcher/cakephp-photo-gallery (If composer is unavailable download the zip and extract it to your plugins directory.)
-
PhotoGallery requires Imagick php extension for image resizing: Imagick. You cannot run it without it.
-
Install the database tables by visiting DOMAIN.com/photo_gallery/install or by running the below queries on your database.
CREATE TABLE gallery ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, category_id INT(11), title VARCHAR(50), description TEXT, img VARCHAR(50), created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL );
CREATE TABLE category ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, title VARCHAR(50), description TEXT, img VARCHAR(50), created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL );
-
CHMOD 777 your /plugins/PhotoGallery/webroot/img/gallery and all it's subfolders.
-
Go to your /ROOT/config/bootstrap.php and load the plugin by adding the following to the end of the file: Plugin::load('PhotoGallery', ['bootstrap' => false, 'routes' => true]);
-
Congratulations you are all setup!
URL Structure (this can be changed in routes.php)
The URL's are as follows: Auto Installer: DOMAIN.com/photo_gallery/install
Main gallery view: DOMAIN.com/photo_gallery/gallery DOMAIN.com/photo_gallery/category
Gallery image add: DOMAIN.com/photo_gallery/gallery/add
Category add: DOMAIN.com/photo_gallery/category/add
Gallery image edit: (replace ID) DOMAIN.com/photo_gallery/gallery/edit/ID
Category edit: (replace ID) DOMAIN.com/photo_gallery/category/edit/ID
Gallery image delete: (replace ID) DOMAIN.com/photo_gallery/gallery/delete/ID
Category delete: (replace ID) DOMAIN.com/photo_gallery/category/delete/ID
CUSTOM SECURITY
Open /plugins/PhotoGallery/src/Controller/AppController.php
You will see some commented out code. Remove the comments so it will be functioning.
Get your IP and replace it with the 127.0.0.1 (If you remove the comments from echo $ip you can get your current IP. It will show at the top of any unsecured page. Just make sure to remove it after you have noted your IP.)