Compare commits
2 Commits
b679e911d5
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 1515a0067a | |||
| 775641dc36 |
@@ -17,7 +17,7 @@
|
|||||||
<img src="../img/blinkies/dontfeedtheai.gif" alt="">
|
<img src="../img/blinkies/dontfeedtheai.gif" alt="">
|
||||||
<img src="../img/blinkies/firefox_user.gif" alt="">
|
<img src="../img/blinkies/firefox_user.gif" alt="">
|
||||||
<img src="../img/blinkies/firefoxget.gif" alt="">
|
<img src="../img/blinkies/firefoxget.gif" alt="">
|
||||||
<img src="../img/blinkies/html junkie.gif" alt="">
|
<img src="../img/blinkies/htmljunkie.gif" alt="">
|
||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -19,16 +19,19 @@ function getFile(array $source){
|
|||||||
|
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($selected_source,$curl);
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the given sub-string given a initial search pattern, and a final end pattern.
|
// 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) {
|
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);
|
$end_pos = strpos($string,$end_pattern, $start_pos);
|
||||||
|
|
||||||
$extracted_string = substr($string, $start_pos, $end_pos - $start_pos);
|
$extracted_string = substr($string, $start_pos, $end_pos - $start_pos);
|
||||||
|
|
||||||
|
unset($start_pos,$end_pos);
|
||||||
return $extracted_string;
|
return $extracted_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,5 +39,7 @@ function extractString(string $string,string $start_pattern, string $end_pattern
|
|||||||
function scrapeWebsiteSites(array $source,string $start_pattern, string $end_pattern) {
|
function scrapeWebsiteSites(array $source,string $start_pattern, string $end_pattern) {
|
||||||
$script = getFile($source);
|
$script = getFile($source);
|
||||||
$websites = extractString($script,$start_pattern,$end_pattern);
|
$websites = extractString($script,$start_pattern,$end_pattern);
|
||||||
|
|
||||||
|
unset($script);
|
||||||
return $websites;
|
return $websites;
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
let transfemring = {
|
let transfemring = {
|
||||||
// sitelist (oldest to newest)
|
// sitelist (oldest to newest)
|
||||||
// strip the protocol off
|
// 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"
|
root: "https://fem.nz"
|
||||||
}
|
}
|
||||||
console.log(transfemring)
|
console.log(transfemring)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ $TRANSFEMRING_VALID_WIDGET_TYPES = ["transgender", "nonbinary"];
|
|||||||
|
|
||||||
// Personal identifiers/choices
|
// Personal identifiers/choices
|
||||||
$TRANSFEMRING_WIDGET_TYPE = $TRANSFEMRING_VALID_WIDGET_TYPES[1];
|
$TRANSFEMRING_WIDGET_TYPE = $TRANSFEMRING_VALID_WIDGET_TYPES[1];
|
||||||
$TRANSFEMRING_ID = 8;
|
$TRANSFEMRING_ID = 16;
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
function primarySplit(string $array) {
|
function primarySplit(string $array) {
|
||||||
@@ -51,6 +51,8 @@ function primarySplit(string $array) {
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($array,$start_pos,$end_pos,$item_len,$array);
|
||||||
return $return_array;
|
return $return_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,19 +89,37 @@ function secondarySplit(string $sub_array) {
|
|||||||
|
|
||||||
$sub_array = substr($sub_array,$sub_sub_array_len);
|
$sub_array = substr($sub_array,$sub_sub_array_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($sub_array, $value, $value_len, $value_start_pos, $value_end_pos, $key, $key_len, $key_start_pos, $key_end_pos, $keyhasQuotes, $sub_sub_array_len);
|
||||||
return $return_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 = scrapeWebsiteSites($TRANSFEMRING_SCRIPT_SOURCE,'sites: [',']');
|
||||||
$transfemring_sites = primarySplit($transfemring_sites);
|
$transfemring_sites = primarySplit($transfemring_sites);
|
||||||
for ($i = 0; $i < sizeof($transfemring_sites); $i++) {
|
for ($i = 0; $i < sizeof($transfemring_sites); $i++) {
|
||||||
$depured_transfemring_sites[$i] = secondarySplit($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;
|
$transfemring_sites = $depured_transfemring_sites;
|
||||||
|
unset($depured_transfemring_sites);
|
||||||
|
|
||||||
for ($i = 1; $i < count($transfemring_sites); $i++){
|
for ($i = 1; $i < count($transfemring_sites); $i++){
|
||||||
if ($transfemring_sites[$i]['id'] == $TRANSFEMRING_ID) {
|
if ($transfemring_sites[$i]['id'] == $TRANSFEMRING_ID) {
|
||||||
|
|
||||||
$transfem_prev = 'https://' . $transfemring_sites[($i-1)]["site_link"];
|
$transfem_prev = 'https://' . $transfemring_sites[($i-1)]["site_link"];
|
||||||
$transfem_current = 'https://' . $transfemring_sites[($i)]["site_link"];
|
$transfem_current = 'https://' . $transfemring_sites[($i)]["site_link"];
|
||||||
$transfem_next = 'https://' . $transfemring_sites[($i+1)]["site_link"];
|
$transfem_next = 'https://' . $transfemring_sites[($i+1)]["site_link"];
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ function transingSplit(string $array) {
|
|||||||
$array = substr($array,0,-1);
|
$array = substr($array,0,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = strpos($array,'/',1);
|
|
||||||
|
|
||||||
if (strpos($array,'/',1) > 1 or strpos($array,'/',1) == FALSE) {
|
if (strpos($array,'/',1) > 1 or strpos($array,'/',1) == FALSE) {
|
||||||
$commented=FALSE;
|
$commented=FALSE;
|
||||||
} else {
|
} else {
|
||||||
@@ -88,6 +86,7 @@ function transingSplit(string $array) {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($i, $array, $commented, $start_pos, $end_pos, $item_len);
|
||||||
return $return_array;
|
return $return_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user