Remove formatting from directory list

This commit is contained in:
manfromhuh 2022-07-15 21:09:05 -04:00
parent 1cf4ffface
commit 4929ea5eb8

View File

@ -41,12 +41,8 @@ if (file_exists($dir) && is_dir($dir) ) {
}
if (sizeof($file_array) != 0){
foreach($file_array as $file) {//Renders the folder names as more readable titles.
$_replace = array('.php', '.html', '.htm');//Remove file extensions from webpages.
$link_title = str_replace('_',' ',$file);//Remove undersores and replace them with spaces
$link_title = str_replace($_replace,'',$link_title);
$link_title = ucwords($link_title);//Set the first letter of each word to upercase.
$link_title = get_month_name($link_title);//
$link_title = remove_sorting_number($link_title);//Removes the number used to keep articles in post order from the displayed title.
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
}
} else {