Compare commits
No commits in common. "master" and "issue#18" have entirely different histories.
@ -5,10 +5,6 @@
|
|||||||
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
|
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-->";
|
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){
|
function read_tags($tags_file){
|
||||||
if (filesize($tags_file) == 0){
|
|
||||||
echo "<br/>\n<br/>";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$tags_csv = array_map('str_getcsv', file('tags.csv'));
|
$tags_csv = array_map('str_getcsv', file('tags.csv'));
|
||||||
$tags_rows = sizeof($tags_csv);
|
$tags_rows = sizeof($tags_csv);
|
||||||
$tags_coloums = sizeof($tags_csv[0]);
|
$tags_coloums = sizeof($tags_csv[0]);
|
||||||
@ -53,8 +49,6 @@
|
|||||||
$empty_csv = fopen("tags.csv", "w") or die("Cannot write new tags.csv file.");
|
$empty_csv = fopen("tags.csv", "w") or die("Cannot write new tags.csv file.");
|
||||||
fwrite($empty_csv, "");
|
fwrite($empty_csv, "");
|
||||||
fclose($empty_csv);
|
fclose($empty_csv);
|
||||||
chmod('./tags.csv', 0666);
|
|
||||||
read_tags('tags.csv');
|
|
||||||
}
|
}
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||||
?>
|
?>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
echo "\n</div><!--End of print-content div-->\n";
|
echo "\n</div><!--End of print-content div-->\n";
|
||||||
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
|
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
|
||||||
if (file_exists('author') && (filesize('author') != 0)){
|
if (file_exists('author')){
|
||||||
$author_name_raw = fopen('author', 'r');
|
$author_name_raw = fopen('author', 'r');
|
||||||
$author_name = fread($author_name_raw, filesize('author'));
|
$author_name = fread($author_name_raw, filesize('author'));
|
||||||
$author_name = str_replace("\n", "", $author_name);
|
$author_name = str_replace("\n", "", $author_name);
|
||||||
@ -31,6 +31,9 @@
|
|||||||
echo "<div class =\"byline\">\n"
|
echo "<div class =\"byline\">\n"
|
||||||
. read_md($byline_path)
|
. read_md($byline_path)
|
||||||
."</div><!--End byline div-->\n";
|
."</div><!--End byline div-->\n";
|
||||||
|
} else {
|
||||||
|
echo "<h2>No byline</h2>";
|
||||||
|
echo "<p>$byline_path</p>";
|
||||||
}
|
}
|
||||||
fclose($author_name_raw);
|
fclose($author_name_raw);
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,20 @@
|
|||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<?php
|
<?php
|
||||||
//Sets the page title based on the name of the current directory
|
//Sets the page title based on the name of the current directory
|
||||||
function Title() {
|
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);
|
||||||
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
||||||
|
//~ echo($page_title);
|
||||||
if(strtolower($page_title) == 'index'){
|
if(strtolower($page_title) == 'index'){
|
||||||
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
||||||
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
|
//~ echo($page_path);
|
||||||
|
//~ $folder_name = sizeof($page_path);
|
||||||
$folder_name = explode("/", trim($page_path, "/"));
|
$folder_name = explode("/", trim($page_path, "/"));
|
||||||
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
||||||
} elseif(strtolower($page_title) == 'homepage'){
|
} elseif(strtolower($page_title) == 'homepage'){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user