dineshkummarc / Picturo2.0

Picturo2.0 is a stupidly simple, blazing fast, flat file photo cum Album gallery running. No admin, you just need to drop your pictures in the content to publish your pictures. Picturo2.0 is heavily inspired by Picturo and it’s for photos and Albums.
http://picturomobile.infinityfreeapp.com/public
MIT License
0 stars 0 forks source link

Picturo 2.0

About the Application

Built on top of Picturo, Picturo2.0 is a stupidly simple, blazing fast, flat file photo cum Album gallery running. No admin, you just need to drop your Pictures and Albums in the content to publish your pictures. Picturo is heavily inspired by Pico, but it’s for Photos and Albums.

Demo

You can try Picturo2.0 at Demo, actually the demo is private but you can login with the following credentials :

Admin Account:

user : admin
password : admin

User Account:

user : toto
password : admin

Screenshots

Login login.png Login Fail login-fail.png Default Admin default-admin.png Albums Albums.png Albums+Photos album-photos.png Album View album-view.png Photo View photo.png Error View error.png

Requirements

To run Picturo2.0 you will need PHP 7.1.3+, Twig 2.x (needs at least PHP 7.1.3 to run) and GD Library on your server. If you’re running Apache you will also require mod_rewrite to be enabled.

Installation

First download Picturo2.0 and extract it on your server. Change ownership and permission of the cache folder to the user of your web server set permissions to 777 so you’ll be able to delete cache if needed.

Test Server

  1. ~Apache/2.4.41~ Apache/2.4.59
  2. PHP 5.2.4 ~PHP/7.1.33~ PHP/7.4.33
  3. MySQL 5 ~MySQL/5.0.12-dev~ MySQL/8.3.0
  4. GD Library

Upload your folders of pictures into content.

Customize settings by editing config.php in the root folder of Picturo. To override a setting simply uncomment it in config.php and set your custom value.

Privatize your site

Picturo2.0 can keep your galleries private, you just have to edit config.php and set private variable to true and add a user. By default, there is an admin user with the password “admin” in the configuration file. Just uncomment the two following lines to enable private galleries :

$config['private'] = true;
$config['admin_pass']['admin'] = 'sha512:1000:2Gp+SOuwkWQpMsemFvMyxfPtEfY/M77l:GrHLycEBPATCSmFCmd4onEynvfSoNR3Q';
$config['private_pass']['user'] = 'sha512:1000:2Gp+SOuwkWQpMsemFvMyxfPtEfY/M77l:GrHLycEBPATCSmFCmd4onEynvfSoNR3Q';

Passwords are SHA-1 strings, you can generate your passwords online here at sha1-online.

Add galleries

Your photos must be stored in content folder, if you want to add a gallery you just need to create a folder within your content folder. Galleries thumbnail are generated with the first picture found in the folder.

Create your own theme

Picturo2.0 supports themes with Twig as templating engine they are located in the themes folder. All themes must include two files :

gallery.html
detail.html

If you want to keep your galleries private, you will need a third file “login.html”. Each file will have a basic set of variable, plus specific variable.

Default variables, available for all files :

{{ base_url }} : The URL of your site
{{ theme_url }} : The URL of your active theme
{{ site_title }} : The title of your website
{{ username }} : The logged in username (if you use private gallery)

Variables for gallery.html, which will list all folders and pictures :

{{ url }} : The current url
{{ breadcrumb }} : An hash containing a splitted array of URL. Keys are URL and values are folders name
{{ folders }} : An array containing folder objects for current url. Each folder has 3 attributes (url, thumbnail_url, name)
{{ images }} : An array containing image objects for current url. Each image has 3 attributes (url, thumbnail_url, name)
{{ page_count }} : The total count of pages for current url.
{{ current_page }} : The current page

Variables for detail.html, which will display one picture :

{{ breadcrumb }} : An hash containing a splitted array of URL. Keys are URL and values are folders name
{{ image_url }} : The URL of the current image
{{ image_previous_url }} : The URL of the previous image
{{ image_next_url }} : The URL of the next image

Variables for login.html, which will display the login form :

{{ login_error }} : Tell if login attempt was valid or not
{{ username }} : The username entered in login form input

Thumbnail generation

For easy thumbnail generation in your theme, there is an helper function available in your views. You should use the function picturo_thumbnail in your views. For example, if you want to generate a squared 300px by 300px thumbnail, insert the following line in your view :

{% picturo_thumbnail(thumbnail_url, 300, 300) %}

Thumbnail will be automagically created in a folder matching the size of the thumbnail !

Other themes

I plan to release some others theme later, but if your want to create your own I recommend to check the default theme and use Twig template for easy theming. And please, show me your theme if you want to share it.

Contribute

Help make Picturo2.0 better by checking out the GitHub repository and submitting pull requests. If you find a bug please report it on the Issue page.

Developement Credit:-

2013-05-07 Pico Release V0.6.2

2013.09.01 - v0.0.1

2013.09.19 - v0.1.0

2013.09.21 - v0.2.0

2013.11.08 - v0.3.0

2014.06.26 - v0.4.0

2020.10.16 - v2.0.0

2020.10.17 - v2.1:

v2.2