Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Removing "Save" "Copy" and "Copy Image Tag" links

edited July 2006 in Vanilla 1.0 Help
I love filebrowser and would love it more if i could get rid of those "save" links above the image. Its not a huge deal but I would like to keep the images not AS acessable. If you know what I mean.


  • Options
    You'd have to use JavaScript to do this, :) but that can still be worked around pretty easily. :/
  • Options
    Do you know what the JavaScript is? Where to find it? :)
  • Options
    Pardon me, I'm just a little confused... :)

    You'll need to modify index.php, the function "FormatDisplayedItem", which starts on line 540.

    On lines 549 and 556, add to the very front of the line:

    on lines 552 and 633, add to the very front of the line:

    on line 552, change $Handled = false; to $Handled = true;
  • Options
    MarkMark Vanilla Staff
    edited July 2006
    You don't have to use javascript to remove them. If all you want to do is get rid of them...

    You can either do it with css by adding this to your _default.css file:

    .Options { display: none; }

    Or you can edit the index.php file and remove the links manually. Open up the file and search for "Save". At the second instance of save in the file, you will find this:

    <ul class=\"Options\"> <li class=\"Save\"><a href=\"".CurrentUrl().$Params->GetQueryString()."\">Save</a></li> <li class=\"Copy\"><a href=\"Javascript:copy(document.frmLinkContainer.Item$ItemID);\">Copy url</a></li>\r\n"; $Handled = false; $Params->Remove("gid"); switch ($HandlerMethod) { case "Image": $Handled = true; $Return .= "<input type=\"hidden\" name=\"ImgTag$ItemID\" value='<img src=\"".$EncodedPath."\" />' /> <li class=\"CopyImg\"><a href=\"Javascript:copy(document.frmLinkContainer.ImgTag$ItemID);\">Copy img tag</a></li> </ul>

    Just delete that and you're done.
  • Options
    Thanks guys that helps a bunch. Ill send you a link when its done so you can see whats going on.

    Also can I do something like that with the file name on the large image?

    And is there a way to sort images by date modified? That would help a whole bunch on updating the images and showing which ones are the most resent.

    Thanks again guys.
  • Options
    MarkMark Vanilla Staff
This discussion has been closed.