From 2645f9c733fcab7491238c88a27826fb090aa6b0 Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Wed, 25 Jun 2025 21:40:34 -0600 Subject: guestbook reflects .well-known/button in your site also: - moved johnvertisement and mothverisement to landing page - minor css fixes and other routine updates --- about/index.php | 2 +- common.php | 2 +- etc/index.php | 22 +--------------------- guestbook/bg.jxl | Bin 664811 -> 0 bytes guestbook/comments.css | 10 +++++----- guestbook/comments.php | 12 +++++++++--- guestbook/index.php | 2 +- guestbook/submit.php | 33 +++++++++++++++++++++++++++++++++ index.php | 30 +++++++++++++++++++++++++----- links/index.php | 1 + notes/index.php | 2 +- notes/notes.atom | 23 ++++++++++++++++++++++- stats/index.php | 17 +++++++++-------- style.css | 33 ++++++++++++++++++++++++++++++--- 14 files changed, 139 insertions(+), 50 deletions(-) delete mode 100644 guestbook/bg.jxl diff --git a/about/index.php b/about/index.php index 52730b1..93441ee 100644 --- a/about/index.php +++ b/about/index.php @@ -76,7 +76,7 @@ Youtube for other stuff - deeptwistygaming + isopodgaming_ Twitch diff --git a/common.php b/common.php index 26b02e5..3100ca9 100644 --- a/common.php +++ b/common.php @@ -3,7 +3,7 @@ $datadir = "/var/www/data/isopoddotcool/"; # Common data for the various guestbook scripts -$defaultmodstatus = 0; # If 0, all posts will be held for review by default. +$defaultmodstatus = 1; # If 0, all posts will be held for review by default. # If 1, only posts containing the banned words defined in # $datadir/bannedwords.json will be held for review. $gbform_messages = array ( diff --git a/etc/index.php b/etc/index.php index f164f9a..d8259ef 100644 --- a/etc/index.php +++ b/etc/index.php @@ -6,24 +6,6 @@ More - @@ -32,9 +14,7 @@

more

more

- - + diff --git a/guestbook/bg.jxl b/guestbook/bg.jxl deleted file mode 100644 index a386f5e..0000000 Binary files a/guestbook/bg.jxl and /dev/null differ diff --git a/guestbook/comments.css b/guestbook/comments.css index 031320f..91628cf 100644 --- a/guestbook/comments.css +++ b/guestbook/comments.css @@ -12,7 +12,7 @@ form > table { margin-bottom: 1.5rem; } -article { +.comment { width: 100%; margin: 2rem auto; display: grid; @@ -24,7 +24,7 @@ article { 'gb-message gb-message gb-message' 'gb-reply gb-reply gb-reply'; } -article :is(h1,h2,h3,h4,h5,h6) { +.comment :is(h1,h2,h3,h4,h5,h6) { border: none; padding-left: initial; } @@ -86,7 +86,7 @@ input[type="submit"]:hover, input[type="reset"]:hover { .gb-index { text-align: right; } -.gb-cool { +.gb-cool, .gb-found { word-break: break-all; } .gb-name, .gb-date, .gb-index { @@ -105,11 +105,11 @@ input[type="submit"]:hover, input[type="reset"]:hover { border: 2px solid #00000033; border-bottom: 2px solid #888888; } - article { + .comment { margin: 2rem auto; } @media (max-width: 43rem) { - article { + .comment { grid-template-areas: 'gb-name gb-name gb-index' 'gb-date gb-date gb-date' diff --git a/guestbook/comments.php b/guestbook/comments.php index 3f65fb9..432c1d2 100644 --- a/guestbook/comments.php +++ b/guestbook/comments.php @@ -18,13 +18,19 @@ function echo_comments($page, $Parsedown = null) { $message = $Parsedown->text($post->message); $found = htmlentities($post->found); $website = $post->website; + $button = $post->button; $cool = $post->cool; $coolsanitized = htmlentities(preg_replace("/https?:\/\//i", "", $cool)); $reply = $Parsedown->text($post->reply); - $output = $output."
"; - if($website) { $output = $output."$name"; } - else { $output = $output.$name; } + $output = $output."
"; + if($website) { + if($button) { + $output = $output."$name"; + } else { + $output = $output."$name"; + } + } else { $output = $output.$name; } $output = $output."
$date
Entry #$index
"; if($cool) { $output = $output."
cool thing: $coolsanitized
"; diff --git a/guestbook/index.php b/guestbook/index.php index 8908e25..299bf96 100644 --- a/guestbook/index.php +++ b/guestbook/index.php @@ -22,7 +22,7 @@ error_reporting(E_ALL);

guestbook

-

say hi!

+

say hi

diff --git a/guestbook/submit.php b/guestbook/submit.php index 0e53fb3..bb745a2 100644 --- a/guestbook/submit.php +++ b/guestbook/submit.php @@ -52,6 +52,38 @@ error_reporting(E_ALL); $returnCode = "review"; } + $button = ""; // URL for the submitter's .well-known/button.json + if($_POST["website"]) { + $buttonjson = ""; + $buttonjsonurl = 'https://'.parse_url($_POST["website"], PHP_URL_HOST).'/.well-known/button.json'; + + $ch = curl_init($buttonjsonurl); + + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HEADER, 0); + + $buttonjson = curl_exec($ch); + if(curl_error($ch)) { + //echo curl_error($ch); + $buttonjson = ""; + } + curl_close($ch); + + if($buttonjson) { + $buttonobj = json_decode($buttonjson); + if($buttonobj->default) { + foreach ($buttonobj->buttons as $btn) { + if($btn->id === $buttonobj->default) { + $button = $btn->uri; + break; + } + } + } else { + $button = $buttonobj->buttons[0]->uri; + } + } + } + $currentPost = array( "entry" => $_POST["entry"], "sourceip" => $sourceip, @@ -61,6 +93,7 @@ error_reporting(E_ALL); "found" => $_POST["found"], "website" => $_POST["website"], + "button" => $button, "cool" => $_POST["cool"], "reply" => "", "modstatus" => $modstatus diff --git a/index.php b/index.php index 7ec1dd8..d7add18 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,16 @@ #guys > * { margin-right: var(--stdpadding); } + #ads { + position: fixed; + bottom: -181px; + left: 50%; + transform: translateX(-50%); + transition: 0.5s; + } + #ads:hover { + bottom: 0; + } #bubblecolumn { position: fixed; right: 7%; @@ -91,6 +101,11 @@ position: relative; } + iframe { + border: none; + border-left: var(--stdaccentborder); + } + @media (prefers-reduced-motion) { #bubblecolumn { display: none; @@ -107,10 +122,11 @@ justify-content: initial; height: initial; } - #guys { + #guys, #ads, #ads:hover { position: initial; bottom: initial; left: initial; + transform: initial; } body { display: flex; @@ -198,13 +214,17 @@ →
-
- isopod hours - deep twisty -
+
+
+ Unpaid advertising below! My apolo 90) { echo "cheese"; } else { echo "gies"; } ?>, but it's how we keep the lights on here at IsopodCoolGGMBH PBLLC. +
+ + +
+
An isopod! Kevin diff --git a/links/index.php b/links/index.php index fbb3c71..9a7c400 100644 --- a/links/index.php +++ b/links/index.php @@ -30,6 +30,7 @@ maia.crimew.gay Midnight Solarium +
diff --git a/notes/index.php b/notes/index.php index 9daaf25..e3398ae 100644 --- a/notes/index.php +++ b/notes/index.php @@ -45,7 +45,7 @@ error_reporting(E_ALL); - +

isonotes

superfluous commentary