svnno****@sourc*****
svnno****@sourc*****
2008年 4月 11日 (金) 16:28:41 JST
Revision: 577 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=577 Author: tach Date: 2008-04-11 16:28:41 +0900 (Fri, 11 Apr 2008) Log Message: ----------- merged from upstream T_2_5_0_201 Modified Paths: -------------- slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm slashjp/branches/upstream/current/Slash/Utility/Anchor/Anchor.pm slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm slashjp/branches/upstream/current/Slash/XML/RSS/RSS.pm slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/admin.js slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default slashjp/branches/upstream/current/plugins/Ajax/templates/modal_footer;misc;default slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/friends.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm slashjp/branches/upstream/current/plugins/FireHose/firehose.css slashjp/branches/upstream/current/plugins/FireHose/mysql_dump.sql slashjp/branches/upstream/current/plugins/FireHose/mysql_schema.sql slashjp/branches/upstream/current/plugins/FireHose/templates/data;firehose;default slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default slashjp/branches/upstream/current/plugins/FireHose/templates/paginate;firehose;default slashjp/branches/upstream/current/plugins/Journal/journal.pl slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/Duration.pm slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm slashjp/branches/upstream/current/plugins/ResKey/example.plx slashjp/branches/upstream/current/plugins/ResKey/mysql_dump.sql slashjp/branches/upstream/current/plugins/Stats/Stats.pm slashjp/branches/upstream/current/sql/mysql/defaults.sql slashjp/branches/upstream/current/sql/mysql/upgrades slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm slashjp/branches/upstream/current/themes/slashcode/THEME slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.css slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl slashjp/branches/upstream/current/themes/slashcode/htdocs/images/comments.js slashjp/branches/upstream/current/themes/slashcode/htdocs/users2.pl slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default slashjp/branches/upstream/current/themes/slashcode/templates/printCommComments;misc;default slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default slashjp/branches/upstream/current/themes/slashcode/templates/userInfo2;users;default Added Paths: ----------- slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsLinks;misc;default Removed Paths: ------------- slashjp/branches/upstream/current/themes/slashcode/templates/d2prefs;misc;default -------------- next part -------------- Modified: slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm =================================================================== --- slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: MySQL.pm,v 1.1012 2008/03/27 16:56:27 tvroom Exp $ +# $Id: MySQL.pm,v 1.1013 2008/04/09 22:01:06 jamiemccarthy Exp $ package Slash::DB::MySQL; use strict; @@ -20,7 +20,7 @@ use base 'Slash::DB::Utility'; use Slash::Constants ':messages'; -($VERSION) = ' $Revision: 1.1012 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.1013 $ ' =~ /\$Revision:\s+([^\s]+)/; # Fry: How can I live my life if I can't tell good from evil? @@ -1753,7 +1753,7 @@ $self->sqlUpdate('users', { passwd => $enc, newpasswd => $enc, - newpasswd_ts => undef, + newpasswd_ts => undef, # should this be NOW() ? }, 'uid=' . $self->sqlQuote($uid)); return $newpasswd; } @@ -5071,7 +5071,10 @@ my @aliases = grep { $_ } split /\s+/, $alias_text; for my $alias (@aliases) { my($src, $implied) = $alias =~ /^(\w+)->(\w+)$/; - $_al2_type_aliases->{$src} = $implied if $src && $implied; + if ($src && $implied) { + $_al2_type_aliases->{$src} ||= [ ]; + push @{ $_al2_type_aliases->{$src} }, $implied; + } } } sub getAL2TypeAliases { @@ -5295,8 +5298,10 @@ my $aliases = $self->getAL2TypeAliases(); for my $src (keys %$aliases) { if ($retval->{$src}) { - my $implied = $aliases->{$src}; - $retval->{$implied} = { implied_by => $src }; + my $implied_ar = $aliases->{$src}; + for my $imp (@$implied_ar) { + $retval->{$imp} ||= { implied_by => $src }; + } } } Modified: slashjp/branches/upstream/current/Slash/Utility/Anchor/Anchor.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Utility/Anchor/Anchor.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/Slash/Utility/Anchor/Anchor.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Anchor.pm,v 1.89 2007/06/27 00:12:14 jamiemccarthy Exp $ +# $Id: Anchor.pm,v 1.91 2008/04/10 21:23:38 pudge Exp $ package Slash::Utility::Anchor; @@ -36,9 +36,10 @@ use base 'Exporter'; use vars qw($VERSION @EXPORT); -($VERSION) = ' $Revision: 1.89 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.91 $ ' =~ /\$Revision:\s+([^\s]+)/; @EXPORT = qw( http_send + get_etag header footer redirect @@ -268,7 +269,7 @@ if ($opt->{etag} || $opt->{do_etag}) { if ($opt->{do_etag} && $opt->{content}) { - $opt->{etag} = md5_hex($opt->{content}); + $opt->{etag} = get_etag($opt->{content}); } $r->header_out('ETag', $opt->{etag}); @@ -305,8 +306,11 @@ return 1; } +sub get_etag { + my($content) = @_; + return md5_hex($content); +} - #======================================================================== =head2 footer(OPTIONS) @@ -749,4 +753,4 @@ =head1 VERSION -$Id: Anchor.pm,v 1.89 2007/06/27 00:12:14 jamiemccarthy Exp $ +$Id: Anchor.pm,v 1.91 2008/04/10 21:23:38 pudge Exp $ Modified: slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Comments.pm,v 1.19 2008/04/03 00:38:32 pudge Exp $ +# $Id: Comments.pm,v 1.20 2008/04/10 05:22:29 pudge Exp $ package Slash::Utility::Comments; @@ -34,7 +34,7 @@ use base 'Exporter'; use vars qw($VERSION @EXPORT); -($VERSION) = ' $Revision: 1.19 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.20 $ ' =~ /\$Revision:\s+([^\s]+)/; @EXPORT = qw( constrain_score dispComment displayThread printComments jsSelectComments commentCountThreshold commentThresholds discussion2 @@ -327,11 +327,13 @@ $parent = { cid => $C->{pid}, pid => ($old_comments{ $C->{pid} } && $old_comments{ $C->{pid} }{ pid }) || 0, + opid => ($old_comments{ $C->{pid} } && $old_comments{ $C->{pid} }{ original_pid }) || 0, kids => [ ], points => -2, dummy => 1, %$parent, }; + $parent->{opid} ||= $parent->{pid}; } $comments->{ $C->{pid} } = $parent; } @@ -419,6 +421,7 @@ my @keys = qw(pid points uid); for my $cid (grep $_, keys %$comments) { @{$comments_new->{$cid}}{@keys} = @{$comments->{$cid}}{@keys}; + $comments_new->{$cid}{opid} = $comments->{$cid}{original_pid}; $comments_new->{$cid}{kids} = [sort { $a <=> $b } @{$comments->{$cid}{kids}}]; # we only care about it if it is not original ... we could @@ -454,6 +457,9 @@ $total--; # off by one $extra .= "d2_seen = '$d2_seen_0';\nmore_comments_num = $total;\n"; } + if ($user->{d2_keybindings_switch}) { + $extra .= "d2_keybindings_off = 1;\n"; + } # maybe also check if this ad should be running with some other var? # from ads table? -- pudge @@ -2025,7 +2031,7 @@ op => 'Reply', subject => 'Reply to This', subject_only => 1, - onclick => (($discussion2 && !$user->{is_anon}) ? "replyTo($comment->{cid}); return false;" : '') + onclick => ($discussion2 ? "replyTo($comment->{cid}); return false;" : '') }) . '</b></p></span>') unless $user->{state}{discussion_archived}; push @link, (qq'<span class="nbutton"><p><b>' . linkComment({ @@ -2546,4 +2552,4 @@ =head1 VERSION -$Id: Comments.pm,v 1.19 2008/04/03 00:38:32 pudge Exp $ +$Id: Comments.pm,v 1.20 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/Slash/XML/RSS/RSS.pm =================================================================== --- slashjp/branches/upstream/current/Slash/XML/RSS/RSS.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/Slash/XML/RSS/RSS.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: RSS.pm,v 1.39 2007/10/04 19:38:34 pudge Exp $ +# $Id: RSS.pm,v 1.41 2008/04/10 17:01:52 scc Exp $ package Slash::XML::RSS; @@ -32,7 +32,7 @@ use base 'Slash::XML'; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.39 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.41 $ ' =~ /\$Revision:\s+([^\s]+)/; #======================================================================== @@ -433,6 +433,7 @@ my $desc = $self->rss_item_description($item->{description} || $story->{introtext}); if ($desc) { $encoded_item->{description} = $desc; + $encoded_item->{description} .= qq{<p><a href="$action"><img src="$channel->{'link'}slashdot-it.pl?from=rss&op=image&style=h0&sid=$story->{sid}"></a></p>}; $encoded_item->{description} .= "<p><a href=\"$action\">Read more of this story</a> at $constants->{sitename}.</p>" if $action; # add poll if any $encoded_item->{description} .= pollbooth($story->{qid},1, 0, 1) if $story->{qid}; @@ -575,4 +576,4 @@ =head1 VERSION -$Id: RSS.pm,v 1.39 2007/10/04 19:38:34 pudge Exp $ +$Id: RSS.pm,v 1.41 2008/04/10 17:01:52 scc Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2008-04-11 07:28:41 UTC (rev 577) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: ajax.pl,v 1.84 2008/03/31 21:43:56 pudge Exp $ +# $Id: ajax.pl,v 1.87 2008/04/11 01:12:38 pudge Exp $ use strict; use warnings; @@ -14,7 +14,7 @@ use Slash::Utility; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.84 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.87 $ ' =~ /\$Revision:\s+([^\s]+)/; ################################################################## sub main { @@ -287,15 +287,23 @@ unless $error_message; my $cid = $saved_comment && $saved_comment ne '-1' ? $saved_comment->{cid} : 0; + $options->{content_type} = 'application/json'; + my %to_dump = ( cid => $cid ); + if ($error_message) { $error_message = getData('inline preview warning') . $error_message unless $options->{rkey}->death; # go back to HumanConf if we still have errors left to display $error_message .= slashDisplay('hc_comment', { pid => $pid }, { Return => 1 }); + $to_dump{error} = $error_message; + + my $max_duration = $options->{rkey}->max_duration; + if (defined($max_duration) && length($max_duration)) { + $max_duration = 0 if $max_duration > 60; + $to_dump{eval_last} = "submitCountdown($pid,$max_duration);" + } } - $options->{content_type} = 'application/json'; - my %to_dump = ( cid => $cid, error => $error_message ); #use Data::Dumper; print STDERR Dumper \%to_dump; return Data::JavaScript::Anon->anon_dump(\%to_dump); @@ -312,7 +320,7 @@ my $discussion = $slashdb->getDiscussion($sid); my $comment = preProcessComment($form, $user, $discussion, \$error_message); if ($comment && $comment ne '-1') { - my $preview = postProcessComment({ %$comment, %$form, %$user }, 0, $discussion); + my $preview = postProcessComment({ %$user, %$form, %$comment }, 0, $discussion); $html = prevComment($preview, $user); } @@ -329,6 +337,13 @@ if $form->{gotmodwarning} || ($error_message && $error_message eq Slash::Utility::Comments::getError("moderations to be lost") ); + + my $max_duration = $options->{rkey}->max_duration; + if (defined($max_duration) && length($max_duration)) { + $max_duration = 0 if $max_duration > 60; + $to_dump{eval_last} = "submitCountdown($pid,$max_duration);" + } + #use Data::Dumper; print STDERR Dumper \%to_dump; return Data::JavaScript::Anon->anon_dump(\%to_dump); @@ -368,6 +383,7 @@ $options->{content_type} = 'application/json'; $to_dump{eval_first} = "comment_body_reply[$pid] = '$pid_reply';" if $pid_reply; + #use Data::Dumper; print STDERR Dumper \%to_dump; return Data::JavaScript::Anon->anon_dump(\%to_dump); @@ -792,12 +808,17 @@ my $user_edits_table; if ($params{'formname'} eq 'd2_display') { $user_edits_table = { - discussion2 => ($params{'discussion2'}) ? 'slashdot' : 'none', - d2_comment_q => $params{'d2_comment_q'} || undef, - d2_comment_order => $params{'d2_comment_order'} || undef, - nosigs => ($params{'nosigs'} ? 1 : 0), - noscores => ($params{'noscores'} ? 1 : 0), - domaintags => ($params{'domaintags'} != 2 ? $params{'domaintags'} : undef), + discussion2 => ($params{'discussion2'}) ? 'slashdot' : 'none', + # i know the logic here is backward, but it still makes the most sense to me! + # we only want to save the pref for people who turn it off, but the checkbox + # is on by default, so if the value is true then it is on, and if false, + # it is off -- pudge + d2_keybindings_switch => $params{'d2_keybindings_switch'} ? undef : 1, + d2_comment_q => $params{'d2_comment_q'} || undef, + d2_comment_order => $params{'d2_comment_order'} || undef, + nosigs => ($params{'nosigs'} ? 1 : 0), + noscores => ($params{'noscores'} ? 1 : 0), + domaintags => ($params{'domaintags'} != 2 ? $params{'domaintags'} : undef), }; } Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/admin.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/admin.js 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/admin.js 2008-04-11 07:28:41 UTC (rev 577) @@ -1,34 +1,32 @@ -// $Id: admin.js,v 1.49 2008/03/27 20:12:17 tvroom Exp $ +// $Id: admin.js,v 1.50 2008/04/08 17:52:30 scc Exp $ function um_ajax(the_behaviors, the_events) { - var params = {}; - params['op'] = 'um_ajax'; - params['behaviors'] = the_behaviors; - params['events'] = the_events; - ajax_update(params, 'links-vendors-content'); + ajax_update({ + op: 'um_ajax', + behaviors: the_behaviors, + events: the_events + }, 'links-vendors-content'); } function um_fetch_settings() { - var params = {}; - params['op'] = 'um_fetch_settings'; - ajax_update(params, 'links-vendors-content'); + ajax_update({ op: 'um_fetch_settings' }, 'links-vendors-content'); } function um_set_settings(behavior) { - var params = {}; - params['op'] = 'um_set_settings'; - params['behavior'] = behavior; - ajax_update(params, 'links-vendors-content'); + ajax_update({ + op: 'um_set_settings', + behavior: behavior + }, 'links-vendors-content'); } function admin_neverdisplay(stoid, type, fhid) { - var params = {}; - params['op'] = 'admin_neverdisplay'; - params['reskey'] = reskey_static; - params['stoid'] = stoid; - params['fhid'] = fhid; if (confirm("Set story to neverdisplay?")) { - ajax_update(params, 'nvd-' + stoid); + ajax_update({ + op: 'admin_neverdisplay', + reskey: reskey_static, + stoid: stoid, + fhid: fhid + }, 'nvd-' + stoid); if (type == "firehose") { firehose_remove_entry(fhid); } @@ -36,12 +34,12 @@ } function admin_submit_memory(fhid) { - var params = {}; - params['op'] = 'admin_submit_memory'; - params['reskey'] = reskey_static; - params['submatch'] = $dom('submatch-'+fhid).value; - params['subnote'] = $dom('subnote-'+fhid).value; - ajax_update(params, 'sub_mem_message-'+fhid); + ajax_update({ + op: 'admin_submit_memory', + reskey: reskey_static, + submatch: $('#submatch-'+fhid).val(), + subnote: $('#subnote-'+fhid).val() + }, 'sub_mem_message-'+fhid); } function adminTagsCommands(id, type) { @@ -154,33 +152,23 @@ } function admin_slashdbox_fetch(secs) { - var params = {}; - params['op'] = 'admin_slashdbox'; - ajax_periodic_update(secs, params, "slashdbox-content"); + ajax_periodic_update(secs, { op: 'admin_slashdbox' }, "slashdbox-content"); } function admin_perfbox_fetch(secs) { - var params = {}; - params['op'] = 'admin_perfbox'; - ajax_periodic_update(secs, params, "performancebox-content"); + ajax_periodic_update(secs, { op: 'admin_perfbox' }, "performancebox-content"); } function admin_authorbox_fetch(secs) { - var params = {}; - params['op'] = 'admin_authorbox'; - ajax_periodic_update(secs, params, "authoractivity-content"); + ajax_periodic_update(secs, { op: 'admin_authorbox' }, "authoractivity-content"); } function admin_storyadminbox_fetch(secs) { - var params = {}; - params['op'] = 'admin_storyadminbox'; - ajax_periodic_update(secs, params, "storyadmin-content"); + ajax_periodic_update(secs, { op: 'admin_storyadminbox' }, "storyadmin-content"); } function admin_recenttagnamesbox_fetch(secs) { - var params = {}; - params['op'] = 'admin_recenttagnamesbox'; - ajax_periodic_update(secs, params, "recenttagnames-content"); + ajax_periodic_update(secs, { op: 'admin_recenttagnamesbox' }, "recenttagnames-content"); } function console_update(use_fh_interval, require_fh_timeout) { @@ -190,24 +178,17 @@ return; } - var params = {}; - params['op'] = 'console_update' - var handlers = { - onComplete: json_handler - }; - ajax_update(params, '', handlers); + ajax_update({ op: 'console_update' }, '', { onComplete: json_handler }); var interval = 30000; if(use_fh_interval) { interval = getFirehoseUpdateInterval(); } - setTimeout("console_update(" + use_fh_interval + "," + fh_is_timed_out +")", interval * 2); + setTimeout(function(){console_update(use_fh_interval, fh_is_timed_out)}, interval * 2); } function firehose_usage() { - var params = {}; - params['op'] = 'firehose_usage' var interval = 300000; - ajax_update(params, 'firehose_usage-content'); + ajax_update({ op: 'firehose_usage' }, 'firehose_usage-content'); setTimeout(firehose_usage, interval); } @@ -253,69 +234,60 @@ } function firehose_reject (el) { - var params = {}; - var fh = $dom('firehose-' + el.value); - params['op'] = 'firehose_reject'; - params['id'] = el.value; - params['reskey'] = reskey_static; - ajax_update(params, 'reject_' + el.value); + ajax_update({ + op: 'firehose_reject', + id: el.value, + reskey: reskey_static + }, 'reject_' + el.value); firehose_remove_entry(el.value); } function firehose_open_note(id) { - var nf = $dom('note-form-'+id); - var nt = $dom('note-text-'+id); - var ni = $dom('note-input-'+id); - nf.className=""; - ni.focus(); - nt.className="hide"; + $('#note-form-'+id).removeClass(); + $('#note-input-'+id).each(function(){this.focus()}); + $('#note-text-'+id).setClass("hide"); } function firehose_save_note(id) { - var nf = $dom('note-form-'+id); - var nt = $dom('note-text-'+id); - var ni = $dom('note-input-'+id); - var params = {}; - params['op'] = 'firehose_save_note'; - params['note'] = ni.value; - params['id'] = id; - ajax_update(params, 'note-text-'+id); - nf.className = "hide"; - nt.className = ""; + ajax_update({ + op: 'firehose_save_note', + note: $('#note-input-'+id).val(), + id: id + }, 'note-text-'+id); + $('#note-form-'+id).setClass("hide"); + $('#note-text-'+id).removeClass(); } function firehose_get_admin_extras(id) { - var params = {}; - params['id'] = id; - params['op'] = 'firehose_get_admin_extras'; - var handlers = { + ajax_update({ + op: 'firehose_get_admin_extras', + id: id + }, '', { onComplete: function(transport) { json_handler(transport); if (firehoseIsInWindow(id)) { scrollToWindowFirehose(id); } } - }; - ajax_update(params, '', handlers); + }); } function firehose_get_and_post(id) { - var params = {}; - params['id'] = id; - params['op'] = 'firehose_get_form'; - firehose_collapse_entry(id); - var handlers = { - onComplete: function() { $dom('postform-'+id).submit();} - }; - ajax_update(params, 'postform-'+id, handlers); + ajax_update({ + op: 'firehose_get_form', + id: id + }, 'postform-'+id, { + onComplete: function() { + $dom('postform-'+id).submit() + } + }); } function appendToBodytext(text) { - var obj = $dom('admin-bodytext'); - if (obj) { - obj.className = "show"; - obj.value = obj.value + text; - } + $('#admin-bodytext').each(function(){ + this.className = "show"; + this.value += text; + }) } function appendToMedia(text) { Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2008-04-11 07:28:41 UTC (rev 577) @@ -1,5 +1,5 @@ // _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_ -// $Id: common.js,v 1.194 2008/04/03 19:14:51 tvroom Exp $ +// $Id: common.js,v 1.195 2008/04/08 17:52:30 scc Exp $ function $dom( id ) { return document.getElementById(id); @@ -1160,8 +1160,8 @@ var login_inst = 0; function init_login_divs() { - login_cover = document.getElementById('login_cover'); - login_box = document.getElementById('login_box'); + login_cover = $dom('login_cover'); + login_box = $dom('login_box'); } function install_login() { @@ -1270,28 +1270,23 @@ function getModalPrefs(section, title, tabbed) { if (!reskey_static) return show_login_box(); - document.getElementById('preference_title').innerHTML = title; - var params = {}; - params['op'] = 'getModalPrefs'; - params['section'] = section; - params['reskey'] = reskey_static; - params['tabbed'] = tabbed; - var handlers = {onComplete:show_modal_box}; - ajax_update(params, 'modal_box_content', handlers); - - return; + $('#preference_title').html(title); + ajax_update({ + op: 'getModalPrefs', + section: section, + reskey: reskey_static, + tabbed: tabbed + }, 'modal_box_content', { onComplete: show_modal_box }); } function firehose_get_media_popup(id) { - if ($dom('preference_title')) { - $dom('preference_title').innerHTML = "Media"; - } - var params = {}; - params['op'] = 'firehose_get_media'; - params['id'] = id; + $('#preference_title').html('Media'); show_modal_box(); - $dom('modal_box_content').innerHTML = "<h4>Loading...</h4><img src='/images/spinner_large.gif'>"; - ajax_update(params, 'modal_box_content'); + $('#modal_box_content').html("<h4>Loading...</h4><img src='/images/spinner_large.gif'>"); + ajax_update({ + op: 'firehose_get_media', + id: id + }, 'modal_box_content'); } function saveModalPrefs() { @@ -1325,10 +1320,9 @@ } } -function displayModalPrefHelp(element) { - var elem = document.getElementById(element); - var vis = elem.style; - vis.display = (!vis.display || vis.display == 'block') ? 'none' : 'block'; +function displayModalPrefHelp(id) { + var el = $('#'+id); + el.css('display', el.css('display')!='none' ? 'none' : 'block'); } function toggle_filter_prefs() { Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js 2008-04-11 07:28:41 UTC (rev 577) @@ -13,25 +13,17 @@ YAHOO.extend(YAHOO.slashdot.SlashBox, YAHOO.util.DDProxy); -YAHOO.slashdot.SlashBox.prototype.createFrame = function() { - // ... -} - - YAHOO.slashdot.SlashBox.prototype.startDrag = function(x, y) { - var dragEl = this.getDragEl(); - var clickEl = this.getEl(); - - dragEl.innerHTML = clickEl.innerHTML; - dragEl.className = clickEl.className; - - YAHOO.util.Dom.addClass(clickEl, "to-be-moved"); - // so we can style the object-to-be-moved in CSS + var orig = $(this.getEl()); + var dragCopy = $(this.getDragEl()); + // dragging a copy, make sure it has the same contents and class as the original + dragCopy.html(orig.html()).setClass(orig.attr('className')); + orig.addClass("to-be-moved"); } YAHOO.slashdot.SlashBox.prototype.endDrag = function(e) { - YAHOO.util.Dom.removeClass(this.getEl(), "to-be-moved"); - // done moving, back to your regularly scheduled CSS (see this.startDrag) + $(this.getEl()).removeClass("to-be-moved"); + // done moving, back to your regularly scheduled CSS (see this.startDrag) } YAHOO.slashdot.SlashBox.prototype.onDragOver = function(e, id) { @@ -67,20 +59,14 @@ YAHOO.slashdot.SlashBox.prototype.onDragEnter = function(e, id) { if ( id == this.deleteBoundaryId ) { - var dragEl = this.getDragEl(); - var clickEl = this.getEl(); - YAHOO.util.Dom.removeClass(dragEl, "to-be-deleted"); - YAHOO.util.Dom.removeClass(clickEl, "to-be-deleted"); + $([this.getDragEl(), this.getEl()]).removeClass("to-be-deleted"); // so we can style the object-to-be-moved in CSS } } YAHOO.slashdot.SlashBox.prototype.onDragOut = function(e, id) { if ( id == this.deleteBoundaryId ) { - var dragEl = this.getDragEl(); - var clickEl = this.getEl(); - YAHOO.util.Dom.addClass(dragEl, "to-be-deleted"); - YAHOO.util.Dom.addClass(clickEl, "to-be-deleted"); + $([this.getDragEl(), this.getEl()]).addClass("to-be-deleted"); // so we can style the object-to-be-moved in CSS } } Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default 2008-04-11 07:28:41 UTC (rev 577) @@ -19,21 +19,21 @@ __name__ edit_comment __template__ -<div class="inline_comment"> [% IF user.is_anon %] - <p class="warning"> - [% IF constants.allow_anonymous %] - You are not logged in. You can <a href=\"${gSkin.rootdir}/login.pl\">log - in now</a>, or <a href="[% gSkin.rootdir %]/users.pl">Create an Account</a>. - [% ELSE %] - You are not logged in. You can <a href=\"${gSkin.rootdir}/login.pl\">log - in now</a>, <a href="[% gSkin.rootdir %]/users.pl">Create an Account</a>, - or post as <b>[% user.nickname | strip_literal %]</b>. - [% END %] - </p> +<div class="warning"> + [% IF constants.allow_anonymous %] +You are not logged in. You can <a href=\"${gSkin.rootdir}/login.pl\">log +in now</a>, or <a href="[% gSkin.rootdir %]/users.pl">Create an Account</a>. + [% ELSE %] +You are not logged in. You can <a href=\"${gSkin.rootdir}/login.pl\">log +in now</a>, <a href="[% gSkin.rootdir %]/users.pl">Create an Account</a>, +or post as <b>[% user.nickname | strip_literal %]</b>. + [% END %] +</div> [% END %] [% IF !user.is_anon || constants.allow_anonymous %] +<div class="inline_comment"> <form action="[% gSkin.rootdir %]/comments.pl" method="post"> <div id="replyto_preview_[% pid %]" class="replyto_reply" ondblclick="editReply([% pid %])"></div> <div id="replyto_reply_[% pid %]" class="replyto_reply"> @@ -62,25 +62,25 @@ <div id="replyto_msg_[% pid %]" class="replyto_msg" style="display: none"></div> <div class="replyto_buttons"> <span id="replyto_buttons_1_[% pid %]"> - <input type="button" name="preview_[% pid %]" id="preview_[% pid %]" value="Preview" class="button" onclick="previewReply([% pid %]); return false;"> + <span id="preview_[% pid %]" class="nbutton"><p><b><a href="#" onclick="previewReply([% pid %]); return false;">Preview</a></b></p></span> [%- IF pid # not for root-level reply %] - <input type="button" name="quotereply_[% pid %]" id="quotereply_[% pid %]" value="Quote Parent" class="button" onclick="quoteReply([% pid %]); return false;">[% END %] + <span id="quotereply_[% pid %]" class="nbutton"><p><b><a href="#" onclick="quoteReply([% pid %]); return false;">Quote Parent</a></b></p></span>[% END %] [%- UNLESS user.is_anon %] - <input type="button" name="prefs_[% pid %]" id="prefs_[% pid %]" value="Options" class="button" onclick="getModalPrefs('d2_posting', 'Discussion 2'); return false;">[% END %] + <span id="prefs_[% pid %]" class="nbutton"><p><b><a href="#" onclick="getModalPrefs('d2_posting', 'Discussion 2'); return false;">Options</a></b></p></span>[% END %] </span> <span id="replyto_buttons_2_[% pid %]" style="display: none"> - <input type="button" name="submit_[% pid %]" id="submit_[% pid %]" value="Submit" class="button" onclick="submitReply([% pid %]); return false;"> - <input type="button" name="edit_[% pid %]" id="edit_[% pid %]" value="Continue Editing" class="button" onclick="editReply([% pid %]); return false;"> + <span id="submit_[% pid %]" class="nbutton"><p><b><a href="#" onclick="submitReply([% pid %]); return false;">Submit<span id="submit_countdown_[% pid %]"></span></a></b></p></span> + <span id="edit_[% pid %]" class="nbutton"><p><b><a href="#" onclick="editReply([% pid %]); return false;">Continue Editing</a></b></p></span> <span class="state">Preview</span> </span> <span id="replyto_buttons_3_[% pid %]"> - <input type="button" name="cancel_[% pid %]" id="cancel_[% pid %]" value="Cancel" class="button" onclick="cancelReply([% pid %]); return false;"> + <span id="cancel_[% pid %]" class="nbutton"><p><b><a href="#" onclick="cancelReply([% pid %]); return false;">Cancel</a></b></p></span> </span> </div> </form> +</div> [% END # IF !user.is_anon || constants.allow_anonymous %] -</div> __seclev__ 1000 __version__ -$Id: edit_comment;ajax;default,v 1.11 2008/04/03 04:38:36 pudge Exp $ +$Id: edit_comment;ajax;default,v 1.13 2008/04/10 18:43:44 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/modal_footer;misc;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/modal_footer;misc;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/modal_footer;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -13,11 +13,11 @@ <div id="modal_cover" style="display:none" onclick="hide_modal_box()"></div> <div id="modal_box" style="display:none"> <div class="generaltitle" > - <div class="title"><h3><div id="preference_title"></div> <a href="#" onclick="hide_modal_box(); return false"><img src="[% constants.imagedir %]/sic_close.png" alt="Close"></a></h3></div> + <div class="title"><h3><span id="preference_title"></span> <a href="#" onclick="hide_modal_box(); return false"><img src="[% constants.imagedir %]/sic_close.png" alt="Close"></a></h3></div> </div> <div id="modal_box_content"></div> </div> __seclev__ 500 __version__ -$Id: modal_footer;misc;default,v 1.2 2007/12/13 20:54:55 pudge Exp $ +$Id: modal_footer;misc;default,v 1.3 2008/04/07 22:31:29 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default 2008-04-11 07:28:41 UTC (rev 577) @@ -29,11 +29,7 @@ <table width="100%"> <tr> <td valign="middle"> - [% d2_check = ''; - IF user.discussion2 == 'slashdot'; - d2_check = constants.markup_checked_attribute; - END %] - <input type="checkbox" name="discussion2"[% d2_check %] onclick="javascript:void(document.forms['modal_prefs'].refreshable.value=1);"> <b>Enable Dynamic Discussions</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_discussions');" class="help">?</a> + <input type="checkbox" name="discussion2"[% constants.markup_checked_attribute IF user.discussion2 == 'slashdot' %] onclick="void(document.forms['modal_prefs'].refreshable.value=1);"> <b>Enable Dynamic Discussions</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_discussions');" class="help">?</a> <br> <div id="modalprefhelp_discussions" class="modalprefhelp" style="display: none;"> Toggle between Discussion 2 and the classic discussion system. @@ -42,6 +38,14 @@ <br> [% IF user.discussion2 && user.discussion2 == "slashdot" %] + [% # i know the logic here is backward, but it still makes the most sense to me! -- pudge %] + <input type="checkbox" id="d2_keybindings_switch" name="d2_keybindings_switch"[% constants.markup_checked_attribute IF !user.d2_keybindings_switch %] onclick="d2_keybindings_off = $('#d2_keybindings_switch').attr('checked') ? 0 : 1"> <b>Enable Dynamic Discussion Keybindings</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_discussion_keys');" class="help">?</a> + <br> + <div id="modalprefhelp_discussion_keys" class="modalprefhelp" style="display: none;"> + Toggle to enable <a href="http://slashdot.org/faq/com-mod.shtml#cm128">Discussion 2 keybindings</a>. + </div> + <br> + <div> Retrieve [% comment_q_name = (user.is_subscriber || user.is_admin) ? 'd2_comment_q_all' : 'd2_comment_q'; comment_q = Slash.db.getDescriptions(comment_q_name); @@ -110,4 +114,4 @@ __seclev__ 500 __version__ -$Id: prefs_d2;ajax;default,v 1.13 2008/03/12 14:14:59 entweichen Exp $ +$Id: prefs_d2;ajax;default,v 1.14 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - User Interface</title> -<!-- $Id: UI.shtml,v 1.11 2008/02/27 18:57:06 entweichen Exp $ --> +<!-- $Id: UI.shtml,v 1.12 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="editorial.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="interviews.shtml" class="begin">Next Section</a></span></li> @@ -87,6 +87,8 @@ <p><em><small> Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a><br> Last Modified: 1/21/06 + </small></em></p> + <hr> <ul class="menu"> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Accounts</title> -<!-- $Id: accounts.shtml,v 1.16 2008/02/27 18:33:24 entweichen Exp $ --> +<!-- $Id: accounts.shtml,v 1.17 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="metamod.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="friends.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Advertising</title> -<!-- $Id: advertising.shtml,v 1.6 2008/02/27 18:34:11 entweichen Exp $ --> +<!-- $Id: advertising.shtml,v 1.7 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="tech.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="suggestions.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Badges How-To</title> -<!-- $Id: badges.shtml,v 1.4 2008/02/27 18:36:55 entweichen Exp $ --> +<!-- $Id: badges.shtml,v 1.5 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="firehose.shtml" class="begin">Previous Section</a></span></li> </ul> @@ -27,7 +27,7 @@ for consideration; and once submitted, take them to the discussion.</p> <h2><a name="ba100" id="ba100">Badges</a> -<img src="http://images.slashdot.org/sdit4n.png" style="margin-bottom:-0.1em; padding-left:0.25em;" alt="sample Slashdot badge" title="a Slashdot badge looks like this"/> +<img src="http://images.slashdot.org/sdit4n.png" style="margin-bottom:-0.1em; padding-left:0.25em;" alt="sample Slashdot badge" title="a Slashdot badge looks like this"> </h2> <p>A Slashdot badge is the easiest and most powerful tool to do this. Add a badge to your web page by including this snippet of HTML: @@ -42,7 +42,7 @@ in the toggle. For instance, like this:</p> <p><img src="http://images.slashdot.org/sdit2u.png" style="padding-left:2em;" -alt="sample Slashdot badge" title="a Slashdot badge looks like this"/></p> +alt="sample Slashdot badge" title="a Slashdot badge looks like this"></p> <p>The Slashdot badge is somewhat customizable by setting some values in JavaScript before you invoke the badge script. For instance, you can suggest a title for the @@ -61,18 +61,18 @@ Vertical badges look like this:</p> <p><img src="http://images.slashdot.org/sditv2u.png" style="padding-left:2em;" -alt="sample Slashdot badge" title="a vertical Slashdot badge looks like this"/></p> +alt="sample Slashdot badge" title="a vertical Slashdot badge looks like this"></p> <h2><a name="ba101" id="ba101">Links</a></h2> <p>For security or control reasons, you might wish to use your own image and formatting with a plain HTML link. This snippet builds the appropriate link automatically, you can paste it directly into your page as is: -<xmp><a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)">Slashdot It!</a></xmp></p> +<xmp><a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)">Slashdot It!</a></xmp></p> <p>Or you can construct the URL argument `by hand' for each page, e.g., <xmp><!-- for a page at http://example.com/my-story.html, edit as appropriate for your site --> -<a href="http://slashdot.org/slashdot-it.pl?op=basic&url=http%3A%2F%2Fexample.com%2Fmy-story.html">Slashdot It!</a></xmp></p> +<a href="http://slashdot.org/slashdot-it.pl?op=basic&url=http%3A%2F%2Fexample.com%2Fmy-story.html">Slashdot It!</a></xmp></p> <p>You can add a `favicon'-sized Slashdot icon like so: <xmp><img src="http://images.slashdot.org/favicon.ico" alt="Slashdot" border="0" height="16" width="16"></xmp> @@ -80,9 +80,9 @@ <p style="padding-left:2em;"><!-- HERE IS THE SIMPLE LINK AND FAVICON: ---><a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)" +--><a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)" ><img src="http://images.slashdot.org/favicon.ico" alt="Slashdot" border="0" height="16" width="16" -></a> <a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)" +></a> <a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(location.href)" >Slashdot It!</a><!-- END --></p> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Comments and Moderation</title> -<!-- $Id: com-mod.shtml,v 1.26 2008/02/27 18:38:45 entweichen Exp $ --> +<!-- $Id: com-mod.shtml,v 1.27 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="interviews.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="metamod.shtml" class="begin">Next Section</a></span></li> @@ -100,11 +100,11 @@ <h2><a name="cm125" id="cm125">How do I make the D2 Floating Slider go away?</a></h2> <p>The upper right hand corner of the floating D2 configuration widget has a little icon that toggles between 3 different 'modes'. They are -<OL> - <LI>Floating on the left hand side of the screen in the margin (the default, and I think nicest view)</LI> - <LI>Floating at the top of the screen (some people might like it this way, and on narrower browsers, this will work better.</LI> - <LI>'Locked' or stuck... in this mode, the floater stays pinned atop the discussion. You can't change your thresholds within the page. You can't load 'More' comments within the middle of a discussion, but for a lot of people, this may provide a cleaner view of discussions that they might like.</LI> -</OL> +<ol> + <li>Floating on the left hand side of the screen in the margin (the default, and I think nicest view)</li> + <li>Floating at the top of the screen (some people might like it this way, and on narrower browsers, this will work better.</li> + <li>'Locked' or stuck... in this mode, the floater stays pinned atop the discussion. You can't change your thresholds within the page. You can't load 'More' comments within the middle of a discussion, but for a lot of people, this may provide a cleaner view of discussions that they might like.</li> +</ol> <p><em><small>Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a><br> Last Modified: 2/7/08</small></em></p> @@ -127,23 +127,36 @@ Last Modified: 2/7/08</small></em></p> -<h2><a name="cm128" id="cm128">How about keybinding support?</a></h2> -<p>Keybinding support is very experimental in D2, but already it is a powerful way of navigating forums. We -use the standard 'WASD' directional keys familiar to gamers for navigation. Currently the keys that we support -are as follows: -<UL> - <LI>W/S, 'Up and Down' navigate you to previous and next thread.</LI> - <LI>A/D 'Left and Right' navigate you to the previous and next comment (following the threads)</LI> - <LI>Q/E 'Strafe' navigates you to previous and next comment by the order in which you loaded comments. You can toggled your load order between Score and Date. What this means is that you can navigate a slashdot discussion from oldest to newest, or from Score:5 to Score:-1, whichever you prefer. You can change your load order in the preferences box.</LI> -</UL> +<h2><a name="cm128" id="cm128">What are the Keyboard Shortcuts Available in Discussion2?</a></h2> +<p>Slashdot's Discussion2 system is a work in progress, +and as such as about a zillion keybindings that are +all subject to change. Most of them are documented +here. +</p> +<ul> -<p>Note that if you hold the shift key while pressing one of these keybindings, you will 'collapse' the comment -that you leave. In this way, you can press perhaps Shift-D repeatedly to read every comment on the page, collapsing the comments behind you so its easy to keep your place. -<p>Also, when you get to the end of the discussion, continuing to press the next key (S or D) will check to see if -more comments exist, and if they do, it will retrieve them. -<P>This is all very experimental, and we're open to feedback. +<li>Previous/Next Comment (Following Threads) A/D +<li>Previous/Next Comment Sibling W/S +<li>Previous/Next Comment (Chronologically) Q/E +<li>Next Unread Comment: F +<li>Reply to Current Comment: R +<li>Parent of Current Comment: P +<li>Moderation Log of Current Comment: M (close with X) +<li>Skip to End: V +<li>Skip to Top: T +<li>Get More Comments: G +<li>Raise/Lower Abbreviation Threshold: [/] +<li>Raise/Lower Hide Threshold: ,/. +<li>Toggle D2 Floater Widget: / +</ul> + +<p>Note that if you press a 'Next' key when you are at the end of a discussion will attempt to 'G'et more comments. +Also, holding down 'Shift' while using the navigation keys will hide the comment you just left. So you can press +'shift-d' and leave the comments you have already read closed behind you as you read on. +</p> + <p><em><small>Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a><br> -Last Modified: 2/7/08</small></em></p> +Last Modified: 4/7/08</small></em></p> @@ -158,11 +171,11 @@ <h2><a name="cm130" id="cm130">What is Next for D2?</a></h2> <p> -<UL> - <LI>Bug fixing and compatibility fixing.</LI> - <LI>More keybindings to improve mouseless navigation</LI> - <LI>Comment posting from within the D2 interface</LI> -</UL +<ul> + <li>Bug fixing and compatibility fixing.</li> + <li>More keybindings to improve mouseless navigation</li> + <li>Comment posting from within the D2 interface</li> +</ul> <p><em><small>Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a><br> Last Modified: 2/7/08</small></em></p> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Editorial</title> -<!-- $Id: editorial.shtml,v 1.20 2008/02/27 18:39:47 entweichen Exp $ --> +<!-- $Id: editorial.shtml,v 1.21 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="faq-meta.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="UI.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Meta</title> -<!-- $Id: faq-meta.shtml,v 1.6 2008/02/27 18:41:02 entweichen Exp $ --> +<!-- $Id: faq-meta.shtml,v 1.7 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="editorial.shtml" class="begin">Next Section</a></span></li> </ul> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Feeds</title> -<!-- $Id: feeds.shtml,v 1.5 2008/02/27 18:41:56 entweichen Exp $ --> +<!-- $Id: feeds.shtml,v 1.6 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="subscriptions.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="slashmeta.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Firehose</title> -<!-- $Id: firehose.shtml,v 1.3 2008/02/27 18:43:06 entweichen Exp $ --> +<!-- $Id: firehose.shtml,v 1.4 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="tags.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="badges.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/friends.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/friends.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/friends.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Friends and Journals</title> -<!-- $Id: friends.shtml,v 1.8 2008/03/12 14:08:32 entweichen Exp $ --> +<!-- $Id: friends.shtml,v 1.9 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="accounts.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="subscriptions.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -4,7 +4,7 @@ <head> <title>Slashdot FAQ - Index</title> <!-- -$VERSION = sprintf "%d.%03d", q$Id: index.shtml,v 1.36 2008/02/27 18:32:10 entweichen Exp $ =~ /(\d+)/g +$VERSION = sprintf "%d.%03d", q$Id: index.shtml,v 1.37 2008/04/10 04:34:09 pudge Exp $ =~ /(\d+)/g --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -17,7 +17,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> </ul> </div> @@ -289,7 +289,6 @@ <li><strong><a href="/faq/firehose.shtml#fh600">What browsers are supported?</a></strong></li> <li><strong><a href="/faq/firehose.shtml#fh700">Why didn't you post a submission that made it to red?</a></strong></li> <li><strong><a href="/faq/firehose.shtml#fh800">Doesn't this make you just like...</a></strong></li> - </ul> </ul><!-- Badges --> <h2><strong><a href="/faq/badges.shtml">Badges How-To</a></strong></h2> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Interviews</title> -<!-- $Id: interviews.shtml,v 1.8 2008/02/27 18:45:05 entweichen Exp $ --> +<!-- $Id: interviews.shtml,v 1.9 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="UI.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="com-mod.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Meta-moderation</title> -<!-- $Id: metamod.shtml,v 1.8 2008/02/27 18:51:51 entweichen Exp $ --> +<!-- $Id: metamod.shtml,v 1.9 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="com-mod.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="accounts.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - About Slashdot</title> -<!-- $Id: slashmeta.shtml,v 1.13 2008/02/27 18:52:45 entweichen Exp $ --> +<!-- $Id: slashmeta.shtml,v 1.14 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="feeds.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="tech.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Subscriptions</title> -<!-- $Id: subscriptions.shtml,v 1.23 2008/02/27 18:53:28 entweichen Exp $ --> +<!-- $Id: subscriptions.shtml,v 1.24 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="friends.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="feeds.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Suggestions and Requests</title> -<!-- $Id: suggestions.shtml,v 1.12 2008/02/27 18:54:23 entweichen Exp $ --> +<!-- $Id: suggestions.shtml,v 1.13 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="advertising.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="tags.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -6,7 +6,7 @@ <!--#include virtual="/slashhead-gen-full.inc"--> <!-- -($VERSION) = '$Id: tags.shtml,v 1.20 2008/02/27 18:55:10 entweichen Exp $' =~ /^\$Id: \S+ (\S+)/ +($VERSION) = '$Id: tags.shtml,v 1.21 2008/04/10 04:34:09 pudge Exp $' =~ /^\$Id: \S+ (\S+)/ --> <div class="generaltitle"> @@ -17,7 +17,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="suggestions.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="firehose.shtml" class="begin">Next Section</a></span></li> @@ -166,9 +166,9 @@ bookmark toolbar, or right-click and save the link as a bookmark. Subscribers using SSL will want to use the HTTPS version of this link.</p> -<p>HTTP: <a href="javascript:location.href='http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">Post to Slashdot</a> (general users) +<p>HTTP: <a href="javascript:location.href='http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">Post to Slashdot</a> (general users) <br> -HTTPS: <a href="javascript:location.href='https://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">Post to Slashdot</a> (for subscribers using SSL) +HTTPS: <a href="javascript:location.href='https://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">Post to Slashdot</a> (for subscribers using SSL) </p> <p><i><font size=-1>Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a></font></i> @@ -205,7 +205,7 @@ <p>Your bookmarks are available to you at <a href="/my/bookmarks">/my/bookmarks</a>. You can access other users' bookmarks from their homepages. To read mine, you would use -<a href=/~CmdrTaco/bookmarks/>/~CmdrTaco/bookmarks</a>. +<a href="/~CmdrTaco/bookmarks/">/~CmdrTaco/bookmarks</a>. </p> <p><i><font size=-1>Answered by: <a href="mailto:malda****@slash*****">CmdrTaco</a></font></i> <br><i><font size=-1>Last Modified: 3/22/06</font></i> Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml =================================================================== --- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ <html> <head> <title>Slashdot FAQ - Tech</title> -<!-- $Id: tech.shtml,v 1.8 2008/02/27 18:56:05 entweichen Exp $ --> +<!-- $Id: tech.shtml,v 1.9 2008/04/10 04:34:09 pudge Exp $ --> <!--#include virtual="/slashcssbase.inc"--> <!--#include virtual="/slashhead-gen-full.inc"--> @@ -15,7 +15,7 @@ <div id="usermenu"> <ul class="menu" style="padding: 5px 10px 5px 10px;"> - <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> + <li><span class="begin"><a href="/help" class="begin">Return to Help & Preferences</a></span></li> <li><span class="begin"><a href="/faq" class="begin">Return to the FAQ</a></span></li> <li><span class="begin"><a href="slashmeta.shtml" class="begin">Previous Section</a></span></li> <li><span class="begin"><a href="advertising.shtml" class="begin">Next Section</a></span></li> Modified: slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: FireHose.pm,v 1.231 2008/04/03 19:16:05 tvroom Exp $ +# $Id: FireHose.pm,v 1.233 2008/04/10 05:22:29 pudge Exp $ package Slash::FireHose; @@ -36,12 +36,13 @@ use POSIX qw(ceil); use LWP::UserAgent; use URI; +use Time::HiRes; use base 'Slash::DB::Utility'; use base 'Slash::DB::MySQL'; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.231 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.233 $ ' =~ /\$Revision:\s+([^\s]+)/; sub createFireHose { my($self, $data) = @_; $data->{dept} ||= ""; @@ -379,9 +380,18 @@ $options ||= {}; $options->{limit} ||= 50; my $ps = $options->{limit}; - + + my $fetch_extra = 0; + my($day_num, $day_label, $day_count); + $options->{limit} += $options->{more_num} if $options->{more_num}; + my $fetch_size = $options->{limit}; + if ($options->{orderby} eq "createtime") { + $fetch_extra = 1; + $fetch_size++; + } + my $pop; $pop = $self->getMinPopularityForColorLevel($colors->{$options->{color}}) if $options->{color} && $colors->{$options->{color}}; @@ -413,8 +423,8 @@ $opts{dayduration} = $options->{duration}; } - $opts{records_max} = $options->{limit} unless $options->{nolimit}; - $opts{records_start} = $options->{offset} if $options->{offset}; + $opts{records_max} = $fetch_size unless $options->{nolimit}; + $opts{records_start} = $options->{offset} if $options->{offset}; $opts{sort} = 3; # sorting handled by caller # just a few options to carry over @@ -616,13 +626,21 @@ $offset = defined $options->{offset} ? $options->{offset} : ''; $offset = '' if $offset !~ /^\d+$/; $offset = "$offset, " if length $offset; - $limit_str = "LIMIT $offset $options->{limit}" unless $options->{nolimit}; + $limit_str = "LIMIT $offset $fetch_size" unless $options->{nolimit}; $other .= " ORDER BY $options->{orderby} $options->{orderdir} $limit_str"; } #print STDERR "[\nSELECT $columns\nFROM $tables\nWHERE $where\n$other\n]\n"; my $hr_ar = $self->sqlSelectAllHashrefArray($columns, $tables, $where, $other); + + if ($fetch_extra && @$hr_ar == $fetch_size) { + $fetch_extra = pop @$hr_ar; + ($day_num, $day_label, $day_count) = $self->getNextDayAndCount( + $fetch_extra, $options, $tables, \@where, $count_other + ); + } + my $count; if ($options->{tagged_by_uid}) { my $rows = $self->sqlSelectAllHashrefArray("count(*)", $tables, $where, $count_other); @@ -667,9 +685,36 @@ $items = $hr_ar; } - return($items, $results, $count, $future_count); + return($items, $results, $count, $future_count, $day_num, $day_label, $day_count); } +sub getNextDayAndCount { + my($self, $item, $opts, $tables, $where_ar, $other) = @_; + + my $user = getCurrentUser(); + + my $item_day = timeCalc($item->{createtime}, '%Y-%m-%d'); + + my $is_desc = $opts->{orderdir} eq "DESC"; + + my $border_time = $is_desc ? "$item_day 00:00:00" : "$item_day 23:59:59"; + $border_time = timeCalc($border_time, "%Y-%m-%d %T", -$user->{off_set}); + + my $it_cmp = $is_desc ? "<=" : ">="; + my $bt_cmp = $is_desc ? ">=" : "<="; + + my $i_time_q = $self->sqlQuote($item->{createtime}); + my $border_time_q = $self->sqlQuote($border_time); + + my $where = join ' AND ', @$where_ar, "createtime $it_cmp $i_time_q", "createtime $bt_cmp $border_time_q"; + + my $day_count = $self->sqlSelect("count(*)", $tables, $where, $other); + + my $day_labels = getOlderDaysFromDay($item_day, 0, 0, { skip_add_today => 1, show_future_days => 1 }); + + return($day_labels->[0]->[0], $day_labels->[0]->[1], $day_count); +} + # A single-globjid wrapper around getUserFireHoseVotesForGlobjs. sub getUserFireHoseVoteForGlobjid { @@ -1006,7 +1051,14 @@ $options->{content_type} = 'application/json'; my $firehose = getObject("Slash::FireHose"); my $opts = $firehose->getAndSetOptions(); - + + $firehose->createSettingLog({ + uid => $user->{uid}, + name => $form->{setting_name}, + value => $form->{$form->{setting_name}}, + "-ts" => "NOW()"} + ); + my $html = {}; $html->{fhtablist} = slashDisplay("firehose_tabs", { nodiv => 1, tabs => $opts->{tabs}, options => $opts, section => $form->{section} }, { Return => 1}); $html->{fhoptions} = slashDisplay("firehose_options", { nowrapper => 1, options => $opts }, { Return => 1}); @@ -1156,8 +1208,9 @@ sub ajaxFireHoseGetUpdates { my($slashdb, $constants, $user, $form, $options) = @_; + my $start = Time::HiRes::time(); - my $update_data = { removals => 0, items => 0 }; + my $update_data = { removals => 0, items => 0, updates => 0, new => 0 }; $options->{content_type} = 'application/json'; my $firehose = getObject("Slash::FireHose"); @@ -1168,7 +1221,7 @@ my %ids = map { $_ => 1 } @ids; my %ids_orig = ( %ids ) ; my $opts = $firehose->getAndSetOptions({ no_set => 1 }); - my($items, $results, $count, $future_count) = $firehose_reader->getFireHoseEssentials($opts); + my($items, $results, $count, $future_count, $day_num, $day_label, $day_count) = $firehose_reader->getFireHoseEssentials($opts); my $num_items = scalar @$items; my $future = {}; my $globjs = []; @@ -1232,6 +1285,7 @@ $html->{"text-$_->{id}"} = $introtext; $html->{"fhtime-$_->{id}"} = timeCalc($item->{createtime}); $html->{"topic-$_->{id}"} = slashDisplay("dispTopicFireHose", { item => $item, adminmode => $adminmode }, { Return => 1}); + $update_data->{updates}++; # updated } } @@ -1241,6 +1295,7 @@ if ($_->{day}) { push @$updates, ["add", $_->{id}, slashDisplay("daybreak", { options => $opts, cur_day => $_->{day}, last_day => $_->{last_day}, id => "firehose-day-$_->{day}", fh_page => $base_page }, { Return => 1, Page => "firehose" }) ]; } else { + $update_data->{new}++; push @$updates, ["add", $_->{id}, slashDisplay("dispFireHose", { mode => $curmode, item => $item, tags_top => $tags_top, vote => $votes->{$item->{globjid}}, options => $opts }, { Return => 1, Page => "firehose" })]; } $added->{$_->{id}}++; @@ -1278,25 +1333,31 @@ push @$updates, ["remove", $_, ""]; $update_data->{removals}++; } + + my $firehose_more_data = { + future_count => $future_count, + options => $opts, + day_num => $day_num, + day_label => $day_label, + day_count => $day_count, + contentsonly => 0, + }; - my $html2split = slashDisplay("paginate", { + $html->{'fh-paginate'} = slashDisplay("paginate", { contentsonly => 1, day => $last_day, + last_day => $last_day, page => $form->{page}, options => $opts, ulid => "fh-paginate", divid => "fh-pag-div", num_items => $num_items, fh_page => $base_page, + firehose_more_data => $firehose_more_data, split_refresh => 1 }, { Return => 1, Page => "firehose" }); - my ($beforewidget, $afterwidget) = split('<!-- split -->', $html2split); - - $html->{beforewidget} = $beforewidget; - $html->{afterwidget} = $afterwidget; - $html->{firehose_pages} = slashDisplay("firehose_pages", { page => $form->{page}, num_items => $num_items, @@ -1310,7 +1371,7 @@ $html->{filter_text} = "Filtered to ".strip_literal($opts->{color})." '".strip_literal($opts->{fhfilter})."'"; $html->{gmt_update_time} = " (".timeCalc($slashdb->getTime(), "%H:%M", 0)." GMT) " if $user->{is_admin}; $html->{itemsreturned} = $num_items == 0 ? getData("noitems", { options => $opts }, 'firehose') : ""; - $html->{firehose_more} = getData("firehose_more_link", { options => $opts, future_count => $future_count, contentsonly => 1}, 'firehose'); +# $html->{firehose_more} = getData("firehose_more_link", { options => $opts, future_count => $future_count, contentsonly => 1, day_label => $day_label, day_count => $day_count }, 'firehose'); my $data_dump = Data::JavaScript::Anon->anon_dump({ html => $html, @@ -1324,8 +1385,26 @@ my $reskey = getObject("Slash::ResKey"); my $user_rkey = $reskey->key('ajax_user_static', { no_state => 1 }); $reskey_dump .= "reskey_static = '" . $user_rkey->reskey() . "';\n" if $user_rkey->create(); - return "$data_dump\n$reskey_dump"; + my $duration = Time::HiRes::time() - $start; + my $more_num = $options->{more_num} || 0; + + my $retval = "$data_dump\n$reskey_dump"; + + my $updatelog = { + uid => $user->{uid}, + new_count => $update_data->{new}, + update_count => $update_data->{updates}, + total_num => $update_data->{items}, + more_num => $more_num, + "-ts" => "NOW()", + duration => $duration, + bytes => length($retval) + }; + $firehose->createUpdateLog($updatelog); + + return $retval; + } sub firehose_vote { @@ -2161,6 +2240,9 @@ if (!$user->{is_admin} && (($options->{limit} + $options->{more_num}) > 200)) { $options->{more_num} = 200 - $options->{limit} ; } + if ($options->{more_num} > $user->{firehose_max_more_num}) { + $self->setUser($user->{uid}, { firehose_max_more_num => $options->{more_num}}); + } } return $options; @@ -2287,7 +2369,7 @@ if ($featured && $featured->{id}) { $options->{not_id} = $featured->{id}; } - my($items, $results, $count, $future_count) = $firehose_reader->getFireHoseEssentials($options); + my($items, $results, $count, $future_count, $day_num, $day_label, $day_count) = $firehose_reader->getFireHoseEssentials($options); my $itemnum = scalar @$items; @@ -2355,26 +2437,31 @@ if ($gSkin->{skid} != $constants->{mainpage_skid}) { $section = $gSkin->{skid}; } + my $firehose_more_data = { + future_count => $future_count, + options => $options, + day_num => $day_num, + day_label => $day_label, + day_count => $day_count + }; - my $firehose_more = getData('firehose_more_link', { future_count => $future_count, options => $options }, 'firehose'); - slashDisplay("list", { - itemstext => $itemstext, - itemnum => $itemnum, - page => $options->{page}, - options => $options, - refresh_options => $refresh_options, - votes => $votes, - colors => $colors, - colors_hash => $colors_hash, - tabs => $options->{tabs}, - slashboxes => $Slashboxes, - last_day => $last_day, - fh_page => $base_page, - search_results => $results, - featured => $featured, - section => $section, - firehose_more => $firehose_more + itemstext => $itemstext, + itemnum => $itemnum, + page => $options->{page}, + options => $options, + refresh_options => $refresh_options, + votes => $votes, + colors => $colors, + colors_hash => $colors_hash, + tabs => $options->{tabs}, + slashboxes => $Slashboxes, + last_day => $last_day, + fh_page => $base_page, + search_results => $results, + featured => $featured, + section => $section, + firehose_more_data => $firehose_more_data }, { Page => "firehose", Return => 1 }); } @@ -2479,8 +2566,7 @@ my $last_days_processed = 0; foreach (@$items) { my $cur_day = $_->{createtime}; - $cur_day = timeCalc($cur_day, "%Y%m%d %T", $offset); - $cur_day =~ s/ \d\d:\d\d:\d\d$//g; + $cur_day = timeCalc($cur_day, "%Y%m%d", $offset); if ($cur_day ne $last_day) { if ($last_days_processed >= 5) { push @retitems, { id => "day-$cur_day", day => $cur_day, last_day => $last_day }; @@ -2647,6 +2733,19 @@ return $str; } +sub createUpdateLog { + my($self, $data) = @_; + return if !getCurrentStatic("firehose_logging"); + $data->{uid} ||= getCurrentUser('uid'); + $self->sqlInsert("firehose_update_log", $data); +} + +sub createSettingLog { + my($self, $data) = @_; + return if !getCurrentStatic("firehose_logging"); + $data->{uid} ||= getCurrentUser('uid'); + $self->sqlInsert("firehose_setting_log", $data); +} 1; __END__ @@ -2658,4 +2757,4 @@ =head1 VERSION -$Id: FireHose.pm,v 1.231 2008/04/03 19:16:05 tvroom Exp $ +$Id: FireHose.pm,v 1.233 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/firehose.css =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2008-04-11 07:28:41 UTC (rev 577) @@ -58,9 +58,9 @@ .paginate li.active, #fhtablist li.active { font-weight: bold; } #fhtablist li.active a img { margin-left: .3em} #fhtablist li.active a { padding: 0 } -#firehose_pages a { color: #bbb; border: 1px solid #444; background: #444; padding: 3px !important; } -#firehose_pages a:hover { color: #ccc; border: 1px solid #666; background: #555;} -#firehose_pages a.fh_cur_page { margin: 0; color: #fff !important; border: 1px solid #555; background: #666 url('//images.slashdot.org/block-title-bg.png') repeat-x;} +#firehose_pages a, #firehose_more a { color: #bbb; border: 1px solid #444; background: #444; padding: 3px !important; } +#firehose_pages a:hover, #firehose_more a { color: #ccc; border: 1px solid #666; background: #555;} +#firehose_pages a.fh_cur_page, #firehose_more a { margin: 0; color: #fff !important; border: 1px solid #555; background: #666 url('//images.slashdot.org/block-title-bg.png') repeat-x;} #firehose_pages a b {color: #888; font-size: 130%; font-family: georgia, sans-serif} #fhcalendar_pag {float: left !important;} @@ -126,7 +126,7 @@ border: 1px solid #666; border-bottom: 1px solid #777; border-left: 1px solid #777; - padding: .3em !important; + padding: .5em .3em .5em .3em !important; margin: 0 .3em; white-space: nowrap; } @@ -139,8 +139,6 @@ } ul.menu#fhtablist li.active:before, .paginate .active:before { content: ""; } -#beforewidget, .paginate span.active {float: left} -#beforewidget span, #afterwidget span {line-height:270% !important} .paginate .calendar-pane {margin: 0;} /* Pagination */ @@ -152,7 +150,7 @@ .admin .paginate { margin-right: 0; } .paginate .menu { background: url('//images.slashdot.org/corner_w_br.png') right bottom no-repeat; height:2.9em; -padding-top:0.4em;} +padding-top:0.9em;} /* Articles */ Modified: slashjp/branches/upstream/current/plugins/FireHose/mysql_dump.sql =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/mysql_dump.sql 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/mysql_dump.sql 2008-04-11 07:28:41 UTC (rev 577) @@ -1,5 +1,5 @@ # -# $Id: mysql_dump.sql,v 1.36 2008/01/31 17:37:12 tvroom Exp $ +# $Id: mysql_dump.sql,v 1.37 2008/04/09 19:24:18 tvroom Exp $ # INSERT INTO ajax_ops VALUES (NULL, 'firehose_fetch_text', 'Slash::FireHose', 'fetchItemText', 'ajax_user_static', 'createuse'); INSERT INTO ajax_ops VALUES (NULL, 'firehose_reject', 'Slash::FireHose', 'rejectItem', 'ajax_admin_static', 'use'); @@ -31,6 +31,7 @@ INSERT INTO vars (name, value, description) VALUES ('firehose_spam_score', '-50', 'Popularity score assigned to all firehose items with is_spam=yes'); INSERT INTO vars (name, value, description) VALUES ('firehose_color_labels', 'red|orange|yellow|green|blue|purple|violet|black', 'Firehose color labels'); INSERT INTO vars (name, value, description) VALUES ('firehose_anonval_param', '', 'String needed to be passed in anonval form param to validate requests, set to a string to enforce this validation'); +INSERT INTO vars (name, value, description) VALUES ('firehose_logging', '0', 'Log firehose usage info?'); INSERT INTO firehose_tab VALUES (1,0,'Firehose','','createtime','DESC','indigo','fulltitle'); INSERT INTO firehose_tab VALUES (2,0,'Slashdot','story','createtime','DESC','black','full'); Modified: slashjp/branches/upstream/current/plugins/FireHose/mysql_schema.sql =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/mysql_schema.sql 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/mysql_schema.sql 2008-04-11 07:28:41 UTC (rev 577) @@ -1,5 +1,5 @@ # -# $Id: mysql_schema.sql,v 1.25 2007/11/08 21:50:30 jamiemccarthy Exp $ +# $Id: mysql_schema.sql,v 1.26 2008/04/09 19:24:18 tvroom Exp $ # DROP TABLE IF EXISTS firehose; CREATE TABLE firehose ( @@ -73,3 +73,28 @@ PRIMARY KEY (tabid), UNIQUE uid_tabname(uid,tabname) ) TYPE=InnoDB; + +DROP TABLE IF EXISTS firehose_update_log; +CREATE TABLE firehose_update_log( + id mediumint(8) unsigned NOT NULL auto_increment, + uid MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', + new_count SMALLINT UNSIGNED NOT NULL DEFAULT '0', + update_count SMALLINT UNSIGNED NOT NULL DEFAULT '0', + total_num SMALLINT UNSIGNED NOT NULL DEFAULT '0', + more_num SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ts datetime DEFAULT '1970-01-01 00:00:00' NOT NULL, + duration FLOAT DEFAULT 0.0 NOT NULL, + bytes mediumint UNSIGNED DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +) TYPE=InnoDB; + +DROP TABLE IF EXISTS firehose_setting_log; +CREATE TABLE firehose_setting_log( + id mediumint(8) unsigned NOT NULL auto_increment, + uid MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', + name VARCHAR(32) NOT NULL DEFAULT '', + value VARCHAR(64) NOT NULL DEFAULT '', + ts datetime DEFAULT '1970-01-01 00:00:00' NOT NULL, + PRIMARY KEY (id) +); + Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/data;firehose;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/data;firehose;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/data;firehose;default 2008-04-11 07:28:41 UTC (rev 577) @@ -96,24 +96,45 @@ [% CASE 'firehose_more_link' %] [% extra_onclick = '' %] [% IF !contentsonly %] - <div id="firehose_more"> + <span id="firehose_more"> [% END %] - [% IF day_label && day_count; - label = day_count _ " more " _ $day_label _ "..."; - ELSIF future_count > 0; - label = future_count _ " more..."; - ELSIF future_count <= 0 && !options.startdate && options.duration != -1 && options.orderby == "createtime"; - label = "Get more..."; - extra_onclick = 'firehose_set_options(\'duration\', -1); '; + [% label = "Get more »" %] + [% IF day_label && day_count && options.duration != -1; + label = day_count _ " more »"; + ELSIF future_count > 0 ; + IF options.duration == -1; + label = future_count _ " more »"; + ELSE; + label = future_count _ " more »"; + END; + ELSIF future_count <= 0 ; + IF !options.startdate && options.duration != -1 && options.orderby == "createtime"; + label = "Get more..."; + extra_onclick = 'firehose_set_options(\'duration\', -1); '; + ELSIF options.orderby != "createtime"; + fh = Slash.getObject("Slash::FireHose") + fh_array = fh.getFireHoseColors(1); + fh_hash = fh.getFireHoseColors(); + fh_num = fh_hash.${options.color}; + new_color = fh_array.$fh_num; + IF new_color; + label = "More $new_color »"; + extra_onclick = "firehose_slider_set_color('" _ new_color _ "');"; + END; + END; END; %] - <a href="#" onclick="[% extra_onclick %] firehose_more(); return false;">[% label %]</a> + [% IF user.is_anon %] + <a href="#" onclick="show_login_box(); return false;">[% label %]</a> + [% ELSE %] + <a href="#" onclick="[% extra_onclick %] firehose_more(); return false;">[% label %]</a> + [% END %] [% IF !contentsonly %] - </div> + </span> [% END %] [% CASE 'notavailable' %] The item you're trying to view either does not exist, or is not viewable to you. [% END %] __version__ -$Id: data;firehose;default,v 1.25 2008/04/02 15:00:56 tvroom Exp $ +$Id: data;firehose;default,v 1.28 2008/04/10 16:56:50 tvroom Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default 2008-04-11 07:28:41 UTC (rev 577) @@ -153,8 +153,7 @@ <span id="itemsreturned"> [% IF itemnum == 0; Slash.getData('noitems', { options => options }, 'firehose'); END %] </span> -[% firehose_more %] -[% PROCESS paginate options = options ulid = "fh-paginate" divid = "fh-pag-div" num_items = itemnum fh_page = fh_page %] +[% PROCESS paginate options = options ulid = "fh-paginate" divid = "fh-pag-div" num_items = itemnum fh_page = fh_page last_day = last_day firehose_more_data = firehose_more_data %] <script type="text/javascript"> [% FOR opt = [ 'startdate', 'mode', 'fhfilter', 'orderdir', 'orderby', 'startdate', 'duration', 'color'] %] [%- opt_value = options.$opt -%] @@ -205,4 +204,4 @@ </script> __version__ -$Id: list;firehose;default,v 1.113 2008/04/01 19:34:00 tvroom Exp $ +$Id: list;firehose;default,v 1.114 2008/04/09 19:23:18 tvroom Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/paginate;firehose;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/paginate;firehose;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/paginate;firehose;default 2008-04-11 07:28:41 UTC (rev 577) @@ -34,55 +34,53 @@ [% IF options.duration == 7 && !options.startdate %] [% day = Slash.db.getDay(0) %] - [% IF !split_refresh %]<span id="beforewidget">[% END %] <span class="inactive"> <a href="[% gSkin.rootdir %]/[% day_page %]?[% f = fh.genFireHoseParams(options, { startdate => '', duration => 7 }); f; %][% IF form.index %]&index=1[% END %]">Today</a> </span> - [% IF !split_refresh %]</span>[% END %] - [% IF split_refresh %]<!-- split -->[% END %] - [% IF !split_refresh %] - <span class="active"> - [% IF form.skipmenu || no_peer %] - [% PROCESS datewidget id='fhcalendar_pag' init='firehose_calendar_init' %] - [% ELSE %] - [% PROCESS datewidget id='fhcalendar_pag' peer = 'fhcalendar' init='firehose_calendar_init' %] - [% END %] - [% PROCESS firehose_pages page = page num_items = num_items fh_page = fh_page options=options contentsonly = 0 %] - </span> - [% END %] - [% max_days_ahead = options.smalldevices ? 2 : 3 %] - [% days = Slash.getOlderDaysFromDay(day, 1, max_days_ahead, { "show_future_days" => 1, skip_add_today => 1 }); %] - [% IF !split_refresh %]<span id="afterwidget">[% END %] + [% IF options.orderby == "createtime"; + max_days_ahead = options.smalldevices ? 1 : 2; + days = Slash.getOlderDaysFromDay(last_day, -1, max_days_ahead, { "show_future_days" => 1, skip_add_today => 1 }); + ELSE; + max_days_ahead = options.smalldevices ? 2 : 3; + days = Slash.getOlderDaysFromDay(day, 1, max_days_ahead, { "show_future_days" => 1, skip_add_today => 1 }); + END; + %] [% + got_more_link = 0; FOREACH cur_day = days; %] - <span class="inactive"> + <span class="[% IF cur_day.0 != last_day %]in[% END %]active"> <a onclick="firehose_set_options('issue','[% cur_day.0 %]'); return false;" href="[% gSkin.rootdir %]/[% day_page %]?[% f = fh.genFireHoseParams(options, { startdate => cur_day.0, duration => 1}); f; %][% index_extra %]">[% cur_day.1 | strip_literal %]</a> + [% IF firehose_more_data.day_num == cur_day.0 %] + [% Slash.getData('firehose_more_link', firehose_more_data, 'firehose'); %] + [% got_more_link = 1; %] + [% ELSIF firehose_more_data.future_count <= 0 && cur_day.0 == last_day %] + [% Slash.getData('firehose_more_link', firehose_more_data, 'firehose'); %] + [% got_more_link = 1; %] + [% END %] </span> [% END %] + [% IF !got_more_link %] + <span class="active"> + [% IF options.orderby != "createtime" %] + <a href="#" onclick="firehose_slider_set_color('[% options.color %]'); return false">[% options.color.ucfirst %]</a> + [% END %] + [% Slash.getData('firehose_more_link', firehose_more_data, 'firehose'); %] + </span> + [% END %] [% idle_submit_plug %] - [% IF !split_refresh %]</span>[% END %] [% ELSIF options.startdate && options.duration == 1; day = day || options.startdate; day = day.replace('-',''); day = day || Slash.db.getDay(0); max_days_ahead = options.smalldevices ? 2 : 3; days = Slash.getOlderDaysFromDay(day, -1, max_days_ahead); %] - [% IF !split_refresh %]<span id="beforewidget">[% END %] + [% FOREACH cur_day = days; IF day == cur_day.0; %] - [% IF !split_refresh %]</span>[% END %] - [% IF !split_refresh %] <span class="active"> - [% IF form.skipmenu %] - [% PROCESS datewidget id='fhcalendar_pag' init='firehose_calendar_init' %] - [% ELSE %] - [% PROCESS datewidget id='fhcalendar_pag' peer = 'fhcalendar' init='firehose_calendar_init' %] - [% END %] + <a onclick="firehose_set_options('issue','[% cur_day.0 %]'); return false;" href="[% gSkin.rootdir %]/[% day_page %]?[% f = fh.genFireHoseParams(options, { startdate => cur_day.0, duration => 1}); f; %][% index_extra %]">[% cur_day.1 | strip_literal %]</a> </span> - [% END %] - [% IF split_refresh %]<!-- split -->[% END %] - [% IF !split_refresh %]<span id="afterwidget">[% END %] [% ELSE %] <span class="inactive"> [% IF cur_day.2 %] @@ -95,7 +93,6 @@ [% END %] [% idle_submit_plug %] -[% IF !split_refresh %]</span>[% END %] [% ELSIF options.startdate && options.duration >= 28 && options.duration <= 31; firehose = Slash.getObject("Slash::FireHose"); days = firehose.getOlderMonthsFromDay(options.startdate,-2, 2); @@ -104,7 +101,6 @@ %] <span class="active"> <a href="[% gSkin.rootdir %]/[% day_page %]?startdate=[% cur_day.0 %]&duration=[% cur_day.2 %]">[% cur_day.1 | strip_literal %]</a> - [% PROCESS datelaunch %] [% PROCESS firehose_pages page = page num_items = num_items day_page = fh_page options=options %] </span> [% ELSE %] @@ -117,27 +113,13 @@ idle_submit_plug; %] [% ELSIF options.duration == -1 && !options.startdate %] - [% IF !split_refresh %]<span id="beforewidget">[% END %] <span class="inactive"> <a href="[% gSkin.rootdir %]/[% day_page %]?[% f = fh.genFireHoseParams(options, { startdate => '', duration => 7}); f; %][% IF form.index %]index=1[% END %]">Today</a> + <span class="active"> + <a href="#">Archive</a> [% Slash.getData('firehose_more_link', firehose_more_data, 'firehose'); %] </span> - [% IF !split_refresh %] - </span> - <span class="active"> - [% IF form.skipmenu || form.index %] - [% PROCESS datewidget id='fhcalendar_pag' init='firehose_calendar_init' date="" %] - [% ELSE %] - [% PROCESS datewidget id='fhcalendar_pag' peer = 'fhcalendar' init='firehose_calendar_init' %] - [% END %] - [% PROCESS firehose_pages page = page num_items = num_items fh_page = fh_page options=options %] - </span> - [% END %] - [% IF split_refresh %]<!-- split -->[% END %] - [% IF !split_refresh %] - <span id="afterwidget"> [% idle_submit_plug %] </span> - [% END %] [% ELSE %] [% time_label = ""; IF options.duration == -1; @@ -153,7 +135,6 @@ [% UNLESS nopages %] <span class="active"> [% time_label %] - [% PROCESS datelaunch %] [% PROCESS firehose_pages page = page num_items = num_items fh_page = fh_page options=options %] </span> @@ -164,4 +145,4 @@ </div> [% END %] __version__ -$Id: paginate;firehose;default,v 1.31 2008/02/20 18:42:47 tvroom Exp $ +$Id: paginate;firehose;default,v 1.33 2008/04/10 16:52:49 tvroom Exp $ Modified: slashjp/branches/upstream/current/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Journal/journal.pl 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Journal/journal.pl 2008-04-11 07:28:41 UTC (rev 577) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: journal.pl,v 1.144 2008/04/02 14:20:23 entweichen Exp $ +# $Id: journal.pl,v 1.145 2008/04/03 22:44:02 pudge Exp $ use strict; use Slash 2.003; # require Slash 2.3.x @@ -13,7 +13,7 @@ use Slash::XML; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.144 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.145 $ ' =~ /\$Revision:\s+([^\s]+)/; sub main { my $journal = getObject('Slash::Journal'); @@ -699,6 +699,7 @@ } # Add the User2 event. + if ($event_id) { my $events = $slashdb->sqlSelectAllHashref( 'eid', 'eid, date', 'user_events', "uid = " . $user->{uid} . " and code = 2"); @@ -735,6 +736,7 @@ $slashdb->sqlUpdate('user_event_blocks', { block => $new_blocks }, "uid = " . $user->{uid} . " and code = 2"); } + } # $event_id return 0; } Modified: slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/Duration.pm =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/Duration.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/Duration.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Duration.pm,v 1.12 2008/03/27 00:44:21 pudge Exp $ +# $Id: Duration.pm,v 1.15 2008/04/11 01:12:38 pudge Exp $ package Slash::ResKey::Checks::Duration; @@ -13,7 +13,7 @@ use base 'Slash::ResKey::Key'; -our($VERSION) = ' $Revision: 1.12 $ ' =~ /\$Revision:\s+([^\s]+)/; +our($VERSION) = ' $Revision: 1.15 $ ' =~ /\$Revision:\s+([^\s]+)/; sub doCheckCreate { @@ -26,8 +26,12 @@ return RESKEY_SUCCESS; } + setMaxDuration($self); + my @return = maxUsesPerTimeframe($self); - return @return || RESKEY_SUCCESS; + return @return if @return; + + return RESKEY_SUCCESS; } sub doCheckTouch { @@ -40,6 +44,8 @@ return RESKEY_SUCCESS; } + setMaxDuration($self); + my $reskey_obj = $self->get; my @return = maxUsesPerTimeframe($self, $reskey_obj); @@ -74,10 +80,12 @@ # as not to increase the chance of giving users a rather spurious error @return = minDurationBetweenUses($self, $reskey_obj); + setMaxDuration($self) if @return; return @return if @return; if ($self->origtype ne 'createuse') { @return = minDurationBetweenCreateAndUse($self, $reskey_obj); + setMaxDuration($self) if @return; return @return if @return; } @@ -89,9 +97,8 @@ $reskey_obj ||= {}; my $slashdb = getCurrentDB(); - my $check_vars = $self->getCheckVars; - my $max_failures = $check_vars->{'duration_max-failures'}; + my($max_failures) = duration($self); if ($max_failures && $reskey_obj->{rkid}) { my $where = "rkid=$reskey_obj->{rkid} AND failures > $max_failures"; my $rows = $slashdb->sqlCount('reskeys', $where); @@ -110,12 +117,9 @@ my($self, $reskey_obj) = @_; $reskey_obj ||= {}; - my $constants = getCurrentStatic(); my $slashdb = getCurrentDB(); - my $check_vars = $self->getCheckVars; - my $max_uses = $check_vars->{'duration_max-uses'}; - my $limit = $constants->{reskey_timeframe}; + my($max_uses, $limit) = duration($self); if ($max_uses && $limit) { my $where = $self->getWhereUserClause; $where .= ' AND rkrid=' . $self->rkrid; @@ -141,7 +145,7 @@ my $slashdb = getCurrentDB(); - my $limit = &duration; + my($limit) = duration($self); if ($limit) { my $where = $self->getWhereUserClause; $where .= ' AND rkrid=' . $self->rkrid; @@ -164,13 +168,10 @@ my($self, $reskey_obj) = @_; my $slashdb = getCurrentDB(); - my $check_vars = $self->getCheckVars; - my $limit = $check_vars->{'duration_creation-use'}; + my($limit) = duration($self); if ($limit && $reskey_obj->{rkid}) { - my $where = "rkid=$reskey_obj->{rkid}"; - $where .= ' AND rkrid=' . $self->rkrid; - $where .= ' AND is_alive="no" AND '; + my $where = "rkid=$reskey_obj->{rkid} AND "; $where .= "create_ts > DATE_SUB(NOW(), INTERVAL $limit SECOND)"; my $rows = $slashdb->sqlCount('reskeys', $where); @@ -184,10 +185,11 @@ return; } - sub duration { - my($self, $reskey_obj) = @_; - (my $caller = (caller(1))[3]) =~ s/^.*:(\w+)$/$1/; + # $do is a flag that tells the code to actually check the interval + # using DB calls if necessary -- pudge + my($self, $caller, $do) = @_; + ($caller = (caller(1))[3]) =~ s/^.*:(\w+)$/$1/ unless $caller; my $reader = getObject('Slash::DB', { db_type => 'reader' }); my $constants = getCurrentStatic(); @@ -195,8 +197,8 @@ my $user = getCurrentUser(); my $check_vars = $self->getCheckVars; - my $limit = $constants->{reskey_timeframe}; - my $duration = 0; + my $timeframe = $constants->{reskey_timeframe}; + my @duration; if ($caller eq 'minDurationBetweenUses') { my $duration_name = 'duration_uses'; @@ -204,7 +206,7 @@ # this is kinda ugly ... i'd like a better way to know anon, and # this constant should be a reskey constant i think -- pudge 2008.03.21 my $is_anon = $user->{is_anon} || $form->{postanon} || $user->{karma} < $constants->{formkey_minloggedinkarma}; - $duration = $check_vars->{$is_anon ? $duration_name_anon : $duration_name} || 0; + $duration[0] = $check_vars->{$is_anon ? $duration_name_anon : $duration_name} || 0; # If this user has access modifiers applied, check for possible # different speed limits based on those. First match, if any, @@ -217,7 +219,7 @@ : "$duration_name-$al2_name"; if (defined $check_vars->{$sl_name_al2}) { $al2_name_used = $al2_name; - $duration = $check_vars->{$sl_name_al2}; + $duration[0] = $check_vars->{$sl_name_al2}; last; } } @@ -226,15 +228,73 @@ my $multiplier = $check_vars->{"$duration_name_anon-mult"}; if ($multiplier && $multiplier != 1) { my $num_comm = $reader->getNumCommPostedAnonByIPID($user->{ipid}); - $duration *= ($multiplier ** $num_comm); - $duration = int($duration + 0.5); + $duration[0] *= ($multiplier ** $num_comm); + $duration[0] = int($duration[0] + 0.5); } } + + if ($do && $duration[0]) { + my $reskey_obj = $self->get; + my $slashdb = getCurrentDB(); + # see minDurationBetweenUses() + my $where = $self->getWhereUserClause; + $where .= ' AND rkrid=' . $self->rkrid; + $where .= ' AND is_alive="no" AND '; + $where .= "rkid != '$reskey_obj->{rkid}' AND " if $reskey_obj->{rkid}; + $where .= "submit_ts > DATE_SUB(NOW(), INTERVAL $duration[0] SECOND)"; + my $seconds_left = $slashdb->sqlSelect( + "($duration[0] - (TIME_TO_SEC(NOW()) - TIME_TO_SEC(submit_ts))) AS diff", + 'reskeys', $where, "ORDER BY submit_ts DESC LIMIT 1" + ); + $duration[0] = $seconds_left || 0; + } + + } elsif ($caller eq 'minDurationBetweenCreateAndUse') { + my $duration_name = 'duration_creation-use'; + $duration[0] = $check_vars->{$duration_name} || 0; + + if ($do && $duration[0]) { + my $reskey_obj = $self->get; + if ($reskey_obj) { + my $slashdb = getCurrentDB(); + # see minDurationBetweenCreateAndUse() + my $where = "rkid=$reskey_obj->{rkid} AND "; + $where .= "create_ts > DATE_SUB(NOW(), INTERVAL $duration[0] SECOND)"; + my $seconds_left = $slashdb->sqlSelect( + "($duration[0] - (TIME_TO_SEC(NOW()) - TIME_TO_SEC(create_ts))) AS diff", + 'reskeys', $where + ); + $duration[0] = $seconds_left || 0; + } + } + + } elsif ($caller eq 'maxUsesPerTimeframe') { + my $duration_name = 'duration_max-uses'; + $duration[0] = $check_vars->{$duration_name} || 0; + $duration[1] = $timeframe; + + } elsif ($caller eq 'maxFailures') { + my $duration_name = 'duration_max-failures'; + $duration[0] = $check_vars->{$duration_name} || 0; } - return $duration; + return(@duration); } +sub setMaxDuration { + my($self) = @_; + my $check_vars = $self->getCheckVars; + if ($check_vars->{max_duration}) { + my @durations; + push @durations, (duration($self, 'minDurationBetweenUses', 1))[0]; + push @durations, (duration($self, 'minDurationBetweenCreateAndUse', 1))[0]; + + my($max_duration) = sort { $b <=> $a } @durations; + $self->max_duration($max_duration); + } + +} + 1; Modified: slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Key.pm,v 1.28 2008/04/03 21:20:56 pudge Exp $ +# $Id: Key.pm,v 1.29 2008/04/10 05:22:29 pudge Exp $ package Slash::ResKey::Key; @@ -118,7 +118,7 @@ use Slash::Utility; our($AUTOLOAD); -our($VERSION) = ' $Revision: 1.28 $ ' =~ /\$Revision:\s+([^\s]+)/; +our($VERSION) = ' $Revision: 1.29 $ ' =~ /\$Revision:\s+([^\s]+)/; #======================================================================== sub new { @@ -241,7 +241,7 @@ if ($name =~ /^(?:noop|success|failure|death)$/) { $sub = _createStatusAccessor($name, \@_); - } elsif ($name =~ /^(?:error|reskey|debug|rkrid|resname|origtype|type|code|opts|static|unsaved)$/) { + } elsif ($name =~ /^(?:error|reskey|debug|rkrid|resname|origtype|type|code|opts|static|unsaved|max_duration)$/) { $sub = _createAccessor($name, \@_); } elsif ($name =~ /^(?:create|touch|use|createuse)$/) { @@ -795,7 +795,7 @@ $reskey_obj = $slashdb->sqlSelectHashref('*', 'reskeys', "reskey=$reskey_q"); } - if (!$reskey_obj) { + if (!$reskey_obj && !$self->unsaved) { $self->death(1); $self->error(['reskey not found']); } @@ -1015,4 +1015,4 @@ =head1 VERSION -$Id: Key.pm,v 1.28 2008/04/03 21:20:56 pudge Exp $ +$Id: Key.pm,v 1.29 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/ResKey/example.plx =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/example.plx 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/ResKey/example.plx 2008-04-11 07:28:41 UTC (rev 577) @@ -31,6 +31,9 @@ }); handle($rkey1, 'create'); +use Data::Dumper; +print Dumper $rkey1; +exit; handle($rkey1, 'touch'); chomp(my $answer = <>); getCurrentForm()->{hcanswer} = $answer; Modified: slashjp/branches/upstream/current/plugins/ResKey/mysql_dump.sql =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/mysql_dump.sql 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/ResKey/mysql_dump.sql 2008-04-11 07:28:41 UTC (rev 577) @@ -1,5 +1,5 @@ # -# $Id: mysql_dump.sql,v 1.22 2008/03/25 18:46:24 pudge Exp $ +# $Id: mysql_dump.sql,v 1.23 2008/04/10 05:22:29 pudge Exp $ # ### NOTE: reserved reskey IDs: @@ -73,6 +73,7 @@ INSERT INTO reskey_vars VALUES (1, 'duration_uses-anon-trolla', 3600, 'duration_uses for anon + trolla AL2'); INSERT INTO reskey_vars VALUES (1, 'duration_uses-trolla', 300, 'duration_uses for tolla AL2'); INSERT INTO reskey_vars VALUES (1, 'duration_uses-anon-mult', 1.5, 'multiply by this amount for each comment previously posted in the past 24 hours'); +INSERT INTO reskey_vars VALUES (1, 'max_duration', 1, 'boolean for whether to store max duration in reskey object on creation'); Modified: slashjp/branches/upstream/current/plugins/Stats/Stats.pm =================================================================== --- slashjp/branches/upstream/current/plugins/Stats/Stats.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/plugins/Stats/Stats.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Stats.pm,v 1.194 2008/02/28 19:44:48 jamiemccarthy Exp $ +# $Id: Stats.pm,v 1.195 2008/04/09 21:15:23 jamiemccarthy Exp $ package Slash::Stats; @@ -22,7 +22,7 @@ use base 'Slash::DB::Utility'; use base 'Slash::DB::MySQL'; -($VERSION) = ' $Revision: 1.194 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.195 $ ' =~ /\$Revision:\s+([^\s]+)/; sub new { my($class, $user, $options) = @_; @@ -1744,7 +1744,7 @@ my $top_ar = $self->sqlSelectAll( "query_string AS qs, COUNT(*) AS c", "accesslog_temp", - "op='slashdot-it'", + "op='slashdot-it' AND query_string NOT LIKE '%from=rssbadge'", "GROUP BY qs ORDER BY c DESC, qs LIMIT $count" ); for my $duple (@$top_ar) { @@ -2218,4 +2218,4 @@ =head1 VERSION -$Id: Stats.pm,v 1.194 2008/02/28 19:44:48 jamiemccarthy Exp $ +$Id: Stats.pm,v 1.195 2008/04/09 21:15:23 jamiemccarthy Exp $ Modified: slashjp/branches/upstream/current/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/upstream/current/sql/mysql/defaults.sql 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/sql/mysql/defaults.sql 2008-04-11 07:28:41 UTC (rev 577) @@ -3,7 +3,7 @@ #-------------------------------------------------------- # Server version 3.23.26-beta-log # -# $Id: defaults.sql,v 1.396 2008/04/03 21:21:22 pudge Exp $ +# $Id: defaults.sql,v 1.397 2008/04/10 05:23:53 pudge Exp $ # # @@ -832,7 +832,7 @@ INSERT INTO vars (name, value, description) VALUES ('cur_performance_stats_lastid', '0', 'accesslogid to start searching at'); INSERT INTO vars (name, value, description) VALUES ('cur_performance_stats_weeks', '8', 'number of weeks back to compare current stats to'); INSERT INTO vars (name, value, description) VALUES ('currentqid',1,'The Current Question on the homepage pollbooth'); -INSERT INTO vars (name, value, description) VALUES ('cvs_tag_currentcode','T_2_5_0_200','The current cvs tag that the code was updated to - this does not affect site behavior but may be useful for your records'); +INSERT INTO vars (name, value, description) VALUES ('cvs_tag_currentcode','T_2_5_0_201','The current cvs tag that the code was updated to - this does not affect site behavior but may be useful for your records'); INSERT INTO vars (name, value, description) VALUES ('datadir','/usr/local/slash/www.example.com','What is the root of the install for Slash'); INSERT INTO vars (name, value, description) VALUES ('db_auto_increment_increment','1','If your master DB uses auto_increment_increment, i.e. multiple master replication, echo its value into this var'); INSERT INTO vars (name, value, description) VALUES ('dbsparklines_disp','0','Display dbsparklines in the currentAdminUsers box?'); Modified: slashjp/branches/upstream/current/sql/mysql/upgrades =================================================================== --- slashjp/branches/upstream/current/sql/mysql/upgrades 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/sql/mysql/upgrades 2008-04-11 07:28:41 UTC (rev 577) @@ -10,7 +10,7 @@ # after X started at the same time that X was tagged. # -# $Id: upgrades,v 1.1340 2008/04/03 22:10:48 pudge Exp $ +# $Id: upgrades,v 1.1343 2008/04/10 05:23:53 pudge Exp $ # # BEGIN tf23's additions @@ -5251,3 +5251,33 @@ # SLASHDOT LAST UPDATED HERE +# For plugins/FireHose +CREATE TABLE firehose_update_log( + id mediumint(8) unsigned NOT NULL auto_increment, + uid MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', + new_count SMALLINT UNSIGNED NOT NULL DEFAULT '0', + update_count SMALLINT UNSIGNED NOT NULL DEFAULT '0', + total_num SMALLINT UNSIGNED NOT NULL DEFAULT '0', + more_num SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ts datetime DEFAULT '1970-01-01 00:00:00' NOT NULL, + duration FLOAT DEFAULT 0.0 NOT NULL, + PRIMARY KEY (id) +) TYPE=InnoDB; + +CREATE TABLE firehose_setting_log( + id mediumint(8) unsigned NOT NULL auto_increment, + uid MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', + name VARCHAR(32) NOT NULL DEFAULT '', + value VARCHAR(64) NOT NULL DEFAULT '', + ts datetime DEFAULT '1970-01-01 00:00:00' NOT NULL, + bytes mediumint UNSIGNED DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); + +INSERT INTO vars (name, value, description) VALUES ('firehose_logging', '0', 'Log firehose usage info?'); + +# for plugins/ResKey (comments) +INSERT INTO reskey_vars VALUES (1, 'max_duration', 1, 'boolean for whether to store max duration in reskey object on creation'); + +# 2008-04-09 +UPDATE vars SET value = 'T_2_5_0_201' WHERE name = 'cvs_tag_currentcode'; Modified: slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm =================================================================== --- slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm 2008-04-11 07:28:41 UTC (rev 577) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Despam.pm,v 1.9 2008/03/12 14:27:28 jamiemccarthy Exp $ +# $Id: Despam.pm,v 1.10 2008/04/09 17:08:48 jamiemccarthy Exp $ package Slash::Tagbox::Despam; @@ -28,7 +28,7 @@ use Data::Dumper; use vars qw( $VERSION ); -$VERSION = ' $Revision: 1.9 $ ' =~ /\$Revision:\s+([^\s]+)/; +$VERSION = ' $Revision: 1.10 $ ' =~ /\$Revision:\s+([^\s]+)/; use base 'Slash::DB::Utility'; # first for object init stuff, but really # needs to be second! figure it out. -- pudge @@ -177,7 +177,7 @@ AND tagnameid=$self->{spamid} AND uid IN ($admin_in_str) AND inactivated IS NULL"); - my $is_spam = $binspam_count_globjid > 0 ? 1 : 0; + my $is_spam = ($binspam_count_globjid > 0); # Now see how many times this globjid's uid (or, if anonymous, ipid) # was tagged binspam by an admin. If greater than a certain @@ -243,29 +243,52 @@ # check_type=ipid clear 1 globj set 1 globjid set all globjids, setAL2 # Always set/clear at least the one globjid affected. - my %globjids = ( $affected_id, 1 ); - if ($mark_srcid && $check_type) { + my %globjids_mark_spam = ( $affected_id, 1 ); + if ($is_spam) { # Set/clear both the individual globjid and all its - # fellow submitted globjids, if known. + # fellow admin-tagged globjids, if known. This is + # almost certainly redundant since run() was surely + # called on those ids as well (or will be shortly). + # So XXX consider removing this code after checking + # the logs to make sure this works as I expect. for my $tagid (keys %$binspam_tagid_globj_hr) { - $globjids{ $binspam_tagid_globj_hr->{$tagid} } = 1; + $globjids_mark_spam{ $binspam_tagid_globj_hr->{$tagid} } = 1; } } + + # %$binspam_tagid_globj_hr only contains the tags on the globjs + # which have already been tagged by admins. There may be more + # globjs submitted which have not (yet) been tagged. If the + # srcid needs to be marked, and we have a valid check_type to + # mark, fetch the list of all submissions from that check_type + # and mark them. As long as $check_type is set to uid or ipid, + # the only complicated part of this has already been done by + # setting $table_clause and $where_clause. + if ($mark_srcid && $check_type) { + my $all_globjid_ar = $slashdb->sqlSelectColArrayref( + 'firehose.globjid', + "firehose$table_clause", + $where_clause); + for my $globjid (@$all_globjid_ar) { + $globjids_mark_spam{$globjid} = 1; + } + } + # Convert that list of globjids to firehose ids. - my $globjid_in_str = join(',', sort { $a <=> $b } keys %globjids); - my $fhid_hr = $slashdb->sqlSelectAllKeyValue( + my $globjid_in_str = join(',', sort { $a <=> $b } keys %globjids_mark_spam); + my $fhid_mark_spam_hr = $slashdb->sqlSelectAllKeyValue( 'id, globjid', 'firehose', "globjid IN ($globjid_in_str)"); main::tagboxLog(sprintf("%s->run globjids '%s' -> fhids '%s'", ref($self), - join(' ', sort { $a <=> $b } keys %globjids), - join(' ', sort { $a <=> $b } keys %$fhid_hr))); + join(' ', sort { $a <=> $b } keys %globjids_mark_spam), + join(' ', sort { $a <=> $b } keys %$fhid_mark_spam_hr))); # Loop on all the fhids required to be changed, setting or # clearing them as appropriate. - for my $fhid (sort { $a <=> $b } keys %$fhid_hr) { - my $globjid = $fhid_hr->{$fhid}; + for my $fhid (sort { $a <=> $b } keys %$fhid_mark_spam_hr) { + my $globjid = $fhid_mark_spam_hr->{$fhid}; my $rows = $firehose_db->setFireHose($fhid, { is_spam => ($is_spam ? 'yes' : 'no') }); main::tagboxLog(sprintf("%s->run marked fhid %d (%d) as is_spam=%d rows=%s", ref($self), $fhid, $globjid, $is_spam, $rows)); Modified: slashjp/branches/upstream/current/themes/slashcode/THEME =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/THEME 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/THEME 2008-04-11 07:28:41 UTC (rev 577) @@ -1,4 +1,4 @@ -# $Id: THEME,v 1.134 2008/04/02 14:43:55 entweichen Exp $ +# $Id: THEME,v 1.135 2008/04/10 05:22:29 pudge Exp $ name=slashcode description="Slashcode.com theme" topic=htdocs/images/topics/topicbug.jpg @@ -212,7 +212,6 @@ template=templates/display;slashderrnote;default template=templates/displayForm;users;default template=templates/displayThread;misc;default -template=templates/d2prefs;misc;default template=templates/editComm;users;default template=templates/editHome;users;default template=templates/editKey;users;default @@ -290,6 +289,7 @@ template=templates/preview_comm;comments;default template=templates/printCommComments;misc;default template=templates/printCommNoArchive;misc;default +template=templates/printCommentsLinks;misc;default template=templates/printCommentsMain;misc;default template=templates/reRegisterMail;messages;default template=templates/recentTopics;misc;default Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.css =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.css 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.css 2008-04-11 07:28:41 UTC (rev 577) @@ -209,15 +209,6 @@ /* D2 Widget */ -#d2prefs { background-color: lightgray; padding: 1em; width: 20em; border: 1px solid black; display: none; position: absolute; z-index: 1 } -#d2prefs .pref-group { margin-top: 1.5em; } -#d2prefs .pref-group-comment { font-size: smaller; margin: 0.5em 1em; } -#d2prefs .pref-group h1 { font-size: 110%; } -#d2prefs .reading-prefs, #d2prefs .writing-prefs { display: none; } -#d2prefs.reading .reading-prefs, #d2prefs.writing .writing-prefs { display: block; } - -#d2prefs-closebox { display: block; position: absolute; right: 4px; top: 4px; height: 12px; width: 12px; border: 1px solid darkgray; } - #d2act {display: none; position: relative; opacity: 1; z-index: 1000; width: 9.3em; text-align: center; } .vertical #d2act {position: relative; left: 1.2em !important} .vertical #d2act.rooted {left:-10.6em !important} @@ -236,10 +227,9 @@ #commentlisting {clear: right;} #commentControlBoxStatus {border-bottom: 1px solid #444; border-top: 1px solid #ccc; text-align: center; padding: 3px; background: #666; color: #fff; } -#bindings-legend {display: none; position: relative; text-align: center; font-family: monospace} -.vertical #bindings-legend {display: block;} - .escape-link { position: absolute; left: 0.8em; } +.commentBox div { text-align: right } +.commentBoxLinks { padding-right: 0.8em; } .horizontal .loki {display: block;} .horizontal #d2act {background: #fff; left: 0 !important; right: 0; opacity: 1; top: 0; z-index: 1000; border: none; border-right: 2px solid #aaa; width: auto; margin:0 1.25em 0 11.75em; text-align: center} @@ -425,6 +415,7 @@ .inline_comment .pref a {right: 10px; background-image: url("/images/sic_icons.png"); color: #fff; background-repeat: no-repeat; background-position: 0px -1198px;padding: 5px 10px; position:absolute; text-decoration:none; text-indent:-7000em; top: .8em; } .inline_comment .state { display: none } .inline_comment .replyto_buttons, .inlinemsg {margin: .5em 1em;} +.inline_comment .replyto_buttons, #discussion_buttons { font-size: 80% } .inline_comment #commentlisting {padding: 0; margin: 0;} .warning {background: #ffd; border: 1px solid #fe6; padding: .5em; margin: .5em 0 1em 0; color: #000;} .inline_comment .replyto_msg {background: #fdd; border: 1px solid #fbb; padding: .5em; margin: .5em 1em 0; color: #000 } Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl 2008-04-11 07:28:41 UTC (rev 577) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: comments.pl,v 1.273 2008/04/02 14:14:10 entweichen Exp $ +# $Id: comments.pl,v 1.274 2008/04/10 18:43:44 pudge Exp $ use strict; use Slash 2.003; # require Slash 2.3.x @@ -604,6 +604,8 @@ print $error_message if $error_message; + # so other code thinks we are viewing this comment from a link -- pudge + $form->{cid} = $saved_comment->{cid}; printComments($discussion, $saved_comment->{cid}, $saved_comment->{cid}, { force_read_from_master => 1, just_submitted => 1 } ); Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/images/comments.js =================================================================== (Binary files differ) Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/users2.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/users2.pl 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/users2.pl 2008-04-11 07:28:41 UTC (rev 577) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: users2.pl,v 1.1 2008/04/02 14:38:23 entweichen Exp $ +# $Id: users2.pl,v 1.2 2008/04/09 19:43:43 entweichen Exp $ use strict; use Digest::MD5 'md5_hex'; @@ -1385,6 +1385,36 @@ = $reader->sqlSelect("id, description", "journals", "discussion = $journal_block"); } + # Latest event + my @latest_event_index = $reader->sqlSelect("event, code", "user_events", "uid = $uid", "order by date desc limit 1"); + + my ($root_table, $text_table, $event_subject, $event_text, $event_rkey, $event_tkey); + + if ($latest_event_index[1] == 1) { + $root_table = 'comments'; + $text_table = 'comment_text'; + $event_subject = 'subject'; + $event_text = 'comment'; + $event_rkey = 'cid'; + $event_tkey = 'cid'; + } else { + $root_table = 'journals'; + $text_table = 'journals_text'; + $event_subject = 'description'; + $event_text = 'article'; + $event_rkey = 'discussion'; + $event_tkey = 'id'; + } + + my $latest_event; + ($latest_event->{key}, $latest_event->{subject}) = + $reader->sqlSelect("$event_tkey, $event_subject", "$root_table", "uid = $uid and $event_rkey = " . $latest_event_index[0]); + + $latest_event->{text} = + $reader->sqlSelect($event_text, $text_table, "$event_tkey = " . $latest_event->{key}); + + $latest_event->{code} = $latest_event_index[1]; + slashDisplay('userInfo2', { title => $title, uid => $uid, @@ -1409,6 +1439,7 @@ tagshist => $tagshist, latest_comments => \%latest_comments, latest_journals => \%latest_journals, + latest_event => $latest_event, }, { Page => 'users', Skin => 'default'}); } Deleted: slashjp/branches/upstream/current/themes/slashcode/templates/d2prefs;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/d2prefs;misc;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/templates/d2prefs;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -1,85 +0,0 @@ -__section__ -default -__description__ -Display pop-up prefs for discussion2. -__title__ - -__page__ -misc -__lang__ -en_US -__name__ -d2prefs -__template__ -<div id="d2prefs"> - <form> - <div id="d2-prefs-closebox" onClick="hidePrefs();">x</div> - <div class="pref-group reading-prefs"> - <h1>Discussion Style</h1> - <input type="radio" name="discussion-style" value="classic"> Classic</input><br> - <input type="radio" name="discussion-style" value="UM"> University of Michigan (Testing)</input><br> - <input type="radio" name="discussion-style" value="d2" checked> Slashdot's New Discussion System (Testing)</input> - </div> - <div class="pref-group writing-prefs"> - <h1>Email Display</h1> - <div class="pref-group-comment"> - (currently: <tt>name AT host DOT tld</tt>) - </div> - <input type="radio" name="email-display" value="none"> Do not display an email address</input><br> - <input type="radio" name="email-display" value="armored" checked> Show your emaila address with random SPAM-armoring applied.</input><br> - <div class="pref-group-comment"> - This changes weekly. - </div> - <input type="radio" name="email-display" value="plain"> Show your real email address without cowering behind childish anonymity or obfuscation.</input> - </div> - <div class="pref-group reading-prefs"> - <div class="pref"> - <input type="checkbox" name="disable-sigs" value="disable-sigs"> Disable Sigs</input><br> - </div> - <div class="pref-group-comment"> - Strip sig quotes from comments. - </div> - </div> - <div class="pref-group writing-prefs"> - <div class="pref"> - <input type="checkbox" name="disable-spellchecker" value="disable-spellchecker"> Disable Spellchecker</input><br> - </div> - </div> - <div class="pref-group reading-prefs"> - <div class="pref"> - <input type="checkbox" name="hard-thresholds" value="hard-thresholds"> Hard Thresholds</input><br> - </div> - <div class="pref-group-comment"> - Hides 'X replies below current threshold' message from threads. - </div> - </div> - <div class="pref-group reading-prefs"> - <div class="pref"> - <input type="checkbox" name="hide-scores" value="hide-scores"> Do Not Display Scores</input><br> - </div> - <div class="pref-group-comment"> - Hides score. They still <em>apply</em>, you just don't see them. - </div> - </div> - <div class="pref-group reading-prefs"> - <div class="pref"> - Max Comment Size - <select name="max-comment-size"> - <option value="512"> 512</option> - <option selected value="1024"> 1024</option> - <option value="2048"> 2048</option> - <option value="4096"> 4096</option> - </select> - </div> - </div> - <div class="pref-group reading-prefs"> - <div class="pref"> - <input type="checkbox" name="show-link-domains" value="show-link-domains"> Show Link Domains</input><br> - </div> - </div> - </form> -</div> -__seclev__ -10000 -__version__ -$Id: d2prefs;misc;default,v 1.2 2007/05/09 20:53:59 pudge Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -26,7 +26,7 @@ op => 'Reply', subject => 'Reply to This', subject_only => 1, - onclick => ((discussion2 && !user.is_anon) ? "replyTo($cid); return false;" : '') + onclick => (discussion2 ? "replyTo($cid); return false;" : '') }) %]</b></p></span> [% END %] @@ -58,4 +58,4 @@ __seclev__ 10000 __version__ -$Id: dispLinkComment;misc;default,v 1.46 2008/03/27 19:02:43 lancelot Exp $ +$Id: dispLinkComment;misc;default,v 1.47 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/printCommComments;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/printCommComments;misc;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/templates/printCommComments;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -24,19 +24,22 @@ __name__ printCommComments __template__ -[% moderate_form = can_moderate || user.acl.candelcomments_always %] -[% moderate_button = (can_moderate +[% can_del = (constants.authors_unlimited + && user.is_admin + && user.seclev >= constants.authors_unlimited + ) || user.acl.candelcomments_always; + moderate_form = (!discussion2 || can_del) && (can_moderate || user.acl.candelcomments_always); + moderate_button = (can_moderate && user.mode != 'archive' - && ( !user.state.discussion_archived || constants.comments_moddable_archived)) %] + && ( !user.state.discussion_archived || constants.comments_moddable_archived)); +%] [% IF moderate_form %] - <form action="[% gSkin.rootdir %]/comments.pl" method="post"> + <form id="commentform" name="commentform" action="[% gSkin.rootdir %]/comments.pl" method="post"> [% END %] [% IF discussion2 %] [% IF discussion2 == "slashdot" %] <script src="[% constants.imagedir %]/comments.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> - [%- ELSE %] - <script src="http://socialcomputingresearch.net/slashdot/js/comments.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> [%- END %] <script type="text/javascript"> <!-- @@ -103,38 +106,44 @@ [% IF discussion2 %] <div id="replyto_0"></div> -<div class="prev-next"><a href="#" onclick="ajaxFetchComments(0,1); return false"><span id="more_comments_num_a" class="hide">Check for more</span></a> - [% UNLESS user.state.discussion_archived || user.state.discussion_future_nopost %] - | [% Slash.linkComment({ - sid => sid, - cid => cid, - op => 'reply', - subject => 'Reply', - subject_only => 1, - onclick => ((discussion2 && !user.is_anon) ? "replyTo(0); return false;" : '') - }); - END %] -</div> [% END %] +<div id="discussion_buttons"> + +[% IF discussion2 %] +<span class="nbutton"><p><b><a href="#" onclick="ajaxFetchComments(0,1); return false"><span id="more_comments_num_a" class="hide">Get More Comments</span></a></b></p></span> +[% END %] + +[% IF discussion2 && !user.state.discussion_archived && !user.state.discussion_future_nopost %] +<span class="nbutton"><p><b>[% Slash.linkComment({ + sid => sid, + cid => cid, + op => 'reply', + subject => 'Reply', + subject_only => 1, + onclick => (discussion2 ? "replyTo(0); return false;" : '') +}) %]</b></p></span> +[% END %] + +[% IF (can_moderate || user.acl.candelcomments_always) %] +<span class="nbutton"><p><b><a href="[% gSkin.rootdir %]/moderation.shtml">Moderator Help</a></b></p></span>[% END %] + [% IF moderate_form %] [% IF moderate_button %] - <div>Have you read the - <a href="[% gSkin.rootdir %]/moderation.shtml">Moderator Guidelines</a> - yet? + [% IF can_del %]<span class="nbutton"><p><b>[% END %] <input type="hidden" name="op" value="moderate"> <input type="hidden" name="sid" value="[% sid %]"> <input type="hidden" name="cid" value="[% cid %]"> <input type="hidden" name="pid" value="[% pid %]"> - <input type="submit" value="moderate" class="button"> - </div> - [% IF (constants.authors_unlimited && user.seclev >= constants.authors_unlimited) - || user.acl.candelcomments_always %] - [% PROCESS formNote note='Checked comments will be deleted.' %] - [% END %] + [% IF can_del %]<a href="#" onclick="$('#commentform').submit(); return false">Delete</a></b></p></span> + <a href="#" onclick="displayModalPrefHelp('discussion_delete_help'); return false" title="Click To Expand Help" class="help">?</a> + <div id="discussion_delete_help" class="modalprefhelp" style="display: none;">Checked comments will be deleted.</div> + [%- ELSE %]<input type="submit" value="moderate" class="button"> + [% END %] [% END %] </form> [% END %] +</div> [% IF discussion2 %] <script type="text/javascript"> @@ -157,4 +166,4 @@ __seclev__ 10000 __version__ -$Id: printCommComments;misc;default,v 1.72 2008/04/02 18:27:30 pudge Exp $ +$Id: printCommComments;misc;default,v 1.75 2008/04/10 18:43:44 pudge Exp $ Added: slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsLinks;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsLinks;misc;default (rev 0) +++ slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsLinks;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -0,0 +1,39 @@ +__section__ +default +__description__ +Links for various places on comments page + +* commentslinks_id = unique id for this instantiation of the links +__title__ + +__page__ +misc +__lang__ +en_US +__name__ +printCommentsLinks +__template__ +[% IF discussion2 %] + <a href="#" onclick="ajaxFetchComments(0,1); return false"><span id="more_comments_num_[% commentslinks_id %]"></span> More</a> | +[% END; IF user.is_anon; + PROCESS userlogin_cover + return_url = gSkin.rootdir _ '/comments.pl?sid=' _ sid %] + <a href="[% gSkin.rootdir %]/login.pl" onclick="show_login_box(); return false">Login</a> +[% ELSE %] + <a href="[% gSkin.rootdir %]/my/comments"[% IF constants.modal_prefs_active %] onclick="getModalPrefs('d2', 'Discussion 2'); return false"[% END %]>Prefs</a> +[% END %] + +[% UNLESS user.state.discussion_archived || user.state.discussion_future_nopost %] + | [% Slash.linkComment({ + sid => sid, + cid => cid, + op => 'reply', + subject => 'Reply', + subject_only => 1, + onclick => (discussion2 ? "replyTo(0); return false;" : '') + }); +END %] +__seclev__ +10000 +__version__ +$Id: printCommentsLinks;misc;default,v 1.1 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default 2008-04-11 07:28:41 UTC (rev 577) @@ -38,33 +38,16 @@ point[% user.points == 1 ? '' : 's' %] [% END %] -[% IF user.is_admin && user.d2prefs_debug %] -[% IF (!user.is_anon); PROCESS d2prefs; END %] -[% END %] - <a name="acomments"></a> <div class="commentwrap" id="commentwrap"> -[% IF !user.is_anon %] +[% IF discussion2 %] <div class="commentBox" style="font-size: 120%"> - <form method="GET" action="[% gSkin.rootdir %]/comments.pl"> <div> -[% IF title %] -<span class="escape-link"><a href="[% link | strip_urlattr %]" title="Back to Article - [% title | strip_attribute %]">[% title %]</a></span> -[% END %] - <input type="hidden" name="op" value="setDiscussion2"> - <input type="hidden" name="sid" value="[% sid %]"> - [% IF cid %]<input type="hidden" name="cid" value="[% cid %]">[% END %] - [% IF pid %]<input type="hidden" name="pid" value="[% pid %]">[% END %] - <input type="checkbox" name="discussion2_slashdot" value="1" onchange="this.form.submit();"[% constants.markup_checked_attribute IF discussion2 == 'slashdot' %]> - I am willing to help test <a href="http://slashdot.org/faq/com-mod.shtml#cm120">Slashdot's New Discussion System</a>. - <noscript><input type="submit"></noscript> - +[% IF title %]<span class="escape-link"><a href="[% link | strip_urlattr %]" title="Back to Article - [% title | strip_attribute %]">[% title %]</a></span>[% END %] +<span class="commentBoxLinks">[% PROCESS printCommentsLinks commentslinks_id => 'd' %]</span> </div> - </form> </div> -[% END %] - -[% UNLESS discussion2 %] +[% ELSE %] <div class="commentBox"> [% IF title %] <a href="[% link | strip_urlattr %]">[% title %]</a> @@ -91,22 +74,13 @@ subject => 'Top', subject_only => 1, }) %] -[% IF user.points; modpoints; END %] -[% IF count %] - | <b>[% count %]</b> comments -[% END %] - -[% IF lvl && user.mode == 'thread' %] - ([% spilltext %]) | Index Only -[% END %] - -[% IF form.startat %] - | Starting at #[% form.startat %] -[% END %] - +[% IF user.points; modpoints; END %] +[% IF count %]| <b>[% count %]</b> comments[% END %] +[% IF lvl && user.mode == 'thread' %]([% spilltext %]) | Index Only[% END %] +[% IF form.startat %]| Starting at #[% form.startat %][% END %] | <a href="[% gSkin.rootdir %]/search.pl?op=comments&sid=[% sid %]">Search Discussion</a> - </div> +</div> [% END %] <div class="commentBoxForm" id="commentControlBox"> [% UNLESS discussion2 %] @@ -114,7 +88,6 @@ [% IF user.state.no_d2 %]<input type="hidden" name="no_d2" value="1">[% END %] <fieldset> <legend>Display Options</legend> - [% UNLESS discussion2 %] Threshold: [% Slash.selectThreshold(comments.0.totals); @@ -122,17 +95,11 @@ Slash.selectMode(user.mode); END; Slash.selectSortcode(user.commentsort) %] - [% END %] [% UNLESS user.is_anon %] - [% UNLESS discussion2 %] Save: <input type="checkbox" name="savechanges" class="button"> - [% END %] [%- END %] - [% UNLESS discussion2 %] <input type="submit" name="op" value="Change" class="button"> - [% END %] - <input type="hidden" name="sid" value="[% sid %]"> [% IF cid %]<input type="hidden" name="cid" value="[% cid %]">[% END %] [% IF pid %]<input type="hidden" name="pid" value="[% pid %]">[% END %] @@ -178,30 +145,7 @@ subject_only => 1, }) %] [% END %] - <span class="ccw-header-links"> - [% IF discussion2 %] - <a href="#" onclick="ajaxFetchComments(0,1); return false"><span id="more_comments_num_b"></span> More</a> | - [% END; IF user.is_admin && user.d2prefs_debug %] - <a href="#" onclick="showPrefs('reading'); return false">Prefs</a> - [% ELSIF user.is_anon; - PROCESS userlogin_cover - return_url = gSkin.rootdir _ '/comments.pl?sid=' _ sid %] - <a href="[% gSkin.rootdir %]/login.pl" onclick="show_login_box(); return false">Login</a> - [% ELSE %] - <a href="[% gSkin.rootdir %]/my/comments"[% IF constants.modal_prefs_active %] onclick="getModalPrefs('d2', 'Discussion 2'); return false"[% END %]>Prefs</a> - [% END %] - - [% UNLESS user.state.discussion_archived || user.state.discussion_future_nopost %] - | [% Slash.linkComment({ - sid => sid, - cid => cid, - op => 'reply', - subject => 'Reply', - subject_only => 1, - onclick => ((discussion2 && !user.is_anon) ? "replyTo(0); return false;" : '') - }) %] - [% END %] - </span> + <span class="ccw-header-links">[% PROCESS printCommentsLinks commentslinks_id => 'b' %]</span> <span id="d2toggle" title="Toggle window location" onclick="toggleDisplayOptions()" class="close">/</span> </h4> </div> @@ -265,43 +209,7 @@ </div> </div> </div> - <div class="commentControlFooter"> - [% IF discussion2 %] - <a href="#" onclick="ajaxFetchComments(0,1); return false"><span id="more_comments_num_c"></span> More</a> | - [% END; IF user.is_admin && user.d2prefs_debug %] - <a href="#" onclick="showPrefs('reading'); return false">Prefs</a> - [% ELSIF user.is_anon; - PROCESS userlogin_cover - return_url = gSkin.rootdir _ '/comments.pl?sid=' _ sid %] - <a href="[% gSkin.rootdir %]/login.pl" onclick="show_login_box(); return false">Login</a> - [% ELSE %] - <a href="[% gSkin.rootdir %]/my/comments"[% IF constants.modal_prefs_active %] onclick="getModalPrefs('d2', 'Discussion 2'); return false"[% END %]>Prefs</a> - [% END %] - [% UNLESS user.state.discussion_archived || user.state.discussion_future_nopost %] - | [% Slash.linkComment({ - sid => sid, - cid => cid, - op => 'reply', - subject => 'Reply', - subject_only => 1, - onclick => ((discussion2 && !user.is_anon) ? "replyTo(0); return false;" : '') - }) %] - [% END %] - <div id="bindings-legend">Keybindings Beta<br> -<a href="#" onclick="keyHandler('','Q'); return false" title="previous comment by load order">Q</a> -<a href="#" onclick="keyHandler('','W'); return false" title="previous thread" >W</a> -<a href="#" onclick="keyHandler('','E'); return false" title="next comment by load order" >E</a><br> -<a href="#" onclick="keyHandler('','A'); return false" title="previous comment in thread" >A</a> -<a href="#" onclick="keyHandler('','S'); return false" title="next thread" >S</a> -<a href="#" onclick="keyHandler('','D'); return false" title="next comment in thread" >D</a><br> -<a href="#" onclick="keyHandler('','R'); return false" title="reply to current comment" >R</a> -<a href="#" onclick="keyHandler('','P'); return false" title="parent of current comment" >P</a> -<a href="#" onclick="keyHandler('','M'); return false" title="history of current comment" >M</a><br> -<a href="#" onclick="keyHandler('','T'); return false" title="first comment" >T</a> -<a href="#" onclick="keyHandler('','G'); return false" title="get more comments" >G</a> -<a href="#" onclick="keyHandler('','V'); return false" title="last comment" >V</a> - </div> - </div> + <div class="commentControlFooter">[% PROCESS printCommentsLinks commentslinks_id => 'c' %]</div> <div id="commentControlBoxStatus" class="hide"><b>Loading... please wait.</b></div> </div> </div> @@ -313,4 +221,4 @@ __seclev__ 10000 __version__ -$Id: printCommentsMain;misc;default,v 1.110 2008/04/02 18:27:30 pudge Exp $ +$Id: printCommentsMain;misc;default,v 1.112 2008/04/10 05:22:29 pudge Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/userInfo2;users;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/userInfo2;users;default 2008-04-07 05:09:04 UTC (rev 576) +++ slashjp/branches/upstream/current/themes/slashcode/templates/userInfo2;users;default 2008-04-11 07:28:41 UTC (rev 577) @@ -3,24 +3,6 @@ __description__ Display user's info -* title = passed to titlebar -* useredit = hashref of info of the user being viewed -* points = available moderation points -* commentstruct = arrayref of comments -* nickmatch_flag = current user is same as viewed user -* mod_flag = is moderator - (no need for this anymore) -* karma_flag = boolean for display karma -* admin_block = admin stuff -* admin_flag = boolean for whether to display admin stuff - (no real need for this, could just use user.is_admin) -* fieldkey = the field key used to decide what we're looking at -* reasons = hashref from $moddb->getReasons() -* lastjournal = last journal posted -* hr_hours_back = number of hours back to show a <hr> for -* cids_to_mods = hashref keyed by cid containing arrays of moderations done to that cid -* comment_time = number of days back we are limiting the comments shown to. If 0 or undefined we're showing comments sequentially w/o time limits - __title__ __page__ @@ -32,13 +14,246 @@ __template__ [% orig_title = title %] -<div id="slashboxes"> -[% PROCESS userboxes2 %] -</div> + <div class="head"> + <div class="article"> + <h3>[% latest_event.subject %]</h3> + <div class="body"> + [% latest_event.text %] + </div> + </div> + </div> + + <div id="slashboxes" class="yui-b"> + <div class="block"> + <div class="title"> + <h4>User Bio</h4> + </div> + + <div class="content"> + [% + '<a href="'; gSkin.rootdir; '/~'; + useredit.nickname | strip_paramattr; '/">'; + useredit.nickname | strip_literal; '</a> '; + PROCESS zoo_icons person=useredit.uid implied=""; + + IF user.uid == useredit.uid OR user.is_admin; + '<br>'; IF useredit.realname; useredit.realname | strip_literal; ELSE; '(no real name given)'; END; + '<br><a href="mailto:'; + useredit.realemail | strip_paramattr; '">'; + Slash.ellipsify(Slash.strip_literal(useredit.realemail)); '</a>'; + '<br>'; + + IF useredit.fakeemail; + IF useredit.fakeemail == useredit.realemail; + '(shown without obfuscation)'; + ELSE; + 'shown as <a href="mailto:'; + useredit.fakeemail | strip_paramattr; '">'; + Slash.ellipsify(Slash.strip_literal(useredit.fakeemail)); '</a>'; + END; + ELSE; + '(email not shown publicly)'; + END; + ELSE; + '<br> '; + IF useredit.fakeemail; + '<a href="mailto:'; + useredit.fakeemail | strip_paramattr; '">'; + Slash.ellipsify(Slash.strip_literal(useredit.fakeemail)); '</a>'; + ELSE; + '(email not shown publicly)'; + END; + END; + + IF useredit.homepage; + '<br><a href="'; + useredit.homepage | strip_attribute; + '"'; + IF useredit.karma <= constants.goodkarma; + ' rel="nofollow"'; + END; + '>'; + Slash.ellipsify(Slash.strip_literal(useredit.homepage)); '</a>'; + END; + + IF user.uid == useredit.uid OR user.is_admin; + '<br>Karma: '; + PROCESS karma karma=useredit.karma admin_flag=user.is_admin; + END; + + IF useredit.aim && !useredit.aimdisplay; + '<br><b>AOL IM:</b> '; + useredit.aim | strip_literal; + ' (<b><a href="aim:addbuddy?screenname='; + useredit.aim | strip_attribute; + '">Add Buddy</a>, '; + '<a href="aim:goim?screenname='; + useredit.aim | strip_attribute; + '&message=Greetings!">Send Message</a></b>)'; + END; + + IF useredit.yahoo; + '<br><b>Yahoo! ID:</b> '; + '<a href="http://profiles.yahoo.com/'; + useredit.yahoo | strip_attribute; + '">'; + useredit.yahoo | strip_literal; + '</a> (<b><a href="http://edit.yahoo.com/config/set_buddygrp?'; + '.src=&.cmd=a&.bg=Friends&.bdl='; + useredit.yahoo | strip_attribute; + '">Add User</a>, '; + '<a href="http://edit.yahoo.com/config/send_webmesg?.target='; + useredit.yahoo | strip_attribute; + '">Send Message</a></b>)'; + END; + + IF useredit.jabber; + '<br><b>Jabber:</b> '; + useredit.jabber | strip_literal; + END; + + IF useredit.calendar_url; + '<br><b>Public Calendar:</b> '; + '<a href="webcal://'; + useredit.calendar_url | strip_attribute; + '">Subscribe</a>, <a href="http://'; + useredit.calendar_url | strip_attribute; + '">Download</a>'; + END; + + IF useredit.bio; + '<br><hr>'; + Slash.parseDomainTags(useredit.bio); + END; + %] + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Latest Comments</h4> + </div> + + <div class="content"> + <ul> + [% FOREACH cid = latest_comments.keys.sort %] + <li><a href="[% constants.absolutedir_secure %]/comments.pl?sid=[% latest_comments.$cid.sid %]&cid=[% cid %]">[% latest_comments.$cid.subject %]</a></li> + [% END %] + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Latest Journal Entries</h4> + </div> + + <div class="content"> + <ul> + [% FOREACH jid = latest_journals.keys.sort %] + <li><a href="[% constants.absolutedir_secure %]/~[% useredit.nickname %]/journal/[% latest_journals.$jid.id %]">[% latest_journals.$jid.desc %]</a><br></li> + [% END %] + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 3</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 4</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 5</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 6</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 7</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</lil> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 8</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + <div class="block"> + <div class="title"> + <h4>Box 9</h4> + </div> + + <div class="content"> + <ul> + <li>Foo</li> + <li>Bar</li> + </ul> + </div> + </div> + + </div> + [% title = orig_title %] __seclev__ 500 __version__ -$Id: userInfo2;users;default,v 1.1 2008/04/02 14:42:24 entweichen Exp $ +$Id: userInfo2;users;default,v 1.2 2008/04/09 19:53:59 entweichen Exp $