commit 3de342a61a15bbf079ed61aad5f2d7506bade875
parent 328e36b4ce43a6ac2d60cdbb27861b2f740cc7a5
Author: Nixx <nixx@firemail.cc>
Date: Fri, 29 Jan 2021 00:19:29 +0000
Explicitly set date rather than rely on reading last mod
Diffstat:
7 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/includes/archive.php b/includes/archive.php
@@ -22,11 +22,11 @@ function archive ($includearr) {
echo '</colgroup>';
echo '<tr>';
echo '<th>Title</th>';
- echo '<th>Date Modified</th>';
+ echo '<th>Date</th>';
echo '</tr>';
foreach ($includearr as $post) {
$link = $post[0];
- $mod = date('Y.m.d H:i', $post[1]);
+ $mod = $post[1];
$title = file_get_contents($link);
$linkarr = explode("/", $link);
$linkarr[sizeof($linkarr) - 1] = "_index.php?post=" . $linkarr[sizeof($linkarr) - 1];
@@ -48,12 +48,9 @@ function archive ($includearr) {
continue;
}
}
- #if (isset($_GET['search']) && !preg_match("/{$_GET['search']}/i", $title)) {
- # continue;
- #}
echo '<tr>';
echo '<td><a href="'.$link.'">'.$title.'</a></td>';
- echo '<td>'.$mod.' GMT</td>';
+ echo '<td>'.$mod.'</td>';
echo '</tr>';
}
echo '</table>';
diff --git a/includes/article-end.php b/includes/article-end.php
@@ -1,11 +1,4 @@
<?php
- $workdir=getcwd();
- if (strpos($workdir, '/Other') !== false) {
- $curfile=explode('/', $_SERVER['REQUEST_URI'])[2];
- echo '<b>'.date('Y.m.d H:i', filemtime($workdir.'/'.$curfile)).' GMT</b>';
- } else {
- echo '<b>'.date('Y.m.d H:i', filemtime($workdir.'/'.$_GET['post'])).' GMT</b>';
- }
echo '</div>';
require $root."includes/end.php";
?>
diff --git a/includes/default-start.php b/includes/default-start.php
@@ -19,16 +19,16 @@ function getFileList($dir) {
if(is_dir("{$dir}{$entry}")) {
$retval[] = [
'name' => "{$dir}{$entry}/",
- 'type' => filetype("{$dir}{$entry}"),
- 'size' => 0,
- 'lastmod' => filemtime("{$dir}{$entry}")
+ //'type' => filetype("{$dir}{$entry}"),
+ //'size' => 0,
+ //'lastmod' => filemtime("{$dir}{$entry}")
];
} elseif(is_readable("{$dir}{$entry}")) {
$retval[] = [
'name' => "{$dir}{$entry}",
- 'type' => mime_content_type("{$dir}{$entry}"),
- 'size' => filesize("{$dir}{$entry}"),
- 'lastmod' => filemtime("{$dir}{$entry}")
+ //'type' => mime_content_type("{$dir}{$entry}"),
+ //'size' => filesize("{$dir}{$entry}"),
+ //'lastmod' => filemtime("{$dir}{$entry}")
];
}
}
@@ -46,7 +46,13 @@ foreach ($scanfiles as $scan) {
$filearr = getFileList($scan);
foreach ($filearr as $file) {
if (!preg_match("/{$indexfile}/", $file['name']) && preg_match("/.php/", $file['name'])) {
- $includearr[$inc] = array($file['name'], $file['lastmod']);
+ $filedate = file_get_contents('./'.$file['name']);
+ $filedate = explode('<p class="datetext">', $filedate)[1];
+ $filedate = explode('</p>', $filedate)[0];
+ if ($filedate == '') {
+ $filedate = 0;
+ }
+ $includearr[$inc] = array($file['name'], $filedate);
$inc = $inc + 1;
}
}
diff --git a/includes/section-end.php b/includes/section-end.php
@@ -1,6 +1,6 @@
<?php
echo '<span class="seemore">';
- echo '<b><span class="seedate">'.date('Y.m.d H:i', $includearr[$inc][1]).' GMT</span></b>';
+ echo '<b><span class="seedate">'.$includearr[$inc][1].'</span></b>';
echo '<a class="seemorelink" href="'.$seemorepath.'">Article Page</a>';
echo '</span>';
echo '</div>';
diff --git a/includes/subdirs.php b/includes/subdirs.php
@@ -8,8 +8,8 @@
}
} elseif ($root == "../../") {
$upperdirs = getFileList("../");
- # Media subdirs to block, until I put something in them
- $mediaarray = array("Anime");
+ # Subdirs to block
+ $blockarray = array();
foreach ($upperdirs as $dir) {
if ($dir['type'] == "dir") {
$dirname = explode("/", $dir['name'])[1];
@@ -17,7 +17,7 @@
if ($cwd[sizeof($cwd) - 1] == $dirname) {
echo '<span class="greyed">'.$dirname.'</span> ';
# Blocking
- } elseif (in_array($dirname, $mediaarray)) {
+ } elseif (in_array($dirname, $blockarray)) {
echo '';
} else {
echo '<a href="'.$dir['name'].$indexfile.'">'.$dirname.'</a> ';
diff --git a/index.php b/index.php
@@ -10,6 +10,13 @@ require $root."includes/start-meta.php";
<style type="text/css">
html, body {margin: 0; height: 100%; overflow: hidden}
</style>
+ <meta property="og:type" content="website" />
+ <meta property="og:title" content="~$>connect" />
+ <meta property="og:image" content="/images/banner.gif" />
+ <meta property="og:image:type" content="image/gif" />
+ <meta property="og:image:width" content="240" />
+ <meta property="og:image:height" content="60" />
+
</head>
<body>
<h1><span><a href="home.php">~$>connect</a></span></h1>
diff --git a/styles/default.css b/styles/default.css
@@ -505,15 +505,10 @@ input[type="submit" i] {
margin: 2px;
}
-/* POST TEXT GLOWS
-.section > p, .article > p {
- text-shadow: 0 0 3px var(--fg-col);
-}
-
-.section > p > a, .article > p > a {
- text-shadow: none !important;
+.datetext {
+ text-align: center;
+ font-weight: bold;
}
-*/
@keyframes notgood {
0% {