Skip to content

Commit

Permalink
Merge branch 'release/1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Densham committed Oct 2, 2015
2 parents fa6811f + 32ca567 commit e1edf5b
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 39 deletions.
10 changes: 10 additions & 0 deletions .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
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
build
composer.lock
docs
framework
cms
vendor
32 changes: 32 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,32 @@
# Changelog

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.
- Included `.gitattributes` file.
- Included `php` version `>=5.3.0` as a dependency.
- Updated license.
- Included contributing guide.
- 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`.

## [1.0.1] - 2014-02-18
### Fixed
- Updated readme.

[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
34 changes: 34 additions & 0 deletions 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**!
25 changes: 0 additions & 25 deletions LICENSE

This file was deleted.

27 changes: 27 additions & 0 deletions 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.
46 changes: 39 additions & 7 deletions 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

Expand All @@ -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]
[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
25 changes: 19 additions & 6 deletions composer.json
@@ -1,21 +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"
}
Expand Down
2 changes: 1 addition & 1 deletion templates/Vimeo.ss
@@ -1,3 +1,3 @@
<div class="video">
<iframe src="http://player.vimeo.com/video/{$VimeoID}?title=0&amp;byline=0&amp;portrait=0&amp;<% if $Autoplay %>&autoplay=1<% end_if %>&amp;loop=1" width="{$Width}" height="{$Height}" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
<iframe src="https://player.vimeo.com/video/{$VimeoID}?title=0&amp;byline=0&amp;portrait=0&amp;<% if $Autoplay %>&autoplay=1<% end_if %>&amp;loop=1" width="{$Width}" height="{$Height}" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
</div>

0 comments on commit e1edf5b

Please sign in to comment.