diff --git a/_build/build.transport.php b/_build/build.transport.php index 6621a7e..7dc3ca1 100644 --- a/_build/build.transport.php +++ b/_build/build.transport.php @@ -2,7 +2,7 @@ /** * @package getvimeo * - * Copyright (C) 2013 David Pede. All rights reserved. + * Copyright (C) 2014 David Pede. All rights reserved. * * getVimeo is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software @@ -29,7 +29,7 @@ /* define package names */ define('PKG_NAME','getVimeo'); define('PKG_NAME_LOWER','getvimeo'); -define('PKG_VERSION','1.1.0'); +define('PKG_VERSION','1.1.1'); define('PKG_RELEASE','pl'); /* define sources */ diff --git a/_build/data/transport.chunks.php b/_build/data/transport.chunks.php index 4a1cbe1..9ad5c2c 100644 --- a/_build/data/transport.chunks.php +++ b/_build/data/transport.chunks.php @@ -2,7 +2,7 @@ /** * @package getvimeo * - * Copyright (C) 2013 David Pede. All rights reserved. + * Copyright (C) 2014 David Pede. All rights reserved. * * getVimeo is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software diff --git a/_build/data/transport.snippets.php b/_build/data/transport.snippets.php index 7e4dbc3..5320115 100644 --- a/_build/data/transport.snippets.php +++ b/_build/data/transport.snippets.php @@ -2,7 +2,7 @@ /** * @package getvimeo * - * Copyright (C) 2013 David Pede. All rights reserved. + * Copyright (C) 2014 David Pede. All rights reserved. * * getVimeo is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software diff --git a/_build/properties/properties.getvimeo.php b/_build/properties/properties.getvimeo.php index 853c795..c00266f 100644 --- a/_build/properties/properties.getvimeo.php +++ b/_build/properties/properties.getvimeo.php @@ -2,7 +2,7 @@ /** * @package getvimeo * - * Copyright (C) 2013 David Pede. All rights reserved. + * Copyright (C) 2014 David Pede. All rights reserved. * * getVimeo is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software diff --git a/core/components/getvimeo/docs/changelog.txt b/core/components/getvimeo/docs/changelog.txt index 5635bf5..2cda2e1 100644 --- a/core/components/getvimeo/docs/changelog.txt +++ b/core/components/getvimeo/docs/changelog.txt @@ -1,5 +1,9 @@ Changelog for getVimeo. +getVimeo 1.1.1-pl (September 23, 2014) +==================================== +- Add API pagination support to increase video limit from 20 to 60. + getVimeo 1.1.0-pl (October 16, 2013) ==================================== - Add getPage compatibility to allow output pagination. diff --git a/core/components/getvimeo/docs/readme.txt b/core/components/getvimeo/docs/readme.txt index 2af526d..4a8c216 100644 --- a/core/components/getvimeo/docs/readme.txt +++ b/core/components/getvimeo/docs/readme.txt @@ -1,11 +1,11 @@ -------------------- Extra: getVimeo -------------------- -Version: 1.1.0-pl -Released: October 16, 2013 +Version: 1.1.1-pl +Released: September 23, 2014 Since: June 12, 2013 Author: David Pede -Copyright: (C) 2013 David Pede. All rights reserved. +Copyright: (C) 2014 David Pede. All rights reserved. A simple video retrieval Snippet for MODX Revolution. diff --git a/core/components/getvimeo/elements/snippets/snippet.getvimeo.php b/core/components/getvimeo/elements/snippets/snippet.getvimeo.php index 116f45e..b8e2d5a 100644 --- a/core/components/getvimeo/elements/snippets/snippet.getvimeo.php +++ b/core/components/getvimeo/elements/snippets/snippet.getvimeo.php @@ -3,12 +3,12 @@ * A simple video retrieval Snippet for MODX Revolution. * * @author David Pede - * @version 1.1.0-pl - * @released October 16, 2013 + * @version 1.1.1-pl + * @released September 23, 2014 * @since June 12, 2013 * @package getvimeo * - * Copyright (C) 2013 David Pede. All rights reserved. + * Copyright (C) 2014 David Pede. All rights reserved. * * getVimeo is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software @@ -29,20 +29,29 @@ $tpl = !empty($tpl) ? $tpl : ''; $tplAlt = !empty($tplAlt) ? $tplAlt : ''; $tplWrapper = !empty($tplWrapper) ? $tplWrapper : ''; // Blank default makes '&tplWrapper' optional -$sortby = !empty($sortby) ? $sortby : 'upload_date'; +$sortby = !empty($sortby) ? $sortby : ''; $sortdir = !empty($sortdir) && ($sortdir == "ASC") ? SORT_ASC : SORT_DESC; // If parameter is not empty AND equals 'ASC' assign 'SORT_ASC' $toPlaceholder = !empty($toPlaceholder) ? $toPlaceholder : ''; // Blank default makes '&toPlaceholder' optional $limit = isset($limit) ? (integer) $limit : 0; $offset = isset($offset) ? (integer) $offset : 0; -$totalVar = !empty($totalVar) ? $totalVar : 'total'; +$totalVar = !empty($totalVar) ? $totalVar : ''; $total = 0; $output = ''; if (!empty($channel)) { - $url = unserialize(file_get_contents("http://vimeo.com/api/v2/channel/$channel/videos.php")) - or $modx->log(modX::LOG_LEVEL_ERROR, 'getVimeo() - Unable to find Channel: ' . $channel); + + $url = array(); + $page = 1; + + do { + $pagedata = unserialize(file_get_contents("http://vimeo.com/api/v2/channel/$channel/videos.php?page=$page")) + or $modx->log(modX::LOG_LEVEL_ERROR, 'getVimeo() - Unable to find Channel: ' . $channel); + $url = array_merge($url,$pagedata); + $page++; + } while ((count($pagedata)) == 20 && $page <= 3); + if (!empty($id)) { if (!empty($tpl)) { /* ADD REQUESTED VIDEOS TO ARRAY */ diff --git a/readme.md b/readme.md index 25c346c..d9691ca 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -#getVimeo 1.1.0-pl +#getVimeo 1.1.1-pl ###A simple video retrieval Snippet for MODX Revolution. ####Installation @@ -14,7 +14,7 @@ If you have a bug fix or improvement and would like to submit a Pull Request, pl ####Details Author: David Pede (dev@tasianmedia.com) (https://twitter.com/davepede) -Copyright: (C) 2013 David Pede. All rights reserved. (dev@tasianmedia.com) +Copyright: (C) 2014 David Pede. All rights reserved. (dev@tasianmedia.com) ####Please Note getVimeo is not associated with or endorsed by Vimeo, LLC.