I'm trying to integrate the mp3 player but I can not work
MOD/FILE/VIEWS/DEFAULT/RIVER/OBJECT/CREATE.PHP
<?php
$performed_by = get_entity($vars['item']->subject_guid);
$object = get_entity($vars['item']->object_guid);
$url = $object->getURL();
$container = get_entity($object->container_guid);
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("file:river:created"),$url) . " " . elgg_echo("file:river:item");
$string .= " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
if ($container && $container instanceof ElggGroup) {
$string .= ' ' . elgg_echo('groups:river:togroup') . " <a href=\"" . $container->getURL() ."\">". $container->name . "</a>";
}
echo $string;
?>
<!-- include the audioplayer js code -->
<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/zaudio/audioplayer/audio-player.js"></script>
<!-- set up the player -->
<script type="text/javascript">
AudioPlayer.setup("<?php echo $vars['url']; ?>mod/zaudio/audioplayer/player.swf", {
width: 290
});
</script>
<div style="margin:10px 0 10px 10px;">
<p id="audioplayer_1">Alternative content</p>
<script type="text/javascript">
AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"});
</script>
</div>
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.