Hello,
I'm french and i'm customize an Elgg.
I added a plugin widget to play all mp3 i upload in File. It's working perfectly, but only for all the mp3s uploaded in File BY ONE SINGLE USER : the user who take the plugin on his profile.
What i want is to have the same plugin which could play all the mp3s added in File, from all users.
I hope you understand what i'm saying.
The code seems simple (for someone who wants to help me, cause for me it's just undescriptible code).
//the page owner
$owner = $vars['entity']->owner_guid;
//The maximum mp3 files on playlist
$number = 100;
$playlist = "";
$titles = "";
//get the user's files
$files = get_user_objects($vars['entity']->owner_guid, "file", $number, 0);
//if there are some files, go get them
if ($files)
{
//display in list mode
foreach($files as $f) {
$mime = $f->mimetype;
if (file_get_general_file_type($mime) == "audio") {
if ($playlist) {
$playlist = $playlist . '|';
$titles = $titles . '|';
}
$playlist = $playlist . $vars['url'] . 'action/file/download?file_guid=' . $f->guid;
$titles = $titles . $f->title;
}
}
}
else
{
echo elgg_echo("No Files");
}
Can someone explain me this code and explain me what i have to change to get what i want please ?
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.