diff --git a/ext/chatbox/php/ajaxcall.class.php b/ext/chatbox/php/ajaxcall.class.php index 05aa5c06..affeafc7 100644 --- a/ext/chatbox/php/ajaxcall.class.php +++ b/ext/chatbox/php/ajaxcall.class.php @@ -1,5 +1,8 @@ banned(ip())) { $this->sendBanned(); break; } - if ($post = $ys->post($nickname, $message)) // To use $post somewheres later - $this->sendUpdates(); + if ($post = $ys->post($nickname, $message)) { + // To use $post somewheres later + $this->sendUpdates(); + } break; case 'refresh': @@ -138,7 +143,6 @@ $send['error'] = false; echo jsonEncode($send); - } function unbanSelf() { @@ -235,7 +239,7 @@ } function clearLog() { - $log = $_POST['log']; + //$log = $_POST['log']; $send = array(); $ys = ys($_SESSION['yLog']); @@ -254,10 +258,10 @@ function clearLogs() { global $prefs; - $log = $_POST['log']; + //$log = $_POST['log']; $send = array(); - $ys = ys($_SESSION['yLog']); + //$ys = ys($_SESSION['yLog']); switch(true) { case !loggedIn(): diff --git a/ext/chatbox/php/filestorage.class.php b/ext/chatbox/php/filestorage.class.php index 35b8ede1..a7ab5ba4 100644 --- a/ext/chatbox/php/filestorage.class.php +++ b/ext/chatbox/php/filestorage.class.php @@ -2,6 +2,8 @@ class FileStorage { + public $shoutLog, $path, $handle; + function FileStorage($path, $shoutLog = false) { $this->shoutLog = $shoutLog; $folder = 'logs'; @@ -56,7 +58,6 @@ class FileStorage { fseek($this->handle, 0); //return stream_get_contents($this->handle); return file_get_contents($this->path); - } function write($contents) { @@ -79,7 +80,5 @@ class FileStorage { $this->save($default, false); return $default; } - } -?> \ No newline at end of file diff --git a/ext/chatbox/php/functions.php b/ext/chatbox/php/functions.php index 07078599..c61a65e3 100644 --- a/ext/chatbox/php/functions.php +++ b/ext/chatbox/php/functions.php @@ -16,8 +16,8 @@ } function getVar($name) { - if (isset($_POST[$name])) return $_POST[$name]; - if (isset($_GET[$name])) return $_GET[$name]; + if (isset($_POST[$name])) { return $_POST[$name]; } + if (isset($_GET[$name])) { return $_GET[$name]; } return null; } @@ -28,7 +28,7 @@ } function magic($s) { - if (get_magic_quotes_gpc()) $s = stripslashes($s); + if (get_magic_quotes_gpc()) { $s = stripslashes($s); } return $s; } @@ -147,6 +147,5 @@ return $_SESSION['yLoginHash'] == md5($prefs['password']); return false; - } -?> \ No newline at end of file + diff --git a/ext/chatbox/php/yshout.class.php b/ext/chatbox/php/yshout.class.php index b5b83e0b..e0074cba 100644 --- a/ext/chatbox/php/yshout.class.php +++ b/ext/chatbox/php/yshout.class.php @@ -250,4 +250,3 @@ class YShout { } -?> \ No newline at end of file diff --git a/ext/tagger/script.js b/ext/tagger/script.js index 7a10f162..9f0987d3 100644 --- a/ext/tagger/script.js +++ b/ext/tagger/script.js @@ -1,4 +1,4 @@ -/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */ +/*jshint dojo:true, forin:false, nonew:true, undef:true, strict:false, browser:true, jquery:true */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ * Tagger - Advanced Tagging v2 * @@ -27,7 +27,7 @@ var Tagger = { this.tag.suggest = null; this.tag.image_tags(); - // reveal + // reveal this.editor.container.style.display = ""; // dragging @@ -41,7 +41,7 @@ var Tagger = { }, alert : function (type,text,timeout) { - var id = "tagger_alert-"+type + var id = "tagger_alert-"+type; var t_alert = byId(id); if (t_alert) { if(text === false) { @@ -152,10 +152,10 @@ var Tagger = { }, ajax : function (url, callback) { - var http = (new XMLHttpRequest || new ActiveXObject("Microsoft.XMLHTTP")); + var http = (new XMLHttpRequest() || new ActiveXObject("Microsoft.XMLHTTP")); http.open("GET",url,true); http.onreadystatechange = function () { - if(http.readyState == 4) callback(http); + if(http.readyState == 4) { callback(http); } }; http.send(null); } @@ -164,22 +164,19 @@ var Tagger = { position : { set : function (x,y) { if (!x || !y) { - with(this.parent.editor.container.style) { - top = "25px"; - left = ""; - right = "25px"; - bottom = ""; - } + this.parent.editor.container.style.top = "25px"; + this.parent.editor.container.style.left = ""; + this.parent.editor.container.style.right = "25px"; + this.parent.editor.container.style.bottom = ""; + var xy = this.get(); x = xy[0]; y = xy[1]; } - with(this.parent.editor.container.style) { - top = y+"px"; - left = x+"px"; - right = ""; - bottom = ""; - } + this.parent.editor.container.style.top = y+"px"; + this.parent.editor.container.style.left = x+"px"; + this.parent.editor.container.style.right = ""; + this.parent.editor.container.style.bottom = ""; }, get : function () { diff --git a/ext/tagger/theme.php b/ext/tagger/theme.php index 733db116..398fea7d 100644 --- a/ext/tagger/theme.php +++ b/ext/tagger/theme.php @@ -11,10 +11,14 @@ class taggerTheme extends Themelet { // Initialization code $base_href = get_base_href(); // TODO: AJAX test and fallback. + $page->add_html_header(""); $page->add_block(new Block(null, - "","main",1000)); + "","main",1000)); // Tagger block $page->add_block( new Block( diff --git a/themes/futaba/themelet.class.php b/themes/futaba/themelet.class.php index 5044c3fe..151f952b 100644 --- a/themes/futaba/themelet.class.php +++ b/themes/futaba/themelet.class.php @@ -11,7 +11,7 @@ class Themelet extends BaseThemelet { private function gen_page_link($base_url, $query, $page, $name) { $link = make_link("$base_url/$page", $query); - return "[$name]"; + return "[{$name}]"; } private function gen_page_link_block($base_url, $query, $page, $current_page, $name) { @@ -25,16 +25,16 @@ class Themelet extends BaseThemelet { private function build_paginator($current_page, $total_pages, $base_url, $query) { $next = $current_page + 1; $prev = $current_page - 1; - $rand = mt_rand(1, $total_pages); + //$rand = mt_rand(1, $total_pages); $at_start = ($current_page <= 1 || $total_pages <= 1); $at_end = ($current_page >= $total_pages); - $first_html = $at_start ? "First" : $this->gen_page_link($base_url, $query, 1, "First"); + //$first_html = $at_start ? "First" : $this->gen_page_link($base_url, $query, 1, "First"); $prev_html = $at_start ? "Prev" : $this->gen_page_link($base_url, $query, $prev, "Prev"); - $random_html = $this->gen_page_link($base_url, $query, $rand, "Random"); + //$random_html = $this->gen_page_link($base_url, $query, $rand, "Random"); $next_html = $at_end ? "Next" : $this->gen_page_link($base_url, $query, $next, "Next"); - $last_html = $at_end ? "Last" : $this->gen_page_link($base_url, $query, $total_pages, "Last"); + //$last_html = $at_end ? "Last" : $this->gen_page_link($base_url, $query, $total_pages, "Last"); $start = $current_page-5 > 1 ? $current_page-5 : 1; $end = $start+10 < $total_pages ? $start+10 : $total_pages; @@ -47,7 +47,7 @@ class Themelet extends BaseThemelet { //return "
$first_html | $prev_html | $random_html | $next_html | $last_html".
// "
<< $pages_html >>
$prev_html $pages_html $next_html
"; + return "{$prev_html} {$pages_html} {$next_html}
"; } } diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php index 73ae0a4e..f4922887 100644 --- a/themes/lite/layout.class.php +++ b/themes/lite/layout.class.php @@ -16,21 +16,21 @@ class Layout { $h = $block->header; $b = $block->body; $i = str_replace(' ', '_', $h) . $salt; - $html = "