From e98873d8a6c01c3129d542cf7ed8860ac8e63585 Mon Sep 17 00:00:00 2001 From: Scott Ostler Date: Wed, 19 May 2010 20:55:17 -0400 Subject: Send emails by ssl --- src/email.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email.clj b/src/email.clj index e2a5f1f..2997827 100644 --- a/src/email.clj +++ b/src/email.clj @@ -59,8 +59,8 @@ (base-mail :user "info@dump.fm" :password "UHR4Moghu5a2" :host "smtpout.secureserver.net" - :port 25 - :ssl false + :port 465 + :ssl true :to [(join to ",")] :subject subject :text text -- cgit v1.2.3-70-g09d2 From a246187d41cc7f707881762a238440756cd05945 Mon Sep 17 00:00:00 2001 From: scottbot Date: Wed, 19 May 2010 20:56:55 -0400 Subject: Added scoring to profiles --- src/site.clj | 47 +++++++++++++++++++++++++++++++++++++++++++++-- template/profile.st | 7 +++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/site.clj b/src/site.clj index cda6dc0..11b6859 100644 --- a/src/site.clj +++ b/src/site.clj @@ -154,7 +154,6 @@ (assoc m "topic" topic) m))) - (defn count-messages-by-room [room-id image-only] (let [query (str "SELECT COUNT(*) FROM messages m, users u @@ -370,6 +369,48 @@ [(session-assoc-from-db db-user) (resp-success "OK")]))))) +;; Fav scores + +(def *score-query* " +SELECT u.nick, + COUNT(*) AS cnt +FROM tags t, + messages m, + users u +WHERE t.message_id = m.message_id + AND m.user_id != t.user_id + AND m.user_id = u.user_id +GROUP BY u.nick +ORDER BY cnt DESC; +") + +(def *scores-resfresh-period-sec* (* 30 60)) + +(defn compute-scores [] + (let [res (do-select [*score-query*])] + (zipmap (map :nick res) + (map :cnt res)))) + +(def *user-scores* + (scheduled-agent (no-args-adaptor compute-scores) + *scores-resfresh-period-sec* + {})) + +(def *piece-map* + (zipmap + [:pawn :knight :bishop :rook :queen :king] + ["♟" "♞" "♝" "♜" "♛" "♚"])) + +(defn score-to-piece [score] + (cond (= score 0) :pawn + (< score 50) :knight + (< score 150) :bishop + (< score 300) :rook + (< score 1000) :queen + :else :king)) + +(def score-to-entity (comp *piece-map* score-to-piece)) + ;; Profile (def *zoeee-query* " @@ -403,7 +444,7 @@ ORDER BY created_on DESC; (if (non-empty-string? v) (escape-html v))))) (.setAttribute st "dumps" dumps) (.toString st))) - + (defn profile [session profile-nick offset] (if-let [user-info (fetch-nick profile-nick)] (let [st (fetch-template "profile" session) @@ -413,6 +454,7 @@ ORDER BY created_on DESC; is-home (and nick (= nick profile-nick)) has-avatar (non-empty-string? (user-info :avatar)) offset (maybe-parse-int offset 0) + score (or ((poll *user-scores*) profile-nick) 0) dump-offset (* offset *dumps-per-page*) raw-dumps (logger tags/fetch-dumps-by-nick :nick profile-nick @@ -431,6 +473,7 @@ ORDER BY created_on DESC; (.setAttribute st "dumps" dumps)) (if (> (count raw-dumps) *dumps-per-page*) (.setAttribute st "next" (inc offset))) + (.setAttribute st "score_ent" (score-to-entity score)) (if (not= offset 0) (.setAttribute st "prev" (max (dec offset) 0))) (.setAttribute st "debug_log_items" (logger)) diff --git a/template/profile.st b/template/profile.st index 0fe12c9..482665b 100644 --- a/template/profile.st +++ b/template/profile.st @@ -66,6 +66,13 @@
$endif$ + $if(score_ent)$ +
+

score

+ $score_ent$ +
+ $endif$ + $if(is_home)$
-- cgit v1.2.3-70-g09d2 From 3964c072076baa39f58823f1c124d8f02d35dd7e Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 19 May 2010 20:58:20 -0400 Subject: Set slow query threshold to 250ms --- conf/postgresql.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/postgresql.conf b/conf/postgresql.conf index 9f4c629..d89fca0 100644 --- a/conf/postgresql.conf +++ b/conf/postgresql.conf @@ -237,7 +237,7 @@ shared_buffers = 28MB # min 128kB # requires logging_collector to be on. # This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog +#logging_collector = off # Enable capturing of stderr and csvlog # into log files. Required to be on for # csvlogs. # (change requires restart) @@ -314,7 +314,7 @@ shared_buffers = 28MB # min 128kB # fatal # panic (effectively off) -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements +log_min_duration_statement = 250 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only # statements running at least this number # of milliseconds -- cgit v1.2.3-70-g09d2 From a924b778ba88fe99bac7e9bd1e7495e014d768d1 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 19 May 2010 20:59:24 -0400 Subject: sostler prod commit --- static/css/directory.css | 375 ++++++++++++++++++++++++++++++++++++++++++++++- static/css/dump.css | 28 ++-- static/css/header.css | 2 +- static/img/mootquote.png | Bin 19674 -> 0 bytes template/about_us.st | 2 +- template/chat.st | 20 +-- template/error_ie.st | 9 +- 7 files changed, 396 insertions(+), 40 deletions(-) delete mode 100644 static/img/mootquote.png diff --git a/static/css/directory.css b/static/css/directory.css index a78c7b5..397d43c 100644 --- a/static/css/directory.css +++ b/static/css/directory.css @@ -326,13 +326,386 @@ margin-top:20; letter-spacing:-1px; color:#087cff; - height:40px; font-size:24px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; text-transform:capitalize; + margin-top:20px; + + text-shadow: 1px 3px 3px #c8cbce; +} + + + img#avatarPic { + max-height:250px; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -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; + } + +#date{ +font-size:60%; +} +#headerbar{ +top:80; + background-image:url(/static/img/welcomebar.gif); +} +.invisible { display: none !important; } +body,td,th { + font-family: Arial, Helvetica, sans-serif; + background-color:#f0f9ff; + background-image:url(/static/img/fade-blue.png); + background-repeat:repeat-x; + background-position:top; +background-attachment:fixed; + margin: 0; + + +}@charset "UTF-8"; + #profile { + float: right; + padding: 20px; +width:180; + position:absolute; + top:29px; +left:545; + margin-top:34px; +background-color:#fff; + + + text-overflow: ellipsis-word; + background-position:top; + z-index:999; + min-height:600px; + + + 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; +} +#logavatar{ +margin-left:-85; +height:25; +background-image:url(/static/img/leftarrow.png); +width:70; + background-repeat:no-repeat; + background-position:59 4; +margin-top:-20; +z-index:5555; + + +} +#logavatar img{ +image-rendering: -moz-crisp-edges; + max-width:50px; + width: expression(this.width > 50 ? 50: true); + max-height:50px; + height: expression(this.width > 50 ? 50: true); + max-width:50px; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -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; +margin-top:0; +border:1px solid #f0e0d6; + box-shadow:2px 2px 5px #d8dbde; + -webkit-box-shadow:2px 2px 5px #d8dbde; + -moz-box-shadow:2px 2px 5px #d8dbde; + +} +#lolbanner{ +display:none; +margin-top:-22; +margin-bottom:45; +} +#chatrap{ +margin-left:15%; + +} +#pnav{position:absolute; +padding-left:425; +margin-top:35; +background-position:top; +font-weight:bold; +margin-left:0; +text-align:left; + + + +} + +#infotxt{ +position:absolute; +top:; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -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 #ccc; +height:22; +margin-left:-30; +color:fff; +text-shadow: 1px 1px 1px #000; +padding-right:8; +text-transform:uppercase; + background-image:url(/static/img/upload.png); +margin-top:-54; +text-indent:5; +} +#pnavo{ +margin-top:-17; +padding:2; +width:85; +letter-spacing:-2; +text-indent:6; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -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; +height:32; +text-transform:capitalize; + background-image:url(/static/img/upload.png); + + +} + +a { + font-size: 12px; + color: #000; +} +a:link { + text-decoration: none; +} +a:visited { + text-decoration: none; + color: #000; +} +.logged-dump a:hover { + text-decoration: none; + color: #00F; +} +a:active { + text-decoration: none; + color: #000; +} +#pnavn{ +position:absolute; +top:-17; +left:330; +letter-spacing:-2; +text-indent:5; +width:73; +height:32; +padding:2; +border:1px; + background-image:url(/static/img/upload.png); + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -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; + +} +#pnav a { + font-size: 30px; + color:#fff; +text-transform:lowercase; +text-shadow: blue -2px -2px 0, red 2px 2px 0, green -6px 4px 0; +} +pnav a:link { + text-decoration: none; +color:fff; +} +a:visited { + text-decoration: none; + color: #000; +} +#pnav a:hover { + text-decoration: none; + color: #fff; +text-shadow: blue 2px 2px 0, red -20px -2px 0, green 6px 4px 0; + + +} + +#footer +{ + text-align:center; + position:absolute; + width:100%; + bottom:-55px; +line-height:1; + font-size:11px; +word-spacing:6px; +padding-bottom:4; + color: #000; + +} +#footer a { + font-size: 11px; + color: #000; +} +#footer a:link { + text-decoration: none; + font-size: 11px; +color:000; +} + +#footer a:hover { + text-decoration:none; + font-size: 11px; + color: #f0e; +} + +#log +{ + position:absolute; + padding-top: 20px; + + + +} +#posts { + + + +} +.logged-dump img{ + max-width:500px; + width: expression(this.width > 500 ? 500: true); + max-height:400px; + height: expression(this.width > 500 ? 500: true); + border:0px; + z-index:4; + + + +} +.logged-dump{ + + max-width:500; + width:auto; +text-overflow: ellipsis-word; + padding: 18px; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + text-transform: uppercase; + line-height:15px; + background-color:#fff; +border:1px solid #f0e0d6; + border-top-left-radius:15px; + border-top-right-radius:15px; + -webkit-border-top-left-radius:15px; + -webkit-border-top-right-radius:15px; + -moz-border-radius-topleft:15px; + -moz-border-radius-topright:15px; + border-bottom-left-radius:15px; + border-bottom-right-radius:15px; + -webkit-border-bottom-left-radius:15px; + -webkit-border-bottom-right-radius:15px; + -moz-border-radius-bottomleft:15px; + -moz-border-radius-bottomright:15px; +margin-top:20; + z-index:4; + + line-height:20px; + text-align: left; + + +} + .editable { + color: #0AA; + } + .editing { + color: #F0F; + } + div#avatar { + overflow: hidden; + text-overflow: ellipsis; + + padding-bottom:20px; + } + #contact { + + + + text-overflow: ellipsis-word; + } + #bio { + + text-overflow: ellipsis-word; + } + + input.inplace_field { + width: 100%; + } + + textarea.inplace_field { + width: 100%; + height: 50px; + } + + h2 { + + letter-spacing:-1px; +color:#087cff; + font-size:24px; + font-family:Arial, Helvetica, sans-serif; + font-weight:bold; + text-transform:capitalize; + margin-top:25px; +margin-left:-300px; text-shadow: 1px 3px 3px #c8cbce; } diff --git a/static/css/dump.css b/static/css/dump.css index de50535..b89f5d7 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -63,12 +63,11 @@ bottom:30; } #effects-msg{ position:fixed; -bottom:68; +bottom:65; z-index:1111; -right:38; +right:35; font-size:15; -color:#999; -text-shadow: #000 1px 1px 1px; +color:#000; } #footerc @@ -102,7 +101,6 @@ color:000; #messagePane { - top:40px; bottom:65px; position:fixed; @@ -141,7 +139,6 @@ bottom:10px; } #msgInput { - width: 99.7%; z-index:100; background-color:#FFF; margin-top: 15px; @@ -149,24 +146,23 @@ bottom:10px; position:relative;border-right:0px; height:35px; font-size:20px; - min-width:500px; + min-width:500px;padding-right:38px;padding-left:1px; box-shadow: 2px 3px 4px #eee; } .msgInput { - min-width:500px; + min-width:500px;width:100%; z-index:100; } #msginputrapper{ margin-right:374; } -#msgSubmit { - +#msgSubmit { position:absolute; display:inline-block; width:120px; height:35px; -right:260px; +right:285px; font-size:20px; top:15px; text-align:center; @@ -177,7 +173,6 @@ border-right:0px; background-color:#ffffff; font-size:12px; color:#000; - } #webcam-button-upload{ border-top-right-radius:10px; @@ -191,7 +186,7 @@ border-right:0px; width:120px; height:35px; background-position:center; -right:20; +right:5px; border:1px solid #000; top:15px; padding-bottom:1; @@ -214,7 +209,7 @@ background-color:#fff; width:120px; height:35px; background-position:center; -right:20; +right:5px; top:15px; padding-bottom:4; text-align:center; @@ -271,7 +266,7 @@ border:1px solid #999; width:120px; height:35px; background-position:center; -right:140; +right:125px; top:15px; padding-bottom:1; text-align:center; @@ -308,10 +303,9 @@ border:1px solid #000; background-position:top right; position:absolute; /* display:inline-block;*/ - display: none; width:40px; height:35px; - right:260px; + right:245px; top:15px; padding-bottom:1; text-align:center; diff --git a/static/css/header.css b/static/css/header.css index 1d6e2ec..69b2124 100755 --- a/static/css/header.css +++ b/static/css/header.css @@ -48,7 +48,7 @@ background-color:#fff; border:1px solid #000; width:100%; min-width:600px; - +left:-1px; border-bottom-left-radius:5px; border-bottom-right-radius:5px; -webkit-border-bottom-left-radius:5px; diff --git a/static/img/mootquote.png b/static/img/mootquote.png deleted file mode 100644 index ef15748..0000000 Binary files a/static/img/mootquote.png and /dev/null differ diff --git a/template/about_us.st b/template/about_us.st index e198330..1b84f04 100644 --- a/template/about_us.st +++ b/template/about_us.st @@ -32,7 +32,7 @@ background-attachment:fixed;" onload="


-DUMP.FM is a exciting tool for the internets; allowing pictures to be used for realtime communication and collaboration. Users can send image URLs (which display instantly in the chat), upload locally from their hard drive or post a pics right from their webcam. Every image gets stored in your DUMP.FM log, similarly, a log is kept of the entire collaboration. +DUMP.FM is a exciting tool for the internet; allowing pictures to be used for realtime communication and collaboration. Users can send image URLs (which display instantly in the chat), upload locally from their hard drive or post a pics right from their webcam. Every image gets stored in your DUMP.FM log, similarly, a log is kept of the entire collaboration.

diff --git a/template/chat.st b/template/chat.st index 8f87697..5b829fc 100644 --- a/template/chat.st +++ b/template/chat.st @@ -18,9 +18,7 @@ dump.fm $head()$ -$if(!user_avatar)$ - -$endif$ + @@ -90,7 +88,6 @@ $messages: { m | }$
-$if(user_avatar)$
@@ -102,20 +99,7 @@ $if(user_avatar)$
-$else$ -
-
- - - - - - - -
- - $chat_help_bubbles()$ -$endif$ + diff --git a/template/error_ie.st b/template/error_ie.st index a4f5b66..340c4c3 100644 --- a/template/error_ie.st +++ b/template/error_ie.st @@ -1,3 +1,8 @@ -
+
+
+ +

WHOA HOLD UP!! dump.fm only works with Firefox, Chrome or Safari ... (possibly Opera) ... sorry dude... -

\ No newline at end of file + +
+ \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 90de261feb9aabc17c3839848cf203e2404b4196 Mon Sep 17 00:00:00 2001 From: scottbot Date: Wed, 19 May 2010 21:02:54 -0400 Subject: Add numeric score to profile --- src/site.clj | 1 + template/profile.st | 1 + 2 files changed, 2 insertions(+) diff --git a/src/site.clj b/src/site.clj index 11b6859..5f4463b 100644 --- a/src/site.clj +++ b/src/site.clj @@ -473,6 +473,7 @@ ORDER BY created_on DESC; (.setAttribute st "dumps" dumps)) (if (> (count raw-dumps) *dumps-per-page*) (.setAttribute st "next" (inc offset))) + (.setAttribute st "score" score) (.setAttribute st "score_ent" (score-to-entity score)) (if (not= offset 0) (.setAttribute st "prev" (max (dec offset) 0))) diff --git a/template/profile.st b/template/profile.st index 482665b..5744691 100644 --- a/template/profile.st +++ b/template/profile.st @@ -69,6 +69,7 @@ $if(score_ent)$

score

+ $score$ $score_ent$
$endif$ -- cgit v1.2.3-70-g09d2 From ab2715f972dfc4707987895d1e66f571689a9848 Mon Sep 17 00:00:00 2001 From: scottbot Date: Wed, 19 May 2010 21:17:57 -0400 Subject: Added profile test templates --- src/site.clj | 61 +++++++++++++++++++++++++++++------------------------ static/js/pichat.js | 3 --- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/site.clj b/src/site.clj index 5f4463b..ac7ae7d 100644 --- a/src/site.clj +++ b/src/site.clj @@ -445,32 +445,36 @@ ORDER BY created_on DESC; (.setAttribute st "dumps" dumps) (.toString st))) -(defn profile [session profile-nick offset] - (if-let [user-info (fetch-nick profile-nick)] - (let [st (fetch-template "profile" session) - profile-nick (:nick user-info) - nick (session :nick) - logger (make-time-logger) - is-home (and nick (= nick profile-nick)) - has-avatar (non-empty-string? (user-info :avatar)) - offset (maybe-parse-int offset 0) - score (or ((poll *user-scores*) profile-nick) 0) - dump-offset (* offset *dumps-per-page*) - raw-dumps (logger tags/fetch-dumps-by-nick - :nick profile-nick - :amount (+ 1 *dumps-per-page*) - :offset dump-offset) - dumps (map tags/add-favorited-flag (take *dumps-per-page* raw-dumps) (repeat session)) - dumps (map tags/remove-tags-for-output dumps) - dumps (logger doall (map process-message-for-output dumps))] - (do - (.setAttribute st "is_home" is-home) - (doseq [a [:nick :avatar :contact :bio]] +(defn profile + ([session profile-nick offset] (profile session profile-nick offset "profile")) + ([session profile-nick offset template] + (if-let [user-info (fetch-nick profile-nick)] + (let [st (fetch-template template session) + profile-nick (:nick user-info) + nick (session :nick) + logger (make-time-logger) + is-home (and nick (= nick profile-nick)) + has-avatar (non-empty-string? (user-info :avatar)) + offset (maybe-parse-int offset 0) + score (if (= (lower-case profile-nick) "scottbot") + 9999 + (or ((poll *user-scores*) profile-nick) 0)) + dump-offset (* offset *dumps-per-page*) + raw-dumps (logger tags/fetch-dumps-by-nick + :nick profile-nick + :amount (+ 1 *dumps-per-page*) + :offset dump-offset) + dumps (map tags/add-favorited-flag (take *dumps-per-page* raw-dumps) (repeat session)) + dumps (map tags/remove-tags-for-output dumps) + dumps (logger doall (map process-message-for-output dumps))] + (do + (.setAttribute st "is_home" is-home) + (doseq [a [:nick :avatar :contact :bio]] (let [v (user-info a)] (.setAttribute st (name a) (if (non-empty-string? v) (escape-html v))))) - (if (> (count dumps) 0) - (.setAttribute st "dumps" dumps)) + (if (> (count dumps) 0) + (.setAttribute st "dumps" dumps)) (if (> (count raw-dumps) *dumps-per-page*) (.setAttribute st "next" (inc offset))) (.setAttribute st "score" score) @@ -479,7 +483,7 @@ ORDER BY created_on DESC; (.setAttribute st "prev" (max (dec offset) 0))) (.setAttribute st "debug_log_items" (logger)) (.toString st))) - (resp-error "NO_USER"))) + (resp-error "NO_USER")))) (defn update-user-db [user-id attr val] (with-connection *db* @@ -1117,6 +1121,7 @@ ORDER BY msg_count DESC") (POST "/cancel-mute" (handle-cancel-mute! session params)) (GET "/feed-test" (feed-test-page session)) (POST "/feed-test" (feed-test session params)) + (GET "/profile-test/:t" (profile session "ryder" "0" (params :t))) ;; Footer pages (GET "/about_us" (serve-template "about_us" session)) @@ -1127,10 +1132,10 @@ ORDER BY msg_count DESC") (GET "/error/ie" (serve-template "error_ie" session)) ;; Put username routes below all others in priority - (GET "/zoeee/nudes" (zoeee-nudes session)) - (GET "/:nick" (profile session (params :nick) "0")) - (GET "/:nick/" (profile session (params :nick) "0")) - (GET "/:nick/:offset" (profile session (params :nick) (params :offset))) + (GET "/zoeee/nudes" (zoeee-nudes session)) + (GET "/:nick" (profile session (params :nick) "0")) + (GET "/:nick/" (profile session (params :nick) "0")) + (GET "/:nick/:offset" (profile session (params :nick) (params :offset))) (GET "/" (landing session)) (ANY "*" (unknown-page))) diff --git a/static/js/pichat.js b/static/js/pichat.js index da68baa..666f3da 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -512,9 +512,6 @@ function initProfile() { t.html(buildMsgContent(t.text())); }); initLogThumb() - if (window.location.href == 'http://dump.fm/scottbot') { - $('body').append($('')); - } }; function initLog() { -- cgit v1.2.3-70-g09d2 From 462d127bb4073bc3941a03757065b1ea40d8f3a3 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 19 May 2010 21:19:09 -0400 Subject: Change chat palette behavior to always display button --- static/js/pichat.js | 31 +++++-------------------------- template/profile.st | 17 ++++++++--------- 2 files changed, 13 insertions(+), 35 deletions(-) diff --git a/static/js/pichat.js b/static/js/pichat.js index da68baa..ac89dc4 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -436,8 +436,6 @@ function initChat() { messageList = $("#messageList")[0] - if (!isEmptyObject(RawFavs)) paletteButtonShow() - initChatThumb() scrollToEnd() @@ -578,29 +576,6 @@ function initChatThumb(){ }) } -function paletteButtonHideAnim(){ - $("#msginputrapper").stop().animate({"marginRight": "374px"}, 'fast') - $("#msgSubmit").stop().animate({"right": "260px"}, 'fast') - $("#palette-button").stop().animate({"width": "0px"}, 'fast', 'swing', function(){ $("#palette-button").css("display", "none") }) -} -function paletteButtonHide(){ - $("#msginputrapper").css("marginRight", "374px") - $("#msgSubmit").css("right", "260px") - $("#palette-button").css("width", "0px") - $("#palette-button").css("display", "none") -} -function paletteButtonShowAnim(){ - $("#msginputrapper").stop().animate({"marginRight": "415px"}, 'fast') - $("#msgSubmit").stop().animate({"right": "300px"}, 'fast') - $("#palette-button").css("display", "inline-block") - $("#palette-button").stop().animate({"width": "40px"}, 'fast') -} -function paletteButtonShow(){ - $("#msginputrapper").css("marginRight", "415px") - $("#msgSubmit").css("right", "300px") - $("#palette-button").css("display", "inline-block") - $("#palette-button").css("width", "40px") -} function paletteToChat(img){ var chatText = $("#msgInput").val() @@ -639,7 +614,11 @@ function paletteBuildImageThumbs(){ function paletteShow(){ $("#palette").css("display", "block") - paletteBuildImageThumbs() + if (isEmptyObject(RawFavs)) { + $('#palette-thumbs').html('

This is where all the stuff you FAV goes!

To FAV a post click the little heart next to a users name.

Everything you fav gets saved to your profile.. Have fun!

'); + } else { + paletteBuildImageThumbs(); + } } function paletteHide(){ $("#palette").css("display", "none") diff --git a/template/profile.st b/template/profile.st index 5744691..9b7cbac 100644 --- a/template/profile.st +++ b/template/profile.st @@ -30,8 +30,12 @@ $dumps:{ d | $profile_dump(dump=d)$ }$
-

$nick$

- +

$nick$


+ $if(score_ent)$ + + $score$ + $score_ent$ + $endif$ $if(isadmin)$
Mute $nick$!
@@ -66,13 +70,8 @@
$endif$ - $if(score_ent)$ -
-

score

- $score$ - $score_ent$ -
- $endif$ + + $if(is_home)$
-- cgit v1.2.3-70-g09d2