Smart Files v1.0.0

Release Notes

Version 1.0.0, released 27th October, 2010* Inital release

  • this is great - p.s. thanks for the easy reading docs!  very clear and the Troubleshooting and FAQ are fun to read :)

  • This is great! Thank you Andras!!

  • wow woW wOW WOW :)

    Thanks Buddy :)

    Impressive :)


    HaPPy ElGGinG :)

    Do GooD :)


  • This sounds great! Was just curious: is the content is passed out to the service and then returned?

    How does that fit in if some content is only shared between a select number of users or private?

  • @Sam -( it's all in the documentation), I tested on my site if I choose not to override elgg access rules, then private content will not embed.

  • Thanks for the positive feedbacks, everyone. I hope that will come up a solution for making the embed sharing secure (like locked to a domain) and then I'll jump on it.

    @Susan: thanks for mentioning and referencing the doc. I always try to make a point of preparing useful docs for my code, it feels nice to know that some of you appreciate this effort.

  • I was looking for something similar to and your plugin is very cool.

    for now I see there are some problems to load big file, I'm trying with pdf of 30 pages and something comes wrong

    thanks for this great plugin!

  • this plugin is not working for me in 1.7.4 - 

    the box displays but no document appears - instead I see 'We're sorry, the URL InvalidURLError could not be loaded. Please verify you have entered it correctly.'.

    i searched for 'InvalidURLError' but there were no hits.

    is this likely to be an issue with embeditin or with the elgg plugin?



  • n.b. this is running on my laptop - elgg174.localhost - perhaps that is related to the issue.. perhaps not.

  • Hi Andras :)

    Thanks for the great plugin and a beautifully explained documentation

    Eventhough you have documented about the speed issues, I have a small question :)

    You have said in the documentation that -
    "This speed issue is only present when viewing embeds (or their thumbnails) for the first time.
    Once a given individual file or gallery page was visited, the embeds and thumbnails will be
    available without the need for any further uploads."

    Well, consider this Im the admin of the site and I upload some files,
    and I view each one of the individual file so that their thumbnails get created,
    so it wont slow down for thumbnail creation.

    Being done that do only I will get the faster thumbnail creation or all the users or anyone who views the files get faster thumbnail creation ?
    Does thumbnail gets created for each user for an existing and already viewed file ?

    If as an admin I go around and view all the files uploaded by the members and thus get the thumbnails created, will that reduce the time next time some other user views it ?

    Where is this thumbnail cached ?

    and did I confuse you hehehe :)


    HaPPy ElGGInG :)

    Do GooD :)


  • This is truly excellent plugin!

    I believe you can ajust your privacy settings in the start.php by entering your URL.

    In   /mod/smartfiles/start.php

    (line 133)

    "allowed_url" => ""    // Small hack suggested by Jeff Seibert Jr at to disable public display

    The file ebedded can then only be viewed in your site.

  • Let me add my 2 cents.  Wow.

    Nicely done.  Installed perfectly. The manual is professional. Great.


  • i have a file content don't display in inline(embed).You have any suggestions for me.I'm using ELGG_1.7.3 .Thanks so much.

  • @lord55: has an upload limit of 20MB / file. My guess would be that either your file exceeded that, or somehow the network between your server and the server was not fast enough to deliver the file within your max_execution_time php setting. For the latter, you can try to increase the max_execution time value in your php_ini. Or rather in your .htaccess, so it would work on a per directory base (add this to your .htaccess file: php_value max_execution_time 300)

    And as for me, I'll add to my todo list to check the file size before trying to upload it to

  • @tunist: Thanks for this report and I'm happy to say that you actually answered your own question ;)

    This plugin will only work if your Elgg site is available at a public location. will try to download the file from your Elgg server - if it does not have a public site address, or it's protected by any  other means than the usual Elgg access/login restriction (like htaccess authentication), then will not be able to get the file. So "elgg174.localhost" will not work, I'm afraid.

    I'll add this to the FAQ, thanks for pointing it out.

  • aha! thanks for explaining; i'll leave the testing until the site is public then. :)

  • @jaxcatz: Glad you like it! As for your questions:

    "Being done that do only I will get the faster thumbnail creation or all the users or anyone who views the files get faster thumbnail creation ? "

    Upload of a file to happens only one time. Either when the Elgg file is created (if the plugin setting "auto-create" is enabled), or when the file is viewed by any user, regardless of who owns the given file.  So if john.doe uploads a file, and you as admin view it for the first time, the file will be uploaded to when you visit the file page, and will stay there forever. No further uploads necessary. So yes, "all the users or anyone who views the files get faster thumbnail creation"

    "Does thumbnail gets created for each user for an existing and already viewed file ?"

    Nope, see above. One time file upload, one time embed and thumbnail creation, visible for all users (if Elgg access permits).

    "If as an admin I go around and view all the files uploaded by the members and thus get the thumbnails created, will that reduce the time next time some other user views it ?"

    Exactly! You're getting the hang of this :)

    "Where is this thumbnail cached ?"

    When uploaded to, all files will get a unique 10-character identifier. Assuming that the identifier returned by is "7VmUSzo8Je", the location of the embed file will be "" and the location of the thumbnail will be ""

    "and did I confuse you hehehe :)"

    Nope, I'm still good LOL.

  • @Canterbury: Thanks, appreciate it! As for you suggestion, I've tried to use the allowed_url parameter propertly in the request, i.e. I set it to $CONFIG->wwwroot. Unfortunately, this does not work properly. When restricting the file view to your domain, the file will only shows up on the page, when you're logged in at with the same identifier and in the same browser, meaning that it is actually not available for your website's users. Here is what Jeff Seibert Jr said about this issue:

    "Hi András,

    We're thinking of removing the allowed_url parameter since, you're right, it doesn't really work. It used to work, but newer versions of Flash combined with newer browser versions have stopped passing accurate Referrer information so we are unable to tell what page the site is loading on. 

    I would recommend passing allowed_url = / so disable the embed from displaying on publicly, but it's otherwise not reliable to restrict it just to your site"
    However, I've spent some time since trying to figure out a way to lock embed views to a certain domain, and I think I figured out a solution. I'll check today with Jeff if they are willing to implement this security feature on their side. Will keep you posted here.
  • @lina nguyen: I'm sorry, you will have to be a lot more specific, otherwise I won't be able to figure out what might cause your problem. Please follow these steps to be able to resolve your issue:

    1. See my answer on this page above to tunist, and check if this applies to your site.

    2. If not, check the file mime type, as suggested by the documentation.

    3. Check if there is any error on screen or in the php errors log file, if yes, post it here

    4. Attach a screenshot.

    The plugin works fine in Elgg 1.7.3 for me, and apparently for a number of other people.

  • Everyone: thanks for all the feedback and the recommendation votes! Seeing this much interest in the plugin, I'll try to keep it updated and supported as much as possible.

  • @Andras :i checked type file the same as suggested by you documentation. my file .docx, xls.x,pdf.  you can see it here:

  • @lina: please send me a private message with some credentials for your site (user, pwd). The link you pasted here will not work unless I'm logged in to your site (guess you set the file access to "logged in users"

  • @lina: Sent you private message here on the site.

  • I have noticed that when Smart Files is activated it interferes with Westors download counter and the number of downloads that was before displayed next to each file disappears.


  • Category: Media
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3394
  • Recommendations: 5

Other Projects

View Andras Szepeshazi's plugins