diff --git a/includes/common_webrings.inc.php b/includes/common_webrings.inc.php index 50d0f5e..c301f3d 100644 --- a/includes/common_webrings.inc.php +++ b/includes/common_webrings.inc.php @@ -26,7 +26,7 @@ function getFile(array $source){ // Returns the given sub-string given a initial search pattern, and a final end pattern. function extractString(string $string,string $start_pattern, string $end_pattern) { - $start_pos = strpos($string,$start_pattern,strlen($start_pattern)); + $start_pos = strpos($string,$start_pattern,strlen($start_pattern)) + strlen($start_pattern); $end_pos = strpos($string,$end_pattern, $start_pos); $extracted_string = substr($string, $start_pos, $end_pos - $start_pos); diff --git a/includes/transfemwebring.js b/includes/transfemwebring.js index 8d1a386..14f931b 100644 --- a/includes/transfemwebring.js +++ b/includes/transfemwebring.js @@ -7,7 +7,7 @@ let transfemring = { // sitelist (oldest to newest) // strip the protocol off - sites: [{"id":1,"description":"You're here!","site_link":"fem.nz","author":"me","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:09.659Z","updated_at":"2025-10-07T08:10:09.659Z"},{"id":2,"description":"transfem webdev :p","site_link":"skyler.lol","author":"Skyler!","in_the_ring":false,"notes":"","created_at":"2025-10-07T08:10:35.275Z","updated_at":"2025-10-07T08:10:35.275Z"},{"id":3,"description":"just a personal site for music, musings, and blog posts! ran by a transfem enby :)","site_link":"transferns.neocities.org","author":"Andie/Fern","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:57.429Z","updated_at":"2025-12-11T02:14:39.833Z"},{"id":4,"description":"the most evil and repulsive website on planet earth","site_link":"cresentri.com","author":"cresentri","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:11:30.742Z","updated_at":"2025-10-07T08:11:30.883Z"},{"id":5,"description":"i'm messing around with trying to learn how to use html for somewhat interesting things i guess","site_link":"iseel.neocities.org","author":"IseeL","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:12:18.126Z","updated_at":"2025-10-07T08:29:03.148Z"},{"id":6,"description":"Just a place for me to share info about my projects and talk about things i enjoy \u003c3","site_link":"vivslakes.moe","author":"Viv","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:13:05.476Z","updated_at":"2025-10-07T08:13:05.567Z"},{"id":7,"description":"all kinds of things!","site_link":"fionaruthbo.neocities.org","author":"Fiona Ruthbo","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:14:16.412Z","updated_at":"2025-10-07T08:14:16.428Z"},{"id":8,"description":"Poetry, halftones, and Twitchy.","site_link":"klara.nz","author":"me!","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:39:07.132Z","updated_at":"2025-10-07T08:57:26.399Z"},{"id":9,"description":"a little birdie on the internet :)","site_link":"kestrel.pet","author":"Kestrel","in_the_ring":true,"notes":"","created_at":"2025-11-15T06:57:16.625Z","updated_at":"2025-11-15T06:57:26.268Z"},{"id":10,"description":"autistic artist musician webdev dragon(girl?)thing; very gay; rawr","site_link":"ytd.wtf","author":"Yuri the Dragon","in_the_ring":true,"notes":"","created_at":"2025-12-30T09:57:00.232Z","updated_at":"2025-12-30T11:19:58.022Z"},{"id":11,"description":"This website runs on my living room heater","site_link":"izzy.kiwi","author":"Just Izzy","in_the_ring":false,"notes":"","created_at":"2025-12-30T11:19:12.953Z","updated_at":"2026-01-01T02:54:57.059Z"},{"id":12,"description":"a dump for all of my projects and adhd thoughts","site_link":"ikelene.dev","author":"Ikelene","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:52:44.443Z","updated_at":"2026-01-23T01:52:44.463Z"},{"id":13,"description":"contains my mind space, which includes gaming, references, easter eggs, art, programming, etc!","site_link":"theabsoluterealm.com","author":"ezra","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:54:27.672Z","updated_at":"2026-01-23T01:56:27.520Z"},{"id":14,"description":"Just a trans girl that likes radios, computers, creative freedom, art, etc not much more to it!","site_link":"cafepots.neocities.org","author":"Cafe_Pots","in_the_ring":true,"notes":"","created_at":"2026-01-30T08:36:39.133Z","updated_at":"2026-01-30T08:36:51.946Z"},{"id":15,"description":"Extension of my cute, sparkley, sprinkle filled transfem brain! ദ്ദി◝ ⩊ ◜)","site_link":"winzpir.neocities.org","author":"Winzpir/Angel","in_the_ring":true,"notes":"","created_at":"2026-02-20T01:31:47.843Z","updated_at":"2026-02-20T01:31:47.843Z"}], + sites: [{"id":1,"description":"You're here!","site_link":"fem.nz","author":"me","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:09.659Z","updated_at":"2025-10-07T08:10:09.659Z"},{"id":2,"description":"transfem webdev :p","site_link":"skyler.lol","author":"Skyler!","in_the_ring":false,"notes":"","created_at":"2025-10-07T08:10:35.275Z","updated_at":"2025-10-07T08:10:35.275Z"},{"id":3,"description":"just a personal site for music, musings, and blog posts! ran by a transfem enby :)","site_link":"transferns.neocities.org","author":"Andie/Fern","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:57.429Z","updated_at":"2025-12-11T02:14:39.833Z"},{"id":4,"description":"the most evil and repulsive website on planet earth","site_link":"cresentri.com","author":"cresentri","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:11:30.742Z","updated_at":"2025-10-07T08:11:30.883Z"},{"id":5,"description":"i'm messing around with trying to learn how to use html for somewhat interesting things i guess","site_link":"iseel.neocities.org","author":"IseeL","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:12:18.126Z","updated_at":"2025-10-07T08:29:03.148Z"},{"id":6,"description":"Just a place for me to share info about my projects and talk about things i enjoy \u003c3","site_link":"vivslakes.moe","author":"Viv","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:13:05.476Z","updated_at":"2025-10-07T08:13:05.567Z"},{"id":7,"description":"all kinds of things!","site_link":"fionaruthbo.neocities.org","author":"Fiona Ruthbo","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:14:16.412Z","updated_at":"2025-10-07T08:14:16.428Z"},{"id":8,"description":"Poetry, halftones, and Twitchy.","site_link":"klara.nz","author":"me!","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:39:07.132Z","updated_at":"2025-10-07T08:57:26.399Z"},{"id":9,"description":"a little birdie on the internet :)","site_link":"kestrel.pet","author":"Kestrel","in_the_ring":true,"notes":"","created_at":"2025-11-15T06:57:16.625Z","updated_at":"2025-11-15T06:57:26.268Z"},{"id":10,"description":"autistic artist musician webdev dragon(girl?)thing; very gay; rawr","site_link":"ytd.wtf","author":"Yuri the Dragon","in_the_ring":true,"notes":"","created_at":"2025-12-30T09:57:00.232Z","updated_at":"2025-12-30T11:19:58.022Z"},{"id":11,"description":"This website runs on my living room heater","site_link":"izzy.kiwi","author":"Just Izzy","in_the_ring":false,"notes":"","created_at":"2025-12-30T11:19:12.953Z","updated_at":"2026-01-01T02:54:57.059Z"},{"id":12,"description":"a dump for all of my projects and adhd thoughts","site_link":"ikelene.dev","author":"Ikelene","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:52:44.443Z","updated_at":"2026-01-23T01:52:44.463Z"},{"id":13,"description":"contains my mind space, which includes gaming, references, easter eggs, art, programming, etc!","site_link":"theabsoluterealm.com","author":"ezra","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:54:27.672Z","updated_at":"2026-01-23T01:56:27.520Z"},{"id":14,"description":"Just a trans girl that likes radios, computers, creative freedom, art, etc not much more to it!","site_link":"cafepots.neocities.org","author":"Cafe_Pots","in_the_ring":true,"notes":"","created_at":"2026-01-30T08:36:39.133Z","updated_at":"2026-01-30T08:36:51.946Z"},{"id":15,"description":"Extension of my cute, sparkley, sprinkle filled transfem brain! ദ്ദി◝ ⩊ ◜)","site_link":"winzpir.neocities.org","author":"Winzpir/Angel","in_the_ring":true,"notes":"","created_at":"2026-02-20T01:31:47.843Z","updated_at":"2026-02-20T01:31:47.843Z"},{"id":16,"description":"Personal site - my ttrpg's, writing and other experiment","site_link":"tiiimezombie.neocities.org","author":"Val","in_the_ring":true,"notes":"","created_at":"2026-03-19T05:48:10.093Z","updated_at":"2026-03-19T05:48:10.115Z"},{"id":17,"description":"my little cozy place on the internet :p","site_link":"ethernal.win","author":"masiv_","in_the_ring":false,"notes":"","created_at":"2026-03-19T05:49:01.290Z","updated_at":"2026-03-19T05:55:08.612Z"}], root: "https://fem.nz" } console.log(transfemring) diff --git a/includes/transfemwebring_contr.inc.php b/includes/transfemwebring_contr.inc.php index 1ce26c7..0e2648a 100644 --- a/includes/transfemwebring_contr.inc.php +++ b/includes/transfemwebring_contr.inc.php @@ -29,7 +29,7 @@ $TRANSFEMRING_VALID_WIDGET_TYPES = ["transgender", "nonbinary"]; // Personal identifiers/choices $TRANSFEMRING_WIDGET_TYPE = $TRANSFEMRING_VALID_WIDGET_TYPES[1]; -$TRANSFEMRING_ID = 8; +$TRANSFEMRING_ID = 16; // Functions function primarySplit(string $array) { @@ -94,17 +94,32 @@ function secondarySplit(string $sub_array) { return $return_sub_array; } +function excludeNonactive(array $sites) { + for ($i = 1; $i < count($sites); $i++){ + if ($sites[$i]['in_the_ring'] === "false") { + array_splice($sites,$i,1); + } + } + return $sites; +} + +function addEdge(array $array) { + $array[count($array)] = $array[0]; + return $array; +} + $transfemring_sites = scrapeWebsiteSites($TRANSFEMRING_SCRIPT_SOURCE,'sites: [',']'); $transfemring_sites = primarySplit($transfemring_sites); for ($i = 0; $i < sizeof($transfemring_sites); $i++) { $depured_transfemring_sites[$i] = secondarySplit($transfemring_sites[$i]); } +$depured_transfemring_sites = excludeNonactive($depured_transfemring_sites); +$depured_transfemring_sites = addEdge($depured_transfemring_sites); $transfemring_sites = $depured_transfemring_sites; unset($depured_transfemring_sites); for ($i = 1; $i < count($transfemring_sites); $i++){ if ($transfemring_sites[$i]['id'] == $TRANSFEMRING_ID) { - $transfem_prev = 'https://' . $transfemring_sites[($i-1)]["site_link"]; $transfem_current = 'https://' . $transfemring_sites[($i)]["site_link"]; $transfem_next = 'https://' . $transfemring_sites[($i+1)]["site_link"]; diff --git a/includes/transingtheinternet_contr.inc.php b/includes/transingtheinternet_contr.inc.php index 391fa8f..224c654 100644 --- a/includes/transingtheinternet_contr.inc.php +++ b/includes/transingtheinternet_contr.inc.php @@ -86,7 +86,7 @@ function transingSplit(string $array) { $i++; } - unset($array, $commented, $start_pos, $end_pos, $item_len); + unset($i, $array, $commented, $start_pos, $end_pos, $item_len); return $return_array; }