Giter Club home page Giter Club logo

splash's Introduction

Splash!

Quickly and easily get beautiful Unsplash images in Craft!

Click here for the Craft 2.5 version.

Features

  • Quick and easy search & preview
  • Store the images author and a link to their Unsplash profile
  • Save the complementary colour of the image, as chosen by Unsplash
  • Stop clients uploading bad images ever again! (Just kidding, of course they will)

Upcoming Features

  • Search Collections
  • Keep track of previously downloaded images
  • Integrate with additional free stock image services
  • Ability to like and collect images, mood boards?
  • Improve asset titles on download

splash's People

Contributors

alexjcollins avatar dominicvonk avatar tam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

splash's Issues

Able to download image without volume

Steps to recreate:

  • Unsure you have no Asset Volumes set up
  • Attempt to download an image from Splash
  • CP will return Image downloaded successfully!

RC9 Settings Page Issue

When navigating to the settings page in RC9 the following error is encountered:

Internal Server Error
Argument 1 passed to craft\services\Fields::getLayoutById() must be of the type integer, null given, called in /***/***/***/***/***/vendor/ether/splash/src/Splash.php on line 79

RC1 Sidebar Issue

When running RC1 the Splash menu item doesn't display correctly, see screenshot below:

image

Error trying to run on Craft

PHP Notice 'yii\base\ErrorException' with message 'Undefined offset: 1'

in C:\Users\Caleb\Local Sites\c\app\vendor\ether\splash\src\controllers\SplashController.php:76

Stack trace:
#0 C:\Users\Caleb\Local Sites\c\app\vendor\craftcms\cms\src\web\ErrorHandler.php(76): craft\web\ErrorHandler->handleError()
#1 C:\Users\Caleb\Local Sites\c\app\vendor\ether\splash\src\controllers\SplashController.php(76): craft\web\ErrorHandler->handleError()
#2 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\InlineAction.php(57): ether\splash\controllers\SplashController->actionUn()
#3 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\InlineAction.php(57): ::call_user_func_array:{C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\InlineAction.php:57}()
#4 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\Controller.php(180): yii\base\InlineAction->runWithParams()
#5 C:\Users\Caleb\Local Sites\c\app\vendor\craftcms\cms\src\web\Controller.php(190): ether\splash\controllers\SplashController->runAction()
#6 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\Module.php(528): ether\splash\controllers\SplashController->runAction()
#7 C:\Users\Caleb\Local Sites\c\app\vendor\craftcms\cms\src\web\Application.php(274): craft\web\Application->runAction()
#8 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\web\Application.php(103): craft\web\Application->runAction()
#9 C:\Users\Caleb\Local Sites\c\app\vendor\craftcms\cms\src\web\Application.php(259): craft\web\Application->handleRequest()
#10 C:\Users\Caleb\Local Sites\c\app\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest()
#11 C:\Users\Caleb\Local Sites\c\app\public\index.php(22): craft\web\Application->run()
#12 {main}
Splash!
Search Unsplash...

Image Author URL and Colour not being pulled in

Can'y get this to pull in the Image author URL and the color of the image.

I've set the following fields to capture the above, but not working (the image author is fine). They fields are applied to the asset volumes field layout too.

Image Author URL imageAuthorUrl -> Plain Text (tried URL too)

Image Colour imageColour -> Colour

Any ideas why it's not pulling in that info?

Thanks
Lewis

getLayoutById() is null

After installing the plugin I get this message:

2019-03-27 09:09:03 [-][1][b9bjju5ps0886ji1apuk1assf2][error][TypeError] TypeError: Argument 1 passed to craft\services\Fields::getLayoutById() must be of the type integer, null given, called in /Users/clarknelson/Documents/lse/vendor/ether/splash/src/Splash.php on line 79 and defined in /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/services/Fields.php:974
Stack trace:
#0 /Users/clarknelson/Documents/lse/vendor/ether/splash/src/Splash.php(79): craft\services\Fields->getLayoutById(NULL)
#1 /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/base/Plugin.php(224): ether\splash\Splash->settingsHtml()
#2 /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/controllers/PluginsController.php(117): craft\base\Plugin->getSettingsResponse()
#3 [internal function]: craft\controllers\PluginsController->actionEditPluginSettings('splash', Object(ether\splash\Splash))
#4 /Users/clarknelson/Documents/lse/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /Users/clarknelson/Documents/lse/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#6 /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('edit-plugin-set...', Array)
#7 /Users/clarknelson/Documents/lse/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit-plugin-set...', Array)
#8 /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('plugins/edit-pl...', Array)
#9 /Users/clarknelson/Documents/lse/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('plugins/edit-pl...', Array)
#10 /Users/clarknelson/Documents/lse/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#11 /Users/clarknelson/Documents/lse/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#12 /Users/clarknelson/Documents/lse/web/index.php(21): yii\base\Application->run()
#13 /Users/clarknelson/.composer/vendor/laravel/valet/server.php(158): require('/Users/clarknel...')
#14 {main}

Images not saved when clicking "download"

When I click the "download" button on an image, I get a spinning wheel and after a while "Image downloaded successfully". However, there is no image in the folder I set up in the configuration. (I only have volumes hosted on 3S, I don't know if that might be the issue.)

Craft Pro 3.0.30.2
Splash 3.0.2

Can't download any images from Unsplash.

I just noticed that we can't fetch any images from Unsplash after we updated Craft to 3.7.25 and in the log the following error is shown:
Prevented saving /app/storage/runtime/tempA5E-ym6WyGM.jpg as an asset. It must be located within a temp directory or the project root

We are using the latest version of the plugin: 3.0.5

It seems that one slash is missing in the path to the temp image that is saved in the storage so the file is saved directly under the runtime folder with temp as a prefix instead of being saved to the folder temp. Adding slash before the filename fixes this for me on row 139 in the actionDl() method.

Before:

$tempLocation = $tempPath . $fileName; // Results in /storage/runtime/tempxxxxx.png

After:

$tempLocation = $tempPath . '/' . $fileName;  // Results in /storage/runtime/temp/xxxxx.png

Doesn't work

Everything seems fine (no errors), but there is nothing showing up in the asset index.

I am using Splash 3.0.2 on Craft 3.0.26.1

FR - Choose the size of the image to download via the query params

Hi,

Is it possible to please add a feature to set the size of the images to download/view. A simple field perhaps in the settings which is then passed to the API query?

Most images are 4mb in size, and after a while this builds up on storage volumes. It would also speed up image transforms and make this the perfect plugin..

Thank you.

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.