3 Commits

Author SHA1 Message Date
5016fa8ce8 Cleanup header.php
Cleanup debugging code for issue #10
2022-07-31 17:10:41 -04:00
206f94f5db Fix variable being tested for empty file in PR #21 2022-07-27 22:11:36 -04:00
7ff2cf1d0f Resolve issue #9 (#21) 2022-07-27 20:17:34 -04:00
2 changed files with 2 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
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-->";
function read_tags($tags_file){
if (filesize($tags_vile) == 0){
if (filesize($tags_file) == 0){
echo "<br/>\n<br/>";
return;
}

View File

@@ -2,20 +2,11 @@
<html lang="en-US">
<?php
//Sets the page title based on the name of the current directory
function Title() {//Needs cleanup.
//~ $new_title = $_SERVER['REQUEST_URI'];
//~ $new_title = preg_replace("/^^\//i", "", $new_title);
//~ $new_title = preg_replace("/\//i", "", $new_title);
//~ $page_title = $_SERVER['REQUEST_URI'];
//~ $page_title = preg_replace("/^(.*)\//i", "", $page_title);
function Title() {
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
//~ echo($page_title);
if(strtolower($page_title) == 'index'){
parse_str($_SERVER['REQUEST_URI'], $page_uri);
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
//~ echo($page_path);
//~ $folder_name = sizeof($page_path);
$folder_name = explode("/", trim($page_path, "/"));
$page_title = $folder_name[(sizeof($folder_name) - 1)];
} elseif(strtolower($page_title) == 'homepage'){