From 6651dd7ad79429c5b03b2f7bddbe73fd4bba3b5c Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:17:00 +0100 Subject: [PATCH 01/10] ADD: Include changelog --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100755 index 0000000..758ba70 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Changelog + +All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented in this file + +## [Unreleased] +### Added +- Included changelog. + +## [1.0.2] - 2014-03-03 +### Fixed +- Replaced YouTube embedding with `object` to `iframe`. + +## [1.0.1] - 2014-02-18 +### Fixed +- Updated readme. + +[Unreleased]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.2...HEAD +[1.0.2]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.0...1.0.1 \ No newline at end of file From 1ce83d8cad92a3e492972b864d00ead9a79a9d15 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:19:54 +0100 Subject: [PATCH 02/10] ADD: Include gitignore --- .gitignore | 6 ++++++ CHANGELOG.md | 1 + 2 files changed, 7 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05eba4a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build +composer.lock +docs +framework +cms +vendor \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 758ba70..e3dc257 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented ## [Unreleased] ### Added - Included changelog. +- Included `.gitignore` file. ## [1.0.2] - 2014-03-03 ### Fixed From c930e69fe8218c6a3ee1b13cf7829d077ef6e757 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:20:58 +0100 Subject: [PATCH 03/10] ADD: Include gitattributes --- .gitattributes | 10 ++++++++++ CHANGELOG.md | 1 + 2 files changed, 11 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..01c98c6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Path-based git attributes +# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html + +# Ignore all test and documentation with "export-ignore". +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/.scrutinizer.yml export-ignore +/tests export-ignore \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e3dc257..871a92a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented ### Added - Included changelog. - Included `.gitignore` file. +- Included `.gitattributes` file. ## [1.0.2] - 2014-03-03 ### Fixed From 9672679a7767e01dcf338f0c4cccdf8ad3a47ec8 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:22:36 +0100 Subject: [PATCH 04/10] ADD: Include php dependency --- CHANGELOG.md | 1 + composer.json | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 871a92a..8a34c44 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Included changelog. - Included `.gitignore` file. - Included `.gitattributes` file. +- Included `php` version `>=5.3.0` as a dependency. ## [1.0.2] - 2014-03-03 ### Fixed diff --git a/composer.json b/composer.json index 2d74c8d..52d8006 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ } ], "require": { + "php": ">=5.3.0", "silverstripe/framework": ">=2.4" }, "support": { From 5cb579848fc77e11719242d469e69de553061ddc Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:23:32 +0100 Subject: [PATCH 05/10] ADD: Update license --- CHANGELOG.md | 1 + LICENSE | 25 ------------------------- LICENSE.md | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 25 deletions(-) delete mode 100644 LICENSE create mode 100644 LICENSE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a34c44..24deb23 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Included `.gitignore` file. - Included `.gitattributes` file. - Included `php` version `>=5.3.0` as a dependency. +- Updated license. ## [1.0.2] - 2014-03-03 ### Fixed diff --git a/LICENSE b/LICENSE deleted file mode 100644 index c61c8c6..0000000 --- a/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014 Studio Bonito Ltd. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are -permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY STUDIO BONITO LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STUDIO BONITO LTD OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the -authors and should not be interpreted as representing official policies, either expressed -or implied, of Studio Bonito Ltd. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..12c9bb2 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,27 @@ +# Copyright (c) 2014, Studio Bonito Ltd. + +All rights reserved. + +> Redistribution and use in source and binary forms, with or without modification, are +> permitted provided that the following conditions are met: +> +> 1. Redistributions of source code must retain the above copyright notice, this list of +> conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above copyright notice, this list +> of conditions and the following disclaimer in the documentation and/or other materials +> provided with the distribution. +> +> THIS SOFTWARE IS PROVIDED BY STUDIO BONITO LTD "AS IS" AND ANY EXPRESS OR IMPLIED +> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +> FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STUDIO BONITO LTD OR +> CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +> CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +> ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +> NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +> ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +> +> The views and conclusions contained in the software and documentation are those of the +> authors and should not be interpreted as representing official policies, either expressed +> or implied, of Studio Bonito Ltd. \ No newline at end of file From 272d1a0992d5d067362ef42e4466a30fdaddbb85 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:25:15 +0100 Subject: [PATCH 06/10] ADD: Include contributing --- CHANGELOG.md | 1 + CONTRIBUTING.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 CONTRIBUTING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 24deb23..5ec3ab0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Included `.gitattributes` file. - Included `php` version `>=5.3.0` as a dependency. - Updated license. +- Included contributing guide. ## [1.0.2] - 2014-03-03 ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..4fdb1e2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on [Github](https://github.com/studiobonito/silverstripe-shortcodes/tree/develop). + + +## Pull Requests + +- **Development branch** - You're pull request should be made against the `develop` branch. + +- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). + +- **Add tests!** - Your patch won't be accepted if it doesn't have tests. + +- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. + +- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. + +- **Create feature branches** - Don't ask us to pull from your master branch. + +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. + +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. + + +## Running Tests + +``` bash +$ phpunit +``` + + +**Happy coding**! From f0dbc2f419f2e603b8230b56f00b84fa6847fe04 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:33:23 +0100 Subject: [PATCH 07/10] ADD: Update composer --- CHANGELOG.md | 1 + composer.json | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec3ab0..ced2e15 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Included `php` version `>=5.3.0` as a dependency. - Updated license. - Included contributing guide. +- Updated `composer.json` file. ## [1.0.2] - 2014-03-03 ### Fixed diff --git a/composer.json b/composer.json index 52d8006..8781f54 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,34 @@ { "name": "studiobonito/silverstripe-shortcodes", - "description": "ShortCodes Module is based on Daniel Hensby's post at SSbits. It adds a shortcode for inserting YouTube and Vimeo videos to pages, as well as adding a buttons to the TinyMCE WYSIWYG editor.", + "description": "Adds shortcodes for inserting YouTube and Vimeo videos.", "type": "silverstripe-module", - "keywords": ["silverstripe", "shortcodes", "vimeo", "youtube", "video", "shortcode", "wysiwyg", "tinymce", "cms"], + "keywords": [ + "studiobonito", + "silverstripe-shortcodes", + "silverstripe", + "shortcodes", + "vimeo", + "youtube", + "video", + "shortcode", + "wysiwyg", + "tinymce", + "cms" + ], + "homepage": "https://github.com/studiobonito/silverstripe-shortcodes", "license": "BSD-2-Clause", "authors": [ { "name": "Tom Densham", - "email": "tom.densham@studiobonito.co.uk" + "email": "tom.densham@studiobonito.co.uk", + "homepage": "http://www.studiobonito.co.uk", + "role": "Developer" } ], "require": { "php": ">=5.3.0", "silverstripe/framework": ">=2.4" }, - "support": { - "issues": "https://github.com/studiobonito/silverstripe-shortcodes/issues" - }, "extra": { "installer-name": "shortcodes" } From bac9ed14dfbfcf8ef24b90a3e98ba3914188c15a Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:33:41 +0100 Subject: [PATCH 08/10] ADD: Update readme --- CHANGELOG.md | 1 + README.md | 46 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced2e15..2140029 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Updated license. - Included contributing guide. - Updated `composer.json` file. +- Updated readme. ## [1.0.2] - 2014-03-03 ### Fixed diff --git a/README.md b/README.md index 44db2ce..732bbd7 100755 --- a/README.md +++ b/README.md @@ -1,26 +1,32 @@ # ShortCodes Module +[![Latest Version on Packagist][ico-version]][link-packagist] +[![Software License][ico-license]](LICENSE.md) +[![Total Downloads][ico-downloads]][link-downloads] + ## Overview ShortCodes Module is based on Daniel Hensby's post at [SSbits](http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/). It adds a shortcodes for inserting YouTube and Vimeo videos to pages, as well as adding a buttons to the TinyMCE WYSIWYG editor. ## Requirements -SilverStripe 2.4 or newer. +- SilverStripe 2.4 or newer. -## Installation Instructions +## Install -### Composer +### Via Composer Run the following to add this module as a requirement and install it via composer. - $ composer require studiobonito/silverstripe-youtubevideos +```bash +$ composer require studiobonito/silverstripe-youtubevideos +``` -### Manual +### Manually Copy the 'shortcodes' folder to your the root of your SilverStripe installation. -## Usage Overview +## Usage Use the following shortcode in any `HTMLTextField` to embed a YouTube video @@ -32,4 +38,30 @@ or a Vimeo video You can also specify a height and width which can be used by the templates that render the videos - [youtube id=4af1bFh3duo width=300 height=150][/youtube] \ No newline at end of file + [youtube id=4af1bFh3duo width=300 height=150][/youtube] + +## Contributing + +Please see [CONTRIBUTING](CONTRIBUTING.md) for details. + +## Security + +If you discover any security related issues, please email support@studiobonito.co.uk instead of using the issue tracker. + +## Credits + +- [Tom Densham][link-author] +- [All Contributors][link-contributors] + +## License + +The BSD-2-Clause License. Please see [License File](LICENSE.md) for more information. + +[ico-version]: https://img.shields.io/packagist/v/studiobonito/silverstripe-shortcodes.svg?style=flat-square +[ico-license]: https://img.shields.io/badge/license-BSD-brightgreen.svg?style=flat-square +[ico-downloads]: https://img.shields.io/packagist/dt/studiobonito/silverstripe-shortcodes.svg?style=flat-square + +[link-packagist]: https://packagist.org/packages/studiobonito/silverstripe-shortcodes +[link-downloads]: https://packagist.org/packages/studiobonito/silverstripe-shortcodes +[link-author]: https://github.com/nedmas +[link-contributors]: ../../contributors \ No newline at end of file From 32f6d5eabe774f41c3318fcb940415f46b03163b Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:38:25 +0100 Subject: [PATCH 09/10] FIX: Update Vimeo URL to use `https` --- CHANGELOG.md | 3 +++ templates/Vimeo.ss | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2140029..9aa75af 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented - Updated `composer.json` file. - Updated readme. +### Fixed +- Update Vimeo embed URL to use `https`. + ## [1.0.2] - 2014-03-03 ### Fixed - Replaced YouTube embedding with `object` to `iframe`. diff --git a/templates/Vimeo.ss b/templates/Vimeo.ss index e0fdd43..7ba3a52 100644 --- a/templates/Vimeo.ss +++ b/templates/Vimeo.ss @@ -1,3 +1,3 @@
- +
\ No newline at end of file From 32ca5672adc4d97e653c57798dc29e9d2b492079 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Fri, 2 Oct 2015 14:41:01 +0100 Subject: [PATCH 10/10] ADD: Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa75af..358fee4 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented in this file ## [Unreleased] + +## [1.0.3] - 2015-10-02 ### Added - Included changelog. - Included `.gitignore` file. @@ -24,6 +26,7 @@ All Notable changes to `studiobonito/silverstripe-shortcodes` will be documented ### Fixed - Updated readme. -[Unreleased]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.2...HEAD +[Unreleased]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.3...HEAD +[1.0.3]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.2...1.0.3 [1.0.2]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.1...1.0.2 [1.0.1]: https://github.com/studiobonito/silverstripe-shortcodes/compare/1.0.0...1.0.1 \ No newline at end of file