Skip to content
Permalink
Browse files

v3.0.7 - Improve Drive & Shared indexes.

-v3.0.7.
-Drive and shared indexes now truncate long filenames.
-Truncation involves chopping the middle out of long names and replacing it with '... '.
-This allows enough room for favorite and shared icons as well as filename, and gives extra long names a breakpoint.
-Add title and alt text to all table row items.
-I need to figure out a way to purge Shared index files from a users Cloud drive.
  • Loading branch information...
zelon88 committed Mar 7, 2019
1 parent 665e9c1 commit a0cff7589e08f76aa80a177a0781e27aa89792a3
Showing with 10 additions and 6 deletions.
  1. +10 −6 Applications/displaydirectorycontents_shared/.index.php
@@ -48,7 +48,11 @@
if (substr("$dirArray[$index]", 0, 1) != $hide) {
$favicon = "";
$class = "file";
$name = $dirArray[$index];
$name = $namehref = $shortName = str_replace('//', '/', str_replace('///', '/', $dirArray[$index]));
$nameLength = $fixedLength = strlen($name);
if ($nameLength > 35) {
$shortName = substr($name, 0, 24).'...'.substr($name, ($nameLength-8), $nameLength);
$fixedLength = strlen($shortName); }
foreach ($DangerousFiles as $DangerousFile) {
if (strpos($name, $DangerousFile) == TRUE) continue 2; }
$namehref = $dirArray[$index];
@@ -121,11 +125,11 @@
$size = "Unknown"; }
if (in_array($name, $defaultApps)) continue;
echo("<tr class='$class'>
<td><a href='$namehref'$favicon class='name'>$name</a></td>
<td><a href='$namehref'>$extn</a></td>
<td><div><input type='checkbox' name='corePostSelect[]' id='$namehref' value='$name'></div></td>
<td sorttable_customkey='$sizekey'><a href='./$namehref'>$size</a></td>
<td sorttable_customkey='$timekey'><a href='./$namehref'>$modtime</a></td></tr>");
<td title='$name' alt='$name'><a href='$namehref'$favicon class='name'>$shortName</a></td>
<td title='$name' alt='$extn'><a href='$namehref'>$extn</a></td>
<td title='Select \"$name\"' alt='Select \"$name\"'><div><input type='checkbox' name='corePostSelect[]' id='$namehref' value='$name'></div></td>
<td title='$size' alt='$size' sorttable_customkey='$sizekey'><a href='./$namehref'>$size</a></td>
<td title='$modtime' alt='$modtime' sorttable_customkey='$timekey'><a href='./$namehref'>$modtime</a></td></tr>");
$fileCounter++; } } ?>
</tbody>
</table>

0 comments on commit a0cff75

Please sign in to comment.
You can’t perform that action at this time.