1
0
Fork 1

Tagging and links

pull/29/head
gravel 1 year ago
parent 3fdd0b7325
commit 3f115c62cf
Signed by: gravel
SSH Key Fingerprint: SHA256:p4HP49CCk4YQMkJpWJ09L8peEPQWjERtdCRAFxPfbOY

@ -1,3 +1,4 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/svg+xml" href="favicon.svg" sizes="any">
<link rel="icon" type="image/svg+xml" href="favicon.svg" sizes="any">
<meta name="keywords" content="Session, Community, Anonymous, Chat">

@ -6,7 +6,7 @@
// Join URL contents are not guaranteed to have visible text.
return $id != "qr" && $id != "preview" && $id != "join_url";
}
function sort_onclick($colno) {
global $TABLE_COLUMNS;
$column = $TABLE_COLUMNS[$colno];
@ -14,7 +14,7 @@
$name = $column['name'];
return " onclick='sortTable($colno)' title='Click to sort by $name'";
}
$TABLE_COLUMNS = [
['id' => "identifier", 'name' => "Identifier"],
['id' => "language", 'name' => "L"],
@ -54,15 +54,15 @@
$hostname = explode("/", $hostname)[0];
?>
<tr id="<?=$id?>">
<td class="td_identifier"><?=$id?></td>
<tr id="<?=$id?>" itemscope itemtype="https://schema.org/EntryPoint">
<td class="td_identifier" itemprop="identifier"><?=$id?></td>
<td class="td_language"><?=$room->language?></td>
<td class="td_name"><?=$room->name?></td>
<td class="td_description"
<td class="td_name" itemprop="name"><?=$room->name?></td>
<td class="td_description" itemprop="description"
><?=$room->description?></td>
<td class="td_users"><?=$room->active_users?></td>
<td class="td_preview">
<a href="<?=$room->preview_link?>" target="_blank" rel="noopener noreferrer">
<td class="td_preview" itemprop="url">
<a href="<?=$room->preview_link?>" target="_blank" rel="noopener noreferrer nofollow">
<?php if (str_starts_with($room->preview_link, 'http://')): ?>
<span class="protocol-indicator protocol-http">HTTP</span>
<?php endif; ?>
@ -72,16 +72,17 @@
</a>
</td>
<td class="td_qr_code">
<img
class="qr-code-icon"
<img
class="qr-code-icon"
src="qrcode-solid.svg"
onclick='displayQRModal("<?=$id?>")'
alt="Pictogram of a QR code"
>
</td>
<td class="td_server_icon"
<td class="td_server_icon"
data-token="<?=$token?>"
title="<?=$hostname?> (<?=$token?>)"
item="image"
>
<div class="td_server_icon-circle" style="background-color: <?=$icon_color?>">
<span><?=strtoupper($token[0] . $token[1])?></span>
@ -91,7 +92,7 @@
<div class="join_url_container" data-url="<?=$room->join_link?>">
<span class="join_url show-from-w5" title="<?=$room->join_link?>"
><?=truncate($room->join_link, 32)?></span>
<a class="noscript" href="<?=$room->join_link?>"
<a class="noscript" href="<?=$room->join_link?>" rel="external nofollow"
>Copy link</a>
</div>
</td>

@ -13,6 +13,7 @@
<head>
<?php include "+components/page-head.php" ?>
<link rel="canonical" href="https://sessioncommunities.online/">
<link rel="stylesheet" href="styles2.css">
<script type="module" src="main.js"></script>
<title>Self-updating list of active Session communities</title>
@ -21,6 +22,16 @@
Copy these Communities into the Session app
and talk anonymously about Privacy, Security, or Cryptocurrency.
">
<meta name="modified" content="<?=date("Y-m-d H:i:s", $timestamp)?>">
<meta property="og:title" content="Click here for Session Communities">
<meta
property="og:description"
content="<?=count($rooms_assoc)?> Communities and counting — updated every day!"
>
<meta property="og:url" content="https://sessioncommunities.online/">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_US"/>
</head>
<body onload="onLoad(<?php echo $timestamp ?>)">
<header>
@ -29,6 +40,8 @@
<a
id="link-instructions"
target="_blank"
rel="help"
title="Mutli-language guide to joining communities using the site."
href="instructions.html"
>Instructions</a>
</div>
@ -55,10 +68,16 @@
</p>
<p id="disclaimer">
This site is not affiliated with
<a href="https://optf.ngo">Oxen Privacy Tech Foundation</a>.
<a
href="https://optf.ngo"
target="_blank"
>Oxen Privacy Tech Foundation</a>.
<br>
Communities shown are fetched automatically from
various sources.
<a
href="https://github.com/mdPlusPlus/sessioncommunities.online#which-sources-are-crawled"
target="_blank"
>various sources</a>.
<br>
We make an attempt to hide communities containing
objectionable or illegal content, but
@ -93,17 +112,30 @@
<a
href="https://github.com/oxen-io/session-pysogs"
target="_blank"
title="Information about running a community server"
title="Information about running a community server."
>Host Your Own Community</a>
<a
href="https://getsession.org/terms-of-service"
target="_blank"
>Session Terms Of Service</a>
</nav>
<nav>
<a
href="https://github.com/mdPlusPlus/sessioncommunities.online"
target="_blank"
title="sessioncommunities.online repository on GitHub."
>Source Code & Contact</a>
>Source Code</a>
<a
href="https://lokilocker.com/someguy/sessioncommunities.online"
target="_blank"
title="sessioncommunities.online repository on Lokinet Gitea."
>Source Code (Mirror)</a>
<a
href="https://github.com/mdPlusPlus/sessioncommunities.online#contact"
target="_blank"
rel="author"
title="Information on how to contact the maintainer of sessioncommunities.online"
>Contact</a>
</nav>
</footer>
<div id="copy-snackbar">

@ -1,17 +1,18 @@
<?php
include_once "+getenv.php";
$instruction_files = glob("+instructions/*.txt");
function filename($file) { return pathinfo($file)['filename']; }
function file_language($file) { return pathinfo($file)['filename']; }
?>
<!DOCTYPE html>
<html>
<head>
<?php include "+components/page-head.php" ?>
<link rel="canonical" href="https://sessioncommunities.online/instructions.php">
<link rel="stylesheet" href="css/instructions.css">
<style type="text/css">
<?php foreach ($instruction_files as $i => $file): ?>
#language-selection-<?=$i?>:checked ~
#language-selection-<?=$i?>:checked ~
#instructions #instructions-<?=$i?> {
display: block;
}
@ -21,35 +22,45 @@
Discover how to use the sessioncommunities.online website
to help you join Session Open Groups; available in <?php
// Print languages instructions are available in.
$languages = array_map('filename', array_slice($instruction_files, 0, 10));
$languages = array_map('file_language', array_slice($instruction_files, 0, 10));
echo(join(", ", $languages));
?>. In short: Use the Copy button or scan the QR code!
">
<meta property="og:title" content="How to join Session Communities">
<meta property="og:description" content="Learn how to use sessioncommunities.online to join">
<meta property="og:url" content="https://sessioncommunities.online/instructions.php">
<meta property="og:type" content="article">
</head>
<body>
<header>
<h1>Instructions for joining Session Communities</h1>
</header>
<main>
<p>
<a href="/" title="Return to the Session Community listing">
Go back to Community list
</a>
</p>
Choose your language:
<?php foreach ($instruction_files as $i => $file): ?>
<br>
<input
<input
id="language-selection-<?=$i?>"
class="language-selection"
name="language"
type="radio"
<?=file_language($file) == 'English' ? 'checked="checked"' : ''?>
>
<label for="language-selection-<?=$i?>">
<?=
// Name of the language
// Can be later parsed from i.e. first line of file
filename($file);
file_language($file);
?>
</label>
<?php endforeach; ?>
<article id="instructions">
<?php foreach ($instruction_files as $i => $file): ?>
<section id="instructions-<?=$i?>" class="instructions"><?php