GithubHelp home page GithubHelp logo

angel-galleries's Introduction

Angel Galleries

This is a galleries module for the Angel CMS.

This module allows you to create multiple 'galleries', each with their own collection of images.

Installation

Add the following requirements to your composer.json file:

"require": {
	"angel/galleries": "dev-master"
},

Issue a composer update to install the package.

Add the following service provider to your providers array in app/config/app.php:

'Angel\Galleries\GalleriesServiceProvider',
'Intervention\Image\ImageServiceProvider'

Add the following alias to your aliases array in app/config/app.php:

'Image' 		  => 'Intervention\Image\Facades\Image'

Issue the following commands:

php artisan migrate --package="angel/galleries"  # Run the migrations
php artisan asset:publish                        # Publish the assets
php artisan config:publish angel/galleries       # Publish the config

Open up your app/config/packages/angel/core/config.php and add the galleries routes to the menu array:

'menu' => array(
	'Pages'     => 'pages',
	'Menus'     => 'menus',
	'Galleries' => 'galleries', // <--- Add this line
	'Users'     => 'users',
	'Settings'  => 'settings'
),

...and the menu-linkable models to the linkable_models array:

'linkable_models' => array(
	'Page'             => 'pages',
	'Gallery'          => 'galleries', // <--- Add this line
)

Open up your app/config/packages/angel/galleries/config.php and define your desired thumbnail settings. The default is:

array(
	'thumbs' => array(
		't' => array(
			'width' => 75,
			'height' => 75,
			'crop' => 1,
			'enlarge' => 1,
			'path' => '/uploads/images/t/'
		),
		's' => array(
			'width' => 150,
			'height' => 150,
			'crop' => 1,
			'enlarge' => 1,
			'path' => '/uploads/images/s/'
		),
		'm' => array(
			'width' => 300,
			'height' => 300,
			'crop' => 0,
			'enlarge' => 1,
			'path' => '/uploads/images/m/'
		),
		'l' => array(
			'width' => 600,
			'height' => 600,
			'crop' => 0,
			'enlarge' => 0,
			'path' => '/uploads/images/l/'
		)
	)
)

Finally, make sure you actually create the directories where the thumbnail images will be saved. These paths are relative to the /public/ folder (ex: /public/uploads/images/t/).

angel-galleries's People

Contributors

charlesav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.