gidlov / pico-gallery Goto Github PK
View Code? Open in Web Editor NEWA Gallery plugin for the micro CMS Pico
A Gallery plugin for the micro CMS Pico
It seems that since Image 2.x the static method make
is not available on the Image class anymore and grab()
has been replaced by fit()
. Because the README suggests using "dev-master" the plugin method flush
should be updated with:
$img = new ImageManager();
$img->make($image)
->fit($size[0], $size[1])
->save($thumb_path.DIRECTORY_SEPARATOR.GALLERY_PRE_THUMB_NAME.$file_name, 80);
with Intervention\Image\ImageManager
as namespace.
Hi there,
I've installed the pico-gallery. I put the gallery.php in the plugins folder.
And I updated the config.php.
But I didn't know which example to take, because I don't know if I have gallery >1.2 or <1.2?
Also I could not run the composer update command. Shell said "unknown command"
When i call up my page I get
Fatal error: Default value for parameters with a class type hint can only be NULL in /homepages/u8489/Actor/pico/plugins/Gallery.php on line 405
Regards
Hendrik
Hello Developers,
I would like to test this gallery plugin and have just the code, because you mentioned, included in the config.php. Unfortunately, it does not work and I get the same error.
My config.php looks like this now.
<?php
/**
* Pico configuration
*
* This is the configuration file for {@link Pico}. It comes loaded with the
* default values, which can be found in {@link Pico::getConfig()} (see
* {@path "lib/Pico.php"}).
*
* To override any of the default settings below, copy this file to
* {@path "config/config.php"}, uncomment the line, then make and
* save your changes.
*
* @author Gilbert Pellegrom
* @link http://picocms.org
* @license http://opensource.org/licenses/MIT
* @version 1.0
*/
/*
* BASIC
*/
$config['site_title'] = 'Pico CMS Webseite'; // Site title
$config['base_url'] = 'http://picocms.wpzweinull.ch'; // Override base URL (e.g. http://example.com)
$config['rewrite_url'] = true; // A boolean indicating forced URL rewriting
/*
* THEME
*/
$config['theme'] = 'default'; // Set the theme (defaults to "default")
// $config['twig_config'] = array( // Twig settings
// 'cache' => false, // To enable Twig caching change this to a path to a writable directory
// 'autoescape' => false, // Auto-escape Twig vars
// 'debug' => false // Enable Twig debug
// );
/*
* CONTENT
*/
// $config['date_format'] = '%D %T'; // Set the PHP date format as described here: http://php.net/manual/en/function.strftime.php
// $config['pages_order_by'] = 'alpha'; // Order pages by "alpha" or "date"
// $config['pages_order'] = 'asc'; // Order pages "asc" or "desc"
// $config['content_dir'] = 'content-sample/'; // Content directory
// $config['content_ext'] = '.md';
$config['rewrite_url'] = true; // File extension of content files to serve
$config['at_navigation']['class_li'] = 'list-item';
$config['at_navigation']['class_a'] = 'link-item';
/*
* TIMEZONE
*/
// $config['timezone'] = 'UTC'; // Timezone may be required by your php install
/*
* PLUGINS
*/
// $config['DummyPlugin.enabled'] = false; // Force DummyPlugin to be disabled
/*
* CUSTOM
*/
// $config['custom_setting'] = 'Hello'; // Can be accessed by {{ config.custom_setting }} in a theme
$config['gallery'] = array(
'my_gallery' => array( // Add %my_gallery% some place in your page.
'page' => 'index', // The page you want to view the gallery.
'image_path' => 'gallery/fullsize', // Original Images.
'thumb_path' => 'gallery/thumbnails', // Must be a empty separate folder.
'flush' => '47b71a856274ac45', // A unique string to delete and regenerate thumbnails.
// These are possible, but not mandatory...
'thumb_size' => array(200, 200),
'before_gallery' => '',
'after_gallery' => '',
'before_thumbnail' => '',
'after_thumbnail' => '',
'thumbnail_link_class' => '',
'thumbnail_image_class' => '',
'before_image' => '',
'after_image' => '',
'image_class' => '',
'alt_image' => '',
'exclude' => array(), // Exclude file name(s).
'sort_by' => '', // Sort by empty or 'random'.
'order_by' => '', // Order by ampty or 'reverse'.
),
And the error looks like this.
Parse error: syntax error, unexpected end of file, expecting ')' in
/xxxxxxx/picocms.wpzweinull.ch/config/config.php on line 85
Could you help me.
Thanks in advance.
Hello Klas,
it's possible to imlement your gallery plugin on nextcloud 13.0.5 - PicoCMS 0.9.7 app?
Regards
Matthias
Hello developer,
sorry that I disturb you again, but I can not realize it.
My gallery page is at http://picocms.wpzweinull.ch/my-gallery/index and I have now added %my_gallery%
in the index.md.
Which URL must be accurate to generate the thumbnails.
If it is with mydomain.de/index .....
, then it does not work.
Phile CMS is complicated for me yet a bit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.