Quote:
Originally Posted by v12kid
not sure if I missed it but are you going to add a feature where we can upload the screenshot/thumb when entering a new file into the system? If this already exists please excuse me
great hack!
|
That feature doesn't exist at the moment, you need to add them afterwards
Quote:
Originally Posted by MotMann
@ RS_Jelle first, thank's for the nice support
But, there are more than 6 Screens in one row and the Style is not correct right now.
|
I wrote it a bit too quick and missed some things

What I did wrong: I first do the $count +1 and then there's the check. So if $count is 5, it becomes 6 and then there's the check wich resets it (so no new line for the images)

For the layout: I forgot the </tr></table>.
Final:
PHP Code:
$dimages .= '<table cellpadding="0" cellspacing="1" border="0"><tr>';
$countnumber = 6;
$count = 1;
while ($image = $db->fetch_array($result))
{
if (($permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditallfiles']) OR
(($permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditownfiles']) AND
(($image['uploaderid'] == $vbulletin->userinfo['userid']) AND ($file['uploaderid'] == $vbulletin->userinfo['userid']))))
{
$edit = '[<a href="./downloads.php?do=file&id='.$file['id'].'&act=delimg&img='.$image['id'].'" onclick="return delete_it()">'.$vbphrase['delete'].'</a>]';
}
if (file_exists($dl->url.$image['thumb']))
{
if ($count == $countnumber)
{
$dimages . '<tr>';
}
$dimages .= '<td class="smallfont"><a href="'.$dl->url.$image['name'].'"><img src="'.$dl->url.$image['thumb'].'" alt="'.$file['name'].'" title="'.$file['name'].'" border="0" /></a><br />by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
if ($count == $countnumber)
{
$dimages . '</tr>';
}
}
else
{
if ($count == $countnumber)
{
$dimages . '<tr>';
}
$dimages .= '<td class="smallfont"><a href="'.$dl->url.$image['name'].'">'.$image['name'].'</a><br />by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
if ($count == $countnumber)
{
$dimages . '</tr>';
}
}
if ($count == $countnumber)
{
$count = 1;
}
$count = $count+1;
}
$dimages .= '</tr></table>';