aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--template/assemblies/chat.phtml16
-rw-r--r--template/assemblies/irc.phtml10
-rw-r--r--template/room.phtml4
3 files changed, 18 insertions, 12 deletions
diff --git a/template/assemblies/chat.phtml b/template/assemblies/chat.phtml
new file mode 100644
index 0000000..e3aab6c
--- /dev/null
+++ b/template/assemblies/chat.phtml
@@ -0,0 +1,16 @@
+<div class="chat">
+ <? if(room_has_irc($room)): ?>
+ <div>
+ <a class="btn btn-primary irclink" href="<?=h(room_get_irc_url($room))?>">
+ <span class="fa fa-comment"></span> <?=h(room_get_irc_display($room))?>
+ </a>
+ </div>
+ <? endif ?>
+ <? if(room_has_twitter($room)): ?>
+ <div>
+ <a class="btn btn-success twitterlink" href="https://twitter.com/intent/tweet?text=<?=h(rawurlencode(room_get_twitter_hashtag($room)))?>" target="_blank">
+ <span class="fa fa-twitter"></span> <?=h(room_get_twitter_display($room))?>
+ </a>
+ </div>
+ <? endif ?>
+</div>
diff --git a/template/assemblies/irc.phtml b/template/assemblies/irc.phtml
deleted file mode 100644
index abca8ac..0000000
--- a/template/assemblies/irc.phtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<div class="click-to-irc">
- <div class="activator">
- Click to Activate
- <br />
- <a class="irclink" href="irc://irc.hackint.eu:6667/<?=h(urlencode(irc_channel($room)))?>">#<?=h(irc_channel($room))?> @ hackint</a>
- <br />
- <a class="twitterlink" href="https://twitter.com/intent/tweet?text=<?=h(urlencode(twitter_hashtag($room)))?>" target="_blank"><?=h(twitter_hashtag($room))?> @ twitter</a>
- </div>
- <iframe data-src="http://evility.net/cgiirc/irc.cgi?chan=<?=h(rawurlencode('#'.irc_channel($room)))?>" width="1020" height="372" border="0"></iframe>
-</div>
diff --git a/template/room.phtml b/template/room.phtml
index aa489fc..3a186df 100644
--- a/template/room.phtml
+++ b/template/room.phtml
@@ -27,7 +27,7 @@
<li class="active">
<a href="#switcher" role="tab" data-toggle="tab">Formats</a>
</li>
- <? if((get("ROOMS.$room.IRC") && has("IRC")) || (get("ROOMS.$room.TWITTER") && has("TWITTER"))): ?>
+ <? if(room_has_chat($room)): ?>
<li>
<a href="#chat" role="tab" data-toggle="tab">Chat</a>
</li>
@@ -48,7 +48,7 @@
<div role="tabpanel" class="tab-pane active" id="switcher">
<? include("$assemblies/switcher/$tab.phtml") ?>
</div>
- <? if((get("ROOMS.$room.IRC") && has("IRC")) || (get("ROOMS.$room.TWITTER") && has("TWITTER"))): ?>
+ <? if(room_has_chat($room)): ?>
<div role="tabpanel" class="tab-pane" id="chat">
<? include("$assemblies/chat.phtml") ?>
</div>