Skip to content

Commit

Permalink
Merge pull request #411 from jgen/develop
Browse files Browse the repository at this point in the history
Chatbox is broken on develop branch
  • Loading branch information
shish committed Apr 20, 2014
2 parents dc6653d + 60980c8 commit ef3daaf
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 176 deletions.
2 changes: 1 addition & 1 deletion ext/chatbox/cp/ajax.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
error_reporting(E_ALL);
$kioskMode = false;

Expand Down
7 changes: 4 additions & 3 deletions ext/chatbox/cp/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
include 'ajax.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Expand All @@ -8,7 +8,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>YShout: Admin CP</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="js/admincp.js"></script>
</head>
<body>
Expand All @@ -33,7 +34,7 @@
<span id="login-loading">Loading...</span>
</form>
</div>
<?
<?php
if (loggedIn()) echo cp();
?>
</div>
Expand Down
3 changes: 2 additions & 1 deletion ext/chatbox/history/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>YShout: History</title>
<script type="text/javascript" src="../js/jquery.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="js/history.js"></script>

<link rel="stylesheet" href="../example/css/example.yshout.css" />
Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/include.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
$null = null;
include 'php/filestorage.class.php';
include 'preferences.php';
Expand Down
154 changes: 0 additions & 154 deletions ext/chatbox/js/jquery.js

This file was deleted.

9 changes: 4 additions & 5 deletions ext/chatbox/js/yshout.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,12 @@ YShout.prototype = {
if (!$.browser.safari) return;

var same = [];
for (var i = 0; i < this.p.length; i++) {
for (var i = 0; i < this.p.length; i++)
if (this.p[i].adminInfo.ip == ip)
same.push(this.p[i]);
}

for (var j = 0; j < same.length; j++) {
$('#' + same[j].id).fadeTo(this.animSpeed, 0.8).fadeTo(this.animSpeed, 1);

for (var i = 0; i < same.length; i++) {
$('#' + same[i].id).fadeTo(this.animSpeed, .8).fadeTo(this.animSpeed, 1);
}
},

Expand Down
10 changes: 5 additions & 5 deletions ext/chatbox/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ public function onPageRequest(PageRequestEvent $event) {

// Adds header to enable chatbox
$root = get_base_href();
$yPath = "$root/ext/chatbox/";
$yPath = make_http("") . "/ext/chatbox/";
$page->add_html_header("
<script src=\"$root/ext/chatbox/js/jquery.js\" type=\"text/javascript\"></script>
<script src=\"http://code.jquery.com/jquery-migrate-1.2.1.js\" type=\"text/javascript\"></script>
<script src=\"$root/ext/chatbox/js/yshout.js\" type=\"text/javascript\"></script>
<link rel=\"stylesheet\" href=\"$root/ext/chatbox/css/dark.yshout.css\" />
<script type=\"text/javascript\">
nickname = '{$user->name}';
new YShout({ yPath: '$yPath' });
nickname = '{$user->name}';
new YShout({ yPath: '$yPath' });
</script>
");
", 500);

// loads the chatbox at the set location
$html = "<div id=\"yshout\"></div>";
Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/php/ajaxcall.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
class AjaxCall {
function AjaxCall($log = null) {
header('Content-type: application/json');
Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/php/filestorage.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

class FileStorage {

Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/php/functions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

function cookie($name, $data) {
return setcookie($name, $data, time() + 60 * 60 * 24 * 30, '/');
Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/php/yshout.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

class YShout {

Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/preferences.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
// If you want to change the nickname, the line below is the one to modify.
// Simply set $overrideNickname to whatever variable you want to appear as the nickname,
// or leave it null to use the set nicknames.
Expand Down
2 changes: 1 addition & 1 deletion ext/chatbox/yshout.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
error_reporting(E_ALL);
ob_start();
set_error_handler('errorOccurred');
Expand Down

0 comments on commit ef3daaf

Please sign in to comment.