mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
chat shit
This commit is contained in:
20
index.php
20
index.php
@@ -9,12 +9,6 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
|
||||||
<head>
|
<head>
|
||||||
<?php include("php/header.php"); ?>
|
<?php include("php/header.php"); ?>
|
||||||
<style>
|
|
||||||
#player{
|
|
||||||
width: calc(100% - 261px);
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body id="channelpage">
|
<body id="channelpage">
|
||||||
<header>
|
<header>
|
||||||
@@ -59,7 +53,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-btn" href="#chat" data-activates="chat-bar" id="chat-btn">
|
<a class="nav-btn" href="#chat_btn" data-activates="chat-bar" id="chat-btn">
|
||||||
<i class="tiny mdi-communication-message"></i>
|
<i class="tiny mdi-communication-message"></i>
|
||||||
<span class="hover-text">Chat</span>
|
<span class="hover-text">Chat</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -96,19 +90,23 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m9 video-container hide-on-small-only">
|
<div class="col s12 m9 video-container hide-on-small-only">
|
||||||
|
|
||||||
<ul class="side-nav left-aligned" id="chat-bar" style="width: 261px; left: 0px;position: relative;display: inline;will-change: left;margin: 0;padding: 0;float: left;">
|
<ul class="side-nav left-aligned chat-bar" id="chat-bar" style="position: absolute;display: inline;will-change: left;margin: 0;padding: 0;float: left;">
|
||||||
<li class="no-padding">
|
<li id="chat-log" style="padding:0 0 0 11px">
|
||||||
<ul class="collapsible collapsible-accordion">
|
<ul class="collapsible collapsible-accordion">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
|
|
||||||
<div class="collapsible-body" style="display: block;">
|
<div class="collapsible-body" style="display: block;">
|
||||||
<ul id="#chat">
|
<ul id="chat">
|
||||||
<li>Nixo: hello world!</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="chat-input">
|
||||||
|
<form onsubmit="chat(this.input);return false;">
|
||||||
|
<input id="text-chat-input" name="input" type="text" autocomplete="off">
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
width: calc(100% - 261px);
|
width: calc(100% - 261px);
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
<script type="text/javascript" src="static/js/youtube.js"></script>
|
<script type="text/javascript" src="static/js/youtube.js"></script>
|
||||||
<script type="text/javascript" src="static/js/search.js"></script>
|
<script type="text/javascript" src="static/js/search.js"></script>
|
||||||
<script type="text/javascript" src="static/js/admin.js"></script>
|
<script type="text/javascript" src="static/js/admin.js"></script>
|
||||||
|
<script type="text/javascript" src="static/js/chat.js"></script>
|
||||||
<script type="text/javascript" src="static/js/lib/materialize.js"></script>
|
<script type="text/javascript" src="static/js/lib/materialize.js"></script>
|
||||||
|
|
||||||
<!-- Piwik tracking -->
|
<!-- Piwik tracking -->
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ io.on('connection', function(socket){
|
|||||||
var in_list = false;
|
var in_list = false;
|
||||||
|
|
||||||
socket.on('chat', function (data) {
|
socket.on('chat', function (data) {
|
||||||
io.sockets.emit('chat,'+coll, guid + " said: " + data);
|
if(data != "" && data !== undefined && data !== null && data.length < 151)
|
||||||
|
io.sockets.emit('chat,'+coll, guid + " said: " + data);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('frontpage_lists', function()
|
socket.on('frontpage_lists', function()
|
||||||
|
|||||||
@@ -192,6 +192,16 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
|
|
||||||
/*------------------- Channel page ---------------------------------------------------------------------------- */
|
/*------------------- Channel page ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#chat {
|
||||||
|
height: 81%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chat-log {
|
||||||
|
padding: 0px 0px 0px 11px !important;
|
||||||
|
}
|
||||||
|
|
||||||
#player_overlay{
|
#player_overlay{
|
||||||
background-color:black;
|
background-color:black;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ socket.on(chan.toLowerCase()+",np", function(obj)
|
|||||||
$("#player_overlay").height($("#player").height());
|
$("#player_overlay").height($("#player").height());
|
||||||
if(!window.mobilecheck())
|
if(!window.mobilecheck())
|
||||||
$("#player_overlay").toggleClass("hide");
|
$("#player_overlay").toggleClass("hide");
|
||||||
importOldList(chan.toLowerCase());
|
importOldList(chan.toLowerCasettings-barse());
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("gotten new song");
|
console.log("gotten new song");
|
||||||
@@ -71,11 +71,6 @@ socket.on(chan.toLowerCase()+",viewers", function(view)
|
|||||||
getTitle(song_title, viewers);
|
getTitle(song_title, viewers);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("chat,"+chan.toLowerCase(), function(data)
|
|
||||||
{
|
|
||||||
console.log(data);
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -84,6 +79,13 @@ $(document).ready(function()
|
|||||||
edge: 'right', // Choose the horizontal origin
|
edge: 'right', // Choose the horizontal origin
|
||||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#chat-btn").sideNav({
|
||||||
|
menuWidth: 272, // Default is 240
|
||||||
|
edge: 'left', // Choose the horizontal origin
|
||||||
|
closeOnClick: true // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
||||||
|
});
|
||||||
|
|
||||||
$('#settings-close').sideNav('hide');
|
$('#settings-close').sideNav('hide');
|
||||||
|
|
||||||
if(!window.mobilecheck() && !msieversion())
|
if(!window.mobilecheck() && !msieversion())
|
||||||
@@ -251,11 +253,6 @@ function notifyUser(id, title) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function chat(data)
|
|
||||||
{
|
|
||||||
socket.emit("chat", data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRandomInt(min, max) {
|
function getRandomInt(min, max) {
|
||||||
return Math.floor(Math.random() * (max - min)) + min;
|
return Math.floor(Math.random() * (max - min)) + min;
|
||||||
|
|||||||
Reference in New Issue
Block a user