Skip to content

Commit 2944d72

Browse files
author
Nicolas Morand
committed
Push files
1 parent 84c3af1 commit 2944d72

7 files changed

+139
-0
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

Diff for: README.textile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
h1. oui_player_myspace
2+
3+
A MySpace extension for oui_player.
4+
See the oui_player help for global config/tags informations.
5+
6+
h2. Plugin requirements
7+
8+
oui_player's minimum requirements:
9+
10+
* "Textpattern CMS":http://textpattern.com/ 4.6+.
11+
* "oui_player":https://github.com/oui-textpattern/oui_player/ 2.+.
12+
13+
h2. Recognised values for the @play@ attribute
14+
15+
* *ID* (using @myspace@ as provider.)
16+
* http(s)://myspace.com/…/video/…/[*ID*]
17+
18+
h2. Player size
19+
20+
- @width@ :=
21+
The width of the player in pixels.
22+
*Default:* related plugin pref
23+
*Initial:* @640@
24+
*valid:* integer =:
25+
- @height@ :=
26+
*Default:* related plugin pref
27+
*Initial:* none
28+
*valid:* integer
29+
The height of the player in pixels. =:
30+
- @ratio@ :=
31+
The ratio used to calculate the missing value for the width or the height.
32+
*Default:* related plugin pref
33+
*Initial:* @16:9@
34+
*valid:* integer[@:@]integer =:

Diff for: composer.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "oui/oui_player_myspace",
3+
"description": "MySpace HTML extension for oui_player",
4+
"keywords": [
5+
"textpattern",
6+
"plugin",
7+
"player",
8+
"video",
9+
"myspace"
10+
],
11+
"homepage": "https://github.com/NicolasGraph/oui_player",
12+
"license": "MIT",
13+
"type": "textpattern-plugin",
14+
"authors": [
15+
{
16+
"name": "Nicolas Morand",
17+
"homepage": "https://github.com/NicolasGraph",
18+
"role": "Developer"
19+
}
20+
],
21+
"support": {
22+
"issues": "https://github.com/NicolasGraph/oui_player/issues",
23+
"source": "https://github.com/NicolasGraph/oui_player"
24+
},
25+
"require": {
26+
"textpattern/lock": "4.6.*",
27+
"textpattern/installer": "*",
28+
"oui/oui_player": "2.*"
29+
}
30+
}

Diff for: manifest.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name" : "oui_player_myspace",
3+
"description" : "Myspace extension for oui_player",
4+
"version" : "1.0.0-beta",
5+
"type" : 1,
6+
"author" : "Nicolas Morand",
7+
"author_uri" : "http://github.com/NicolasGraph",
8+
"order" : 5,
9+
"flags" : 3
10+
}

Diff for: oui_player_myspace.php

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/*
4+
* This file is part of oui_player,
5+
* an extendable plugin to easily embed
6+
* customizable players in Textpattern CMS.
7+
*
8+
* https://github.com/NicolasGraph/oui_player
9+
*
10+
* Copyright (C) 2016-2017 Nicolas Morand
11+
*
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
14+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
17+
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
18+
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
*/
20+
21+
/**
22+
* Myspace
23+
*
24+
* @package Oui\Player
25+
*/
26+
27+
namespace Oui\Player {
28+
29+
if (class_exists('Oui\Player\Provider')) {
30+
31+
class Myspace extends Provider
32+
{
33+
protected static $patterns = array(
34+
'video' => array(
35+
'scheme' => '#^(http|https)://myspace\.com/[\S]+/video/[\S]+/(\d+)$#i',
36+
'id' => '2',
37+
),
38+
);
39+
protected static $src = '//media.myspace.com/';
40+
protected static $glue = array('play/video/', '?', '&amp;');
41+
}
42+
43+
if (txpinterface === 'admin') {
44+
Myspace::getInstance();
45+
}
46+
47+
}
48+
}

Diff for: textpacks/en-gb.textpack

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#Default language, en-us, en-gb
2+
#@admin
3+
oui_player_provider_myspace => Myspace videos
4+
oui_player_myspace => Myspace player (oui_player_myspace)
5+
oui_player_myspace_prefs => Display the Myspace player prefs
6+
oui_player_myspace_width => Player width
7+
oui_player_myspace_height => Player height
8+
oui_player_myspace_ratio => Player ratio by default

Diff for: textpacks/fr-fr.textpack

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#@language fr-fr
2+
#@admin
3+
oui_player_provider_myspace => Myspace Videos
4+
oui_player_myspace => Lecteur Myspace Videos (oui_player_myspace)
5+
oui_player_myspace_prefs => Afficher les préférences du lecteur Myspace
6+
oui_player_myspace_width => Largeur du lecteur
7+
oui_player_myspace_height => Hauteur du lecteur
8+
oui_player_myspace_ratio => Ratio utilisé en l'absence de l'une des dimensions

0 commit comments

Comments
 (0)