Browse Source

update webchat links

pull/41/head
Ben Harris 9 months ago
parent
commit
9a09ce25fd
  1. 4
      badges/shieldsio.php
  2. 2
      gen_stats
  3. 4
      index.php
  4. 10
      navbar.php
  5. 2
      stats/index.php
  6. 2
      wiki/pages/hamradio.md

4
badges/shieldsio.php

@ -1,14 +1,14 @@
<?php
function get_badge($channel_name=FALSE) {
if ($channel_name==FALSE) {
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.usercount&suffix=%20online&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat&colorB=%2300cc00";
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.usercount&suffix=%20online&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fkiwi.tilde.chat&colorB=%2300cc00";
}
$name_url = urlencode($channel_name);
$name_link = urlencode(substr($channel_name,1));
$stats = json_decode(file_get_contents("https://tilde.chat/stats.json")) ?? array("channels"=>[]);
foreach ($stats->channels as $key=>$channel) {
if ($channel->name==$channel_name) {
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online%20on%20{$name_url}&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fweb.tilde.chat%2F%3Fjoin%3D{$name_link}&colorB=%2300cc00";
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online%20on%20{$name_url}&link=https:%2F%2Ftilde.chat&link=https:%2F%2Fkiwi.tilde.chat%2F{$name_link}&colorB=%2300cc00";
}
}
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";

2
gen_stats

@ -52,7 +52,7 @@ for c in root.findall("./channellist/channel"):
name=name,
topic=unsanitize(c.find("./channeltopic/topictext"), "no topic set"),
usercount=int(c.find("usercount").text),
webchatlink="https://web.tilde.chat/?join=" + quote(name),
webchatlink="https://kiwi.tilde.chat/" + quote(name),
)
)

4
index.php

@ -15,9 +15,7 @@
<em>na</em>.tilde.chat, <em>eu</em>.tilde.chat, and <em>au</em>.tilde.chat on port 6697 with ssl.
</p>
<p>or localhost 6667 from a shell on any of the member tildes :) (port 7766 on ~town)</p>
<p>if you don't have a client ready to go, try using one of our webchat clients:
<a href="https://web.tilde.chat/">thelounge</a> or <a href="https://kiwi.tilde.chat/">kiwiirc</a>
</p>
<p>if you don't have a client ready to go, try using our <a href="https://kiwi.tilde.chat/">webchat</a>.</p>
<h3>mumble server</h3>
<p>use your client to connect to tilde.chat on the default port using "tilde.chat" as the password and talk!</p>

10
navbar.php

@ -13,15 +13,7 @@
<ul class="nav navbar-nav navbar-right">
<li><a href="/wiki/"><i class="fa fa-edit"></i> wiki</a></li>
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> qdb</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-comments-o"></i> webchat <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="https://web.tilde.chat/">thelounge</a></li>
<li><a href="https://kiwi.tilde.chat/">kiwiirc</a></li>
</ul>
</li>
<li><a href="https://kiwi.tilde.chat/"><i class="fa fa-comments-o"></i> webchat</a></li>
<li><a href="/stats/"><i class="fa fa-bar-chart"></i> channels</a></li>
<li><a href="/badges/"><i class="fa fa-shield"></i> badges</a></li>
</ul>

2
stats/index.php

@ -13,7 +13,7 @@ include __DIR__."/../header.php";
<div class="btn-group">
<a class="btn btn-default" href="<?=$member->link?>"><?=$member->name?></a>
<?php foreach ($chans as $chan) { ?>
<a class="btn btn-primary" href="https://web.tilde.chat/?join=<?=substr($chan, 1)?>"><?=$chan?></a>
<a class="btn btn-primary" href="https://kiwi.tilde.chat/<?=$chan?>"><?=$chan?></a>
<?php } ?>
</div>
<?php } ?>

2
wiki/pages/hamradio.md

@ -18,4 +18,4 @@ This is a list of callsigns of tildeverse members.
- [N3FOS = LickTheCheese](//lickthecheese.fuckup.club)
- [KK6GET = NoraCodes](//tilde.town/~noracodes)
A ham radio operator channel is available: [#hamradio](https://web.tilde.chat/?join=hamradio).
A ham radio operator channel is available: [#hamradio](https://kiwi.tilde.chat/#hamradio).
Loading…
Cancel
Save