diff --git a/README.md b/README.md index 62bef75..ed9989c 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ If you're a blogger like myself, you can use it as storage for your images so th - Uploads without logins or validation (that's a good thing, right?) - Simple API to upload any image from remote servers to your instance [via URL](#upload-from-url) and [via Base64](#upload-from-base64-string) - 100% file based - no database needed +- Simple album functions with embedding support - Converts gif to (much smaller) MP4 - MP4 resizing - PictShare removes all exif data so you can upload photos from your phone and all GPS tags and camera model info get wiped @@ -101,11 +102,11 @@ If there is some option that's not recognized by PictShare it's simply ignored, <width>**x**<height> | -none- | https://pictshare.net/20x20/b260e36b60.jpg | ![Resized](https://pictshare.net/20x20/b260e36b60.jpg) forcesize | -none- | https://pictshare.net/100x400/forcesize/b260e36b60.jpg | ![Forced size](https://pictshare.net/100x400/forcesize/b260e36b60.jpg) **Albums** | | | -just add multiple image hashes | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg | Takes the **images** you put in the URL and makes an album out of them -embed | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/embed | Renders the album without CSS and with transparent background so you can embed them easily -responsive | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/responsive | Renders all images responsive (max-width 100%) according to screen size -<width>**x**<height> | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/150x150 | Sets the size for the thumbnails in the album -forcesize | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/100x300/forcesize | Forces thumbnail sizes to the values you provided +just add multiple image hashes | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg | Takes the **images** you put in the URL and makes an album out of them. All filters are supported! +embed | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/embed | Renders the album without CSS and with transparent background so you can embed them easily +responsive | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/responsive | Renders all images responsive (max-width 100%) according to screen size +<width>**x**<height> | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/150x150 | Sets the size for the thumbnails in the album +forcesize | -none- | https://www.pictshare.net/b260e36b60.jpg/32c9cf77c5.jpg/163484b6b1.jpg/100x300/forcesize | Forces thumbnail sizes to the values you provided **GIF to mp4** | | | mp4 | -none- | https://www.pictshare.net/mp4/102687fe65.gif | Converts gif to mp4 and displays as that. Note that you can't include that mp4 in an img tag raw | -none- | https://www.pictshare.net/mp4/raw/102687fe65.gif | Renders the converted mp4 directly. Use with /mp4/ diff --git a/inc/core.php b/inc/core.php index 6b6f195..97f9dfc 100644 --- a/inc/core.php +++ b/inc/core.php @@ -126,7 +126,7 @@ function renderAlbum($data) foreach($data['album'] as $hash) { - $content.=''; + $content.=''; } if($data['embed']===true) diff --git a/models/pictsharemodel.php b/models/pictsharemodel.php index fa8d16f..c957c94 100644 --- a/models/pictsharemodel.php +++ b/models/pictsharemodel.php @@ -499,9 +499,17 @@ class PictshareModel extends Model $o.= '

'.$this->translate(4).' '.++$i.'

'.$data['hash'].'
'; else $o.= '

'.$this->translate(4).' '.++$i.'


'; + + $hashes[] = $data['hash']; } } } + + if(count($hashes)>1) + { + $albumlink = DOMAINPATH.implode('/',$hashes); + $o.='

Album link

'.$albumlink.''; + } return $o; } diff --git a/template_album.php b/template_album.php index 0cbe926..3c83cca 100644 --- a/template_album.php +++ b/template_album.php @@ -25,7 +25,7 @@