Controlling the "Download" files button..

Greetings Community:   Is there a way to control the "Download" button that appears by default for uploaded files? For the project I'm working on, inviting download is not always desirable.  Sometimes photographers do not want their work downloaded, only reviewed and/or commented on...  It can potentially become a copyright issue for them and other media producers.  Of course someone can still take the image by other means, but this level of control would be a great feature enhancement.

If toggling the "Download" button On/Off is possible with 1.5, at what granular level can it be accomplished?  All users, specific users, single, or all groups, etc?   I know there is file access control built into Elgg, but controlling this level of access should be an option for certain types of projects; no matter what the access level is for the file.  Image theft is a huge problem on the web..

Looking forward to all feedback on this... Thanks in advance!

  • @Malaga Jack:  Very well put. You hit it (conceptually) right on the nose...  I've been watching Elgg since 2007 and I understand the Educational/Asset sharing concept behind Elgg, but I think this level of control would greatly improve it's viability for a wider array of community oriented solutions...

  • @Marcus - Like I stated in my last post I just found this out when I installed the plugin Custom Styles. To experiment - download the custom Style plugin on a test elgg install.

    Edit your custom style for your personal profile

    Add a Background

    Then try and lift the background off the page You will see that its is blocked. I have not looked into the code @ all to see why downloading and/or copying/stealing the background is prevented but I found that feature by accient.

  • @Dhrup, we each have our own goals and purposes. I don't see need to belittle others. Marcus is not an idiot. He knows people can figure out ways to get images. I think the point being pressed is one out of idiology.

    @Malaga Jack - I think what you said is very good. You make strong point, regarding other social networks.

    I think even for regular social networks, it is just highly unusual to have download buttons or links. It encourages people to download and store other user's photos for instance. I think it should be toggled and I think the default should be set to off. If someone wants to toggle it on, at least it is their choice.

  • @The Father: I'm gonna look into that as a possible approach for a solution. Will be setting up another test install in short order..

    @Ukr:  Thanks for your input.. Glad to be getting feedback from others on this topic and appreciate everyone's participation in this discussion.  Elgg is a great platform and has evolved in an incredible way and I'm very excited about it.  I totally agree with your last statement and am thinking that the Toggle should be at the individual file level since the file widget handles multiple file formats, some of which are made to be downloaded and shared, like Word documents & PDF's, etc...

  • Interesting developments here, or should I say digression... Everyone one of us here has a means of messaging each other directly through their profile page... Please don't corrupt this thread with personal attacks  ~Thanks!

    I started this discussion to solicit constructive feedback from community members who have more Elgg experience and knowledge than I do on this subject.  I know there and many here that do have this level of knowledge.. 

    Staying on topic could yield some great results that we all could benefit from and it's with that Spirit that I'm eager to receive constructive feedback from others on "How To Toggle The "Download" Files Button Off/On" as mentioned above...


  • Hi Marcus, If you just remove the "download this" link from there I think that would be ok. Then at least you are not inviting anyone to download. To remove the link:

    Delete "  <div class="filerepo_download"><p><a href="<?php echo $vars['url']; ?>action/file/download?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div>  " from line 157th of this file "elgg1.5\mod\file\views\default\object\file.php". Hope that helps.

  • Yes

    Thank you I will check this out

  • @bossumon

    that will most likely remove the genn'd html d/l button but you know it is really a "hack" and as soon as one installs a newer versionor plugins need to change their behaviour or their elgg function calls -- site will break ;-O

  • @Drup

    Yes this is a core hack but a very clean hack. When you upgrade to a newer version the download button will apear again. You just will have to remove that again. thats it. And there is no chance of a broken site.

  • @Marcus Tremble

    Make sure you back up the whole file mod before doing this just incase you mess it up. And as Dhrup advised It is a core hack and you gotta consider that point.

    Go to elgg1.5\mod\file\views\rss\object\file.php and remove following line at line 29 to stop rss file download link.

    <enclosure url="<?php echo $vars['url']; ?>action/file/download?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" />

    To stop the image from opening in a new window go to line 90 of elgg1.5\elgg1.5\mod\file\views\default\object\file.php and replace the following lines

    <a href="<?php echo $vars['url']; ?>action/file/download?file_guid=<?php echo $file_guid; ?>"><?php
                            echo elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid));

    With this

                            echo elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid));