| 1 |
<?php // $Id: movino_variables.inc,v 1.3 2007/08/05 12:33:15 tomsun Exp $
|
| 2 |
/*
|
| 3 |
Movino Web Frontend - Server handling, feed parsing and feed caching
|
| 4 |
Copyright 2006, 2007 Tom Sundström
|
| 5 |
|
| 6 |
This program is free software; you can redistribute it and/or modify
|
| 7 |
it under the terms of the GNU General Public License version 2 as
|
| 8 |
published by the Free Software Foundation.
|
| 9 |
|
| 10 |
This program is distributed in the hope that it will be useful,
|
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
GNU General Public License for more details.
|
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public
|
| 16 |
License along with this program; if not, write to the Free Software
|
| 17 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
| 18 |
*/
|
| 19 |
|
| 20 |
|
| 21 |
/**
|
| 22 |
* Metadata fields available for movino content.
|
| 23 |
*/
|
| 24 |
function movino_metadata() {
|
| 25 |
return array(
|
| 26 |
'player' => t('Embedded player'),
|
| 27 |
'icon' => t('Preview icon'),
|
| 28 |
'title' => t('Title'),
|
| 29 |
'author' => t('Author'),
|
| 30 |
'created' => t('Created'),
|
| 31 |
'length' => t('Duration'),
|
| 32 |
'url' => t('Direct link'),
|
| 33 |
'encoding' => t('Encoding'),
|
| 34 |
);
|
| 35 |
}
|
| 36 |
|
| 37 |
|
| 38 |
/**
|
| 39 |
* Tell which metadata fields are enabled by default.
|
| 40 |
*/
|
| 41 |
function movino_metadata_enabled($teaser = FALSE) {
|
| 42 |
if ($teaser) {
|
| 43 |
return variable_get('movino_metadata_teaser', array('icon', 'title', 'author', 'created', 'length'));
|
| 44 |
}
|
| 45 |
|
| 46 |
return variable_get('movino_metadata_page', array('player', 'title', 'author', 'created', 'length', 'url'));
|
| 47 |
}
|
| 48 |
|
| 49 |
|
| 50 |
/**
|
| 51 |
* Tell if metadata labels should be hidden.
|
| 52 |
*
|
| 53 |
* @param boolean $teaser
|
| 54 |
* @return array
|
| 55 |
*/
|
| 56 |
function movino_metadata_labels_enabled($teaser = FALSE) {
|
| 57 |
if ($teaser) {
|
| 58 |
return variable_get('movino_metadata_labels_enabled_teaser', array());
|
| 59 |
}
|
| 60 |
|
| 61 |
return variable_get('movino_metadata_labels_enabled_page', array('title', 'author', 'created', 'length', 'url'));
|
| 62 |
}
|
| 63 |
|
| 64 |
|
| 65 |
/**
|
| 66 |
* Whether or not to allow the embedded player to be resized.
|
| 67 |
*/
|
| 68 |
function movino_player_embed_allow_resize($video) {
|
| 69 |
if (isset($video['allow_resize'])) {
|
| 70 |
return $video['allow_resize'];
|
| 71 |
}
|
| 72 |
return variable_get('movino_player_embed_allow_resize', 1);
|
| 73 |
}
|
| 74 |
|
| 75 |
|
| 76 |
/**
|
| 77 |
* Maximum size of embedded video.
|
| 78 |
*/
|
| 79 |
function movino_player_embed_scale_max() {
|
| 80 |
return 4;
|
| 81 |
}
|
| 82 |
|
| 83 |
|
| 84 |
/**
|
| 85 |
* Minimum size of embedded video.
|
| 86 |
*/
|
| 87 |
function movino_player_embed_scale_min() {
|
| 88 |
return 1;
|
| 89 |
}
|