Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 015c5ef6db | |||
| 4958a76f9a | |||
| b01c237d5d |
@@ -4,34 +4,6 @@
|
||||
|
||||
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
|
||||
echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->";
|
||||
|
||||
//if(file_exists("tags.csv")){
|
||||
//echo "<ul id=\"tag_menu\">\n";
|
||||
//$csv = array_map('str_getcsv', file("tags.csv"));
|
||||
//array_walk($csv, function(&$a) use ($csv) {
|
||||
//$a = array_combine($csv[0], $a);
|
||||
//});
|
||||
//array_shift($csv); # remove column header
|
||||
//foreach ($csv as $row){
|
||||
//$counter = 0;
|
||||
//foreach ($row as $item){
|
||||
//$counter++;
|
||||
//if ($counter == 1){
|
||||
//echo "\t<li id=\"" . $item . "\">" . $item . " <a id=\"" . $item . "\"></a>\n";
|
||||
//} elseif ($counter % 2 == 0) {
|
||||
//if ($item == ""){
|
||||
//break;
|
||||
//} else {
|
||||
//echo "\t\t<ol><a href=\"" . $item . "\">";
|
||||
//}
|
||||
//} elseif ($counter % 2 != 0) {
|
||||
//echo $item . "</a></ol>\n";
|
||||
//}
|
||||
//}
|
||||
//echo "\t</li>\n";
|
||||
//}
|
||||
//echo "</ul>\n";
|
||||
//}
|
||||
function read_tags($tags_file){
|
||||
$tags_csv = array_map('str_getcsv', file('tags.csv'));
|
||||
$tags_rows = sizeof($tags_csv);
|
||||
|
||||
@@ -18,11 +18,12 @@ function remove_sorting_number($link_title){
|
||||
$dir = '.';
|
||||
// Check if the directory exists
|
||||
if (file_exists($dir) && is_dir($dir) ) {
|
||||
// Get the files of the directory as an array
|
||||
$scan_arr = scandir($dir);
|
||||
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
||||
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
||||
// Get each files of our directory with line break
|
||||
// Get the files of the directory as an array
|
||||
$scan_arr = scandir($dir);
|
||||
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
||||
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
||||
// Get each files of our directory with line break
|
||||
if (sizeof($files_arr) != 0 ) {
|
||||
foreach ($files_arr as $file) {
|
||||
//Get the file path
|
||||
$file_path = "./".$file;
|
||||
@@ -41,6 +42,7 @@ if (file_exists($dir) && is_dir($dir) ) {
|
||||
$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 {
|
||||
echo "Directory does not exists";
|
||||
|
||||
Reference in New Issue
Block a user