normalize webchat links
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
316fa0c321
commit
157404fb0c
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
function get_badge($channel_name=FALSE) {
|
function get_badge($channel_name=FALSE) {
|
||||||
if ($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%2Fkiwi.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%2Ftilde.chat%2Fkiwi%2F&colorB=%2300cc00";
|
||||||
}
|
}
|
||||||
$name_url = urlencode($channel_name);
|
$name_url = urlencode($channel_name);
|
||||||
$name_link = urlencode(substr($channel_name,1));
|
$name_link = urlencode(substr($channel_name,1));
|
||||||
$stats = json_decode(file_get_contents("https://tilde.chat/stats.json")) ?? array("channels"=>[]);
|
$stats = json_decode(file_get_contents("https://tilde.chat/stats.json")) ?? array("channels"=>[]);
|
||||||
foreach ($stats->channels as $key=>$channel) {
|
foreach ($stats->channels as $key=>$channel) {
|
||||||
if ($channel->name==$channel_name) {
|
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%2Fkiwi.tilde.chat%2F{$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%2Ftilde.chat%2Fkiwi%2F{$name_link}&colorB=%2300cc00";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";
|
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";
|
||||||
|
|
|
@ -51,7 +51,7 @@ for c in root.findall("./channellist/channel"):
|
||||||
name=name,
|
name=name,
|
||||||
topic=unsanitize(c.find("./channeltopic/topictext"), "no topic set"),
|
topic=unsanitize(c.find("./channeltopic/topictext"), "no topic set"),
|
||||||
usercount=int(c.find("usercount").text),
|
usercount=int(c.find("usercount").text),
|
||||||
webchatlink="https://kiwi.tilde.chat/" + name,
|
webchatlink="https://tilde.chat/kiwi/" + name,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<em>na</em>.tilde.chat, <em>eu</em>.tilde.chat, and <em>au</em>.tilde.chat on port 6697 with ssl/tls.
|
<em>na</em>.tilde.chat, <em>eu</em>.tilde.chat, and <em>au</em>.tilde.chat on port 6697 with ssl/tls.
|
||||||
</p>
|
</p>
|
||||||
<p>plaintext <a href="irc://localhost:6667">on localhost port 6667</a> is available at a shell on <a href="wiki/servers">tildes that run chat nodes</a> (port 7766 on ~town)</p>
|
<p>plaintext <a href="irc://localhost:6667">on localhost port 6667</a> is available at a shell on <a href="wiki/servers">tildes that run chat nodes</a> (port 7766 on ~town)</p>
|
||||||
<p>if you don't have a client ready to go, try using our <a href="https://kiwi.tilde.chat/">webchat</a>.</p>
|
<p>if you don't have a client ready to go, try using our <a href="https://tilde.chat/kiwi/">webchat</a>.</p>
|
||||||
<p>
|
<p>
|
||||||
you can also connect from any xmpp client with our <a href="https://biboumi.louiz.org">biboumi gateway</a>.
|
you can also connect from any xmpp client with our <a href="https://biboumi.louiz.org">biboumi gateway</a>.
|
||||||
it runs on <a href="https://tilde.team/wiki/xmpp#biboumi">tilde.team</a>'s xmpp server.
|
it runs on <a href="https://tilde.team/wiki/xmpp#biboumi">tilde.team</a>'s xmpp server.
|
||||||
|
|
|
@ -13,7 +13,7 @@ include __DIR__."/../header.php";
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn btn-default" href="<?=$member->link?>"><?=$member->name?></a>
|
<a class="btn btn-default" href="<?=$member->link?>"><?=$member->name?></a>
|
||||||
<?php foreach ($chans as $chan) { ?>
|
<?php foreach ($chans as $chan) { ?>
|
||||||
<a class="btn btn-primary" href="https://kiwi.tilde.chat/<?=$chan?>"><?=$chan?></a>
|
<a class="btn btn-primary" href="https://tilde.chat/kiwi/<?=$chan?>"><?=$chan?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -19,4 +19,4 @@ This is a list of callsigns of tildeverse members.
|
||||||
- [KK6GET = NoraCodes](//tilde.town/~noracodes)
|
- [KK6GET = NoraCodes](//tilde.town/~noracodes)
|
||||||
- [NV0N = jjs](//jjs.tilde.team)
|
- [NV0N = jjs](//jjs.tilde.team)
|
||||||
|
|
||||||
A ham radio operator channel is available: [#hamradio](https://kiwi.tilde.chat/#hamradio).
|
A ham radio operator channel is available: [#hamradio](https://tilde.chat/kiwi/#hamradio).
|
||||||
|
|
Loading…
Reference in New Issue