diff options
Diffstat (limited to 'mod/zaudio/views')
5 files changed, 54 insertions, 0 deletions
diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mp3.php b/mod/zaudio/views/default/file/specialcontent/audio/mp3.php new file mode 100644 index 000000000..11d09708a --- /dev/null +++ b/mod/zaudio/views/default/file/specialcontent/audio/mp3.php @@ -0,0 +1,7 @@ +<?php +/** + * ZAudio file view override + * @package ElggZAudio + */ + +echo elgg_view('zaudio/audioplayer', array('file_guid' => $vars['entity']->getGUID())); diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php b/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php new file mode 100644 index 000000000..11d09708a --- /dev/null +++ b/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php @@ -0,0 +1,7 @@ +<?php +/** + * ZAudio file view override + * @package ElggZAudio + */ + +echo elgg_view('zaudio/audioplayer', array('file_guid' => $vars['entity']->getGUID())); diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mpg.php b/mod/zaudio/views/default/file/specialcontent/audio/mpg.php new file mode 100644 index 000000000..11d09708a --- /dev/null +++ b/mod/zaudio/views/default/file/specialcontent/audio/mpg.php @@ -0,0 +1,7 @@ +<?php +/** + * ZAudio file view override + * @package ElggZAudio + */ + +echo elgg_view('zaudio/audioplayer', array('file_guid' => $vars['entity']->getGUID())); diff --git a/mod/zaudio/views/default/zaudio/audioplayer.php b/mod/zaudio/views/default/zaudio/audioplayer.php new file mode 100644 index 000000000..bae725458 --- /dev/null +++ b/mod/zaudio/views/default/zaudio/audioplayer.php @@ -0,0 +1,23 @@ +<?php +/** + * ZAudio audio player + * @package ElggZAudio + */ + +elgg_load_js('elgg.zaudio'); + +$swf_url = elgg_get_site_url() . 'mod/zaudio/audioplayer/player.swf'; +$mp3_url = elgg_get_site_url() . "mod/file/download.php?file_guid={$vars['file_guid']}"; + +?> +<?php //@todo JS 1.8: no ?> +<script type="text/javascript"> + AudioPlayer.setup("<?php echo $swf_url; ?>", {width: 290}); +</script> + +<div class="zaudio"> + <p id="zaudioplayer"></p> + <script type="text/javascript"> + AudioPlayer.embed("zaudioplayer", {soundFile: "<?php echo $mp3_url; ?>"}); + </script> +</div>
\ No newline at end of file diff --git a/mod/zaudio/views/default/zaudio/css.php b/mod/zaudio/views/default/zaudio/css.php new file mode 100644 index 000000000..86cc4aadb --- /dev/null +++ b/mod/zaudio/views/default/zaudio/css.php @@ -0,0 +1,10 @@ +<?php +/** + * ZAudio CSS + * @package ElggZAudio + */ +?> +/* ZAudio */ +.zaudio { + margin: 10px 0; +} |