From ac090bac119fbe0d6884f6b2bca4b308e457e735 Mon Sep 17 00:00:00 2001 From: timb Date: Sun, 14 Feb 2010 21:52:49 -0800 Subject: page to test scrolling code --- static/tests/scrolling.html | 117 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 static/tests/scrolling.html diff --git a/static/tests/scrolling.html b/static/tests/scrolling.html new file mode 100644 index 0000000..bb3c6bd --- /dev/null +++ b/static/tests/scrolling.html @@ -0,0 +1,117 @@ + + + + + + + +
+ test
test
test
test
test
test
test
test
test
test
test
+ test
test
test
test
test
test
test
test
test
test
test
+ test
test
test
test
test
test
test
test
test
test
test
+ test
test
test
test
test
test
test
test
test
test
test
+ test
test
test
test
test
test
test
test
test
test
test
+ test
test
test
test
test
test
test
test
test
test
test
+
+

+ + + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From b506502b1327b6b37e2aabdee7417d51a7e72b95 Mon Sep 17 00:00:00 2001 From: timb Date: Mon, 15 Feb 2010 01:44:07 -0800 Subject: scrolling fix i think... --- static/tests/scrolling.html | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/static/tests/scrolling.html b/static/tests/scrolling.html index bb3c6bd..bef6f7e 100644 --- a/static/tests/scrolling.html +++ b/static/tests/scrolling.html @@ -31,6 +31,8 @@ function log(m){ } function go(){ + messagePane = $("#chat")[0] + maxImages = $("#max-images")[0] imagePoster() scrollToEnd() scrollWatcher() @@ -49,9 +51,20 @@ function imagePoster(){ setTimeout(imagePoster, 500) } +imagePosts = 0 function imagePost(image){ + imagePosts += 1 + while (imagePosts > maxImages.value) { + var imgs = $(".image-post:first") + if (imgs.length) { + imgs.remove() + } else { + break + } + imagePosts -= 1 + } var i = $("").attr("src", image) //.load(scrollIfPossible).error(scrollIfPossible) - var d = $("
").html("username: ") + var d = $("
").html("username: ") d.append(i).appendTo("#chat") } @@ -61,30 +74,26 @@ function pausego(){ $("#pausego-button").html(Paused ? "go" : "pause") } - -function isScrolledToBottom(id){ +function isScrolledToBottom(){ var threshold = 50; - var obj = $(id)[0] - var containerHeight = obj.style.pixelHeight || obj.offsetHeight - var currentHeight = (obj.scrollHeight > 0) ? obj.scrollHeight : 0 + var containerHeight = messagePane.style.pixelHeight || messagePane.offsetHeight + var currentHeight = (messagePane.scrollHeight > 0) ? messagePane.scrollHeight : 0 - var result = (currentHeight - obj.scrollTop - containerHeight < threshold); + var result = (currentHeight - messagePane.scrollTop - containerHeight < threshold); return result; } function scrollIfPossible(){ - var obj = $("#chat")[0] - if (lastScriptedScrolledPosition == obj.scrollTop || isScrolledToBottom("#chat")) + if (lastScriptedScrolledPosition >= messagePane.scrollTop || isScrolledToBottom()) scrollToEnd() } var lastScriptedScrolledPosition = 0 function scrollToEnd(){ - var obj = $("#chat")[0] - obj.scrollTop = obj.scrollHeight - lastScriptedScrolledPosition = obj.scrollTop + messagePane.scrollTop = messagePane.scrollHeight + lastScriptedScrolledPosition = messagePane.scrollTop } function scrollWatcher(){ @@ -110,6 +119,8 @@ function scrollWatcher(){

+
+ max image posts: - Take Snapshot -*/ - // Everything is under a 'webcam' Namespace window.webcam = { version: '1.0.8', -- cgit v1.2.3-70-g09d2 From d2ede89204ffe08b5a4927b6ebc7365abffdafd6 Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:36:08 -0500 Subject: cookie_login refactor --- src/cookie_login.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cookie_login.clj b/src/cookie_login.clj index 6ac1f6c..9e501f4 100755 --- a/src/cookie_login.clj +++ b/src/cookie_login.clj @@ -47,7 +47,7 @@ - is-logged-in?: Function to apply to request's session map to determine whether to process login token or not. If a truthy value is returned, - then the next handler is called. + then the next handler is called without further processing. - token-maker: Function to generate new login token from session map and milliseconds until login token expiry. -- cgit v1.2.3-70-g09d2 From eb764883beb1ddf4d5a2f429f4f73c6ee93e4728 Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:36:32 -0500 Subject: Split site.clj --- src/site.clj | 32 ++----------------------- src/utils.clj | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 30 deletions(-) create mode 100755 src/utils.clj diff --git a/src/site.clj b/src/site.clj index 4ba5981..b1774fd 100755 --- a/src/site.clj +++ b/src/site.clj @@ -9,20 +9,10 @@ org.antlr.stringtemplate.StringTemplateGroup) (:use clojure.contrib.str-utils clojure.contrib.duck-streams - clojure.contrib.json.write clojure.contrib.sql compojure cookie-login - )) - -(let [db-host "localhost" - db-port 5432 - db-name "dumpfm"] - (def db {:classname "org.postgresql.Driver" - :subprotocol "postgresql" - :subname (str "//" db-host ":" db-port "/" db-name) - :user "postgres" - :password "root"})) + utils)) (def template-group (new StringTemplateGroup "dumpfm" "template")) (.setRefreshInterval template-group 3) @@ -74,12 +64,6 @@ (def formatter (new SimpleDateFormat "h:mm EEE M/d")) -(defn resp-error [message] - {:status 400 :headers {} :body message}) - -(defn resp-success [message] - {:status 200 :headers {} :body (json-str message)}) - (defn non-empty-string? [s] (and s (> (count s) 0))) @@ -98,19 +82,6 @@ (.setTimeZone df (TimeZone/getTimeZone "GMT")) (.format df dt)))) -;; Database - -(defn do-select [query] - (with-connection db - (with-query-results rs query - (doall rs)))) - -(defn do-count [query] - ((first (with-connection db - (with-query-results rs query - (doall rs)))) - :count)) - ;; User authentication (def nick-regex #"^[A-Za-z0-9\-_∆˚†]*$") @@ -586,6 +557,7 @@ (-> request :route-params :room) (-> request :route-params :offset) params)) + (GET "/stats" (validated-stats session params)) ;; TODO: validate POST Referrer headers for POSTs (POST "/msg" (validated-msg session params)) (POST "/submit-registration" (register session params)) diff --git a/src/utils.clj b/src/utils.clj new file mode 100755 index 0000000..3ffd54b --- /dev/null +++ b/src/utils.clj @@ -0,0 +1,75 @@ +(ns utils + (:import java.text.SimpleDateFormat + java.util.Date) + (:use clojure.contrib.json.write + clojure.contrib.sql)) + +(let [db-host "localhost" + db-port 5432 + db-name "dumpfm"] + (def db {:classname "org.postgresql.Driver" + :subprotocol "postgresql" + :subname (str "//" db-host ":" db-port "/" db-name) + :user "postgres" + :password "root"})) + +;; JSON responses + +(def yyyy-mm-dd-formatter (new SimpleDateFormat "yyyy-MM-dd")) + +(defmethod print-json Date + [d] + (print-json (.format yyyy-mm-dd-formatter d))) + +(defn resp-error [message] + {:status 400 :headers {} :body message}) + +(defn resp-success [message] + {:status 200 :headers {} :body (json-str message)}) + +;; Database + +(defn do-select [query] + (with-connection db + (with-query-results rs query + (doall rs)))) + +(defn do-count [query] + ((first (with-connection db + (with-query-results rs query + (doall rs)))) + :count)) + + +;; Stats + +(defn msg-stats [ts] + (let [qry (str "SELECT created_on::date, count(*) FROM messages " + "GROUP BY created_on::date " + "ORDER BY created_on::date")] + (do-select [qry]))) + +(defn new-user-stats [ts] + (let [qry (str "SELECT created_on::date, count(*) FROM users " + "GROUP BY created_on::date " + "ORDER BY created_on::date")] + (do-select [qry]))) + +(defn msgs-per-user-stats [ts] + true) + +(def *stat-map* {"msgs" msg-stats + "new users" new-user-stats + "msgs per user" msgs-per-user-stats}) + +(defn stats [session params] + (let [stat (params :stat) + ts (params :timescale)] + (if-let [f (*stat-map* stat)] + (resp-success (f ts)) + (resp-error "UNKNOWN STAT")))) + +(defn validated-stats [session params] + (if (session :is_admin) + (stats session params) + (resp-error "BAD_REQUEST"))) \ No newline at end of file -- cgit v1.2.3-70-g09d2 From ce5a8751507285522695f662916010461fcf4106 Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:37:30 -0500 Subject: Removed defunct scotty scrolling code --- static/js/pichat.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/static/js/pichat.js b/static/js/pichat.js index d3da949..6b9c3e8 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -106,30 +106,12 @@ function ifEnter(fn) { }; } -/* -function isScrolledToBottom(div) { - return Math.abs(div.scrollTop - (div.scrollHeight - div.offsetHeight)) <= 3; -} - -function scrollToBottom(div) { - div.scrollTop = div.scrollHeight; -} - -// Give images time to start loading before scrolling. -// Needed until server knows size of images. -function delayedScrollToBottom(delay) { - setTimeout(scrollToBottom, delay, $('#messageList')[0]); -} -*/ - function addNewMessages(msgs) { - //var wasScrolledToBottom = isScrolledToBottom($('#messageList')[0]); var msgStr = $.map(msgs, buildMessageDiv).join(''); $('#messageList').append(msgStr); } function addNewMessage(msg, isLoading) { - //var wasScrolledToBottom = isScrolledToBottom($('#messageList')[0]); var msgStr = buildMessageDiv(msg, isLoading); var div = $(msgStr).appendTo('#messageList'); return div; -- cgit v1.2.3-70-g09d2 From 099809e854c9f19ce8301b9cff12b9291619755b Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:40:00 -0500 Subject: Push PROD to repo --- static/away.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/away.js b/static/away.js index 36579ff..cf4b19c 100755 --- a/static/away.js +++ b/static/away.js @@ -5,6 +5,7 @@ var HasFocus = true; function onFocus() { HasFocus = true; UnseenMsgCounter = 0; + $('title').text(OrigTitle); } function onBlur() { -- cgit v1.2.3-70-g09d2 From 99e9cbe532166b154314b6107ce269162359f660 Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:40:34 -0500 Subject: Add stats-tracking --- static/js/stats.js | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ template/chat.st | 56 +++++++++++++++++++++----------------- 2 files changed, 111 insertions(+), 24 deletions(-) create mode 100755 static/js/stats.js diff --git a/static/js/stats.js b/static/js/stats.js new file mode 100755 index 0000000..00e00a0 --- /dev/null +++ b/static/js/stats.js @@ -0,0 +1,79 @@ +var CurrentStats = ['msgs', 'today']; + +function refreshStats() { + $('a.statname, a.timescale').addClass('disabled'); + $('#statschart').empty().append(''); + + var onSuccess = function(json) { + var dataString = "Date,Count\n"; + $.each(json, function(i, v) { + dataString += v.created_on + "," + v.count + "\n"; + }); + $('#statschart').empty(); + new Dygraph($('#statschart')[0], + dataString, + { showRoller: false} + ); + + $('a.statname, a.timescale').removeClass('disabled'); + }; + + var onError = function(resp, textStatus, errorThrown) { + $('a.statname, a.timescale').removeClass('disabled'); + }; + + $.ajax({ + type: 'GET', + timeout: 5000, + url: '/stats', + data: { 'stat': CurrentStats[0], 'ts': CurrentStats[1] }, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + }); +} + +function makeStatsWindow() { + var statBox= $('
'); + var choices = ['msgs', 'new users']; + $(choices).map(function(i, c) { + return link = $('') + .text(c) + .attr('href', '#') + .addClass('statname') + .addClass(i == 0 ? 'active' : 'inactive') + .click(function() { + if ($(this).hasClass('disabled') || + CurrentStats[0] == c) { return }; + $('.statname').removeClass('active'); + $(this).addClass('active'); + CurrentStats[0] = c; + refreshStats(); + }); + }).appendTo(statBox); + $('
').appendTo(statBox); + var timescales = ['today', 'all time']; + $(timescales).map(function(i, c) { + return link = $('') + .text(c) + .attr('href', '#') + .addClass('timescale') + .addClass(i == 0 ? 'active' : 'inactive') + .click(function() { + if ($(this).hasClass('disabled') || + CurrentStats[1] == c) { return }; + $('.timescale').removeClass('active'); + $(this).addClass('active'); + CurrentStats[1] = c; + refreshStats(); + }); + })//.appendTo(statBox); + return statBox; +} + +function initStats() { + makeStatsWindow().appendTo('body'); + refreshStats(); +} + diff --git a/template/chat.st b/template/chat.st index 90e2602..4d792ae 100755 --- a/template/chat.st +++ b/template/chat.st @@ -16,36 +16,13 @@ $endif$ $if(isadminroom)$ @@ -60,6 +37,37 @@ function MM_swapImage() { //v3.0 }); } + $if(isadminroom)$ + + + + + $endif$ $banner()$ -- cgit v1.2.3-70-g09d2 From d304167e85f67340fa145924a22087a0723fc1cc Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 16 Feb 2010 01:41:54 -0500 Subject: Readded clojure.contri.json.write import --- src/site.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/site.clj b/src/site.clj index e0a40b9..dd7de80 100755 --- a/src/site.clj +++ b/src/site.clj @@ -10,6 +10,7 @@ (:use clojure.xml clojure.contrib.str-utils clojure.contrib.duck-streams + clojure.contrib.json.write clojure.contrib.sql compojure cookie-login -- cgit v1.2.3-70-g09d2 From 2b64baa3f6cffe0153596613ee7a749b90aaa816 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 17 Feb 2010 00:47:47 -0500 Subject: commit site.clj to fix cookies --- src/site.clj | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/site.clj b/src/site.clj index dd7de80..fb78a9b 100755 --- a/src/site.clj +++ b/src/site.clj @@ -243,13 +243,9 @@ (try [(aget x 0) (Long/parseLong (aget x 1)) (aget x 2)] (catch NumberFormatException _ nil)))) + (defn read-login-token [token] - (if-let [[nick expiry token-hash] (parse-login-token token)] - (if (>= expiry (System/currentTimeMillis)) - (let [db-info (fetch-nick nick) - computed-hash (sha1-hash (db-info :hash) expiry)] - (if (= token-hash computed-hash) - db-info))))) + nil) (defn make-login-token [{nick :nick hash :hash}] @@ -272,7 +268,7 @@ db-user (authorize-nick-hash nick hash) remember-me (= (params :rememberme) "yes") login-cookie (if remember-me - (make-login-token db-user *login-token-expiry*) + (make-login-token db-user) (clear-login-token *login-token-key*))] (if db-user [(session-assoc-from-db db-user) @@ -623,4 +619,4 @@ "/upload" (servlet multipart) "/*" (servlet pichat)) -(send-off flusher flush!) \ No newline at end of file +(send-off flusher flush!) -- cgit v1.2.3-70-g09d2 From 9db75059dc42b847876058cd2dde1957d4922087 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 21 Feb 2010 01:17:24 -0500 Subject: Increased server memory --- bin/repl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/repl.sh b/bin/repl.sh index d5c7413..856e592 100755 --- a/bin/repl.sh +++ b/bin/repl.sh @@ -1,3 +1,3 @@ #!/bin/sh -java -server -cp .:lib/commons-io-1.4.jar:lib/commons-fileupload-1.2.1.jar:lib/commons-codec-1.3.jar:lib/jline-0.9.94.jar:lib/clojure.jar:lib/clojure-contrib.jar:lib/compojure-3.2v1.jar:lib/jetty-6.1.14.jar:lib/jetty-util-6.1.14.jar:lib/servlet-api-2.5-6.1.14.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/stringtemplate-3.2.1.jar:lib/antlr-2.7.7.jar:src/ jline.ConsoleRunner clojure.lang.Repl $1 +java -Xmx256m -server -cp .:lib/commons-io-1.4.jar:lib/commons-fileupload-1.2.1.jar:lib/commons-codec-1.3.jar:lib/jline-0.9.94.jar:lib/clojure.jar:lib/clojure-contrib.jar:lib/compojure-3.2v1.jar:lib/jetty-6.1.14.jar:lib/jetty-util-6.1.14.jar:lib/servlet-api-2.5-6.1.14.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/stringtemplate-3.2.1.jar:lib/antlr-2.7.7.jar:src/ jline.ConsoleRunner clojure.lang.Repl $1 -- cgit v1.2.3-70-g09d2 From a85f1102a74b7bb9b2adf9b21ef8c7c56dce781a Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 21 Feb 2010 15:22:15 -0500 Subject: Added event tracking and registration codes --- static/js/home.js | 3 +++ static/js/register.js | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/static/js/home.js b/static/js/home.js index b37bc8d..107486c 100755 --- a/static/js/home.js +++ b/static/js/home.js @@ -152,6 +152,9 @@ function login() { var hash = hex_sha1(nick + '$' + password + '$dumpfm'); var onSuccess = function(json) { + if (typeof pageTracker !== 'undefined') { + pageTracker._setCustomVar(1, "logged-in", nick, 1); + } location.href = "/chat"; }; diff --git a/static/js/register.js b/static/js/register.js index 682efcb..1739ed6 100755 --- a/static/js/register.js +++ b/static/js/register.js @@ -13,20 +13,25 @@ function submitRegistration() { var email = $('#emailInput').val(); var password = $('#passwordInput').val() || ""; var code = $('#codeInput').val(); - if ($.inArray(code.toUpperCase(), ValidCodes) == -1) { - alert("Bad registration code! Try again dude...." ); - return; - } - if (nick.length < 3) { - alert("Nicks must be at least 3 characters long."); + + if (nick.length < 3 || nick.length > 12) { + alert("Nicks must be between 3 and 12 characters long."); return; } else if (password.length < 5) { alert("Password must be at least 5 characters long."); return; } + if ($.inArray(code.toUpperCase(), ValidCodes) == -1) { + alert("Bad registration code! Try again dude...." ); + return; + } + var hash = hex_sha1(nick + '$' + password + '$dumpfm'); var onSuccess = function() { + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('User', 'Register', nick); + } location.href = "/"; }; -- cgit v1.2.3-70-g09d2 From 1656fdf68387f7966d9caff9ee1a4f03436b6c51 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 21 Feb 2010 15:25:02 -0500 Subject: Added event tracking, upload filename checking, and fixed linkifying --- static/js/pichat.js | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/static/js/pichat.js b/static/js/pichat.js index 33788e2..3137ac4 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -16,14 +16,17 @@ function linkify(text) { // durty hack to use a global to check this... but otherwise i'd have to rewrite the String.replace function? :/ var LastMsgContainsImage = false -function linkReplace(match){ +function linkReplace(url){ var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; - var matchWithoutParams = match.replace(/\?.*$/i, "") - if (PicRegex.test(matchWithoutParams)){ + var urlWithoutParams = url.replace(/\?.*$/i, ""); + + linkUrl = url.indexOf('http://') == 0 ? url : 'http://' + url; + + if (PicRegex.test(url)){ LastMsgContainsImage = true - return "" + return "" } else { - return "" + match + "" + return "" + url + "" } } @@ -102,6 +105,9 @@ function submitMessage() { var div = addNewMessage(msg, true); var onSuccess = function(json) { + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('Message', 'Submit', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); + } div.attr('id', 'message-' + json) .removeClass('loading').addClass('loaded'); }; @@ -225,6 +231,13 @@ function initChat() { } function initProfile() { + + jQuery(".linkify").each(function() { + var text = jQuery(this).text(); + jQuery(this).html(linkify(text)); + }); + + $('.logged-dump .content').each(function() { var t = $(this); t.html(buildMsgContent(t.text())); @@ -277,11 +290,24 @@ function initLog() { function favoriteImage() {}; function setupUpload(elementId, roomKey) { + var onSubmit = function(file, ext) { + if (!(ext && /^(jpg|png|jpeg|gif)$/i.test(ext))) { + alert('Error: invalid file extension ' + ext); + return false; + } + }; + var onComplete = function(file, response) { + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('Message', 'Upload', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); + } + } new AjaxUpload(elementId, { action: '/upload', autoSubmit: true, name: 'image', - data: { room: roomKey } + data: { room: roomKey }, + onSubmit: onSubmit, + onComplete: onComplete }); } -- cgit v1.2.3-70-g09d2 From 2b6c2cef9a3398dbafb1f6cfbc0323c0b83e2053 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 21 Feb 2010 18:57:29 -0500 Subject: Added PROD changes --- static/browsertool.gif | Bin 4583 -> 6231 bytes static/cloudbar.png | Bin 0 -> 56423 bytes static/cloudbar2.png | Bin 0 -> 27560 bytes static/cloudbar3.png | Bin 0 -> 88316 bytes static/header.css | 6 +- static/index.html | 4 +- static/noinfo.png | Bin 0 -> 52768 bytes static/pichat.css | 57 ++++++----- static/profile.css | 15 ++- static/search/browser.html | 2 +- static/webcam/register.html | 233 ++++++++++++++++++++++++++++++++++++++++++++ static/webcam/webcam.js | 3 + template/banner.st | 2 +- template/browser.st | 2 +- template/chat.st | 31 ------ template/form_login.st | 2 +- template/profile.st | 23 ++--- 17 files changed, 304 insertions(+), 76 deletions(-) create mode 100644 static/cloudbar.png create mode 100644 static/cloudbar2.png create mode 100644 static/cloudbar3.png create mode 100644 static/noinfo.png create mode 100644 static/webcam/register.html diff --git a/static/browsertool.gif b/static/browsertool.gif index e3dc960..9777d27 100644 Binary files a/static/browsertool.gif and b/static/browsertool.gif differ diff --git a/static/cloudbar.png b/static/cloudbar.png new file mode 100644 index 0000000..e4e6893 Binary files /dev/null and b/static/cloudbar.png differ diff --git a/static/cloudbar2.png b/static/cloudbar2.png new file mode 100644 index 0000000..ac4d1c8 Binary files /dev/null and b/static/cloudbar2.png differ diff --git a/static/cloudbar3.png b/static/cloudbar3.png new file mode 100644 index 0000000..aca0f05 Binary files /dev/null and b/static/cloudbar3.png differ diff --git a/static/header.css b/static/header.css index 1aa1d1c..5ad2fbc 100755 --- a/static/header.css +++ b/static/header.css @@ -73,17 +73,17 @@ margin-top:2; color: #fff; } #logout7{ - top:-2px; + top:-1px; position:relative; font-size:12px; - margin-right: 3px; + margin-right: 5px; float:right; z-index: 999; font-family: Arial, Helvetica, sans-serif; font-weight: normal; } -#logout7 a{font-size:11px;text-shadow: 1px 1px 4px #000; +#logout7 a{font-size:11px; } #logout7 a:hover{font-size:11px; } diff --git a/static/index.html b/static/index.html index c3006af..a7e896a 100755 --- a/static/index.html +++ b/static/index.html @@ -76,8 +76,8 @@ body { } #customer { position: absolute; - left: -80px; - top: -65px; + left: -90px; + top: -75px; z-index: 10; } diff --git a/static/noinfo.png b/static/noinfo.png new file mode 100644 index 0000000..a80724a Binary files /dev/null and b/static/noinfo.png differ diff --git a/static/pichat.css b/static/pichat.css index 1e4a4f3..f01a150 100755 --- a/static/pichat.css +++ b/static/pichat.css @@ -117,22 +117,16 @@ filter: progid:DXImageTransform.Microsoft.dropShadow(color=#eee, offX=3, offY=4, z-index:100; } #msginputrapper{ -margin-right:359; +margin-right:374; } #msgSubmit { - border-top-right-radius:10px; - -webkit-border-top-right-radius:5px; - -moz-border-radius-topright:5px; - border-bottom-right-radius:5px; - -webkit-border-bottom-right-radius:5px; - -moz-border-radius-bottomright:5px; - border-radius:5px; + position:absolute; display:inline-block; width:120px; height:35px; -right:240px; +right:255px; font-size:20px; background-image:url(/static/urlbutton.png); text-indent:27; @@ -159,7 +153,7 @@ top:15px; width:120px; height:35px; background-position:center; -right:0; +right:15; top:15px; padding-bottom:1; text-indent:28; @@ -186,17 +180,16 @@ background-image:url(/static/cambutton.png); width:120px; height:35px; background-position:center; -right:0; +right:15; top:15px; -padding-bottom:1; +padding-bottom:4; text-align:center; z-index:100; cursor:pointer; background-color:yellow; - font-size:16px; + font-size:17px; color:#fff; background-image:url(/static/bg-btn-red.png); - text-shadow:1px 1px 3px rgba(0,0,0,1); } #webcam-button-snap.blink{ @@ -206,17 +199,37 @@ background-image:url(/static/bg-btn-red.png); #webcam-button-close { /* 16 x 14 */ position: fixed; - bottom: 300px; /* 240 + 68 - (16 / 2) */ - right: 313px; /* 320 - (14 / 2) */ + bottom: 330px; /* 240 + 68 - (16 / 2) */ + right: 335px; /* 320 - (14 / 2) */ z-index: 5001; +border:1px solid #000; + box-shadow: 3px 4px 4px #c8cbce; +-webkit-box-shadow: 3px 4px 4px #c8cbce; +-moz-box-shadow: 3px 4px 4px #c8cbce; cursor: pointer; } #webcam-preview { position:fixed; - bottom: 68px; - right:0; - z-index:5000 + bottom: 82; +opacity:0.9; + right:30; + box-shadow: 3px 4px 4px #c8cbce; +-webkit-box-shadow: 3px 4px 4px #c8cbce; +-moz-box-shadow: 3px 3px 4px #c8cbce; + border-top-right-radius:5px; + background-color:#FFF; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; +border:1px solid #999; + z-index:5000; } #upload { border-top-right-radius:10px; @@ -231,7 +244,7 @@ background-image:url(/static/bg-btn-red.png); width:120px; height:35px; background-position:center; -right:120; +right:135; top:15px; padding-bottom:1; text-indent:24; @@ -268,10 +281,10 @@ margin:-2; position: absolute; padding: 5px; top:85px; - min-width: 190px; + min-width: 200px; width:11%; float:right; - right: 6%; + right: 6.2%; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight:420; diff --git a/static/profile.css b/static/profile.css index 8aaafa8..8ee09d3 100755 --- a/static/profile.css +++ b/static/profile.css @@ -17,6 +17,18 @@ background-color:#fff; line-height:1.5; } +#profile h3{ +margin-top:12; +line-height:2; +color:#fff; +text-shadow: blue -2px -2px 0, red 2px 2px 0, green -6px 4px 0; +} +#profile h2{ +text-indent:-10; +margin-top:-7; +margin-bottom:15; +} + #chatrap{ width:720; @@ -309,6 +321,7 @@ font-size:60%; top:80; background-image:url(/static/welcomebar.gif); } +.invisible { display: none !important; } body,td,th { font-family: Arial, Helvetica, sans-serif; background-color:#ffffee; @@ -320,4 +333,4 @@ background-attachment:fixed; -}@charset "UTF-8"; \ No newline at end of file +}@charset "UTF-8"; diff --git a/static/search/browser.html b/static/search/browser.html index c3f4766..11223ca 100755 --- a/static/search/browser.html +++ b/static/search/browser.html @@ -107,7 +107,7 @@ background-image:url(/static/bg-btn-blue.png); - optionz + options diff --git a/static/webcam/register.html b/static/webcam/register.html new file mode 100644 index 0000000..4458f9c --- /dev/null +++ b/static/webcam/register.html @@ -0,0 +1,233 @@ + + + + + + + + + + + dump.fm + + + + + +
+
+
+
+
+
+ +
+

+
+
+
+
+

+Sorry, registration is closed, come back tomorrow +

+
+
+
+
+ + + + + diff --git a/static/webcam/webcam.js b/static/webcam/webcam.js index f5a5536..3e3b4fd 100644 --- a/static/webcam/webcam.js +++ b/static/webcam/webcam.js @@ -37,6 +37,9 @@ window.webcam = { }, uploadCompleted: function(){ + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('Message', 'Webcam', typeof Room !== 'undefined' ? Room : 'UnknownRoom'); + } $("#webcam-button-snap").attr("value", "Send Pic") webcam.reset(); }, diff --git a/template/banner.st b/template/banner.st index a857628..c67bafa 100755 --- a/template/banner.st +++ b/template/banner.st @@ -15,7 +15,7 @@
  • Log
  • Profile
  • -
  • Browser Tool
  • +
  • Image Search
  • $else$    Register diff --git a/template/browser.st b/template/browser.st index 26dcb8b..e172d15 100755 --- a/template/browser.st +++ b/template/browser.st @@ -1,6 +1,6 @@ - dump.fm | Browser Tool Beta + dump.fm | Image Search Beta $head()$ diff --git a/template/chat.st b/template/chat.st index 4d792ae..2c0f15f 100755 --- a/template/chat.st +++ b/template/chat.st @@ -37,37 +37,6 @@ }); } - $if(isadminroom)$ - - - - - $endif$ $banner()$ diff --git a/template/form_login.st b/template/form_login.st index 8b126ff..ad61bbb 100644 --- a/template/form_login.st +++ b/template/form_login.st @@ -18,7 +18,7 @@

    diff --git a/template/profile.st b/template/profile.st index c3d77e2..04a28fb 100755 --- a/template/profile.st +++ b/template/profile.st @@ -10,16 +10,11 @@ - - + @@ -46,7 +41,7 @@ $if(avatar)$ $else$ - No avatar + $endif$ $if(is_home)$ @@ -61,20 +56,21 @@

    contact info

    $contact$
    $else$ -
    No contact info
    +

    +
    $endif$
    $if(is_home)$ -

    biography

    +

    bio

    $bio$
    - $elseif(contact)$ -

    biography

    + $elseif(bio)$ +

    bio

    $bio$
    $else$ -
    No bio
    +
    $endif$ @@ -144,6 +140,7 @@ $footer()$ - + +$preload()$ -- cgit v1.2.3-70-g09d2