Hello, I'm trying (vainly) to show an uploaded file in the view of another object.
The file is an mp3 and uploads and plays fine using zaudio in it's own view. I want to get that zaudio into another object's view. I've managed to get the zaudio to appear by using the following code from the file object view:
if (elgg_view_exists('file/specialcontent/' . $mime)) {
echo "<div class=\"filerepo_specialcontent\">".elgg_view('file/specialcontent/' . $mime, $vars)."</div>";
} else if (elgg_view_exists("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
echo "<div class=\"filerepo_specialcontent\">".elgg_view("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars)."</div>";
}
The reason it's showing is because I've set the mimetype to the guid of my test file. However when I click play it stays on "buffering" forever. So it can read successfully from the test file in terms of mimetype which I've got in the following way:
$test_guid = $guid +1;
$testfile = get_entity($test_guid);
$mime = $testfile->mimetype;
But it doesn't seem to want to play the file. So I'm assuming somewhere in the code at the top I need to add the test file's guid somewhere.
Any help or direction is appreciated. I have searched (quite extensively) in the docs and API and on the community as well, so far with little or no luck.
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.
- Trajan@Trajan

Trajan - 0 likes
- rjcalifornia@rjcalifornia

rjcalifornia - 0 likes
- DhrupDeScoop@Dhrup2000

DhrupDeScoop - 0 likes
- rjcalifornia@rjcalifornia

rjcalifornia - 0 likes
- Trajan@Trajan

Trajan - 0 likes
You must log in to post replies.anyone got an idea?
Not really... may be Dhrup can help us out here xD
@RJC
LOLZ
The "root" (ie *not "sudo" ) just got that problem fixed ;-)
and everything works now..
suave mi a amigo ..!!!
haha =) si, al suave Dhrup
indeed it has been fixed. And learnt something new in the process. Cheers D.