From 710abf1237066066d02f553ffd9f30f387d5ce3c Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sat, 2 Jan 2021 18:31:29 -0700 Subject: [PATCH] Finalizing MVP for image cache plugin. Closes #27. --- www/plugins/jasonwilliams/imgcache/Plugin.php | 4 +- .../imgcache/assets/images/notfound.png | Bin 0 -> 23914 bytes .../jasonwilliams/imgcache/classes/Image.php | 52 ++++++++++++++++++ .../partials/feed/template.htm | 3 +- 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 www/plugins/jasonwilliams/imgcache/assets/images/notfound.png create mode 100644 www/plugins/jasonwilliams/imgcache/classes/Image.php diff --git a/www/plugins/jasonwilliams/imgcache/Plugin.php b/www/plugins/jasonwilliams/imgcache/Plugin.php index 4c44a06..c1eab93 100644 --- a/www/plugins/jasonwilliams/imgcache/Plugin.php +++ b/www/plugins/jasonwilliams/imgcache/Plugin.php @@ -5,6 +5,7 @@ */ use System\Classes\PluginBase; +use JasonWilliams\ImgCache\Classes\Image; class Plugin extends PluginBase { @@ -24,7 +25,8 @@ class Plugin extends PluginBase return [ 'filters' => [ 'imgcache' => function($imgurl) { - return $imgurl; + $image = new Image($imgurl); + return $image; } ] ]; diff --git a/www/plugins/jasonwilliams/imgcache/assets/images/notfound.png b/www/plugins/jasonwilliams/imgcache/assets/images/notfound.png new file mode 100644 index 0000000000000000000000000000000000000000..f8b472ea52b957353793690a6d5b1ce93f44e204 GIT binary patch literal 23914 zcmeFZcRW{r{5Jlkp=56ol7yrvBSpgqMNuSsB_U)bGMZKrk`S`8LXu=FJ4r@HHrYEX zg!?*uzW4q6^Y{P#xO==Sf@9 zXnf@9tJUV&v6-2)T!B?1ujztl*hs!Y=VW85hKBfCT3gixm>%2Egl4U+xjQ;Lo7maW zN$j*`l@FEQ?p>DJ5WvIB-e<>V+g*4{C{!$8@X{$g5mrS-MLMdj0XCHM+l@(lsig38 zTQdzyDjOPt8dPH`TN)eh&CcGG;-tZ6%X5g57((;3g&z&q$Lt9|$I-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$url; + $this->folder = base_path(substr(config('cms.storage.media.path'), 1)).'/external/'; + $this->urlbase = config('cms.storage.media.path').'/external/'; + $this->filename = md5($url).'.jpg'; + + $fs = new Filesystem; + + if($fs->existsInsensitive($this->folder.$this->filename)) + { + $this->found = true; + $this->imgurl = $this->urlbase.$this->filename; + return; + } + + $req = new Http(); + $img = $req->get($url, [ + 'CURLOPT_CONNECTTIMEOUT' => 1 + ]); + + if ($img->code !== 200) $this->imgurl = '/plugins/jasonwilliams/imgcache/assets/images/notfound.png'; + else { + $this->found = true; + $fs->put($this->folder.$this->filename, $img); + $this->imgurl = $this->urlbase.$this->filename; + } + } + + public function __toString() + { + return $this->imgurl; + } +} diff --git a/www/themes/jason-williamsca/partials/feed/template.htm b/www/themes/jason-williamsca/partials/feed/template.htm index 0194921..01b664c 100644 --- a/www/themes/jason-williamsca/partials/feed/template.htm +++ b/www/themes/jason-williamsca/partials/feed/template.htm @@ -13,7 +13,6 @@