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.
Add random thumbnail to each folder on index.php?
3stripe
✭✭
I'm trying to add a random image, or even hard code an image, to each folder listed on the main page.
I need to add something into $FileList - maybe somewhere after // Add actual folders... I think.... can anyone help?
(EDIT - Managed to hard code an image into the <li> loop, ok for now as I only have 1 folder at the moment, will look a bit stupid if I add any more folders!)
0
This discussion has been closed.
Comments
Yeah I think a random image from each sub directory would be nice as a start, or the option to choose the first image or something. However I know about this much php... . ..... so I can't take it any further myself.
I've stuck up the full code if anyone wants to have a peek : http://www.3stripe.net/beta/filebrowser_index.zip
If you have time to take a quick look tomorrow or whenever that would be sweet :-)
Anyhows here the chunk that I was messing about with:
//////////////////////////////////////////////////////////
// Add actual folders
$thumb = "
";
for ($i = 0; $i < count($FolderCollection); $i++) {
" . $thumb ."$Params->Set("did",FormatDelimitedString($Config->FolderIDs,$i,$Config->FolderDelimiter));
$FileList .= "
GetQueryString()."\">".$FolderCollection[$i]."
";
}
$FileList .= "\r\n";
}
//////////////////////////////////////////////////////////