forked from 20xd6/simple_blog
Remove formatting from directory list
This commit is contained in:
parent
1cf4ffface
commit
4929ea5eb8
@ -41,12 +41,8 @@ if (file_exists($dir) && is_dir($dir) ) {
|
|||||||
}
|
}
|
||||||
if (sizeof($file_array) != 0){
|
if (sizeof($file_array) != 0){
|
||||||
foreach($file_array as $file) {//Renders the folder names as more readable titles.
|
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('_',' ',$file);//Remove undersores and replace them with spaces
|
||||||
$link_title = str_replace($_replace,'',$link_title);
|
$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.
|
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user