rejetto forum

File Listing

nodosur · 11 · 8127

0 Members and 1 Guest are viewing this topic.

Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI
 ::)
Please adjust file list
goes all on one line
should do well ordered in the column
missing newline at the end of each line

*****************************************************
so goes:

File List of: http://nodosur.sytes.net/modelos/

File Date      File Size       Hits       Location
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
03/05/2009 17:46:40                 /modelos/DEMOS/04/10/2008 17:20:40     11,46 KB         8      /modelos/democ.html09/10/2008 12:48:38     24,35 KB         11      /modelos/demof.html09/10/2008 12:47:44     16,47 KB         5      /modelos/demoh.html09/10/2008 12:48:12     12,38 KB         6      /modelos/demot.html09/05/2009 18:50:58     24,75 KB         14      /modelos/demow.html- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5 File(s)
1 Folder(s)
89,40 KB







************************************************
and should go well:

File List of: http://nodosur.sytes.net/modelos/

File Date      File Size       Hits       Location
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
03/05/2009 17:46:40                 /modelos/DEMOS/
04/10/2008 17:20:40     11,46 KB         8      /modelos/democ.html
09/10/2008 12:48:38     24,35 KB         11      /modelos/demof.html
09/10/2008 12:47:44     16,47 KB         5      /modelos/demoh.html
09/10/2008 12:48:12     12,38 KB         6      /modelos/demot.html
09/05/2009 18:50:58     24,75 KB         14      /modelos/demow.html
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5 File(s)
1 Folder(s)
89,40 KB



**************************************

thanks 1000
Salu2 a To2
®


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
Add a <br /> in your filelist.tpl in the [file] (and [folder]) section after the last element %item-name%

-->
[file]
%item-modified%     %item-size%         %item-dl-count%      %item-folder%%item-name%<br />
your computer has no brain - use your own !


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
another (untested) solution may be to put {.mime|text/plain.} on top of it


Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI
sorry ....   insert the two codes indicate but the result is equal
Salu2 a To2
®


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
post the template you are using for the file list


Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI
it is the file filelist.tpl with add-ons indicated

--------------------------------------------------------

{.mime|text/plain.}
%files%
[files]
File List of: http://%host%%folder%

File Date      File Size       Hits       Location
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%list%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%number-files% File(s)
%number-folders% Folder(s)
%total-size%
[file]
%item-modified%     %item-size%         %item-dl-count%      %item-folder%%item-name%<br />
[folder]
%item-modified%                 %item-folder%%item-name%/<br />
Salu2 a To2
®


Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI
UPSssssss

change the contents of the indicated listing.tpl but now the list of files appears empty
Salu2 a To2
®


Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI
thanks....

re-edit the filelist.tpl with notepad
was tabulated and included some running
Salu2 a To2
®


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
forget my previous post and use the attached filelist.tpl , before making change , make a copy of the file.

it is not possible here to use some html code to obtain a plain/text, but it is possible by using hfs macros as :

Quote
{.mime|text/plain.}
%files%

[files]
File List of: http://%host%%folder%

File Date{.repeat|13|{: :}.}File Size{.repeat|4|{: :}.}Hits{.repeat|3|{: :}.}Location
{.repeat|60|{:- :}.}
%list%{.repeat|60|- .}
%number-files% File(s)
%number-folders% Folder(s)
%total-size%


[file]
%item-modified%{.repeat|3|{: :}.}%item-size%{.repeat|{.sub|13|{.length|%item-size%.}.}|{: :}.}%item-dl-count%{.repeat|{.sub|7|{.length|%item-dl-count%.}.}|{: :}.}%item-folder%%item-name%

[folder]
%item-modified%{.repeat|3|{: :}.}{.repeat|9|{:-:}.}{.repeat|4|{: :}.}{.repeat|4|{:-:}.}{.repeat|3|{: :}.}%item-folder%%item-name%/

[last line of filelist.tpl, do not remove]
made in Mars ;)

This little tpl will look can be to think about the addicts of the javascript, here it is that of the pure text with the resources of hfs
« Last Edit: August 28, 2009, 10:45:24 AM by Mars »


Offline nodosur

  • Occasional poster
  • *
    • Posts: 30
  • Mamá !... donde estoy ?...
    • View Profile
    • www.no2ur.com.ar .:. Nodo Sur .:. Diseño Web + Hosting + TI

Offline waskol

  • Occasional poster
  • *
    • Posts: 4
    • View Profile
Yes, I confirm, you have to add a blank line  ;)

Code: [Select]
%files%
[files]
%folder%
%number-folders%
%number-files%
%list%
[file]
%item-name%

[folder]
%item-name%/

(note the two blank lines)

Attached is the tpl file I use

Note : this tpl file permits a distant webserver to "ask" for a Directory listing (from a php code for instance) :
Code: [Select]
<?php
$httpServer 
"http://WWW.XXX.YYY.ZZZ/RootFolder/"//HFS server address + root folder to "view"
$dir_icon='<img style="border: none;vertical-align: middle;" src="'.CHEMIN.'inc/img/general/dir.gif" alt=" " />';
$up_icon='<img style="border: none;vertical-align: middle;" src="./img/top.gif" alt=" " />';
$file_icons='<img style="border: none;vertical-align: middle;" src="./img/{FileType}.gif" alt=" " />';
$excel_img="excel";
$word_img="word";
$zip_img="zip";
$pdf_img="acrobat";
$txt_img="text";
$uknw_im="unknown";
set_time_limit(160);

function 
MessageErreur($message){
    echo 
"Error, blabla, Thank you !";
}

$workingDir $httpServer;
$dossier_agent='';
$path="./";
if (isset(
$_GET['to']) && $_GET['to'] != '') {
$AFolder=stripslashes(urldecode($_GET['to'])); 
$path=$workingDir.rawurlencode($_GET['to']).'/';
echo "<b>Dossier de : </b>".ucwords(strtolower($AFolder)).'<hr />';  
$lines=array();
$lines=file($path.'~files.lst');            
$cfolder=$lines[0];
$n_folders=$lines[1];
$n_files=$lines[2];
$flist=array();
if($n_files!=0) {
$flist=array_slice($lines3+$n_folders);
sort($flist);
foreach($flist as $fname){   
$ext substr($fnamestrrpos($fname'.') + 1);
if ($ext=="xls"){$FileType="excel";}
elseif ($ext=="doc"){$FileType="word";}
elseif ($ext=="zip"){$FileType="zip";}
elseif ($ext=="pdf"){$FileType="acrobat";}
elseif ($ext=="txt"){$FileType="text";}
else{$FileType="unknown";}
$in = array ('{FileType}');
$out = array ($FileType);
$img str_replace ($in$out$file_icons);
echo '<a href="'.$httpServer.$AFolder.'/'.basename($fname).'" target="_blank">'.$img.' '.ucwords(strtolower(basename($fname))).'</a><br />';
}
}
else {
echo "Folder empty !";
}
echo '<br /><center><div style="text-align: center;"><button onclick="self.location.href=\'javascript:history.go(-1)\'" type="button">Back to folder list</button></div></center>';

}
else {
echo "<b>List of folders :</b><hr />\n";
$nav="";
for ($i="A"$i != "AA"$i++){
$nav.='  <a href="#letter'.$i.'">'.$i.'</a>&nbsp;'."\n";
}
echo $nav.'<br />';                           
$oldfirst=" ";
$lines=file($workingDir.'~files.lst');
$cfolder=$lines[0];
$n_folders=$lines[1];
$n_files=$lines[2];
$flist=array();
if($n_folders!=0){
$flist=array_slice($lines3$n_folders);
for($i=0;$i<$n_folders;$i++){
$s=trim($flist[$i]);
$flist[$i]=substr($s,0,-1);
}

foreach($flist as $fname){
//$fname=substr(
$first $fname[0];
/* Alpha Separator */
if($first!=$oldfirst){
echo '<br /><b><span style="width: 100%; font-size: 18px;">';
echo '<a name="letter'.$first.'" href="#top" title="Back to Top of page">'.$up_icon.'</a>'.$first;
echo '</span></b><hr width="100" />'."\n";
}
$oldfirst=$first;
echo '<a href="pcu.php?to='.urlencode($fname).'">'.$dir_icon.' '.ucwords(strtolower($fname)).'</a><br />'."\n";
}
}
else {
echo "Empty Folder !";
}
}

?>
« Last Edit: October 30, 2009, 03:17:32 PM by waskol »