add canonical url to web page, take down mailman API while mailman is broken on the server

This commit is contained in:
ohsqueezy 2024-03-05 14:42:46 -05:00
parent 616aa93bc3
commit da0458e0a9
5 changed files with 44 additions and 38 deletions

BIN
www/Scrapeboard_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

View File

@ -39,12 +39,13 @@
<meta property="og:type" content="website">
<title>Scrapeboard 🛹💥</title>
<link rel="stylesheet" href="www/style.css" type="text/css" />
<link rel="canonical" href="https://scrape.nugget.fun" />
</head>
<body>
<!-- ************************************************************ NEWS POP-UP ***************************************************************** -->
<!-- **************************************************** NEWS POP-UP ****************************************************** -->
<style>
div#banner
@ -81,7 +82,7 @@
</div>
-->
<!-- ****************************************************** AUTOPLAY HEADER VIDEO ************************************************************* -->
<!-- *********************************** AUTOPLAY HEADER VIDEO **************************************************** -->
<style>
@ -113,7 +114,8 @@
});
</script>
<video id="landing_video" autoplay muted disablepictureinpicture disableremoteplayback loop="true">
<video id="landing_video" autoplay muted disablepictureinpicture disableremoteplayback loop="true"
poster="www/Scrapeboard_pictureinpicture_still_1.png">
<source src="www/scrapeboard_new.webm">
</video>
@ -190,7 +192,7 @@
<img src="www/koolMan.gif" />
</div>
<!-- ************************************************************ ONE LINE DESCRIPTION ******************************************************** -->
<!-- ******************************************* ONE LINE DESCRIPTION ********************************************** -->
<style>
@ -252,7 +254,7 @@
<img id="head_2" src="www/ad_head_transparent_2.png" />
</div>
<!-- **************************************************************** GIFS ************************************************************** -->
<!-- ************************************************ GIFS ******************************************************** -->
<style>
@ -300,7 +302,7 @@
<a href="www/Boarding_3.gif" id="boarding_4"><img src="www/Boarding_3_thumb.gif" /></a>
</div>
<!-- ********************************************************** HOW TO PLAY *************************************************************** -->
<!-- ************************************************ HOW TO PLAY ********************************************************* -->
<style>
@ -417,7 +419,7 @@
<img src="www/ad_description_transparent_3.png" />
</div>
<!-- ***************************************************************** CALENDAR ************************************************************* -->
<!-- ***************************************************** CALENDAR ***************************************************** -->
<style>
/* landscape */
@ -485,10 +487,10 @@
<div id="calendar">
<p>
Play Scrapeboard at an upcoming event!
<!-- Check back soon for upcoming events! -->
<!-- Play Scrapeboard at an upcoming event! -->
Check back soon for upcoming events!
</p>
<div class="date current">
<div class="date past">
<div class="day-of-week">
Thu. - Sun.
</div>
@ -916,15 +918,15 @@
onclick="subscribe(document.querySelector('#mailing-list-form #email-box').value);">Join</button>
</div>
<div id="mailing-list-archives">
[<a href="https://nugget.fun/mailman3/hyperkitty/list/scrapeboard-list@nugget.fun/">check past announcements</a>]
</div>
<!-- <div id="mailing-list-archives">
[<a href="https://nugget.fun/mailman3/hyperkitty/list/scrapeboard-list@nugget.fun/">check past announcements</a>]
</div>
-->
<p class="emotes">
d(⌒ー⌒) (❁´◡`❁) ヽ(^Д^)ノ (。>‿‿<。 (*´∇`)ノ (●⌒v⌒●) ´・ᴗ・` (✿^-^) ヾ(^ヮ^) d(⌒ー⌒) (❁´◡`) (^Д^) (。>‿‿< (*´∇`)
</p>
<!-- ************************************************************ PROMO VIDEO **************************************************************** -->
<!-- ************************************************ PROMO VIDEO ***************************************************** -->
<div id="comedy">
<iframe src="https://www.youtube.com/embed/ai9WlJdfbvI" frameborder="0"
@ -989,7 +991,7 @@
</iframe>
-->
<!-- ************************************************************ FOLLOW BUTTONS ************************************************************* -->
<!-- ***************************************** FOLLOW BUTTONS ********************************************* -->
<p id="credits-heading">
Follow the developers!
@ -1010,7 +1012,7 @@
</p>
</div>
<!-- *************************************************************** NEWS ********************************************************* -->
<!-- *************************************************** NEWS ************************************************** -->
<style>
div#news

View File

@ -90,13 +90,16 @@ function submit_request_to_mailman($request, $method = "GET", $post_data = array
}
/* Start a response array that will be output as JSON and get the log directory */
$response = submit_request_to_mailman("system/configuration/paths.debian");
// commented out while mailman is down:
// $response = submit_request_to_mailman("system/configuration/paths.debian");
if ($response["success"])
{
// if ($response["success"])
// {
/* Use the mailman-web log since www-data has write permission and record the input */
$log_directory = $response["log_dir"];
$log_path = $log_directory . "/web/mailman-web.log";
// $log_directory = $response["log_dir"];
// $log_path = $log_directory . "/web/mailman-web.log";
$response = array("success" => false, "message" => "");
$log_path = "/home/frank/scrapeboard_mail_signups.txt"; // temporary while mailman is down
file_put_contents(
$log_path, "[" . date(DATE_RFC2822) . "] Processing subscription request with input " . json_encode($_POST) . "\n", FILE_APPEND);
@ -117,24 +120,25 @@ if ($response["success"])
else
{
/* Skip the verification, confirmation, and approval emails, and subscribe the submitted address */
$subscription_response = submit_request_to_mailman(
"members", "POST", array(
'list_id' => MAILING_LIST_ID,
'subscriber' => $sanitized_email,
'pre_verified' => true,
'pre_confirmed' => true,
'pre_approved' => true));
// commented out while mailman3 is down
// $subscription_response = submit_request_to_mailman(
// "members", "POST", array(
// 'list_id' => MAILING_LIST_ID,
// 'subscriber' => $sanitized_email,
// 'pre_verified' => true,
// 'pre_confirmed' => true,
// 'pre_approved' => true));
if ($subscription_response["success"])
{
// if ($subscription_response["success"])
// {
$response["success"] = true;
$response["message"] = "Added $sanitized_email to " . MAILING_LIST_ID;
}
else
{
/* Merge in the API request response, which will contain the error information */
$response = array_merge($response, $subscription_response);
}
// }
// else
// {
// /* Merge in the API request response, which will contain the error information */
// $response = array_merge($response, $subscription_response);
// }
}
}
else
@ -142,7 +146,7 @@ if ($response["success"])
$response["success"] = false;
$response["message"] = "No email address to subscribe was provided";
}
}
// }
/* Log the response internally, set the JSON output header, and output JSON for the client */
file_put_contents($log_path, "[" . date(DATE_RFC2822) . "] Final response is " . json_encode($response) . "\n", FILE_APPEND);