Filesize in fileviewer
Filesize in fileviewer
Dont know if this is mentioned before,
but it would be nice if the filesize of the files in the file viewer
was displayd?? for each file and total size
Just a suggestion
Sample:
but it would be nice if the filesize of the files in the file viewer
was displayd?? for each file and total size
Just a suggestion
Sample:
Re: Filesize in fileviewer
first shot: 90% is possible with core at once!joransrb wrote: but it would be nice if the filesize of the files in the file viewer
was displayd?? for each file and total size
Code: Select all
#
#---[OPEN]---
#
include/inc_lib/files.private-filelist.inc.php
#
#---[FIND]---
#
//Button zum Downloaden der Datei
echo "<a href="include/inc_act/act_download.php?dl=".$file_row["f_id"].
#
#---[REPLACE WITH]---
#
//Button zum Downloaden der Datei
echo fsizelong($file_row["f_size"])." <a href="include/inc_act/act_download.php?dl=".$file_row["f_id"].
#------[4the rest]--------
#
...will be follow: i write an function in the moment... must be testet first ...
... or someone find the second shot in the core...
Erfahrung ist das, was man besitzt, kurz nach dem es gebraucht wurde.
Warning: I have no foggiest idea of English/German, but I do
-ha{p}{p}y day/night/dia/noche-
Warning: I have no foggiest idea of English/German, but I do
-ha{p}{p}y day/night/dia/noche-
:YES:brans wrote:ouhm what do you mean by second shot ? the total size ?
[edit->]
function ready ! where is the best place 4?
Code: Select all
function getPrivatFileSize()
{
global $db;
$sQuery = 'SELECT SUM(f_size) as summe FROM '.DB_PREPEND.'phpwcms_file
WHERE f_public=1 AND f_aktiv=1 AND f_kid=1 AND f_trash=0 AND f_uid='.$_SESSION[wcs_user_id];
$hResult = mysql_query($sQuery);
if ($hResult)
{
$row=mysql_fetch_object($hResult);
return ($row?$row->summe:0);
}
return 0;
}//end-fnc
Code: Select all
#
#---[FIND]---
#
}
} //Ende Liste Dateien
#
#---[BEFORE, ADD]---
#
echo '<tr><td colspan="2">'.fsizelong(getPrivatFileSize()).'</td>
</tr>'."\n";
Erfahrung ist das, was man besitzt, kurz nach dem es gebraucht wurde.
Warning: I have no foggiest idea of English/German, but I do
-ha{p}{p}y day/night/dia/noche-
Warning: I have no foggiest idea of English/German, but I do
-ha{p}{p}y day/night/dia/noche-