WebRing Fediverse.Radio

A webring (or web ring) is a collection of websites linked together in a circular structure, and usually organized around a specific theme, often educational or social. [Wikipedia]

All of these sites are run by people on The Fediverse and are about Amateur Radio.

If you want to find Fediverse servers, try Fediverse.Radio.

Navigate the ring

Join the ring

  1. Contact @M0YNG@mastodon.radio with your site URL
  2. Add the code to your site
  3. Change "YOURSITEKEYHERE" to your site key, usually your domain

<nav>
    Fediverse.Radio Web Ring<br/>
    <a href="https://ring.fediverse.radio/ring.php?site=YOURSITEKEYHERE&direction=previous">← Back</a>
    <a href="https://ring.fediverse.radio/ring.php?site=YOURSITEKEYHERE&direction=random">↑ Random</a>
    <a href="https://ring.fediverse.radio">↓ Ring Home</a>
    <a href="https://ring.fediverse.radio/ring.php?site=YOURSITEKEYHERE&direction=next">Next →</a>
</nav>
    

Note: the 'site' parameter is only required to locate your site in the ring, so we can find the previous/next site. It's not logged. But you do need to set it, usually to your domain.

The Sites

There are 6 sites

  1. M0YNG.uk (@M0YNG@mastodon.radio)
    M0YNG is the callsign of a radio amateur in Gloucestershire. This is a smolnet version of their website available via Gopher and Gemini and HTTP.
  2. F1RUM.fr (@F1RUM@mastodon.radio)
    My name is Jean-Pierre Morfin Cholat. I am radio amateur and this site groups publications too long to be posted on Mastodon
  3. N3VEM Blog (@N3VEM@mastodon.radio)
    Vance Martin, Amateur Extra callsign N3VEM. I am a thirty something (pushing 40…) husband and father, who happens to love ham radio!
  4. Mike Zero Romeo Victor Bravo (@M0RVB@mastodon.radio)
    Mike Zero Romeo Victor Bravo
  5. K8VSY amateur radio blog (@k8vsy@mastodon.radio)
    musings of an amateur radio enthusiast
  6. KC8JC blog (@KC3JXQ@mastodon.radio)
    This is a very simple and sporadically updated blog about my adventures in amateur radio

Ring Code

This ring is coded in PHP, because it was already there. The exact code used to run the ring right now is:


<?php

// load in the knwon sites
$ringData = file_get_contents("sites.json");
$ringSites = json_decode($ringData, true);

try {
    // check we were given a source site and direction
    if ($_GET['direction'] && $_GET['site']) {
        // check the site is one we know about
        if (array_key_exists($_GET['site'], $ringSites)) {
            $currentSite = $ringSites[$_GET['site']];
        } else {
            throw new Exception('Specified site not known');
        }
        // try navigating the ring
        if ($_GET['direction'] === 'previous') {
            $ringSite = nextElement($ringSites, $_GET['site'], true);
        } elseif ($_GET['direction'] === 'random') {
            $ringSite = $ringSites[array_rand($ringSites, 1)];
        } elseif ($_GET['direction'] === 'next') {
            $ringSite = nextElement($ringSites, $_GET['site'], false);
        } else {
            throw new Exception('Direction not specified or not understood');
        }
    } else {
        throw new Exception('Direction or Site not specified');
    }
} catch (Exception $e) {
    // Let the user know what went wrong
    echo "<p>" . $e->getMessage() . "<br/><a href='/'>Maybe try the ring homepage</a>?";
    return;
}

// Assuming nothing went wrong, navigate the ring!
header('Location: ' . $ringSite['url']);

echo "Coming from: " . $currentSite["name"] . "</br>";

echo "Going to: " . $ringSite["name"] . " (<a href='" . $ringSite['url'] . "'>" . $ringSite['url'] . "</a>)</br>" . $ringSite["description"];

function nextElement(array $array, $currentKey, $previous)
{
    if (!isset($array[$currentKey])) {
        return false;
    }
    $nextElement = false;
    // flip the array if we're going backwards
    if ($previous) {
        $array = array_reverse($array);
    }
    foreach ($array as $key => $item) {
        $nextElement = next($array);
        if ($key == $currentKey) {
            break;
        }
    }

    if (!$nextElement) {
        $nextElement = reset($array);
    }

    return $nextElement;
}