defult elgg File plugin issue

I have seen an issue in the file plugin. if you post any image using file plugin its works fine (it means actual file show even at river and on the landing page).

But if you post any other file like flash, mp3 or video . file plugin shown you the defult image of the elgg not the actual file. Because of this user never able to see the actual file other than images.

Can you please help me in getting the path of the file which user posted? I want when user insert the other files also in the system instead of the default image actual file should come.

  • swf is not flv (video). Therefore, video plugins won't work. I've played a bit trying to get it work by writing a little plugin. Unfortunately, no luck so far...

  • @@ thanks for your effort.

    What I identify from the issue is this is something related to file path. But I am not very sure on this as other files like video and mp3 are playing fine.

    I am trying below code to get the file path and flash file is not working but other files like video\mp3 is working fine(this path I am using in the video plugin).

    Not working URL for flash(othr files working with same code) :-$url1 = elgg_get_site_url() . "mod/file/download.php?file_guid=$file_guid";

    But when I try to give below path directly flash file works. this is the actual path where my flash file is stored its working .

     Working :- $download_url = 'http://localhost/data/2013/02/12/789/file/myContent.swf';


    I think if I can get the correct file path flash file will work. But then how video\mp3 is working this making me nuts. :( :( :(

  • Hello ,

    Any suggestions on this flash files(swf files)..

    Now I am trying to create the plugin with "adobe flash player " but it seems adobe flash player works in different way as other player like jw player works any suggestion not able to proceed on this either. :( :(


  • First you need to confirm that the mime-type is being detected properly.

    Once that's the case I would use embed_extender with a custom view for that mimetype.  I have a fork of it just for that purpose - it allows embed_extender to embed content from the files plugin just by using a url (how you would for youtube).

  • Note - it's been a while since I set that up with the local embedding - I think it may also require this

  • Thanks matt ,

    I have already create a view "x-shockwave-flash" in "views\default\file\specialcontent\application\" x-shockwave-flash.php

    but its not working.  we already tired this before even we are already using embed extender from cash its working fine for other files like video \mp3 but i am able to play the flash file .

    below is the code to get the file path which is not working

    Not working URL :-$url1 = elgg_get_site_url() . "mod/file/download.php?file_guid=$file_guid";

    But when I try to give below path directly flash file works.

     working :- $download_url = 'http://localhost/data/2013/02/12/789/file/myContent.swf';

     * Display Flash
     * @uses $vars['entity']
    $file = $vars['entity'];
    $originalfilename = $file->originalfilename;
    $file_created = $file->time_created;
    $filename = $file_created.$originalfilename;
    $file_guid = $file->getGUID();

    $file_path = elgg_get_site_url() . 'file/download/' . $file_guid;
    $file_path2 = $file_path2 ."/".$originalfilename;

    if ($vars['full_view']) {
    echo "<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"480\" HEIGHT=\"400\"
    CODEBASE=\",0,0,0\" ID=\"$filename\">
    <PARAM NAME=\"MOVIE\" VALUE=\"$filename\">
    <PARAM NAME=\"PLAY\" VALUE=\"true\">
    <PARAM NAME=\"LOOP\" VALUE=\"true\">
    <PARAM NAME=\"QUALITY\" VALUE=\"high\">
    <PARAM NAME=\"SCALE\" value=\"noborder\">
    <EMBED SRC=\"$file_path\" NAME=\"$filename\" WIDTH=\"480\" HEIGHT=\"400\" PLAY=\"true\" LOOP=\"true\" QUALITY=\"high\"  TYPE=\"application/x-shockwave-flash\" scale=\"noborder\" PLUGINSPAGE=\"\">

  • I think I've tried quite the same, i.e. creating a view including an embed block to display the swf file on site. I don't know if the path to the swf file is the problem. When using

    $file_guid = $vars['file_guid'];
    $swf_url = elgg_get_site_url() . "mod/file/download.php?file_guid=" . $file_guid;

    and echoing $swf_url it gave the correct url. It didn't work for me when hard-coding the url either. When I entered the url in the browser I was able to download the swf file.

    I also added a application/x-shockwave-flash.php and I think Elgg does identify the mime type correctly as my view gets loaded. The problem seems to be the embed code and/or Flash plugin in browser. I see the box with the defined  size where the swf should show up to be loaded but the Flash plugin reports "Movie not loaded". So, I think - at least in my case - the mime type is not correctly transmitted to the Flash plugin.

    Before I tried it with the embed code I tried this small JS script: It failed to work either but as I later found out maybe due to some error on my site. Maybe you want to give it a try.

  • My version of embed extender has specific changes to allow for embedding from within the local site.  Cash's version is only for third party providers.

  • @@ Matt,

    I have tried your plugin also. plus I tried lot more other thing it does not work. I think there is somehting to do with elgg mine type.

    @ iinoly, thanks for you time.

  • Hi All,

    Does anyone get any solution for Flash issue..