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.
Icons to Represent Non-Images
aaronkeuper
New
Would someone be able to show me how to apply a custom icon to different filetypes (non-images; images can just use thumbnailer.php).
It doesn't have to be unique per document, just 1 blanket icon for text, 1 for movies, 1 for html etc... which I could design.
I just want to change the "no preview available" icon and I'll be all set.
-Aaron
0
This discussion has been closed.
Comments
I removed lines 662 - 666:
$Return .= "<li class=\"ItemThumb NoPreview\">" ."<a href=\"".CurrentUrl().$Params->GetQueryString()."\">" ."Preview Unavailable" ."</a>" ."</li>";
in the FormatListItem function and replaced it with this:
$CurrFileExt = substr(strrchr($Name, '.'), 1, strlen($Name)); $ValidThumbExt = array("doc", "txt", "rtf", "pdf"); if (in_array ($CurrFileExt, $ValidThumbExt)) { $ThumbPath = EncodeLinkUrl($CurrFileExt.".png"); $Return .= "<li class=\"ItemThumb\">" ."<a href=\"".CurrentUrl().$Params->GetQueryString()."\" style=\"background:url('".$ThumbPath."') center center no-repeat;\">" ."<img src=\"".$ThumbPath."\" border=\"0\" alt=\"\" />" ."</a>" ."</li>\r\n"; } else { $Return .= "<li class=\"ItemThumb NoPreview\">" ."<a href=\"".CurrentUrl().$Params->GetQueryString()."\">" ."Preview Unavailable" ."</a>" ."</li>"; }
Feel free to see it in action, along with "wrap long filenames" at http://web.usf.edu/FacultySenate/ay0607/meetings/index.php?fpp=10&did=1-0.