Skip to content

Commit

Permalink
v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris-B authored May 12, 2017
1 parent 70e4f96 commit e83dc6d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ On your webserver:
- in this folder:
- copy the files:
- `nano_photos_provider2.php`,
- `nano_photos_provider2.class.php`,
- `nano_photos_provider2.json.class.php`,
- `nano_photos_provider2.cfg` and
- `nano_photos_provider2.Encoding.php`
- `nano_photos_provider2.encoding.php`
- create a folder named `nano_photos_content`
- copy your photos here
- copy your photos there
- you can organize your photos in folders (= albums)
- edit the `nano_photos_provider2.cfg` file for custom settings

Expand All @@ -45,7 +45,7 @@ Example:

```js
jQuery(document).ready(function () {
jQuery("#nanoGallery1").nanogallery2({
jQuery("#my_nanogallery").nanogallery2({
thumbnailWidth: 'auto',
thumbnailHeight: 150,
kind: 'nano_photos_provider2',
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ nanoPhotosProvider2 - nanogallery2 plugin
ChangeLog
------

v0.9.1
------
- fix upper case issue in filename

v0.9.0
------

Expand Down
20 changes: 10 additions & 10 deletions nano_photos_provider2.json.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class item
public $ID = '';
public $albumID = '0';
public $kind = ''; // 'album', 'image'
public $t_url = []; // thumbnails URL
public $t_width = []; // thumbnails width
public $t_height = []; // thumbnails height
public $t_url = array(); // thumbnails URL
public $t_width = array(); // thumbnails width
public $t_height = array(); // thumbnails height
public $dc = '#000'; // image dominant color
// public $dcGIF = '#000'; // image dominant color

Expand All @@ -45,10 +45,10 @@ class galleryJSON
protected $data;
protected $albumID;
protected $album;
protected $tn_size = [];
protected $ctn_urls = [];
protected $ctn_w = [];
protected $ctn_h = [];
protected $tn_size = array();
protected $ctn_urls = array();
protected $ctn_w = array();
protected $ctn_h = array();
protected $currentItem;

const CONFIG_FILE = './nano_photos_provider2.cfg';
Expand Down Expand Up @@ -247,9 +247,9 @@ protected function Compare($a, $b)
protected function GetThumbnail2( $baseFolder, $filename )
{

$s = [ 'xs', 'sm', 'me', 'la', 'xl' ];
$sw = [ 'wxs', 'wsm', 'wme', 'wla', 'wxl' ];
$sh = [ 'hxs', 'hsm', 'hme', 'hla', 'hxl' ];
$s = array( 'xs', 'sm', 'me', 'la', 'xl' );
$sw = array( 'wxs', 'wsm', 'wme', 'wla', 'wxl' );
$sh = array( 'hxs', 'hsm', 'hme', 'hla', 'hxl' );
for( $i = 0; $i < count($s) ; $i++ ) {
$pi=pathinfo($filename);
$tn= $pi['filename'] . '_' . $this->tn_size[$sw[$i]] . '_' . $this->tn_size[$sh[$i]] . '.' . $pi['extension'];
Expand Down
6 changes: 3 additions & 3 deletions nano_photos_provider2.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
*
*
* PHP 5.2+
* @version 0.9.0
* @version 0.9.1
* @author Christophe BRISBOIS - http://www.brisbois.fr/
* @Contributor Ruplahlava - https://github.com/Ruplahlava
* @Contributor EelcoA - https://github.com/EelcoA
* @Contributor eae710 - https://github.com/eae710
* @copyright Copyright 2015
* @license CC BY-NC 3.0
* @license GPL v3 and commercial
* @link https://github.com/nanostudio-org/nanoPhotosProvider2
* @Support https://github.com/nanostudio-org/nanoPhotosProvider2/issues
*
*/
require './nano_photos_provider2.JSON.class.php';
require './nano_photos_provider2.json.class.php';

// Available values development, production
// Codeigniter env switch https://github.com/bcit-ci/CodeIgniter/
Expand Down

0 comments on commit e83dc6d

Please sign in to comment.