[Slashdotjp-dev 1000] [527] merged from upstream T_2_5_0_196

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 3月 4日 (火) 18:02:09 JST


Revision: 527
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=527
Author:   tach
Date:     2008-03-04 18:02:07 +0900 (Tue, 04 Mar 2008)

Log Message:
-----------
merged from upstream T_2_5_0_196

Modified Paths:
--------------
    slashjp/branches/upstream/current/Slash/Hook/Hook.pm
    slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm
    slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm
    slashjp/branches/upstream/current/plugins/Admin/admin.pl
    slashjp/branches/upstream/current/plugins/Ajax/PLUGIN
    slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl
    slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_admin;ajax;default
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2_posting;ajax;default
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_home;ajax;default
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default
    slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;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/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/templates/fhadvprefpane;misc;default
    slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default
    slashjp/branches/upstream/current/plugins/Stats/Stats.pm
    slashjp/branches/upstream/current/plugins/Tags/Tags.pm
    slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql
    slashjp/branches/upstream/current/plugins/Tags/templates/taghistory;misc;default
    slashjp/branches/upstream/current/sql/mysql/defaults.sql
    slashjp/branches/upstream/current/sql/mysql/upgrades
    slashjp/branches/upstream/current/tagboxes/Top/Top.pm
    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/templates/dispLinkComment;misc;default
    slashjp/branches/upstream/current/themes/slashcode/templates/help_anon;misc;default
    slashjp/branches/upstream/current/themes/slashcode/templates/help_main;misc;default

Added Paths:
-----------
    slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default


-------------- next part --------------
Modified: slashjp/branches/upstream/current/Slash/Hook/Hook.pm
===================================================================
--- slashjp/branches/upstream/current/Slash/Hook/Hook.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/Slash/Hook/Hook.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -1,14 +1,14 @@
 # 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: Hook.pm,v 1.10 2006/02/03 23:43:46 pudge Exp $
+# $Id: Hook.pm,v 1.11 2008/02/28 19:26:58 pudge Exp $
 
 package Slash::Hook;
 use strict;
 use DBIx::Password;
 use Slash;
 use Slash::DB;
-use Slash::Utility;
+use Slash::Utility::Environment; # avoid cross-caller issues
 use vars qw($VERSION);
 
 # Arrrr Matey...
@@ -16,7 +16,7 @@
 use base 'Exporter';
 use vars qw($VERSION @EXPORT);
 
-($VERSION) = ' $Revision: 1.10 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.11 $ ' =~ /\$Revision:\s+([^\s]+)/;
 @EXPORT	   = qw(slashHook);
 
 my %classes;

Modified: slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm
===================================================================
--- slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/Slash/Utility/Comments/Comments.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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.1 2008/02/21 01:01:52 pudge Exp $
+# $Id: Comments.pm,v 1.2 2008/02/28 19:26:58 pudge Exp $
 
 package Slash::Utility::Comments;
 
@@ -23,22 +23,23 @@
 
 use strict;
 use Fcntl;
-use Slash::Display;
 use Slash::Utility::Access;
 use Slash::Utility::Data;
 use Slash::Utility::Display;
 use Slash::Utility::Environment;
-use Slash::Constants qw(:strip :people);
+use Slash::Display;
+use Slash::Hook;
+use Slash::Constants qw(:strip :people :messages);
 
 use base 'Exporter';
 use vars qw($VERSION @EXPORT);
 
-($VERSION) = ' $Revision: 1.1 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.2 $ ' =~ /\$Revision:\s+([^\s]+)/;
 @EXPORT		= qw(
 	constrain_score dispComment displayThread printComments
 	jsSelectComments commentCountThreshold commentThresholds discussion2
 	tempUofmLinkGenerate tempUofmCipherObj selectComments
-	getPoints preProcessComment postProcessComment prevComment
+	getPoints preProcessComment postProcessComment prevComment saveComment
 );
 
 
@@ -333,8 +334,6 @@
 
 sub jsSelectComments {
 #slashProf("jsSelectComments");
-	# XXXd2 selectComments() is being called twice in same request ... compare and consolidate
-	# also consolidate code with ajax.pl:fetchComments
 	# version 0.9 is broken; 0.6 and 1.00 seem to work -- pudge 2006-12-19
 	require Data::JavaScript::Anon;
 	my($slashdb, $constants, $user, $form, $gSkin) = @_;
@@ -366,7 +365,7 @@
 		$comments = _get_thread($comments, $pid);
 	}
 
-	my @roots = $pid ? $pid : grep { $_ && !$comments->{$_}{pid} } keys %$comments;
+	my @roots = $pid ? $pid : @{$comments->{$pid}{kids}};
 	my %roots_hash = ( map { $_ => 1 } @roots );
 	my $thresh_totals;
 
@@ -1328,6 +1327,12 @@
 	my $constants = getCurrentStatic();
 	my $reader = getObject('Slash::DB', { db_type => 'reader' });
 
+	$discussion->{type} = isDiscussionOpen($discussion);
+	if ($discussion->{type} eq 'archived') {
+		$$error_message = getError('archive_error');
+		return -1;
+	}
+
 	my $tempSubject = strip_notags($comm->{postersubj});
 	my $tempComment = $comm->{postercomment};
 
@@ -1449,7 +1454,214 @@
 	return $previewForm;
 }
 
+sub saveComment {
+	my($comm, $comment, $user, $discussion, $error_message) = @_; # probably $comm = $form
+	my $slashdb = getCurrentDB();
+	my $constants = getCurrentStatic();
+	my $reader = getObject('Slash::DB', { db_type => 'reader' });
 
+	$comm->{nobonus}  = $user->{nobonus}	unless $comm->{nobonus_present};
+	$comm->{postanon} = $user->{postanon}	unless $comm->{postanon_present};
+	$comm->{nosubscriberbonus} = $user->{nosubscriberbonus}
+						unless $comm->{nosubscriberbonus_present};
+
+#print STDERR scalar(localtime) . " $$ E header_emitted=$header_emitted do_emit_html=$do_emit_html redirect_to=" . (defined($redirect_to) ? $redirect_to : "undef") . "\n";
+
+	# Set starting points to the AC's starting points, by default.
+	# If the user is posting under their own name, we'll reset this
+	# value (and add other modifiers) in a moment.
+	my $pts = getCurrentAnonymousCoward('defaultpoints');
+	my $karma_bonus = 0;
+	my $subscriber_bonus = 0;
+	my $tweak = 0;
+
+	if (!$comm->{anon}) {
+		$pts = $user->{defaultpoints};
+
+		if ($constants->{karma_posting_penalty_style} == 0) {
+			$pts-- if $user->{karma} < 0;
+			$pts-- if $user->{karma} < $constants->{badkarma};
+                } else {
+			$tweak-- if $user->{karma} < 0;
+			$tweak-- if $user->{karma} < $constants->{badkarma};
+		}
+		# Enforce proper ranges on comment points.
+		my($minScore, $maxScore) =
+			($constants->{comment_minscore}, $constants->{comment_maxscore});
+		$pts = $minScore if $pts < $minScore;
+		$pts = $maxScore if $pts > $maxScore;
+		$karma_bonus = 1 if $pts >= 1 && $user->{karma} > $constants->{goodkarma}
+			&& !$comm->{nobonus};
+		$subscriber_bonus = 1 if $constants->{plugin}{Subscribe}
+			&& $user->{is_subscriber}
+			&& (!$comm->{nosubscriberbonus} || $comm->{nosubscriberbonus} ne 'on');
+	}
+
+#print STDERR scalar(localtime) . " $$ F header_emitted=$header_emitted do_emit_html=$do_emit_html\n";
+
+	my $clean_comment = {
+		subject		=> $comment->{subject},
+		comment		=> $comment->{comment},
+		sid		=> $comment->{sid},
+		pid		=> $comment->{pid},
+		ipid		=> $user->{ipid},
+		subnetid	=> $user->{subnetid},
+		uid		=> $comment->{uid},
+		points		=> $pts,
+		tweak		=> $tweak,
+		tweak_orig	=> $tweak,
+		karma_bonus	=> $karma_bonus ? 'yes' : 'no',
+	};
+
+	if ($constants->{plugin}{Subscribe}) {
+		$clean_comment->{subscriber_bonus} = $subscriber_bonus ? 'yes' : 'no';
+	}
+
+	my $maxCid = $slashdb->createComment($clean_comment);
+	if ($constants->{comment_karma_disable_and_log}) {
+		my $post_str = "";
+		$post_str .= "NO_ANON " if $user->{state}{commentkarma_no_anon};
+		$post_str .= "NO_POST " if $user->{state}{commentkarma_no_post};
+		if (isAnon($comment->{uid}) && $user->{state}{commentkarma_no_anon}) {
+			$slashdb->createCommentLog({
+				cid	=> $maxCid,
+				logtext	=> "COMMENTKARMA ANON: $post_str"
+			});
+		} elsif (!isAnon($comment->{uid}) && $user->{state}{commentkarma_no_post}) {
+			$slashdb->createCommentLog({
+				cid	=> $maxCid,
+				logtext	=> "COMMENTKARMA USER: $post_str"
+			});
+		}
+	}
+	if ($constants->{comment_is_troll_disable_and_log}) {
+		$slashdb->createCommentLog({
+			cid	=> $maxCid,
+			logtext	=> "ISTROLL"
+		});
+	}
+
+#print STDERR scalar(localtime) . " $$ G maxCid=$maxCid\n";
+
+	# make the formkeys happy
+	$comm->{maxCid} = $maxCid;
+
+	$slashdb->setUser($user->{uid}, {
+		'-expiry_comm'	=> 'expiry_comm-1',
+	}) if allowExpiry();
+
+	if ($maxCid == -1) {
+		$$error_message = getError('submission error');
+		return -1;
+
+	} elsif (!$maxCid) {
+		# This site has more than 2**32 comments?  Wow.
+		$$error_message = getError('maxcid exceeded');
+		return -1;
+	}
+
+
+	my $saved_comment = $slashdb->getComment($maxCid);
+	slashHook('comment_save_success', { comment => $saved_comment });
+
+	my $moddb = getObject("Slash::$constants->{m1_pluginname}");
+	if ($moddb) {
+		my $text = $moddb->checkDiscussionForUndoModeration($comm->{sid});
+		# XXX
+		print $text if $text;
+	}
+
+	my $tc = $slashdb->getVar('totalComments', 'value', 1);
+	$slashdb->setVar('totalComments', ++$tc);
+
+
+	if ($discussion->{sid}) {
+		$slashdb->setStory($discussion->{sid}, { writestatus => 'dirty' });
+	}
+
+	$slashdb->setUser($clean_comment->{uid}, {
+		-totalcomments => 'totalcomments+1',
+	}) if !isAnon($clean_comment->{uid});
+
+	my($messages, $reply, %users);
+	my $kinds = $reader->getDescriptions('discussion_kinds');
+	if ($comm->{pid}
+		|| $kinds->{ $discussion->{dkid} } =~ /^journal/
+		|| $constants->{commentnew_msg}) {
+		$messages = getObject('Slash::Messages');
+		$reply = $slashdb->getCommentReply($comm->{sid}, $maxCid);
+	}
+
+	$clean_comment->{pointsorig} = $clean_comment->{points};
+
+	# reply to comment
+	if ($messages && $comm->{pid}) {
+		my $parent = $slashdb->getCommentReply($comm->{sid}, $comm->{pid});
+		my $users  = $messages->checkMessageCodes(MSG_CODE_COMMENT_REPLY, [$parent->{uid}]);
+		if (_send_comment_msg($users->[0], \%users, $pts, $clean_comment)) {
+			my $data  = {
+				template_name	=> 'reply_msg',
+				subject		=> { template_name => 'reply_msg_subj' },
+				reply		=> $reply,
+				parent		=> $parent,
+				discussion	=> $discussion,
+			};
+
+			$messages->create($users->[0], MSG_CODE_COMMENT_REPLY, $data);
+			$users{$users->[0]}++;
+		}
+	}
+
+	# reply to journal
+	if ($messages && $kinds->{ $discussion->{dkid} } =~ /^journal/) {
+		my $users  = $messages->checkMessageCodes(MSG_CODE_JOURNAL_REPLY, [$discussion->{uid}]);
+		if (_send_comment_msg($users->[0], \%users, $pts, $clean_comment)) {
+			my $data  = {
+				template_name	=> 'journrep',
+				subject		=> { template_name => 'journrep_subj' },
+				reply		=> $reply,
+				discussion	=> $discussion,
+			};
+
+			$messages->create($users->[0], MSG_CODE_JOURNAL_REPLY, $data);
+			$users{$users->[0]}++;
+		}
+	}
+
+	# comment posted
+	if ($messages && $constants->{commentnew_msg}) {
+		my $users = $messages->getMessageUsers(MSG_CODE_NEW_COMMENT);
+
+		my $data  = {
+			template_name	=> 'commnew',
+			subject		=> { template_name => 'commnew_subj' },
+			reply		=> $reply,
+			discussion	=> $discussion,
+		};
+
+		my @users_send;
+		for my $usera (@$users) {
+			next if $users{$usera};
+			push @users_send, $usera;
+			$users{$usera}++;
+		}
+		$messages->create(\@users_send, MSG_CODE_NEW_COMMENT, $data) if @users_send;
+	}
+
+	if ($constants->{validate_html}) {
+		my $validator = getObject('Slash::Validator');
+		my $test = parseDomainTags($comment->{comment});
+		$validator->isValid($test, {
+			data_type	=> 'comment',
+			data_id		=> $maxCid,
+			message		=> 1
+		}) if $validator;
+	}
+
+	return $saved_comment;
+}
+
+
 #========================================================================
 
 =head2 dispComment(COMMENT)
@@ -1725,7 +1937,7 @@
 			op	=> 'Reply',
 			subject	=> 'Reply to This',
 			subject_only => 1,
-			#onclick	=> ($discussion2 ? "replyTo($comment->{cid}); return false;" : '')
+			onclick	=> (($discussion2 && $user->{test_code}) ? "replyTo($comment->{cid}); return false;" : '')
 		}) unless $user->{state}{discussion_archived};
 
 		push @link, linkComment({
@@ -2164,6 +2376,40 @@
 }
 
 ##################################################################
+# Decide whether or not to send a given message to a given user
+sub _send_comment_msg {
+	my($uid, $uids, $pts, $C) = @_;
+	my $constants	= getCurrentStatic();
+	my $reader	= getObject('Slash::DB', { db_type => 'reader' });
+	my $user	= getCurrentUser();
+
+	return unless $uid;			# no user
+	return if $uids->{$uid};		# user not already being msgd
+	return if $user->{uid} == $uid;		# don't msg yourself
+
+	my $otheruser = $reader->getUser($uid);
+
+	# use message_threshold in vars, unless user has one
+	# a message_threshold of 0 is valid, but "" is not
+	my $message_threshold = length($otheruser->{message_threshold})
+		? $otheruser->{message_threshold}
+		: length($constants->{message_threshold})
+			? $constants->{message_threshold}
+			: undef;
+
+	my $mod_reader = getObject("Slash::$constants->{m1_pluginname}", { db_type => 'reader' });
+	my $newpts = getPoints($C, $otheruser,
+		$constants->{comment_minscore}, $constants->{comment_maxscore},
+		$reader->countUsers({ max => 1 }), $mod_reader->getReasons,
+	);
+
+	# only if reply pts meets message threshold
+	return if defined $message_threshold && $newpts < $message_threshold;
+
+	return 1;
+}
+
+##################################################################
 # Troll Detection: checks to see if this IP or UID has been
 # abusing the system in the last 24 hours.
 # 1=Troll 0=Good Little Goober
@@ -2244,4 +2490,4 @@
 
 =head1 VERSION
 
-$Id: Comments.pm,v 1.1 2008/02/21 01:01:52 pudge Exp $
+$Id: Comments.pm,v 1.2 2008/02/28 19:26:58 pudge Exp $

Modified: slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm
===================================================================
--- slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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: Environment.pm,v 1.233 2008/02/08 04:27:03 jamiemccarthy Exp $
+# $Id: Environment.pm,v 1.234 2008/02/28 19:26:58 pudge Exp $
 
 package Slash::Utility::Environment;
 
@@ -33,7 +33,7 @@
 use base 'Exporter';
 use vars qw($VERSION @EXPORT);
 
-($VERSION) = ' $Revision: 1.233 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.234 $ ' =~ /\$Revision:\s+([^\s]+)/;
 @EXPORT	   = qw(
 
 	dbAvailable
@@ -1693,6 +1693,8 @@
 		$user->{state}{lostprivs} = 1;
 	}
 
+	$user->{test_code} ||= $constants->{test_code};
+
 	if ($constants->{plugin}{Tags}) {
 		my $max_uid;
 		my $write = $constants->{tags_stories_allowwrite} || 0;
@@ -3524,4 +3526,4 @@
 
 =head1 VERSION
 
-$Id: Environment.pm,v 1.233 2008/02/08 04:27:03 jamiemccarthy Exp $
+$Id: Environment.pm,v 1.234 2008/02/28 19:26:58 pudge Exp $

Modified: slashjp/branches/upstream/current/plugins/Admin/admin.pl
===================================================================
--- slashjp/branches/upstream/current/plugins/Admin/admin.pl	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Admin/admin.pl	2008-03-04 09:02:07 UTC (rev 527)
@@ -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: admin.pl,v 1.330 2008/01/30 22:46:10 jamiemccarthy Exp $
+# $Id: admin.pl,v 1.331 2008/02/27 19:00:15 jamiemccarthy Exp $
 
 use strict;
 use File::Temp 'tempfile';
@@ -2059,14 +2059,31 @@
 	}
 
 	$data->{neverdisplay} = $form->{display} ? '' : 1;
-
-#print STDERR "admin.pl before updateStory data: " . Dumper($data);
 	if ($data->{neverdisplay}) {
 		print STDERR "Setting sid: $form->{sid} to neverdisplay\n";
 		use Data::Dumper;
 		print STDERR Dumper($form);
 		print STDERR Dumper($data);
 	}
+
+	if ($constants->{brief_sectional_mainpage}) {
+		$data->{offmainpage} = undef;
+		my $sectional_weight = $constants->{topics_sectional_weight} || 10;
+		if (!$rendered_hr->{ $constants->{mainpage_nexus_tid} }) {
+			my $mdn_ar = $slashdb->getMainpageDisplayableNexuses();
+			my $mdn_hr = { map { ($_, 1) } @$mdn_ar };
+			my $any_sectional = 0;
+			for my $tid (keys %$rendered_hr) {
+				$any_sectional = 1, last
+					if $rendered_hr->{$tid} >= $sectional_weight
+						&& $mdn_hr->{$tid};
+			}
+			$data->{offmainpage} = 1 if !$any_sectional;
+		}
+		
+	}
+
+#print STDERR "admin.pl before updateStory data: " . Dumper($data);
 	if (!$slashdb->updateStory($form->{sid}, $data)) {
 		titlebar('100%', getTitle('story_update_failed'));
 		editStory(@_);

Modified: slashjp/branches/upstream/current/plugins/Ajax/PLUGIN
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/PLUGIN	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/PLUGIN	2008-03-04 09:02:07 UTC (rev 527)
@@ -1,4 +1,4 @@
-# $Id: PLUGIN,v 1.39 2008/02/20 16:30:47 entweichen Exp $
+# $Id: PLUGIN,v 1.40 2008/02/28 19:26:58 pudge Exp $
 name=Ajax
 description="Ajax (Asynchronous Javascript and XML)"
 mysql_dump=mysql_dump.sql
@@ -35,6 +35,7 @@
 template=templates/ajax_reskey_tag;misc;default
 template=templates/data;ajax;default
 template=templates/datewidget;misc;default
+template=templates/edit_comment;ajax;default
 template=templates/modal_footer;misc;default
 template=templates/prefs_d2;ajax;default
 template=templates/prefs_d2_posting;ajax;default

Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl	2008-03-04 09:02:07 UTC (rev 527)
@@ -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.72 2008/02/21 01:01:52 pudge Exp $
+# $Id: ajax.pl,v 1.74 2008/02/28 19:26:58 pudge Exp $
 
 use strict;
 use warnings;
@@ -14,7 +14,7 @@
 use Slash::Utility;
 use vars qw($VERSION);
 
-($VERSION) = ' $Revision: 1.72 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.74 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 ##################################################################
 sub main {
@@ -63,7 +63,9 @@
 		}
 		if ($ops->{$op}{reskey_type} eq 'createuse') {
 			$rkey->createuse;
-		} else {
+		} elsif ($ops->{$op}{reskey_type} eq 'touch') {
+			$rkey->touch;
+		} else  {
 			$rkey->use;
 		}
 		if (!$rkey->success) {
@@ -266,6 +268,71 @@
 ###################
 # comments
 
+sub submitReply {
+	my($slashdb, $constants, $user, $form, $options) = @_;
+	my $pid = $form->{pid} || 0;
+	my $sid = $form->{sid} or return;
+
+}
+
+sub previewReply {
+	my($slashdb, $constants, $user, $form, $options) = @_;
+	my $pid = $form->{pid} || 0;
+	my $sid = $form->{sid} or return;
+
+	$user->{state}{ajax_accesslog_op} = 'comments_preview_reply';
+
+	my $discussion = $slashdb->getDiscussion($sid);
+	my $comment = preProcessComment($form, $user, $discussion);
+	my $preview = postProcessComment({ %$comment, %$user }, 0, $discussion);
+	my $html = prevComment($preview, $user);
+
+
+	$options->{content_type} = 'application/json';
+	my %to_dump = (html => { "replyto_preview_$pid" => $html });
+#use Data::Dumper; print STDERR Dumper \%to_dump; 
+
+	return Data::JavaScript::Anon->anon_dump(\%to_dump);
+}
+
+
+sub replyForm {
+	my($slashdb, $constants, $user, $form, $options) = @_;
+	my $pid = $form->{pid} || 0;
+	my $sid = $form->{sid} or return;
+
+	$user->{state}{ajax_accesslog_op} = 'comments_reply_form';
+
+	my($reply, $pid_reply);
+	$reply = $slashdb->getCommentReply($sid, $pid) if $pid;
+	$pid_reply = prepareQuoteReply($reply) if $pid && $reply;
+
+	my $reskey = getObject('Slash::ResKey');
+	my $rkey = $reskey->key('comments', { nostate => 1 });
+	$rkey->create;
+
+	my %to_dump;
+	if ($rkey->success) {
+		my $reply_html = slashDisplay('edit_comment', {
+			sid    => $sid,
+			pid    => $pid,
+			reply  => $reply,
+			rkey   => $rkey
+		}, { Return => 1 });
+		%to_dump = (html => { "replyto_$pid" => $reply_html });
+	} else {
+		%to_dump = (html => { "replyto_$pid" => $rkey->errstr });
+	}
+
+	$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);
+}
+
+
 sub readRest {
 	my($slashdb, $constants, $user, $form) = @_;
 	my $cid = $form->{cid} or return;
@@ -550,90 +617,103 @@
 			{ Return => 1 }
 		);
 	} elsif ($form->{'section'} eq 'sectional') {
-                
-               getSectionPrefsHTML($slashdb, $constants, $user, $form);
+	       getSectionPrefsHTML($slashdb, $constants, $user, $form);
 
-        } elsif ($form->{'section'} eq 'slashboxes') {
-                my $section_descref = { };
-                my $box_order;
-                my $sections_description = $slashdb->getSectionBlocks();
-                my $slashboxes_hr = { };
-                my $slashboxes_textlist = $user->{slashboxes};
-                my $userspace = $user->{mylinks} || "";
+	} elsif ($form->{'section'} eq 'slashboxes') {
+		my $section_descref = { };
+		my $box_order;
+		my $sections_description = $slashdb->getSectionBlocks();
+		my $slashboxes_hr = { };
+		my $slashboxes_textlist = $user->{slashboxes};
+		my $userspace = $user->{mylinks} || "";
 
-                if (!$slashboxes_textlist) {
-                        my($boxes, $skinBoxes) = $slashdb->getPortalsCommon();
-                        $slashboxes_textlist = join ",", @{$skinBoxes->{$constants->{mainpage_skid}}};
-                }
+		if (!$slashboxes_textlist) {
+			my($boxes, $skinBoxes) = $slashdb->getPortalsCommon();
+			$slashboxes_textlist = join ",", @{$skinBoxes->{$constants->{mainpage_skid}}};
+		}
 
-                for my $bid (map { /^'?([^']+)'?$/; $1 } split(/,/, $slashboxes_textlist)) {
-                        $slashboxes_hr->{$bid} = 1;
-                }
+		for my $bid (map { /^'?([^']+)'?$/; $1 } split(/,/, $slashboxes_textlist)) {
+			$slashboxes_hr->{$bid} = 1;
+		}
 
-                for my $ary (sort { lc $a->[1] cmp lc $b->[1]} @$sections_description) {
-                        my($bid, $title, $boldflag) = @$ary;
-                        push @$box_order, $bid;
-                        $section_descref->{$bid}{checked} = $slashboxes_hr->{$bid} ? $constants->{markup_checked_attribute} : '';
-                        $title =~ s/<(.*?)>//g;
-                        $section_descref->{$bid}{title} = $title;
-                }
+		for my $ary (sort { lc $a->[1] cmp lc $b->[1]} @$sections_description) {
+			my($bid, $title, $boldflag) = @$ary;
+			push @$box_order, $bid;
+			$section_descref->{$bid}{checked} = $slashboxes_hr->{$bid} ? $constants->{markup_checked_attribute} : '';
+			$title =~ s/<(.*?)>//g;
+			$section_descref->{$bid}{title} = $title;
+		}
 
-                return
-                        slashDisplay('prefs_slashboxes', {
-                                box_order         => $box_order,
-                                section_descref   => $section_descref,
-                                userspace         => $userspace,
-                                tabbed            => $form->{'tabbed'},
-                        },
-                        { Return => 1 }
-                );
+		return
+			slashDisplay('prefs_slashboxes', {
+				box_order	  => $box_order,
+				section_descref	  => $section_descref,
+				userspace	  => $userspace,
+				tabbed		  => $form->{'tabbed'},
+			},
+			{ Return => 1 }
+		);
 
-        } elsif ($form->{'section'} eq 'authors') {
+	} elsif ($form->{'section'} eq 'authors') {
 
-                my $author_hr = $slashdb->getDescriptions('authors');
-                my @aid_order = sort { lc $author_hr->{$a} cmp lc $author_hr->{$b} } keys %$author_hr;
-                my %story_never_author;
-                map { $story_never_author{$_} = 1 } keys %$author_hr;
-                map { $story_never_author{$_} = 0 } split(/,/, $user->{story_never_author});
+		my $author_hr = $slashdb->getDescriptions('authors');
+		my @aid_order = sort { lc $author_hr->{$a} cmp lc $author_hr->{$b} } keys %$author_hr;
+		my %story_never_author;
+		map { $story_never_author{$_} = 1 } keys %$author_hr;
+		map { $story_never_author{$_} = 0 } split(/,/, $user->{story_never_author});
 
-                return
-                        slashDisplay('prefs_authors', {
-                                aid_order          => \@aid_order,
-                                author_hr          => $author_hr,
-                                story_never_author => \%story_never_author,
-                                tabbed             => $form->{'tabbed'},
-                        },
-                        { Return => 1 }
-                );
+		return
+			slashDisplay('prefs_authors', {
+				aid_order	   => \@aid_order,
+				author_hr	   => $author_hr,
+				story_never_author => \%story_never_author,
+				tabbed		   => $form->{'tabbed'},
+			},
+			{ Return => 1 }
+		);
 
-        } elsif ($form->{'section'} eq 'admin') {
-                return if !$user->{is_admin};
+	} elsif ($form->{'section'} eq 'admin') {
+		return if !$user->{is_admin};
 
-                return
-                        slashDisplay('prefs_admin', {
-                                user   => $user,
-                                tabbed => $form->{'tabbed'},
-                        },
-                        { Return => 1 }
-                );
+		return
+			slashDisplay('prefs_admin', {
+				user   => $user,
+				tabbed => $form->{'tabbed'},
+			},
+			{ Return => 1 }
+		);
 
-        } elsif ($form->{'section'} eq 'fh') {
+	} elsif ($form->{'section'} eq 'fh') {
 
-                my $firehose = getObject("Slash::FireHose");
-                my $opts = $firehose->getAndSetOptions();
-                $opts->{firehose_usermode} = $user->{firehose_usermode} if $user->{is_admin};
+		my $firehose = getObject("Slash::FireHose");
+		my $opts = $firehose->getAndSetOptions();
+		$opts->{firehose_usermode} = $user->{firehose_usermode} if $user->{is_admin};
 
-                return
-                        slashDisplay('fhadvprefpane', {
-                                options => $opts,
-                                user    => $user,
-                        },
-                        { Return => 1 }
-                );
-                
-        } else {
-                
-                return
+		return
+			slashDisplay('fhadvprefpane', {
+				options => $opts,
+				user	=> $user,
+			},
+			{ Return => 1 }
+		);
+		
+	} elsif ($form->{'section'} eq 'ifh') {
+
+		my $firehose = getObject("Slash::FireHose");
+		my $opts = $firehose->getAndSetOptions();
+		$opts->{firehose_usermode} = $user->{firehose_usermode} if $user->{is_admin};
+
+		return
+			slashDisplay('fhadvprefpane', {
+				options => $opts,
+				user	=> $user,
+			},
+			{ Page => 'misc', Skin => 'idle', Return => 1 }
+		);
+
+	} else {
+		
+		return
 			slashDisplay('prefs_' . $form->{'section'}, {
 				user   => $user,
                                 tabbed => $form->{'tabbed'},
@@ -701,229 +781,230 @@
 		};
 	}
 
-        # Generic user
-        if ($params{'formname'} eq 'user') {
-                my $user_edit = $slashdb->getUser($params{uid});
-                my $gSkin = getCurrentSkin();
+	# Generic user
+	if ($params{'formname'} eq 'user') {
+		my $user_edit = $slashdb->getUser($params{uid});
+		my $gSkin = getCurrentSkin();
 
-                # Real Email
-                if ($user_edit->{realemail} ne $params{realemail}) {
-                        if ($slashdb->existsEmail($params{realemail})) {
-                                $params{realemail} = $user_edit->{realemail};
-                        }
-                }
+		# Real Email
+		if ($user_edit->{realemail} ne $params{realemail}) {
+			if ($slashdb->existsEmail($params{realemail})) {
+				$params{realemail} = $user_edit->{realemail};
+			}
+		}
 
-                # Homepage
-                my $homepage = $params{homepage};
-                $homepage = '' if $homepage eq 'http://';
-                $homepage = fudgeurl($homepage);
-                $homepage = URI->new_abs($homepage, $gSkin->{absolutedir})
-                               ->canonical
-                               ->as_string if $homepage ne '';
-                $homepage = substr($homepage, 0, 100) if $homepage ne '';
+		# Homepage
+		my $homepage = $params{homepage};
+		$homepage = '' if $homepage eq 'http://';
+		$homepage = fudgeurl($homepage);
+		$homepage = URI->new_abs($homepage, $gSkin->{absolutedir})
+			       ->canonical
+			       ->as_string if $homepage ne '';
+		$homepage = substr($homepage, 0, 100) if $homepage ne '';
 
-                # Calendar
-                my $calendar_url = $params{calendar_url};
-                if (length $calendar_url) {
-                        $calendar_url =~ s/^webcal/http/i;
-                        $calendar_url = fudgeurl($calendar_url);
-                        $calendar_url = URI->new_abs($calendar_url, $gSkin->{absolutedir})
-                                           ->canonical
-                                           ->as_string if $calendar_url ne '';
-                        $calendar_url =~ s|^http://||i;
-                        $calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';
-                }
+		# Calendar
+		my $calendar_url = $params{calendar_url};
+		if (length $calendar_url) {
+			$calendar_url =~ s/^webcal/http/i;
+			$calendar_url = fudgeurl($calendar_url);
+			$calendar_url = URI->new_abs($calendar_url, $gSkin->{absolutedir})
+					   ->canonical
+					   ->as_string if $calendar_url ne '';
+			$calendar_url =~ s|^http://||i;
+			$calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';
+		}
 
-                my(%extr, $err_message, %limit);
-                $limit{sig} = 120;
-                $limit{bio} = $constants->{users_bio_length} || 1024;
+		my(%extr, $err_message, %limit);
+		$limit{sig} = 120;
+		$limit{bio} = $constants->{users_bio_length} || 1024;
 
-                for my $key (keys %limit) {
-                        my $dat = chopEntity($params{$key}, $limit{$key});
-                        $dat = strip_html($dat);
-                        $dat = balanceTags($dat, { deep_nesting => 2, length => $limit{$key} });
-                        $dat = addDomainTags($dat) if $dat;
+		for my $key (keys %limit) {
+			my $dat = chopEntity($params{$key}, $limit{$key});
+			$dat = strip_html($dat);
+			$dat = balanceTags($dat, { deep_nesting => 2, length => $limit{$key} });
+			$dat = addDomainTags($dat) if $dat;
 
-                        if ($key eq 'sig' && defined($dat) && length($dat) > 200) {
-                                $extr{sig} = undef;
-                        }
+			if ($key eq 'sig' && defined($dat) && length($dat) > 200) {
+				$extr{sig} = undef;
+			}
 
-                        if ((length($dat) > 1 && !filterOk('comments', 'postersubj', $dat, \$err_message)) ||
-                            (!compressOk('comments', 'postersubj', $dat))) {
-                                $extr{$key} = undef;
-                        }
-                        else {
-                                $extr{$key} = $dat;
-                        }
-                }
+			if ((length($dat) > 1 && !filterOk('comments', 'postersubj', $dat, \$err_message)) ||
+			    (!compressOk('comments', 'postersubj', $dat))) {
+				$extr{$key} = undef;
+			}
+			else {
+				$extr{$key} = $dat;
+			}
+		}
 
-                $user_edits_table = {
-                        homepage            => $homepage,
-                        realname            => $params{realname},
-                        calendar_url        => $calendar_url,
-                        yahoo               => $params{yahoo},
-                        jabber              => $params{jabber},
-                        aim                 => $params{aim},
-                        aimdisplay          => $params{aimdisplay},
-                        icq                 => $params{icq},
-                        mobile_text_address => $params{mobile_text_address},
-                };
+		$user_edits_table = {
+			homepage	    => $homepage,
+			realname	    => $params{realname},
+			calendar_url	    => $calendar_url,
+			yahoo		    => $params{yahoo},
+			jabber		    => $params{jabber},
+			aim		    => $params{aim},
+			aimdisplay	    => $params{aimdisplay},
+			icq		    => $params{icq},
+			mobile_text_address => $params{mobile_text_address},
+		};
 
-                for (keys %extr) {
-                        $user_edits_table->{$_} = $extr{$_} if defined $extr{$_};
-                }
+		for (keys %extr) {
+			$user_edits_table->{$_} = $extr{$_} if defined $extr{$_};
+		}
 
-                for (keys %$user_edits_table) {
-                        $user_edits_table->{$_} = '' unless defined $user_edits_table->{$_};
-                }
+		for (keys %$user_edits_table) {
+			$user_edits_table->{$_} = '' unless defined $user_edits_table->{$_};
+		}
 
-                if ($user_edit->{realemail} ne $params{realemail}) {
-                        $user_edits_table->{realemail} = chopEntity($params{realemail}, 50);
-                        my $new_fakeemail = '';
+		if ($user_edit->{realemail} ne $params{realemail}) {
+			$user_edits_table->{realemail} = chopEntity($params{realemail}, 50);
+			my $new_fakeemail = '';
 
-                        if ($user->{emaildisplay}) {
-                                $new_fakeemail = getArmoredEmail($params{uid}, $user_edits_table->{realemail}) if $user->{emaildisplay} == 1;
-                                $new_fakeemail = $user_edits_table->{realemail} if $user->{emaildisplay} == 2;
-                        }
-                        $user_edits_table->{fakeemail} = $new_fakeemail;
-                }
+			if ($user->{emaildisplay}) {
+				$new_fakeemail = getArmoredEmail($params{uid}, $user_edits_table->{realemail}) if $user->{emaildisplay} == 1;
+				$new_fakeemail = $user_edits_table->{realemail} if $user->{emaildisplay} == 2;
+			}
+			$user_edits_table->{fakeemail} = $new_fakeemail;
+		}
 
-                my $reader = getObject('Slash::DB', { db_type => 'reader' });
-                my $otherparams  = $reader->getDescriptions('otherusersparam');
-                for my $param (keys %$otherparams) {
-                        if (exists $params{$param}) {
-                                $user_edits_table->{$param} = $user->{$param} = $params{$param} || undef;
-                        }
-                }
-        }
+		my $reader = getObject('Slash::DB', { db_type => 'reader' });
+		my $otherparams	 = $reader->getDescriptions('otherusersparam');
+		for my $param (keys %$otherparams) {
+			if (exists $params{$param}) {
+				$user_edits_table->{$param} = $user->{$param} = $params{$param} || undef;
+			}
+		}
+	}
 
-        # Sections
-        if ($params{'formname'} eq "sectional") {
-                setSectionNexusPrefs($slashdb, $constants, $user, \%params);
-        }
+	# Sections
+	if ($params{'formname'} eq "sectional") {
+		setSectionNexusPrefs($slashdb, $constants, $user, \%params);
+	}
 
-        # Homepage
-        if ($params{'formname'} eq "home") {
-                $user_edits_table = {
-                        maxstories      => 30,
-                        lowbandwidth    => ($params{lowbandwidth}    ? 1 : 0),
-                        simpledesign    => ($params{simpledesign}    ? 1 : 0),
-                        noicons         => ($params{noicons}         ? 1 : 0),
-                        willing         => ($params{willing}         ? 1 : 0),
-                        tags_turnedoff  => ($params{showtags}        ? undef : 1),
-                        opt_osdn_navbar => ($params{opt_osdn_navbar} ? 1 : 0),
-                };
+	# Homepage
+	if ($params{'formname'} eq "home") {
+		$user_edits_table = {
+			maxstories	=> 30,
+			lowbandwidth	=> ($params{lowbandwidth}    ? 1 : 0),
+			simpledesign	=> ($params{simpledesign}    ? 1 : 0),
+			noicons		=> ($params{noicons}	     ? 1 : 0),
+			willing		=> ($params{willing}	     ? 1 : 0),
+			tags_turnedoff	=> ($params{showtags}	     ? undef : 1),
+			opt_osdn_navbar => ($params{opt_osdn_navbar} ? 1 : 0),
+		};
 
-                if (defined $params{tzcode} && defined $params{tzformat}) {
-                        $user_edits_table->{tzcode} = $params{tzcode};
-                        $user_edits_table->{dfid}   = $params{tzformat};
-                        $user_edits_table->{dst}    = $params{dst};
-                }
+		if (defined $params{tzcode} && defined $params{tzformat}) {
+			$user_edits_table->{tzcode} = $params{tzcode};
+			$user_edits_table->{dfid}   = $params{tzformat};
+			$user_edits_table->{dst}    = $params{dst};
+		}
 
-                if (!isAnon($params{uid}) && !$params{willing}) {
-                        $slashdb->setUser($params{uid}, { points => 0 });
-                }
-        }
+		if (!isAnon($params{uid}) && !$params{willing}) {
+			$slashdb->setUser($params{uid}, { points => 0 });
+		}
+	}
 
-        if ($params{'formname'} eq "slashboxes") {
-                my $slashboxes = $user->{slashboxes};
-                my($boxes, $skinBoxes) = $slashdb->getPortalsCommon();
-                my $default_slashboxes_textlist = join ",",
-                        @{$skinBoxes->{$constants->{mainpage_skid}}};
+	if ($params{'formname'} eq "slashboxes") {
+		my $slashboxes = $user->{slashboxes};
+		my($boxes, $skinBoxes) = $slashdb->getPortalsCommon();
+		my $default_slashboxes_textlist = join ",",
+			@{$skinBoxes->{$constants->{mainpage_skid}}};
 
-                $slashboxes = $default_slashboxes_textlist if !$slashboxes;
-                my @slashboxes = split /,/, $slashboxes;
-                my %slashboxes = ( );
+		$slashboxes = $default_slashboxes_textlist if !$slashboxes;
+		my @slashboxes = split /,/, $slashboxes;
+		my %slashboxes = ( );
 
-                for my $i (0..$#slashboxes) {
-                        $slashboxes{$slashboxes[$i]} = $i;
-                }
+		for my $i (0..$#slashboxes) {
+			$slashboxes{$slashboxes[$i]} = $i;
+		}
 
-                for my $key (sort grep /^showbox_/, keys %params) {
-                        my($bid) = $key =~ /^showbox_(\w+)$/;
-                        next if length($bid) < 1 || length($bid) > 30 || $bid !~ /^\w+$/;
-                        if (! exists $slashboxes{$bid}) {
-                                $slashboxes{$bid} = 999;
-                        }
-                }
+		for my $key (sort grep /^showbox_/, keys %params) {
+			my($bid) = $key =~ /^showbox_(\w+)$/;
+			next if length($bid) < 1 || length($bid) > 30 || $bid !~ /^\w+$/;
+			if (! exists $slashboxes{$bid}) {
+				$slashboxes{$bid} = 999;
+			}
+		}
 
-                for my $bid (@slashboxes) {
-                        delete $slashboxes{$bid} unless $params{"showbox_$bid"};
-                }
+		for my $bid (@slashboxes) {
+			delete $slashboxes{$bid} unless $params{"showbox_$bid"};
+		}
 
-                @slashboxes = sort { $slashboxes{$a} <=> $slashboxes{$b} || $a cmp $b } keys %slashboxes;
-                $#slashboxes = 19 if $#slashboxes > 19;
-                $slashboxes = join ",", @slashboxes;
-                $slashboxes = "" if ($slashboxes eq $default_slashboxes_textlist);
+		@slashboxes = sort { $slashboxes{$a} <=> $slashboxes{$b} || $a cmp $b } keys %slashboxes;
+		$#slashboxes = 19 if $#slashboxes > 19;
+		$slashboxes = join ",", @slashboxes;
+		$slashboxes = "" if ($slashboxes eq $default_slashboxes_textlist);
 
-                $slashboxes =~ s/[^\w,-]//g;
-                my @items = grep { $_ } split /,/, $slashboxes;
-                $slashboxes = join ",", @items;
+		$slashboxes =~ s/[^\w,-]//g;
+		my @items = grep { $_ } split /,/, $slashboxes;
+		$slashboxes = join ",", @items;
 
-                if (length($slashboxes) > 1024) {
-                        $slashboxes = substr($slashboxes, 0, 1024);
-                        $slashboxes =~ s/,?\w*$//g;
-                } elsif (length($slashboxes) < 1) {
-                        $slashboxes = '';
-                }
+		if (length($slashboxes) > 1024) {
+			$slashboxes = substr($slashboxes, 0, 1024);
+			$slashboxes =~ s/,?\w*$//g;
+		} elsif (length($slashboxes) < 1) {
+			$slashboxes = '';
+		}
 
-                $user_edits_table->{slashboxes} = $slashboxes;
+		$user_edits_table->{slashboxes} = $slashboxes;
 
-                $user_edits_table->{mylinks} = balanceTags(strip_html(
-                        chopEntity($params{mylinks} || '', 255)
-                ), { deep_nesting => 2, length => 255 });
+		$user_edits_table->{mylinks} = balanceTags(strip_html(
+			chopEntity($params{mylinks} || '', 255)
+		), { deep_nesting => 2, length => 255 });
 
-                $user_edits_table->{mylinks} = '' unless defined $user_edits_table->{mylinks};
+		$user_edits_table->{mylinks} = '' unless defined $user_edits_table->{mylinks};
 
-        }
+	}
 
-        if ($params{'formname'} eq "authors") {
-                my $author_hr = $slashdb->getDescriptions('authors');
-                my ($story_author_all, @story_never_author);
+	if ($params{'formname'} eq "authors") {
+		my $author_hr = $slashdb->getDescriptions('authors');
+		my ($story_author_all, @story_never_author);
 
-                for my $aid (sort { $a <=> $b } keys %$author_hr) {
-                        my $key = "aid$aid";
-                        $story_author_all++;
-                        push(@story_never_author, $aid) if (!$params{$key});
-                }
+		for my $aid (sort { $a <=> $b } keys %$author_hr) {
+			my $key = "aid$aid";
+			$story_author_all++;
+			push(@story_never_author, $aid) if (!$params{$key});
+		}
 
-                $#story_never_author = 299 if $#story_never_author  > 299;
+		$#story_never_author = 299 if $#story_never_author  > 299;
 
-                my $story_never_author = join(",", @story_never_author);
-                $story_never_author =~ s/[^\w,-]//g;
-                my @items = grep { $_ } split /,/, $story_never_author;
-                $story_never_author = join ",", @items;
+		my $story_never_author = join(",", @story_never_author);
+		$story_never_author =~ s/[^\w,-]//g;
+		my @items = grep { $_ } split /,/, $story_never_author;
+		$story_never_author = join ",", @items;
 
-                my $len ||= $constants->{checklist_length} || 255;
-                if (length($story_never_author) > $len) {
-                        $story_never_author = substr($story_never_author, 0, $len);
-                        $story_never_author =~ s/,?\w*$//g;
-                } elsif (length($story_never_author) < 1) {
-                        $story_never_author = '';
-                }
+		my $len ||= $constants->{checklist_length} || 255;
+		if (length($story_never_author) > $len) {
+			$story_never_author = substr($story_never_author, 0, $len);
+			$story_never_author =~ s/,?\w*$//g;
+		} elsif (length($story_never_author) < 1) {
+			$story_never_author = '';
+		}
 
-                $user_edits_table = {
-                        story_never_author => $story_never_author,
-                };
+		$user_edits_table = {
+			story_never_author => $story_never_author,
+		};
 
-        }
+	}
 
-        if ($params{'formname'} eq "admin") {
-               return if !$user->{is_admin};
+	if ($params{'formname'} eq "admin") {
+		return if !$user->{is_admin};
 
-              $user_edits_table = {
-                     playing           => $params{playing},
-                     no_spell          => ($params{'no_spell'} ? 1 : undef),
-                     mod_with_comm     => ($params{'mod_with_comm'} ? 1 : undef),
-                     m2_with_mod       => ($params{'m2_with_mod'} ? 1 : undef),
-                     m2_with_comm_mod  => ($params{'m2_with_mod_on_comm'} ? 1 : undef),
-              };
-        }
+		$user_edits_table = {
+			test_code         => ($params{'test_code'} ? 1 : undef),
+			playing           => $params{playing},
+			no_spell          => ($params{'no_spell'} ? 1 : undef),
+			mod_with_comm     => ($params{'mod_with_comm'} ? 1 : undef),
+			m2_with_mod       => ($params{'m2_with_mod'} ? 1 : undef),
+			m2_with_comm_mod  => ($params{'m2_with_mod_on_comm'} ? 1 : undef),
+		};
+	}
 
         # Everything but Sections is saved here.
-        if ($params{'formname'} ne "sectional") {
-                $slashdb->setUser($params{uid}, $user_edits_table);
-        }
+	if ($params{'formname'} ne "sectional") {
+		$slashdb->setUser($params{uid}, $user_edits_table);
+	}
 }
 
 # comments
@@ -961,6 +1042,21 @@
 	);
 
 	my %mainops = (
+		comments_submit_reply  => {
+			function        => \&previewReply,
+			reskey_name     => 'comments',
+			reskey_type     => 'use',
+		},
+		comments_preview_reply  => {
+			function        => \&previewReply,
+			reskey_name     => 'comments',
+			reskey_type     => 'touch',
+		},
+		comments_reply_form     => {
+			function        => \&replyForm,
+			reskey_name     => 'ajax_base',
+			reskey_type     => 'createuse',
+		},
 		comments_read_rest      => {
 			function        => \&readRest,
 			reskey_name     => 'ajax_base',

Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js	2008-03-04 09:02:07 UTC (rev 527)
@@ -1,5 +1,5 @@
 // _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_
-// $Id: common.js,v 1.172 2008/02/22 03:38:41 tvroom Exp $
+// $Id: common.js,v 1.174 2008/02/28 19:26:58 pudge Exp $
 
 // global settings, but a firehose might use a local settings object instead
 var firehose_settings = {};
@@ -1211,6 +1211,10 @@
 	}
 }
 
+function firehose_slider_set_color(color) {
+	fh_colorslider.setValue(fh_ticksize * fh_colors_hash[color] , 1);
+}
+
 function firehose_change_section_anon(section) {
 	window.location.href= window.location.protocol + "//" + window.location.host + "/firehose.pl?section=" + encodeURIComponent(section) + "&tabtype=tabsection";
 }
@@ -1227,7 +1231,7 @@
 
 function vendorStoryPopup() {
 	id = vendor_popup_id;
-	var title = "<a href='//intel.vendors.slashdot.org' onclick=\"javascript:urchinTracker('/vendor_intel-popup/intel_popup_title');\">Intel's Opinion Center</a>";
+	var title = "<a href='//intel.vendors.slashdot.org' onclick=\"javascript:pageTracker._trackPageview('/vendor_intel-popup/intel_popup_title');\">Intel's Opinion Center</a>";
 	var buttons = createPopupButtons("<a href=\"#\" onclick=\"closePopup('vendorStory-" + id + "-popup')\">[X]</a>");
 	title = title + buttons;
 	var closepopup = function (e) {
@@ -1252,7 +1256,7 @@
 
 function vendorStoryPopup2() {
 	id = vendor_popup_id;
-	var title = "<a href='//intel.vendors.slashdot.org' onclick=\"javascript:urchinTracker('/vendor_intel-popup/intel_popup_title');\">Intel's Opinion Center</a>";
+	var title = "<a href='//intel.vendors.slashdot.org' onclick=\"javascript:pageTracker._trackPageview('/vendor_intel-popup/intel_popup_title');\">Intel's Opinion Center</a>";
 	var buttons = createPopupButtons("<a href=\"#\" onclick=\"closePopup('vendorStory-" + id + "-popup')\">[X]</a>");
 	title = title + buttons;
 	var closepopup = function (e) {

Added: slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/edit_comment;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -0,0 +1,70 @@
+__section__
+default
+__description__
+Template which renders the comment editor.
+
+* error_message = error message if there is an error
+* preview = preview of comment, if applicable
+* reply = hashref of comment replying to
+* hide_name = hide name / log out link
+* hide_email = hide email display
+* extras = array of any extras associated with this comment
+ 
+__title__
+
+__page__
+ajax
+__lang__
+en_US
+__name__
+edit_comment
+__template__
+<div id="wide">
+[% IF pid %]
+        [% PROCESS titlebar title="Reply to: $reply.subject" %]
+[% ELSE %]
+        [% PROCESS titlebar title="Reply to: XXXXX" %]
+[% END %]
+
+[% IF user.is_anon %]<p>
+	[% 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>[% END %]
+
+[% IF !user.is_anon || constants.allow_anonymous %]
+<form action="[% gSkin.rootdir %]/comments.pl" method="post">
+	<div id="replyto_preview_[% pid %]" class="replyto_reply" onclick="editReply([% pid %])"></div>
+	<div id="replyto_reply_[% pid %]" class="replyto_reply">
+<input type="hidden" name="sid" value="[% sid %]">
+[% IF pid %]<input type="hidden" name="pid" value="[% pid %]">[% END %]
+[% IF gotmodwarning %]<input type="hidden" name="gotmodwarning" value="1">[% END # XXXXX %]
+[% reskey_label = "reskey_reply_$pid"; PROCESS reskey_tag %]
+<p><input type="text" name="postersubj_[% pid %]" id="postersubj_[% pid %]" value="Re:[% reply.subject | strip_attribute %]" size="50" maxlength="50">
+[<a href="[% gSkin.rootdir %]/my/comments" onclick="getModalPrefs('d2_posting', 'Discussion 2'); return false;">Customize Posting Preferences</a>]</p>
+<p><textarea wrap="virtual" name="postercomment_[% pid %]" id="postercomment_[% pid %]" rows="[% user.textarea_rows || constants.textarea_rows %]" cols="[% user.textarea_cols || constants.textarea_cols %]"></textarea></p>
+
+[% IF constants.allow_anonymous && user.karma > -1 && !user.is_anon && (discussion.commentstatus == 'enabled' || discussion.commentstatus == 'logged_in')  %]
+	<p><input type="checkbox" name="postanon"> Post Anonymously</p>
+[% END %]
+
+	</div>
+	<div id="replyto_msg_[% pid %]" class="replyto_msg"></div>
+	<div id="replyto_buttons_[% pid %]" class="replyto_buttons">
+<input type="button" name="preview_[% pid %]"    id="preview_[% pid %]"    value="Preview" class="button" onclick="previewReply([% pid %]); return false;">
+<input type="button" name="submit_[% pid %]"     id="submit_[% pid %]"     value="Submit"  class="button" onclick="fetchEl('preview_[% pid %]').style.display='inline'; fetchEl('submit_[% pid %]').style.display='none';  return false;" style="display: none">
+<input type="button" name="quotereply_[% pid %]" id="quotereply_[% pid %]" value="Quote"   class="button" onclick="quoteReply([% pid %]); return false;">
+	</div>
+</form>
+[% END # IF !user.is_anon || constants.allow_anonymous %]
+</div>
+
+__seclev__
+1000
+__version__
+$Id: edit_comment;ajax;default,v 1.1 2008/02/28 21:39:31 pudge Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_admin;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_admin;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_admin;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -30,6 +30,8 @@
                         <input type="hidden" name="uid" value="[% user.uid %]">
                         <input type="hidden" name="name" value="[% user.nickname | strip_attribute %]">
 
+                        <input type="checkbox" name="test_code"[% constants.markup_checked_attribute IF user.test_code %]>&nbsp;<b>Enable Test Code</b>
+
                         [% IF constants.slashbox_whatsplaying %]
                                 <h3>User Info</h3>
                                 <b>What I'm Playing For</b>&nbsp;<input type="text" name="playing" value="[% user.playing | strip_attribute %]" size="40">
@@ -82,4 +84,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_admin;ajax;default,v 1.1 2008/02/12 22:15:36 entweichen Exp $
+$Id: prefs_admin;ajax;default,v 1.2 2008/02/28 19:26:58 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-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -33,7 +33,7 @@
                 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);">&nbsp;<b>Enable Dynamic Discussions</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_discussions');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="discussion2"[% d2_check %] onclick="javascript:void(document.forms['modal_prefs'].refreshable.value=1);">&nbsp;<b>Enable Dynamic Discussions</b>&nbsp;<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.
@@ -46,7 +46,7 @@
                         <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);
-                           Slash.createSelect('d2_comment_q', comment_q, user.d2_comment_q, 1) %] Comments&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sortorder');" style="text-decoration: none;">[?]</a>
+                           Slash.createSelect('d2_comment_q', comment_q, user.d2_comment_q, 1) %] Comments&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sortorder');" class="help">?</a>
 
                         <br>
 
@@ -68,7 +68,7 @@
 
                 <br>
 
-                <input type="checkbox" name="nosigs"[% s_check %]>&nbsp;<b>Disable Sigs</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sigs');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="nosigs"[% s_check %]>&nbsp;<b>Disable Sigs</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sigs');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_sigs" class="modalprefhelp" style="display: none;">
                         Strip sig quotes from comments.
@@ -80,7 +80,7 @@
                 IF user.noscores;
                         n_check = constants.markup_checked_attribute;
                 END %]
-                <input type="checkbox" name="noscores"[% n_check %]>&nbsp;<b>Do Not Display Scores</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_scores');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="noscores"[% n_check %]>&nbsp;<b>Do Not Display Scores</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_scores');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_scores" class="modalprefhelp" style="display: none;">
                         Hide scores. They still <b>apply</b>, but you just don't see them.
@@ -91,7 +91,7 @@
                 [% UNLESS user.domaintags.defined; user.domaintags = 2; END %]
                 [% domaintags.${user.domaintags} = constants.markup_checked_attribute -%]
 
-                <b>Display Link Domains?</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_domains');" style="text-decoration: none;">[?]</a>
+                <b>Display Link Domains?</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_domains');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_domains" class="modalprefhelp" style="display: none;">
                         Show the actual domain of any link in brackets.
@@ -112,4 +112,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_d2;ajax;default,v 1.11 2008/02/12 23:27:49 entweichen Exp $
+$Id: prefs_d2;ajax;default,v 1.12 2008/02/28 17:03:12 entweichen Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2_posting;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2_posting;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2_posting;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -62,7 +62,7 @@
                         b_check = constants.markup_checked_attribute;
                 END %]
                 <input type="hidden" name="nobonus_present" value="1">
-                <b><input type="checkbox" name="nobonus"[% b_check %]>&nbsp;No Karma Bonus</b><a href="#" onclick="displayModalPrefHelp('modalprefhelp_karma');" style="text-decoration: none;">[?]</a>
+                <b><input type="checkbox" name="nobonus"[% b_check %]>&nbsp;No Karma Bonus</b><a href="#" onclick="displayModalPrefHelp('modalprefhelp_karma');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_karma" class="modalprefhelp" style="display: none;">
                         Normally users with high karma post at Score: 2, but you can choose to post down in the Score: 1 gutters with the rest of the user population with this option.
@@ -76,7 +76,7 @@
                         sb_check = constants.markup_checked_attribute;
                 END %]
                 <input type="hidden" name="nosubscriberbonus_present" value="1">
-                <b><input type="checkbox" name="nosubscriberbonus"[% sb_check %]>&nbsp;No Subscriber Bonus</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_subscriber');" style="text-decoration: none;">[?]</a>
+                <b><input type="checkbox" name="nosubscriberbonus"[% sb_check %]>&nbsp;No Subscriber Bonus</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_subscriber');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_subscriber" class="modalprefhelp" style="display: none;">
                         Our paying subscribers are allowed to post at Score: 2, but if you think that this is unnecessary, then you can turn it off.
@@ -84,7 +84,7 @@
 
         [% END %]
 
-        <b>Comment Box Size</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_textarea');" style="text-decoration: none;">[?]</a>
+        <b>Comment Box Size</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_textarea');" class="help">?</a>
         <br>
         <div id="modalprefhelp_textarea" class="modalprefhelp" style="display: none;">
                 Also applies to other large text boxes.
@@ -105,7 +105,7 @@
 
         <br><br>
 
-        <b>Comment Post Mode</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_postmode');" style="text-decoration: none;">[?]</a>
+        <b>Comment Post Mode</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_postmode');" class="help">?</a>
         <br>
         <div id="modalprefhelp_postmode" class="modalprefhelp" style="display: none;">
                 Posting modes determine how the text that you enter for a comment is interpreted and thus how it will be displayed to the reader. The posting modes are:<br>
@@ -128,4 +128,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_d2_posting;ajax;default,v 1.5 2008/02/20 16:28:35 entweichen Exp $
+$Id: prefs_d2_posting;ajax;default,v 1.6 2008/02/28 17:05:40 entweichen Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_home;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_home;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_home;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -74,7 +74,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="simpledesign"[% sd_check %]> <b>Simple Design</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_simpledesign');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="simpledesign"[% sd_check %]> <b>Simple Design</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_simpledesign');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_simpledesign" class="modalprefhelp" style="display: none;">
                         Simplifies the design of [% constants.sitename %] to strip away some of the excesses of the UI.
@@ -88,7 +88,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="lowbandwidth"[% lb_check %]> <b>Low Bandwidth</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_lowbandwidth');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="lowbandwidth"[% lb_check %]> <b>Low Bandwidth</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_lowbandwidth');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_lowbandwidth" class="modalprefhelp" style="display: none;">
                         Reduces the size of pages for people with slower network connections
@@ -102,7 +102,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="noicons"[% i_check %]> <b>No Icons</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_noicons');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="noicons"[% i_check %]> <b>No Icons</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_noicons');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_noicons" class="modalprefhelp" style="display: none;">
                         Disable topic icon images on stories.
@@ -110,7 +110,7 @@
 
                 <br>
 
-                <b>Maximum Stories</b> <input type="text" name="maxstories" size="3" value="[% user.maxstories %]">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_maxstories');" style="text-decoration: none;">[?]</a>
+                <b>Maximum Stories</b> <input type="text" name="maxstories" size="3" value="[% user.maxstories %]">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_maxstories');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_maxstories" class="modalprefhelp" style="display: none;">
                         The default is 30.  The main column displays 1/3rd of these at minimum, and all of today's stories at maximum.
@@ -124,7 +124,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="willing"[% w_check %]> <b>Willing to Moderate</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_moderate');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="willing"[% w_check %]> <b>Willing to Moderate</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_moderate');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_moderate" class="modalprefhelp" style="display: none;">
                         By default all users are willing to Moderate. Uncheck this if you aren't interested.
@@ -138,7 +138,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="showtags"[%tag_check %]> <b>Show Tags</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_showtags');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="showtags"[%tag_check %]> <b>Show Tags</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_showtags');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_showtags" class="modalprefhelp" style="display: none;">
                         Turn this off to ignore all tags.
@@ -152,7 +152,7 @@
                 END
                 %]
 
-                <input type="checkbox" name="opt_osdn_navbar"[% osdn_navbar_check %]> <b>OSTG Navbar</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_ostg');" style="text-decoration: none;">[?]</a>
+                <input type="checkbox" name="opt_osdn_navbar"[% osdn_navbar_check %]> <b>OSTG Navbar</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_ostg');" class="help">?</a>
                 <br>
                 <div id="modalprefhelp_ostg" class="modalprefhelp" style="display: none;">
                         Turn this on to display the OSTG nav bar at the top of the screen.
@@ -165,4 +165,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_home;ajax;default,v 1.3 2008/02/06 18:29:02 entweichen Exp $
+$Id: prefs_home;ajax;default,v 1.4 2008/02/28 16:42:09 lancelot Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -22,7 +22,7 @@
 [% END %]
 <br>
 
-<h3><a href="/users.pl?op=edituser" onclick="javascript:getModalPrefs('user', 'User', 1); return false" style="text-decoration: none;">User Info</a>&nbsp;<a href="/users.pl?op=edituser" onclick="displayModalPrefHelp('modalprefhelp_userinfo'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/users.pl?op=edituser" onclick="javascript:getModalPrefs('user', 'User', 1); return false" style="text-decoration: none;">User Info</a>&nbsp;<a href="/users.pl?op=edituser" onclick="displayModalPrefHelp('modalprefhelp_userinfo'); return false" title="Click To Expand Help" class="help">?</a></h3>
 
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_userinfo" class="modalprefhelp" style="display: none;">
@@ -34,7 +34,7 @@
 
 <br>
 
-<h3><a href="/users.pl?op=edithome" onclick="javascript:getModalPrefs('home', 'Homepage', 1); return false" style="text-decoration: none;">Index</a>&nbsp;<a href="/users.pl?op=edithome" onclick="displayModalPrefHelp('modalprefhelp_index'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/users.pl?op=edithome" onclick="javascript:getModalPrefs('home', 'Homepage', 1); return false" style="text-decoration: none;">Index</a>&nbsp;<a href="/users.pl?op=edithome" onclick="displayModalPrefHelp('modalprefhelp_index'); return false" title="Click To Expand Help" class="help">?</a></h3>
 
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_index" class="modalprefhelp" style="display: none;">
@@ -48,7 +48,7 @@
 
 <br>
 
-<h3><a href="[% gSkin.rootdir %]/my/comments"[% IF discussion2 == 'slashdot' %] onclick="getModalPrefs('d2', 'Discussion 2', 1); return false"[% END %] style="text-decoration: none;">Discussions</a>&nbsp;<a href="/users.pl?op=editcomm" onclick="displayModalPrefHelp('modalprefhelp_discussions'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="[% gSkin.rootdir %]/my/comments"[% IF discussion2 == 'slashdot' %] onclick="getModalPrefs('d2', 'Discussion 2', 1); return false"[% END %] style="text-decoration: none;">Discussions</a>&nbsp;<a href="/users.pl?op=editcomm" onclick="displayModalPrefHelp('modalprefhelp_discussions'); return false" title="Click To Expand Help" class="help">?</a></h3>
 
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_discussions" class="modalprefhelp" style="display: none;">
@@ -72,4 +72,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_main;ajax;default,v 1.3 2008/02/20 16:53:02 entweichen Exp $
+$Id: prefs_main;ajax;default,v 1.4 2008/02/28 17:08:02 entweichen Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;ajax;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;ajax;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;ajax;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -40,7 +40,7 @@
 
                         &nbsp;<p><br>
 
-                        <b>Email Address</b>&nbsp;<input type="text" name="realemail" value="[% user.realemail | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_email');" style="text-decoration: none;">[?]</a>
+                        <b>Email Address</b>&nbsp;<input type="text" name="realemail" value="[% user.realemail | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_email');" class="help">?</a>
                         <br>
                         <div id="modalprefhelp_email" class="modalprefhelp" style="display: none;">
                                 Required but never displayed publicly, unless you specify so in your comment preferences. This is where your passwd is mailed. If you change this address, a notification will be sent, and you will need to follow the enclosed instructions to re-register.
@@ -48,7 +48,7 @@
 
                         &nbsp;<p>
 
-                        <b>Homepage</b>&nbsp;<input type="text" name="homepage" value="[% user.homepage | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_homepage');" style="text-decoration: none;" style="text-decoration: none;">[?]</a>
+                        <b>Homepage</b>&nbsp;<input type="text" name="homepage" value="[% user.homepage | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_homepage');" class="help">?</a>
                         <br>
                         <div id="modalprefhelp_homepage" class="modalprefhelp" style="display: none;">
                                 You must enter a fully qualified URL for your homepage.
@@ -75,7 +75,7 @@
 
                         &nbsp;<p><br>
 
-                        <b>Public Calendar</b>&nbsp;<input type="text" name="calendar_url" value="[% user.calendar_url | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_calendar');" style="text-decoration: none;">[?]</a>
+                        <b>Public Calendar</b>&nbsp;<input type="text" name="calendar_url" value="[% user.calendar_url | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_calendar');" class="help">?</a>
                         <br>
                         <div id="modalprefhelp_calendar" class="modalprefhelp" style="display: none;">
                                 You must enter a fully qualified URL for your iCal calendar.
@@ -83,7 +83,7 @@
 
                         &nbsp;<p>
 
-                        <b>Mobile Text Address</b>&nbsp;<input type="text" name="mobile_text_address" value="[% user.mobile_text_address | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_mobile');" style="text-decoration: none;">[?]</a>
+                        <b>Mobile Text Address</b>&nbsp;<input type="text" name="mobile_text_address" value="[% user.mobile_text_address | strip_attribute %]" size="40">&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_mobile');" class="help">?</a>
                         <br>
                         <div id="modalprefhelp_mobile" class="modalprefhelp" style="display: none;">
                                 Set this if you plan to have Messages sent to your mobile device.
@@ -91,7 +91,7 @@
 
                         &nbsp;<p>
 
-                        <b>Sig</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sig');" style="text-decoration: none;">[?]</a>
+                        <b>Sig</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_sig');" class="help">?</a>
                         <div id="modalprefhelp_sig" class="modalprefhelp" style="display: none;">
                                 Appended to the end of comments you post. The maximum is 120 characters.
                         </div>
@@ -102,7 +102,7 @@
 
                         &nbsp;<p>
 
-                        <b>Bio</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_bio');" style="text-decoration: none;">[?]</a>
+                        <b>Bio</b>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_bio');" class="help">?</a>
                         <div id="modalprefhelp_bio" class="modalprefhelp" style="display: none;">
                                 This information is publicly displayed on your user page. The maximum is 255 characters.
                         </div>
@@ -119,4 +119,4 @@
 __seclev__
 500
 __version__
-$Id: prefs_user;ajax;default,v 1.6 2008/02/12 23:34:31 entweichen Exp $
+$Id: prefs_user;ajax;default,v 1.7 2008/02/28 16:42:09 lancelot Exp $

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/UI.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - User Interface</title>
-<!-- $Id: UI.shtml,v 1.10 2007/10/24 21:19:56 jamiemccarthy Exp $ -->
+<!-- $Id: UI.shtml,v 1.11 2008/02/27 18:57:06 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-               <li><a href="editorial.shtml">Previous section</a></li>
-               <li><a href="com-mod.shtml">Next section</a></li>
-               <li><a href="index.shtml">Index</a></li>
-        </ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>User Interface</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="ui100" id="ui100">I want a Slashbox that does X</a></h2>
         <p>The policy for Slashboxes is as follows:</p>
         <ol>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/accounts.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,16 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Accounts</title>
-<!-- $Id: accounts.shtml,v 1.15 2005/10/11 02:32:13 tvroom Exp $ -->
+<!-- $Id: accounts.shtml,v 1.16 2008/02/27 18:33:24 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
-	<ul class="menu">
-            	<li><a href="metamod.shtml">Previous section</a></li>
-                <li><a href="friends.shtml">Next section</a></li>
-                <li><a href="index.shtml">Index</a></li>
-	</ul>
-        <hr>
 
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Accounts</h3>
+                </div>
+        </div>
+
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="ac050">Why should I log in?</a></h2>
         <p>Logged in users have a variety of benefits on Slashdot that are unavailable to users who don't bother logging in. Among these benefits are:</p>
         <ul>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/advertising.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,16 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Advertising</title>
-<!-- $Id: advertising.shtml,v 1.5 2008/02/12 21:38:52 entweichen Exp $ -->
+<!-- $Id: advertising.shtml,v 1.6 2008/02/27 18:34:11 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
-	<ul class="menu">
-               <li><a href="tech.shtml">Previous Section</a></li>
-               <li><a href="suggestions.shtml">Next section</a></li>
-               <li><a href="index.shtml">Index</a></li>
-	</ul>
-        <hr>
 
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Advertising</h3>
+                </div>
+        </div>
+
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="ad100">Can I advertise on Slashdot?</a></h2>
         <p>Yes! You too can have banner ads at the top of Slashdot. Impress your friends! Terrify your competitors!</p>
         <p>Visit the <a href="http://web.sourceforge.com/media_kit.php">Advertising</a> page to learn how.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,23 @@
 <html>
 <head>
         <title>Slashdot FAQ - Badges How-To</title>
-<!-- $Id: badges.shtml,v 1.3 2008/01/07 17:41:52 scc Exp $ -->
+<!-- $Id: badges.shtml,v 1.4 2008/02/27 18:36:55 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-                 <li><a href="firehose.shtml">Previous Section</a></li>
-		             <li><a href="faq-meta.shtml">Next section</a></li>
-                 <li><a href="index.shtml">Index</a></li>
-       	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Badges</h3>
+                </div>
+        </div>
 
+        <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="/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>
+        </div>
 
 <h2>Put a Piece of Slashdot on Your Page</h2>
 <p>You can add a badge or link to your page (or for a blog, to your page template,

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/com-mod.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,16 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Comments and Moderation</title>
-<!-- $Id: com-mod.shtml,v 1.25 2008/02/13 16:37:44 pudge Exp $ -->
+<!-- $Id: com-mod.shtml,v 1.26 2008/02/27 18:38:45 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
-		<ul class="menu">
-                        <li><a href="UI.shtml">Previous section</a></li>
-                        <li><a href="metamod.shtml">Next section</a></li>
-                        <li><a href="index.shtml">Index</a></li>
-		</ul>
-        <hr>
-        
+       
+                <div class="generaltitle">
+                        <div class="title">
+                                <h3>Comments and Moderation</h3>
+                        </div>
+                </div>
+
+                <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="/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>
+                        </ul>
+                </div>
+ 
 <h2><a name="cm100" id="cm100">What's up with flat/threaded/nested comments?</a></h2>
         <p>These are just different ways of displaying what can be a rather long list of comments. Here's the rundown:</p>
         <ul>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/editorial.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Editorial</title>
-<!-- $Id: editorial.shtml,v 1.19 2007/10/04 16:42:37 scc Exp $ -->
+<!-- $Id: editorial.shtml,v 1.20 2008/02/27 18:39:47 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-                 <li><a href="faq-meta.shtml">Previous Section</a></li>
-                 <li><a href="UI.shtml">Next section</a></li>
-                 <li><a href="index.shtml">Index</a></li>
-       	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Editorial</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="ed100" id="ed100">How do I submit stories to Slashdot?</a></h2>
         <p>You can submit a story by using the <a href="/submit.pl">Submissions Bin</a>. When you submit a story, please remember to include appropriate links. Also, you'll have a better chance of getting our attention if you use a clear and specific subject line.</p>
         <p>Before you submit a story, <strong>please</strong> take a minute to make sure it's not a duplicate of a story we've posted already. Check the <a href="/">main Slashdot page</a> and make sure it hasn't already been posted. If it's not breaking news, you might also run a <a href="/search.pl">search</a> to see if it's something that might have been posted on a previous day. Roughly ten percent of all our story submissions are duplicates of stories we've already posted.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/faq-meta.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,17 +3,24 @@
 <html>
 <head>
         <title>Slashdot FAQ - Meta</title>
-<!-- $Id: faq-meta.shtml,v 1.5 2005/10/11 02:32:13 tvroom Exp $ -->
+<!-- $Id: faq-meta.shtml,v 1.6 2008/02/27 18:41:02 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-               <li><a href="editorial.shtml">Next section</a></li>
-               <li><a href="index.shtml">Index</a></li>
-       	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>FAQ Meta</h3>
+                </div>
+        </div>
 
+        <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="/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>
+        </div>
+
 <h2><a name="fm100" id="fm100">What is this document?</a></h2>
         <p>This is the Frequently Asked Questions (FAQ) file for Slashdot. As its name implies, it is intended to address questions that the Slashdot crew are asked repeatedly.</p>
         <p>This particular edition is version 1.2.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/feeds.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Feeds</title>
-<!-- $Id: feeds.shtml,v 1.4 2007/10/04 21:57:12 pudge Exp $ -->
+<!-- $Id: feeds.shtml,v 1.5 2008/02/27 18:41:56 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-		<li><a href="subscriptions.shtml">Previous Section</a></li>
-		<li><a href="slashmeta.shtml">Next section</a></li>
-		<li><a href="index.shtml">Index</a></li>
-	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Feeds</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="fe100">Where can I get Slashdot's main feed?</a></h2>
 	<p>The syndication feed for the Slashdot front page is available in <a href="http://rss.slashdot.org/Slashdot/slashdot/to">RSS 0.9</a>, <a href="http://rss.slashdot.org/Slashdot/slashdot">RSS 1.0</a>, and <a href="http://rss.slashdot.org/Slashdot/slashdotatom">Atom 1.0</a> formats.  Please do not request feeds more than once every 30 minutes.</p>
 	<p><em><small>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/firehose.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Firehose</title>
-<!-- $Id: firehose.shtml,v 1.2 2007/10/04 16:42:37 scc Exp $ -->
+<!-- $Id: firehose.shtml,v 1.3 2008/02/27 18:43:06 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-		<li><a href="subscriptions.shtml">Previous Section</a></li>
-		<li><a href="badges.shtml">Next section</a></li>
-		<li><a href="index.shtml">Index</a></li>
-	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Firehose</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="fh100">What is the Slashdot Firehose?</a></h2>
 	<p>The Slashdot Firehose is a way for you to participate in the Slashdot editorial
 process.  You are able to

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/index.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -4,12 +4,23 @@
 <head>
         <title>Slashdot FAQ - Index</title>
 <!--
-$VERSION = sprintf "%d.%03d", q$Id: index.shtml,v 1.35 2008/02/13 16:37:44 pudge Exp $ =~ /(\d+)/g
+$VERSION = sprintf "%d.%03d", q$Id: index.shtml,v 1.36 2008/02/27 18:32:10 entweichen Exp $ =~ /(\d+)/g
 -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <h1>Slashdot FAQ</h1><!-- FAQ Meta -->
+        <div class="generaltitle" >
+                <div class="title">
+                        <h3>Slashdot FAQ</h3>
+                </div>
+        </div>
+
+        <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>
+                </ul>
+        </div>
+
         <h2><strong><a href="/faq/faq-meta.shtml">FAQ Meta</a></strong></h2>
         <ul>
                 <li><strong><a href="/faq/faq-meta.shtml#fm100">What is this document?</a></strong></li>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/interviews.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Interviews</title>
-<!-- $Id: interviews.shtml,v 1.7 2006/02/05 16:33:01 jamiemccarthy Exp $ -->
+<!-- $Id: interviews.shtml,v 1.8 2008/02/27 18:45:05 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-              <li><a href="UI.shtml">Previous Section</a></li>
-              <li><a href="UI.shtml">Next section</a></li>
-              <li><a href="com-mod.shtml">Index</a></li>
-       	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Interviews</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="int1000" id="int1000">How many questions can I ask?</a></h2>
         <p>You can ask as many questions as you'd like!</p>
         <p>But please, only ask one question per submitted comment.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Meta-moderation</title>
-<!-- $Id: metamod.shtml,v 1.7 2008/01/07 16:15:16 jamiemccarthy Exp $ -->
+<!-- $Id: metamod.shtml,v 1.8 2008/02/27 18:51:51 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-                 <li><a href="com-mod.shtml">Previous Section</a></li>
-                 <li><a href="accounts.shtml">Next section</a></li>
-                 <li><a href="index.shtml">Index</a></li>
-        </ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Meta-moderation</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="mm100" id="mm100">What do "M1" and "M2" mean?</a></h2>
         <p>M1 and M2 are Slashdot shorthand for "moderation" and "metamoderation," respectively. We also use these with suffixes For example, if you see the term "M2ed," it means "metamoderated." Likewise, the term "M1er" means "Moderator."</p>
         <p><em><small>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/slashmeta.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - About Slashdot</title>
-<!-- $Id: slashmeta.shtml,v 1.12 2006/01/30 18:19:22 pudge Exp $ -->
+<!-- $Id: slashmeta.shtml,v 1.13 2008/02/27 18:52:45 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-	<ul class="menu">
-		<li><a href="feeds.shtml">Previous section</a></li>
-		<li><a href="tech.shtml">Next section</a></li>
-		<li><a href="index.shtml">Index</a></li>
-	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>About Slashdot</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="sm100" id="sm100">Who does this?</a></h2>
         <p>Slashdot was originally created in September of 1997 by <a href="mailto:malda****@slash*****">Rob "CmdrTaco" Malda</a>. Today it is owned by <a href="http://www.ostg.com">OSTG</a>, which, in turn is owned by <a href="http://www.vasoftware.com">VA Software</a>.</p>
         <p>Slashdot is run primarily by me and by <a href="http://Hemos.net">Jeff "Hemos" Bates</a>, who posts stories and manages other sites for OSTG.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/subscriptions.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,18 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Subscriptions</title>
-<!-- $Id: subscriptions.shtml,v 1.22 2007/05/09 21:00:25 pudge Exp $ -->
+<!-- $Id: subscriptions.shtml,v 1.23 2008/02/27 18:53:28 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-	<ul class="menu">
-		<li><a href="friends.shtml">Previous section</a></li>
-		<li><a href="feeds.shtml">Next section</a></li>
-		<li><a href="index.shtml">Index</a></li>
-	</ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Subscriptions</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="ss100" id="ss100">Why does Slashdot have subscriptions?</a></h2>
         <p>Read <a href="http://slashdot.org/article.pl?sid=02/03/01/1352200&amp;mode=nocomment">CmdrTaco's story</a> to learn why Slashdot implemented a subscription system.</p>
         <p><em><small>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/suggestions.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,17 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Suggestions and Requests</title>
-<!-- $Id: suggestions.shtml,v 1.11 2006/01/27 13:14:46 jamiemccarthy Exp $ -->
+<!-- $Id: suggestions.shtml,v 1.12 2008/02/27 18:54:23 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-                 <li><a href="advertising.shtml">Previous Section</a></li>
-                 <li><a href="index.shtml">Index</a></li>
-        </ul>
-        
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Suggestions and Requests</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="su100" id="su100">How about an NNTP news gateway?</a></h2>
         <p>I'd love to, but there are several problems that complicate this: first is the time to program it. An NNTP gateway is definitely on the TO-DO list, but it's lower on the priority list then many other things. Second is advertising: Slashdot costs a lot to run each month, and our performance is measured in terms of dollars and pages. If we can figure out a way to put advertising (and don't worry, it'd be reasonably minimal) into the NNTP comments cleanly, we'd be all set. Finally, the moderation system really doesn't have a counterpart in NNTP.</p>
         <p>So you put it all together and you have something that would be pretty nifty, but it has several problems. It'll happen someday, but not tomorrow.</p>

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tags.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -6,19 +6,25 @@
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
 <!--
-($VERSION) = '$Id: tags.shtml,v 1.19 2007/11/29 23:25:12 jamiemccarthy Exp $' =~ /^\$Id: \S+ (\S+)/
+($VERSION) = '$Id: tags.shtml,v 1.20 2008/02/27 18:55:10 entweichen Exp $' =~ /^\$Id: \S+ (\S+)/
 -->
 
-<table>
-<tr>
-<td><a href="suggestions.shtml">Previous section</a></td>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Tags</h3>
+                </div>
+        </div>
 
-<td><a href="index.shtml">Index</a></td>
-</tr>
-</table>
+        <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="/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>
+                </ul>
+        </div>
 
-<hr>
-<br><a name="tags100" id="tags100"></a>
+<a name="tags100" id="tags100"></a>
 <h2>What is this crazy tags thing?</h2>
 <p> Slashdot is currently experimenting with tagging articles.  You are
 encouraged to use this feature to submit a handful of tags: brief labels

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/tech.shtml	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,17 +3,25 @@
 <html>
 <head>
         <title>Slashdot FAQ - Tech</title>
-<!-- $Id: tech.shtml,v 1.7 2005/10/11 02:32:13 tvroom Exp $ -->
+<!-- $Id: tech.shtml,v 1.8 2008/02/27 18:56:05 entweichen Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
-        <ul class="menu">
-                 <li><a href="slashmeta.shtml">Previous section</a></li>
-                 <li><a href="advertising.shtml">Next section</a></li>
-                 <li><a href="index.shtml">Index</a></li>
-        </ul>
-        <hr>
+        <div class="generaltitle">
+                <div class="title">
+                        <h3>Tech</h3>
+                </div>
+        </div>
 
+        <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="/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>
+                </ul>
+        </div>
+
 <h2><a name="te050" id="te050">What kind of hardware does Slashdot run on?</a></h2>
         <p>[ <em>Note: This writeup originally appeared as a Slashdot post. You can see the original post, complete with comments, <a href="http://slashdot.org/articles/00/05/18/1427203.shtml">here</a>.</em> ]</p>
         <p>At the request of countless users, we're happy to finally present a summary of the new setup over at Exodus. It's the result of over 6 months of work from a lot of people, so shout-outs to Adam, Kurt, and Scoop, Team P: Pudge, PatG &amp; Pater for the code, and Martin, BSD-Pat, and Liz for getting the hardware and co-loc taken care of.</p>

Modified: slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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.218 2008/02/21 21:48:38 tvroom Exp $
+# $Id: FireHose.pm,v 1.223 2008/02/27 02:37:05 tvroom Exp $
 
 package Slash::FireHose;
 
@@ -41,7 +41,7 @@
 use base 'Slash::DB::MySQL';
 use vars qw($VERSION);
 
-($VERSION) = ' $Revision: 1.218 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.223 $ ' =~ /\$Revision:\s+([^\s]+)/;
 sub createFireHose {
 	my($self, $data) = @_;
 	$data->{dept} ||= "";
@@ -1001,6 +1001,7 @@
 	$options->{content_type} = 'application/json';
 	my $firehose = getObject("Slash::FireHose");
 	my $opts = $firehose->getAndSetOptions();
+	
 	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});
@@ -1015,7 +1016,14 @@
 
 	my $eval_first = "";
 	for my $o (qw(startdate mode fhfilter orderdir orderby startdate duration color)) {
-		$eval_first .= Data::JavaScript::Anon->var_dump("firehose_settings.$o", $opts->{$o});
+		my $value = $opts->{$o};
+		if ($o eq 'orderby' && $value eq 'editorpop') {
+			$value = 'popularity';
+		}
+		if ($o eq 'startdate') {
+			$value =~ s/-//g;
+		}
+		$eval_first .= "firehose_settings.$o = " . Data::JavaScript::Anon->anon_dump("$value") . "; ";
 	}
 
 	return Data::JavaScript::Anon->anon_dump({
@@ -1769,20 +1777,24 @@
 		$options->{orderdir} = "DESC";
 		$options->{orderby} = "createtime";
 		$options->{color} = "black";
+		$form->{color} = "black";
 	} elsif ($tabtype eq 'tabrecent') {
 		$form->{fhfilter} = "-story";
 		$options->{orderby} = "createtime";
 		$options->{orderdir} = "DESC";
 		$options->{color} = "indigo";
+		$form->{color} = "indigo";
 	} elsif ($tabtype eq 'tabpopular') {
 		$form->{fhfilter} = "-story";
 		$options->{orderby} = "popularity";
 		$options->{orderdir} = "DESC";
 		$options->{color} = "black";
+		$form->{color} = "black";
 	} elsif ($tabtype eq 'tabuser') {
 		$form->{fhfilter} = "\"user:$user->{nickname}\"";
 		$options->{orderby} = "popularity";
 		$options->{color} = "black";
+		$form->{color} = "black";
 		$options->{orderdir} = "DESC";
 		$options->{orderby} = "createtime";
 	}
@@ -2121,7 +2133,6 @@
 	if ($form->{not_id} && $form->{not_id} =~ /^\d+$/) {
 		$options->{not_id} = $form->{not_id};
 	}
-
 	return $options;
 }
 
@@ -2614,4 +2625,4 @@
 
 =head1 VERSION
 
-$Id: FireHose.pm,v 1.218 2008/02/21 21:48:38 tvroom Exp $
+$Id: FireHose.pm,v 1.223 2008/02/27 02:37:05 tvroom Exp $

Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/fhadvprefpane;misc;default
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/templates/fhadvprefpane;misc;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FireHose/templates/fhadvprefpane;misc;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -85,7 +85,7 @@
 
 <br>
 
-<input type="checkbox" name="nodates" onchange="firehose_set_options('nodates', !this.checked)" [% IF !options.nodates; constants.markup_checked_attribute; END %]> <b>Dates</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nodates'); return false" title="Click To Expand Help" style="text-decoration: none; color: #055;">[?]</a>
+<input type="checkbox" name="nodates" onchange="firehose_set_options('nodates', !this.checked)" [% IF !options.nodates; constants.markup_checked_attribute; END %]> <b>Dates</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nodates'); return false" title="Click To Expand Help" class="help">?</a>
 <br>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_nodates" class="modalprefhelp" style="display: none;">
@@ -95,7 +95,7 @@
 
 <br>
 
-<input type="checkbox" name="nobylines" onchange="firehose_set_options('nobylines', !this.checked)" [% IF !options.nobylines; constants.markup_checked_attribute; END %]> <b>Bylines</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nobylines'); return false" title="Click To Expand Help" style="text-decoration: none; color: #055;">[?]</a>
+<input type="checkbox" name="nobylines" onchange="firehose_set_options('nobylines', !this.checked)" [% IF !options.nobylines; constants.markup_checked_attribute; END %]> <b>Bylines</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nobylines'); return false" title="Click To Expand Help" class="help">?</a>
 <br>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_nobylines" class="modalprefhelp" style="display: none;">
@@ -105,7 +105,7 @@
 
 <br>
 
-<input type="checkbox" name="nothumbs" onchange="firehose_set_options('nothumbs', !this.checked)" [% IF !options.nothumbs; constants.markup_checked_attribute; END %]> <b>Thumbs</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nothumbs'); return false" title="Click To Expand Help" style="text-decoration: none; color: #055;">[?]</a>
+<input type="checkbox" name="nothumbs" onchange="firehose_set_options('nothumbs', !this.checked)" [% IF !options.nothumbs; constants.markup_checked_attribute; END %]> <b>Thumbs</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_nothumbs'); return false" title="Click To Expand Help" class="help">?</a>
 <br>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_nothumbs" class="modalprefhelp" style="display: none;">
@@ -155,4 +155,4 @@
 </div>
 
 __version__
-$Id: fhadvprefpane;misc;default,v 1.19 2008/02/20 21:00:55 entweichen Exp $
+$Id: fhadvprefpane;misc;default,v 1.20 2008/02/28 17:11:52 entweichen Exp $

Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -157,7 +157,7 @@
 <script type="text/javascript">
 	[% FOR opt = [ 'startdate', 'mode', 'fhfilter', 'orderdir', 'orderby', 'startdate', 'duration', 'color'] %]
 		[%- opt_value = options.$opt -%]
-		[% IF opt == startdate %]
+		[% IF opt == 'startdate' %]
 			[% opt_value = opt_value.replace('-',''); %]
 		[%- END -%]
 		firehose_settings.[% opt %] = [% firehose.js_anon_dump(opt_value) %];
@@ -204,4 +204,4 @@
 </script>
 
 __version__
-$Id: list;firehose;default,v 1.111 2008/02/20 21:12:38 entweichen Exp $
+$Id: list;firehose;default,v 1.112 2008/02/27 02:35:28 tvroom Exp $

Modified: slashjp/branches/upstream/current/plugins/Stats/Stats.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/Stats/Stats.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Stats/Stats.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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.193 2008/02/15 15:01:58 jamiemccarthy Exp $
+# $Id: Stats.pm,v 1.194 2008/02/28 19:44:48 jamiemccarthy Exp $
 
 package Slash::Stats;
 
@@ -22,7 +22,7 @@
 use base 'Slash::DB::Utility';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.193 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.194 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 sub new {
 	my($class, $user, $options) = @_;
@@ -94,6 +94,7 @@
 		$self->sqlDo("DROP TABLE IF EXISTS accesslog_temp_rss");
 
 		$self->sqlDo("DROP TABLE IF EXISTS accesslog_temp_host_addr");
+		$self->sqlDo("DROP TABLE IF EXISTS accesslog_build_uid_ip");
 		$self->sqlDo("DROP TABLE IF EXISTS accesslog_build_unique_uid");
 		$self->sqlDo("CREATE TABLE accesslog_temp_host_addr (host_addr char(32) NOT NULL, anon ENUM('no','yes') NOT NULL DEFAULT 'yes', PRIMARY KEY (host_addr, anon)) TYPE = InnoDB");
 		$self->sqlDo("CREATE TABLE accesslog_build_uidip (uidip varchar(32) NOT NULL, op varchar(254) NOT NULL, PRIMARY KEY (uidip, op), INDEX (op)) TYPE = InnoDB");
@@ -2217,4 +2218,4 @@
 
 =head1 VERSION
 
-$Id: Stats.pm,v 1.193 2008/02/15 15:01:58 jamiemccarthy Exp $
+$Id: Stats.pm,v 1.194 2008/02/28 19:44:48 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/plugins/Tags/Tags.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/Tags/Tags.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Tags/Tags.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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: Tags.pm,v 1.100 2008/02/12 21:24:05 jamiemccarthy Exp $
+# $Id: Tags.pm,v 1.101 2008/02/28 19:51:01 jamiemccarthy Exp $
 
 package Slash::Tags;
 
@@ -17,7 +17,7 @@
 use base 'Slash::DB::Utility';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.100 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.101 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # FRY: And where would a giant nerd be? THE LIBRARY!
 
@@ -565,14 +565,79 @@
 	return $ar;
 }
 
+# Given a tagnameid, return what clid type should be used for it
+# (0 = unknown).
+
+{ # closure
+my($reason_names, $upvoteid, $downvoteid) = (undef, undef, undef);
+sub getTagnameidClid {
+	my($self, $tagnameid) = @_;
+	if ($tagnameid !~ /^\d+$/) {
+		warn "non-numeric tagnameid passed to getTagnameCloutType: $tagnameid";
+		return 0;
+	}
+	my $constants = getCurrentStatic();
+
+	my $mcd = $self->getMCD();
+	my $mcdkey = undef;
+	if ($mcd) {
+		$mcdkey = "$self->{_mcd_keyprefix}:tanc:";
+		my $value = $mcd->get("$mcdkey$tagnameid");
+		return $value if defined $value;
+	}
+
+	my $clid = 0;
+	my $tn_data = undef;
+	my $types = $self->getCloutTypes();
+
+	# Is it a vote?
+	if ($types->{vote}) {
+		if (!$clid) {
+			$upvoteid   ||= $self->getTagnameidCreate($constants->{tags_upvote_tagname}   || 'nod');
+			$clid = $types->{vote} if $tagnameid == $upvoteid;
+		}
+		if (!$clid) {
+			$downvoteid ||= $self->getTagnameidCreate($constants->{tags_downvote_tagname} || 'nix');
+			$clid = $types->{vote} if $tagnameid == $downvoteid;
+		}
+	}
+
+	# Is it descriptive?
+	if ($types->{describe} && !$clid) {
+		$tn_data = $self->getTagnameDataFromId($tagnameid);
+		$clid = $types->{describe} if $tn_data->{descriptive};
+	}
+
+	# Is it a moderation?
+	if ($types->{moderate} && $constants->{m1} && $constants->{m1_pluginname}) {
+		if (!$clid) {
+			if (!$reason_names) {
+				my $mod_db = getObject("Slash::$constants->{m1_pluginname}", { db_type => 'reader' });
+				my $reasons = $mod_db->getReasons();
+				$reason_names = {
+					map { (lc($reasons->{$_}{name}), 1) }
+					keys %$reasons
+				};
+			}
+			$tn_data ||= $self->getTagnameDataFromId($tagnameid);
+			$clid = $types->{moderate} if $reason_names->{ $tn_data->{tagname} };
+		}
+	}
+
+	$mcd->set("$mcdkey$tagnameid", $clid, $constants->{memcached_exptime_tags}) if $mcd;
+
+	return $clid;
+}
+} # end closure
+
 # Given an arrayref of hashrefs representing tags, such as that
 # returned by getTagsByNameAndIdArrayref, add three fields to each
 # hashref:  tag_clout, tagname_clout, user_clout.  Values default
 # to 1.  "Rounded" means round to 3 decimal places.
 
 sub addRoundedCloutsToTagArrayref {
-	my($self, $ar, $clout_type) = @_;
-	$self->addCloutsToTagArrayref($ar, $clout_type);
+	my($self, $ar) = @_;
+	$self->addCloutsToTagArrayref($ar);
 	for my $tag_hr (@$ar) {
 		$tag_hr->{tag_clout}     = sprintf("%.3f", $tag_hr->{tag_clout});
 		$tag_hr->{tagname_clout} = sprintf("%.3f", $tag_hr->{tagname_clout});
@@ -582,10 +647,9 @@
 }
 
 sub addCloutsToTagArrayref {
-	my($self, $ar, $clout_type) = @_;
+	my($self, $ar) = @_;
 
-if (!$clout_type) { use Carp; Carp::cluck("no clout_type for addCloutsToTagArrayref"); }
-	return if !$ar || !@$ar || !$clout_type;
+	return if !$ar || !@$ar;
 	my $constants = getCurrentStatic();
 
 	# Pull values from tag params named 'tag_clout'
@@ -596,55 +660,36 @@
 		"tagid IN ($tagids_in_str) AND name='tag_clout'");
 
 	# Pull values from tagname params named 'tag_clout'
+	my $tagname_clout_hr = { };
 	my %tagnameid = map { ($_->{tagnameid}, 1) } @$ar;
-	my @tagnameids = sort { $a <=> $b } keys %tagnameid;
-	my $tagnameids_in_str = join(',', @tagnameids);
-	my $tagname_clout_hr = $self->sqlSelectAllKeyValue(
-		'tagnameid, value', 'tagname_params',
-		"tagnameid IN ($tagnameids_in_str) AND name='tag_clout'");
+	for my $tagnameid (keys %tagnameid) {
+		my $tn_data = $self->getTagnameDataFromId($tagnameid);
+		$tagname_clout_hr->{$tagnameid} = $tn_data->{tag_clout} || 1;
+	}
 
-	# Pull values from users_clout
+	# Record which clout type each tagname uses
+	my $tagname_clid_hr = { };
+	for my $tagnameid (keys %tagnameid) {
+		my $clid = $self->getTagnameidClid($tagnameid);
+		$tagname_clid_hr->{$tagnameid} = $clid;
+	}
+
+	# Tagnames with unspecified clout type get a reduced form
+	# of some other clout type.
+	my $default_clout_clid = $constants->{tags_unknowntype_default_clid} || 1;
+	my $default_clout_mult = $constants->{tags_unknowntype_default_mult} || 0.3;
+
+	# Get clouts for all users referenced.
+	my $user_clout_hr = { };
 	my %uid = map { ($_->{uid}, 1) } @$ar;
-	my @uids = sort { $a <=> $b } keys %uid;
-	my $uids_in_str = join(',', @uids);
-	my $clid = $self->getCloutTypes()->{$clout_type};
-if (!$clid) { use Carp; Carp::cluck("no clid for addCloutsToTagArrayref '$clout_type'"); }
-	my $clout_info = $self->getCloutInfo()->{$clid};
-if (!$clout_info) { use Carp; Carp::cluck("getCloutInfo returned false for clid=$clid") }
-	my $uid_info_hr = $self->sqlSelectAllHashref(
-		'uid',
-		'users.uid AS uid, seclev, karma, tag_clout,
-			UNIX_TIMESTAMP(created_at) AS created_at_ut,
-		 clout',
-		"users,
-		 users_info LEFT JOIN users_clout
-			ON (users_info.uid=users_clout.uid AND clid=$clid)",
-		"users.uid=users_info.uid AND users.uid IN ($uids_in_str)");
-#print STDERR "uids_in_str='$uids_in_str'\n";
-
-	my $uid_clout_hr = { };
-	for my $uid (keys %$uid_info_hr) {
-		if (defined $uid_info_hr->{$uid}{clout}) {
-			$uid_clout_hr->{$uid} = $uid_info_hr->{$uid}{clout};
-		} else {
-			# There's a default clout for users who don't have
-			# the clout type in question.  Use it.
-			my %user_stub = %{ $uid_info_hr->{$uid} };
-#			my $user_stub = {
-#				uid		=> $uid,
-#				seclev		=> $uid_info_hr->{$uid}{seclev},
-#				karma		=> $uid_info_hr->{$uid}{karma},
-#				tag_clout	=> $uid_info_hr->{$uid}{tag_clout},
-#				created_at_ut	=> $uid_info_hr->{$uid}{created_at_ut},
-#			}
-			# XXX this stub is good enough for now but we may
-			# need the whole actual getUser() user at some
-			# future time
-			my $clout = getObject($clout_info->{class}, { db_type => 'reader' });
-			$uid_clout_hr->{$uid} = $clout->getUserClout(\%user_stub);
-		}
+	for my $uid (keys %uid) {
+		# XXX getUser($foo, 'clout') does not work at the moment,
+		# so getUser($foo)->{clout} is used instead
+		$user_clout_hr->{$uid} = $self->getUser($uid)->{clout};
 	}
 
+
+	my $clout_types = $self->getCloutTypes();
 	for my $tag_hr (@$ar) {
 		$tag_hr->{tag_clout}     = defined($tag_clout_hr    ->{$tag_hr->{tagid}})
 						 ? $tag_clout_hr    ->{$tag_hr->{tagid}}
@@ -652,8 +697,14 @@
 		$tag_hr->{tagname_clout} = defined($tagname_clout_hr->{$tag_hr->{tagnameid}})
 						 ? $tagname_clout_hr->{$tag_hr->{tagnameid}}
 						 : 1;
-		$tag_hr->{user_clout}    =	   $uid_clout_hr    ->{$tag_hr->{uid}};
-#print STDERR "uc='$tag_hr->{user_clout}' for uid '$tag_hr->{uid}' for " . Dumper($tag_hr) if !defined $tag_hr->{user_clout};
+		my $mult = 1;
+		my $tagname_clid = $tagname_clid_hr->{$tag_hr->{tagnameid}};
+		if (!$tagname_clid) {
+			$mult = $default_clout_mult;
+			$tagname_clid = $default_clout_clid;
+		}
+		my $tagname_clout_name = $clout_types->{ $tagname_clid };
+		$tag_hr->{user_clout}    = $mult * $user_clout_hr   ->{$tag_hr->{uid}}{$tagname_clout_name};
 		$tag_hr->{total_clout} = $tag_hr->{tag_clout} * $tag_hr->{tagname_clout} * $tag_hr->{user_clout};
 	}
 }
@@ -787,7 +838,7 @@
 }
 
 sub getAllObjectsTagname {
-	my($self, $name, $clout_type, $options) = @_;
+	my($self, $name, $options) = @_;
 #	my $mcd = undef;
 #	my $mcdkey = undef;
 #	if (!$options->{include_private}) {
@@ -807,7 +858,7 @@
 		"tagnameid=$id AND inactivated IS NULL $private_clause",
 		'ORDER BY tagid');
 	$self->addGlobjEssentialsToHashrefArray($hr_ar);
-	$self->addCloutsToTagArrayref($hr_ar, $clout_type);
+	$self->addCloutsToTagArrayref($hr_ar);
 #	if ($mcd) {
 #		my $constants = getCurrentStatic();
 #		my $secs = $constants->{memcached_exptime_tags_brief} || 300;
@@ -824,6 +875,29 @@
 		"tagnameid=$tagnameid");
 }
 
+sub getWorstAdminCmdtype {
+	my($self, $tagnameid, $globjid) = @_;
+	$globjid ||= 0;
+	my $ar = $self->getTagnameAdmincmds($tagnameid, $globjid);
+	my $worst = '';
+	my $worst_count = 0;
+	for my $hr (@$ar) {
+		my $cmdtype = $hr->{cmdtype};
+		     if ($cmdtype eq '_' && $worst_count == 0) {
+			$worst = '_';
+		} elsif ($cmdtype =~ /^[*)]$/ && $worst eq '') {
+			$worst = $cmdtype;
+		} elsif ($cmdtype =~ /^\#+$/) {
+			my $count = $cmdtype =~ tr/#/#/;
+			if ($count > $worst_count) {
+				$worst = $cmdtype;
+				$worst_count = $count;
+			}
+		}
+	}
+	return $worst;
+}
+
 sub getTagnameAdmincmds {
 	my($self, $tagnameid, $globjid) = @_;
 	return [ ] if !$tagnameid;
@@ -1255,8 +1329,22 @@
 	$summ->{n_viewed} = scalar grep { $_->{tagname} eq $viewed_tagname } @$tags_ar;
 	$tags_ar = [ grep { $_->{tagname} ne $viewed_tagname } @$tags_ar ];
 
-	$tags_reader->addRoundedCloutsToTagArrayref($tags_ar, 'describe');
+	$tags_reader->addRoundedCloutsToTagArrayref($tags_ar);
 
+	my $clout_types = $tags_reader->getCloutTypes();
+	for my $tag (@$tags_ar) {
+		my $clid = $tags_reader->getTagnameidClid($tag->{tagnameid});
+		$tag->{clout_code} = $clid
+			? uc( substr( $clout_types->{$clid}, 0, 1) )
+			: '';
+		my $cmd = $tags_reader->getWorstAdminCmdtype($tag->{tagnameid}, $tag->{globjid});
+		if (!$tag->{clout_code}) {
+			$tag->{clout_code} = $cmd;
+		} elsif ($cmd) {
+			$tag->{clout_code} = "$tag->{clout_code} $cmd";
+		}
+	}
+
 	my $tagboxdb = getObject('Slash::Tagbox');
 	if (@$tags_ar && $globjid && $tagboxdb) {
 		my $fhs = getObject('Slash::Tagbox::FireHoseScores');
@@ -1593,7 +1681,7 @@
 }
 
 sub listTagnamesActive {
-	my($self, $clout_type, $options) = @_;
+	my($self, $options) = @_;
 	my $constants = getCurrentStatic();
 	my $max_num =         $options->{max_num}         || 100;
 	my $seconds =         $options->{seconds}         || (3600*6);
@@ -1643,7 +1731,7 @@
 		 AND IF(tagname_params.value IS NULL, 1, tagname_params.value) > 0
 		 $slice_where_clause");
 	return [ ] unless $ar && @$ar;
-	$self->addCloutsToTagArrayref($ar, $clout_type);
+	$self->addCloutsToTagArrayref($ar);
 
 	# Sum up the clout for each tagname, and the median time it
 	# was seen within the interval in question.
@@ -1701,7 +1789,7 @@
 }
 
 sub listTagnamesRecent {
-	my($self, $clout_type, $options) = @_;
+	my($self, $options) = @_;
 	my $constants = getCurrentStatic();
 	my $seconds =         $options->{seconds}         || (3600*6);
 	my $include_private = $options->{include_private} || 0;
@@ -1904,7 +1992,7 @@
 		'tags',
 		"tagnameid IN ($tagnameids_of_interest_str)
 		 AND created_at >= DATE_SUB(NOW(), INTERVAL $secsback SECOND)");
-	$self->addCloutsToTagArrayref($tags_ar, 'describe');
+	$self->addCloutsToTagArrayref($tags_ar);
 	my %tagnameid_weightsum = ( );
 	my %t_globjid_weightsum = ( );
 	# Admins will care less about new tagnames applied to data types other

Modified: slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql
===================================================================
--- slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql	2008-03-04 09:02:07 UTC (rev 527)
@@ -1,5 +1,5 @@
 #
-# $Id: mysql_dump.sql,v 1.33 2008/01/09 20:04:51 jamiemccarthy Exp $
+# $Id: mysql_dump.sql,v 1.34 2008/02/28 19:51:01 jamiemccarthy Exp $
 #
 
 INSERT INTO vars (name, value, description) VALUES ('memcached_exptime_tags', '3600', 'Seconds to cache tag data in memcached');
@@ -23,6 +23,8 @@
 INSERT INTO vars (name, value, description) VALUES ('tags_stories_lastscanned', '0', 'The last tagid scanned to update stories');
 INSERT INTO vars (name, value, description) VALUES ('tags_stories_top_minscore', '2', 'Minimum score a tag must have to make it into the top tags for a story');
 INSERT INTO vars (name, value, description) VALUES ('tags_udc_daysback', '182', 'Days back to crunch numbers for tags_udc related tables, should be a multiple of 7');
+INSERT INTO vars (name, value, description) VALUES ('tags_unknowntype_default_clid', '1', 'For tags of unknown type, which clout id do we pretend they are?');
+INSERT INTO vars (name, value, description) VALUES ('tags_unknowntype_default_mult', '0.3', 'For tags of unknown type, what multiplier do we give to the tagging user clout or type tags_unknowntype_default_clid?');
 INSERT INTO vars (name, value, description) VALUES ('tags_urls_examples_pre', 'plus minus binspam', 'Example tags for urls');
 INSERT INTO vars (name, value, description) VALUES ('tags_urls_examples', '', 'Example tags for urls');
 INSERT INTO vars (name, value, description) VALUES ('tags_urls_lastscanned', '0', 'The last tagid scanned to update urls');

Modified: slashjp/branches/upstream/current/plugins/Tags/templates/taghistory;misc;default
===================================================================
--- slashjp/branches/upstream/current/plugins/Tags/templates/taghistory;misc;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/plugins/Tags/templates/taghistory;misc;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -27,16 +27,17 @@
 <table class="data">
 [% toggle = 1 %]
 [% IF tags.size > 0 %]
-	<tr class="data_hl0"><td colspan="6">Viewed by [% summary.n_viewed %]</td></tr>
-	<tr class="data_hl0"><td colspan="6">
+	<tr class="data_hl0"><td colspan="7">Viewed by [% summary.n_viewed %]</td></tr>
+	<tr class="data_hl0"><td colspan="7">
 		[% constants.tags_upvote_tagname %]: [% summary.up_count %] [% summary.up_pop %]
 		(ed: [% summary.up_count_ed %])</td></tr>
-	<tr class="data_hl0"><td colspan="6">
+	<tr class="data_hl0"><td colspan="7">
 		[% constants.tags_downvote_tagname %]: [% summary.down_count %] [% summary.down_pop %]
 		(ed: [% summary.down_count_ed %])</td></tr>
 	[% FOREACH tag = tags %]
 		<tr class="data_hl[% toggle %]">
 			[% nickname = Slash.db.getUser(tag.uid, "nickname") %]
+			<td align=left>[% tag.clout_code %]</td>
 			<td>[% tag.tagname %]</td>
 			<td align=left>[% tag.tag_clout %]</td>
 			<td align=left>[% tag.tagname_clout %]</td>
@@ -51,4 +52,4 @@
 [% END %]
 </table>
 __version__
-$Id: taghistory;misc;default,v 1.8 2007/07/19 03:15:37 jamiemccarthy Exp $
+$Id: taghistory;misc;default,v 1.9 2008/02/28 19:51:01 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/sql/mysql/defaults.sql
===================================================================
--- slashjp/branches/upstream/current/sql/mysql/defaults.sql	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/sql/mysql/defaults.sql	2008-03-04 09:02:07 UTC (rev 527)
@@ -3,7 +3,7 @@
 #--------------------------------------------------------
 # Server version	3.23.26-beta-log
 #
-# $Id: defaults.sql,v 1.392 2008/02/21 01:01:52 pudge Exp $
+# $Id: defaults.sql,v 1.393 2008/02/28 20:44:48 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_195','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_196','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-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/sql/mysql/upgrades	2008-03-04 09:02:07 UTC (rev 527)
@@ -10,7 +10,7 @@
 #      after X started at the same time that X was tagged.
 
 #
-# $Id: upgrades,v 1.1315 2008/02/21 01:01:52 pudge Exp $
+# $Id: upgrades,v 1.1318 2008/02/28 20:44:48 pudge Exp $
 #
 
 # BEGIN tf23's additions 
@@ -5129,10 +5129,6 @@
 # 2008-02-07
 UPDATE vars SET value = 'T_2_5_0_193' WHERE name = 'cvs_tag_currentcode';
 
-# SLASHCODE/USEPERL LAST UPDATED HERE
-
-# SLASHDOT LAST UPDATED HERE
-
 ALTER TABLE users MODIFY newpasswd varchar(32) default '', ADD COLUMN newpasswd_ts datetime DEFAULT NULL AFTER newpasswd;
 UPDATE users SET newpasswd=MD5(newpasswd), newpasswd_ts=NOW() WHERE newpasswd IS NOT NULL;
 INSERT INTO vars (name, value, description) VALUES ('mailpass_valid_days','3','A mailed newpasswd is expired after this many days');
@@ -5140,6 +5136,8 @@
 # 2008-02-13
 UPDATE vars SET value = 'T_2_5_0_194' WHERE name = 'cvs_tag_currentcode';
 
+# SLASHDOT LAST UPDATED HERE
+
 # For sites *without* plugins/Tags
 DELETE FROM clout_types;
 
@@ -5149,3 +5147,12 @@
 # 2008-02-20
 UPDATE vars SET value = 'T_2_5_0_195' WHERE name = 'cvs_tag_currentcode';
 
+# SLASHCODE/USEPERL LAST UPDATED HERE
+
+# for plugins/Tags
+INSERT INTO vars (name, value, description) VALUES ('tags_unknowntype_default_clid', '1', 'For tags of unknown type, which clout id do we pretend they are?');
+INSERT INTO vars (name, value, description) VALUES ('tags_unknowntype_default_mult', '0.3', 'For tags of unknown type, what multiplier do we give to the tagging user clout or type tags_unknowntype_default_clid?');
+
+# 2008-02-28
+UPDATE vars SET value = 'T_2_5_0_196' WHERE name = 'cvs_tag_currentcode';
+

Modified: slashjp/branches/upstream/current/tagboxes/Top/Top.pm
===================================================================
--- slashjp/branches/upstream/current/tagboxes/Top/Top.pm	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/tagboxes/Top/Top.pm	2008-03-04 09:02:07 UTC (rev 527)
@@ -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: Top.pm,v 1.16 2007/12/18 23:40:03 pudge Exp $
+# $Id: Top.pm,v 1.17 2008/02/28 19:51:01 jamiemccarthy Exp $
 
 package Slash::Tagbox::Top;
 
@@ -28,7 +28,7 @@
 use Data::Dumper;
 
 use vars qw( $VERSION );
-$VERSION = ' $Revision: 1.16 $ ' =~ /\$Revision:\s+([^\s]+)/;
+$VERSION = ' $Revision: 1.17 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 use base 'Slash::DB::Utility';	# first for object init stuff, but really
 				# needs to be second!  figure it out. -- pudge
@@ -161,7 +161,7 @@
 		$options->{days_back} = $days_back;
 	}
 	my $tag_ar = $tagsdb->getTagsByGlobjid($affected_id, $options);
-	$tagsdb->addCloutsToTagArrayref($tag_ar, 'describe');
+	$tagsdb->addCloutsToTagArrayref($tag_ar);
 	main::tagboxLog("Top->run called for $affected_id, " . scalar(@$tag_ar) . " tags");
 
 	# Generate the space-separated list of the top 5 scoring tags.

Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl	2008-03-04 09:02:07 UTC (rev 527)
@@ -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.269 2008/02/21 01:01:52 pudge Exp $
+# $Id: comments.pl,v 1.270 2008/02/28 19:26:58 pudge Exp $
 
 use strict;
 use Slash 2.003;	# require Slash 2.3.x
@@ -532,299 +532,6 @@
 
 
 ##################################################################
-# Validate comment, looking for errors
-sub validateComment {
-	my($comm, $subj, $error_message, $preview, $wsfactor) = @_;
-	$wsfactor ||= 1;
-	my $slashdb = getCurrentDB();
-	my $constants = getCurrentStatic();
-	my $user = getCurrentUser();
-	my $form = getCurrentForm();
-	my $moddb = getObject("Slash::$constants->{m1_pluginname}");
-	my $reader = getObject('Slash::DB', { db_type => 'reader' });
-	
-	my $form_success = 1;
-	my $message = '';
-
-	if (!dbAvailable("write_comments")) {
-		$$error_message = getError('comment_db_down');
-		$form_success = 0;
-		return;
-	}
-
-	my $srcids_to_check = $user->{srcids};
-
-	# We skip the UID test for anonymous users (anonymous posting
-	# is banned by setting nopost for the anonymous uid, and we
-	# want to check that separately elsewhere).  Note that
-	# checking the "post anonymously" checkbox doesn't eliminate
-	# a uid check for a logged-in user.
-	delete $srcids_to_check->{uid} if $user->{is_anon};
-
-	# If the user is anonymous, or has checked the 'post anonymously'
-	# box, check to see whether anonymous posting is turned off for
-	# this srcid.
-	my $read_only = 0;
-	$read_only = 1 if ($user->{is_anon} || $form->{postanon})
-		&& $reader->checkAL2($srcids_to_check, 'nopostanon');
-
-	# Whether the user is anonymous or not, check to see whether
-	# all posting is turned off for this srcid.
-	$read_only ||= $reader->checkAL2($srcids_to_check, 'nopost');
-
-	# If posting is disabled, return the error message.
-	if ($read_only) {
-		$$error_message = getError('readonly');
-		$form_success = 0;
-		# editComment('', $$error_message), return unless $preview;
-		return;
-	}
-
-	# New check (March 2004):  depending on the settings of
-	# a var and whether the user is posting anonymous, we
-	# might scan the IP they're coming from to see if we can use
-	# some commonly-used proxy ports to access our own site.
-	# If we can, they're coming from an open HTTP proxy, which
-	# we don't want to allow to post.
-	if ($constants->{comments_portscan}
-		&& ( $constants->{comments_portscan} == 2
-			|| $constants->{comments_portscan} == 1 && $user->{is_anon} )
-	) {
-		my $is_trusted = $slashdb->checkAL2($user->{srcids}, 'trusted');
-		if (!$is_trusted) {
-#use Time::HiRes; my $start_time = Time::HiRes::time;
-			my $is_proxy = $slashdb->checkForOpenProxy($user->{hostip});
-#my $elapsed = sprintf("%.3f", Time::HiRes::time - $start_time); print STDERR scalar(localtime) . " comments.pl cfop returned '$is_proxy' for '$user->{hostip}' in $elapsed secs\n";
-			if ($is_proxy) {
-				$$error_message = getError('open proxy', {
-					unencoded_ip	=> $ENV{REMOTE_ADDR},
-					port		=> $is_proxy,
-				});
-				$form_success = 0;
-				return;
-			}
-		}
-	}
-
-	# New check (July 2002):  there is a max number of posts per 24-hour
-	# period, either based on IPID for anonymous users, or on UID for
-	# logged-in users.  Logged-in users get a max number of posts that
-	# is related to their karma.  The comments_perday_bykarma var
-	# controls it (that var is turned into a hashref in MySQL.pm when
-	# the vars table is read in, whose keys we loop over to find the
-	# appropriate level).
-	# See also comments_maxposts in formkeyErrors - Jamie 2005/05/30
-
-	my $min_cid_1_day_old = $slashdb->getVar('min_cid_last_1_days','value', 1) || 0;
-	
-	if (($user->{is_anon} || $form->{postanon}) && $constants->{comments_perday_anon}
-		&& !$user->{is_admin}) {
-		my($num_comm, $sum_mods) = $reader->getNumCommPostedAnonByIPID(
-			$user->{ipid}, 24, $min_cid_1_day_old);
-		my $num_allowed = $constants->{comments_perday_anon};
-		if ($sum_mods - $num_comm + $num_allowed <= 0) {
-
-			$$error_message = getError('comments post limit daily', {
-				limit => $constants->{comments_perday_anon}
-			});
-			$form_success = 0;
-			return;
-
-		}
-	} elsif (!$user->{is_anon} && $constants->{comments_perday_bykarma}
-		&& !$user->{is_admin}) {
-		my($num_comm, $sum_mods) = $reader->getNumCommPostedByUID(
-			$user->{uid}, 24, $min_cid_1_day_old);
-		my $num_allowed = 9999;
-		K_CHECK: for my $k (sort { $a <=> $b }
-			keys %{$constants->{comments_perday_bykarma}}) {
-			if ($user->{karma} <= $k) {
-				$num_allowed = $constants->{comments_perday_bykarma}{$k};
-				last K_CHECK;
-			}
-		}
-		if ($sum_mods - $num_comm + $num_allowed <= 0) {
-
-			$$error_message = getError('comments post limit daily', {
-				limit => $num_allowed
-			});
-			$form_success = 0;
-			return;
-
-		}
-	}
-
-	if (isTroll()) {
-		if ($constants->{comment_is_troll_disable_and_log}) {
-			$user->{state}{is_troll} = 1;
-		} else {
-			$$error_message = getError('troll message', {
-				unencoded_ip => $ENV{REMOTE_ADDR}      
-			});
-			return;
-		}
-	}
-
-	if ($user->{is_anon} || $form->{postanon}) {
-		my $uid_to_check = $user->{uid};
-		if (!$user->{is_anon}) {
-			$uid_to_check = getCurrentAnonymousCoward('uid');
-		}
-		if (!$slashdb->checkAllowAnonymousPosting($uid_to_check)) {
-			$$error_message = getError('anonymous disallowed');
-			return;
-		}
-	}
-
-	if (!$user->{is_anon} && $form->{postanon} && $user->{karma} < 0) {
-		$$error_message = getError('postanon_option_disabled');
-		return;
-	}
-
-	my $post_restrictions = $reader->getNetIDPostingRestrictions("subnetid", $user->{subnetid});
-	if ($user->{is_anon} || $form->{postanon}) {
-		if ($post_restrictions->{no_anon}) {
-			my $logged_in_allowed = !$post_restrictions->{no_post};
-			$$error_message = getError('troll message', {
-				unencoded_ip 		=> $ENV{REMOTE_ADDR},
-				logged_in_allowed 	=> $logged_in_allowed      
-			});
-			return;
-		}
-	}
-
-	if (!$user->{is_admin} && $post_restrictions->{no_post}) {
-		$$error_message = getError('troll message', {
-			unencoded_ip 		=> $ENV{REMOTE_ADDR},
-		});
-		return;
-	}
-
-
-	$$subj =~ s/\(Score(.*)//i;
-	$$subj =~ s/Score:(.*)//i;
-
-	$$subj =~ s/&(#?[a-zA-Z0-9]+);?/approveCharref($1)/sge;
-
-	for ($$comm, $$subj) {
-		my $d = decode_entities($_);
-		$d =~ s/&#?[a-zA-Z0-9]+;//g;	# remove entities we don't know
-		if ($d !~ /\w/) {		# require SOME non-whitespace
-			$$error_message = getError('no body');
-			return;
-		}
-	}
-
-	unless (defined($$comm = balanceTags($$comm, { deep_nesting => 1 }))) {
-		# only time this should return an error is if the HTML is busted
-		$$error_message = getError('broken html');
-		return ;
-	}
-
-	my $dupRows = $slashdb->findCommentsDuplicate($form->{sid}, $$comm);
-	if ($dupRows) {
-		$$error_message = getError('duplication error');
-		$form_success = 0;
-		return unless $preview;
-	}
-
-	my $kickin = $constants->{comments_min_line_len_kicks_in};
-	if ($constants->{comments_min_line_len} && length($$comm) > $kickin) {
-
-		my $max_comment_len = $constants->{default_maxcommentsize};
-		my $check_prefix = substr($$comm, 0, $max_comment_len);
-		my $check_prefix_len = length($check_prefix);
-		my $min_line_len_max = $constants->{comments_min_line_len_max}
-			|| $constants->{comments_min_line_len}*2;
-		my $min_line_len = $constants->{comments_min_line_len}
-			+ ($min_line_len_max - $constants->{comments_min_line_len})
-				* ($check_prefix_len - $kickin)
-				/ ($max_comment_len - $kickin); # /
-
-		my $check_notags = strip_nohtml($check_prefix);
-		# Don't count & or other chars used in entity tags;  don't count
-		# chars commonly used in ascii art.  Not that it matters much.
-		# Do count chars commonly used in source code.
-		my $num_chars = $check_notags =~ tr/A-Za-z0-9?!(){}[]+='"@$-//;
-
-		# Note that approveTags() has already been called by this point,
-		# so all tags present are legal and uppercased.
-		my $breaktags = $constants->{'approvedtags_break'}
-			|| [qw(HR BR LI P OL UL BLOCKQUOTE DIV)];
-		my $breaktags_1_regex = "<(?:" . join("|", @$breaktags) . ")>";
-		my $breaktags_2_regex = "<(?:" . join("|", grep /^(P|BLOCKQUOTE)$/, @$breaktags) . ")>";
-		my $num_lines = 0;
-		$num_lines++ while $check_prefix =~ /$breaktags_1_regex/gi;
-		$num_lines++ while $check_prefix =~ /$breaktags_2_regex/gi;
-
-		if ($num_lines > 3) {
-			my $avg_line_len = $num_chars/$num_lines;
-			if ($avg_line_len < $min_line_len) {
-				$$error_message = getError('low chars-per-line', {
-					ratio 	=> sprintf("%0.1f", $avg_line_len),
-				});
-				$form_success = 0;
-				return unless $preview;
-			}
-		}
-	}
-
-	# Test comment and subject using filterOk and compressOk.
-	# If the filter is matched against the content, or the comment
-	# compresses too well, display an error with the particular
-	# message for the filter that was matched.
-	my $fields = {
-			postersubj 	=> 	$$subj,
-			postercomment 	=>	$$comm,
-	};
-
-	for (keys %$fields) {
-		# run through filters
-		if (! filterOk('comments', $_, $fields->{$_}, \$message)) {
-			$$error_message = getError('filter message', {
-					err_message	=> $message,
-			});
-			return unless $preview;
-			$form_success = 0;
-			last;
-		}
-		# run through compress test
-		if (! compressOk('comments', $_, $fields->{$_}, $wsfactor)) {
-			# blammo luser
-			$$error_message = getError('compress filter', {
-					ratio	=> $_,
-			});
-			return unless $preview;
-			$form_success = 0;
-			last;
-		}
-	}
-
-	if (	    $constants->{m1}
-		&& !$user->{is_anon}
-		&& !$form->{postanon}
-		&& !$form->{gotmodwarning}
-		&& !( $constants->{authors_unlimited}
-			&& $user->{seclev} >= $constants->{authors_unlimited} )
-		&& !$user->{acl}{modpoints_always}
-		&&  $moddb
-		&&  $moddb->countUserModsInDiscussion($user->{uid}, $form->{sid}) > 0
-	) {
-		$$error_message = getError("moderations to be lost");
-		$form_success = 0;
-		return;
-	}
-
-	$$error_message ||= '';
-	# Return false if error condition...
-	return if ! $form_success;
-
-	# ...otherwise return true.
-	return 1;
-}
-
-
-##################################################################
 # Previews a comment for submission
 sub previewForm {
 	my($error_message, $discussion) = @_;
@@ -834,6 +541,7 @@
 	my $constants = getCurrentStatic();
 
 	my $comment = preProcessComment($form, $user, $discussion, $error_message) or return;
+	return $$error_message if $comment eq '-1';
 	my $preview = postProcessComment({ %$comment, %$user }, 0, $discussion);
 
 	if ($constants->{plugin}{Subscribe}) {
@@ -856,25 +564,16 @@
 	my($form, $slashdb, $user, $constants, $discussion) = @_;
 	my $reader = getObject('Slash::DB', { db_type => 'reader' });
 
-	$form->{nobonus}  = $user->{nobonus}	unless $form->{nobonus_present};
-	$form->{postanon} = $user->{postanon}	unless $form->{postanon_present};
-	$form->{nosubscriberbonus} = $user->{nosubscriberbonus}
-						unless $form->{nosubscriberbonus_present};
-
 	my $header_emitted = 0;
-	my $sid = $form->{sid};
 
-	# Couple of rules on how to treat the discussion depending on how mode is set -Brian
-	$discussion->{type} = isDiscussionOpen($discussion);
-
-	if ($discussion->{type} eq 'archived') {
+ 	my $error_message;
+	my $comment = preProcessComment($form, $user, $discussion, \$error_message);
+	if ($comment eq '-1') { # die!
 		header('Comments', $discussion->{section}) or return;
-		print getError('archive_error');
+		print $$error_message;
 		return;
 	}
 
- 	my $error_message;
-	my $comment = preProcessComment($form, $user, $discussion, $error_message);
 	if (!$comment) {
 		# The comment did not validate.  We're not actually going to
 		# post the comment this time around, we are (probaly) just
@@ -903,232 +602,28 @@
 		titlebar("100%", getData('submitted_comment'));
 	}
 
-#print STDERR scalar(localtime) . " $$ E header_emitted=$header_emitted do_emit_html=$do_emit_html redirect_to=" . (defined($redirect_to) ? $redirect_to : "undef") . "\n";
+	my $saved_comment = saveComment($form, $comment, $user, $discussion, \$error_message);
 
-	# Set starting points to the AC's starting points, by default.
-	# If the user is posting under their own name, we'll reset this
-	# value (and add other modifiers) in a moment.
-	my $pts = getCurrentAnonymousCoward('defaultpoints');
-
-	my $karma_bonus = 0;
-	my $subscriber_bonus = 0;
-	my $tweak = 0;
-	if (!$user->{is_anon} && !$form->{postanon}) {
-
-		$pts = $user->{defaultpoints};
-
-		if ($constants->{karma_posting_penalty_style} == 0) {
-			$pts-- if $user->{karma} < 0;
-			$pts-- if $user->{karma} < $constants->{badkarma};
-                } else {
-			$tweak-- if $user->{karma} < 0;
-			$tweak-- if $user->{karma} < $constants->{badkarma};
-		}
-		# Enforce proper ranges on comment points.
-		my($minScore, $maxScore) =
-			($constants->{comment_minscore}, $constants->{comment_maxscore});
-		$pts = $minScore if $pts < $minScore;
-		$pts = $maxScore if $pts > $maxScore;
-		$karma_bonus = 1 if $pts >= 1 && $user->{karma} > $constants->{goodkarma}
-			&& !$form->{nobonus};
-		$subscriber_bonus = 1 if $constants->{plugin}{Subscribe}
-			&& $user->{is_subscriber}
-			&& (!$form->{nosubscriberbonus} || $form->{nosubscriberbonus} ne 'on');
+	if (!$saved_comment) {
+ 		if (!$header_emitted) {
+ 			header('Comments', $discussion->{section}) or return;
+ 		}
+ 		print $error_message if $error_message;
+ 		return;
 	}
 
-	my $posters_uid = $user->{uid};
-	if ($form->{postanon}
-		&& $reader->checkAllowAnonymousPosting()
-		&& $user->{karma} > -1
-		&& ($discussion->{commentstatus} eq 'enabled'
-			||
-		    $discussion->{commentstatus} eq 'logged_in')) {
-		$posters_uid = getCurrentAnonymousCoward('uid');
-	}
-
-#print STDERR scalar(localtime) . " $$ F header_emitted=$header_emitted do_emit_html=$do_emit_html\n";
-
-	my $clean_comment = {
-		subject		=> $comment->{subject},
-		comment		=> $comment->{comment},
-		sid		=> $comment->{sid},
-		pid		=> $comment->{pid},
-		ipid		=> $user->{ipid},
-		subnetid	=> $user->{subnetid},
-		uid		=> $posters_uid,
-		points		=> $pts,
-		tweak		=> $tweak,
-		tweak_orig	=> $tweak,
-		karma_bonus	=> $karma_bonus ? 'yes' : 'no',
-	};
-	
-	if ($constants->{plugin}{Subscribe}) {
-		$clean_comment->{subscriber_bonus} = $subscriber_bonus ? 'yes' : 'no';
-	}
-
-	my $maxCid = $slashdb->createComment($clean_comment);
-	if ($constants->{comment_karma_disable_and_log}) {
-		my $post_str = "";
-		$post_str .= "NO_ANON " if $user->{state}{commentkarma_no_anon};
-		$post_str .= "NO_POST " if $user->{state}{commentkarma_no_post};
-		if ($posters_uid == $constants->{anonymous_coward_uid} && $user->{state}{commentkarma_no_anon}) {
-			$slashdb->createCommentLog({
-				cid	=> $maxCid,
-				logtext	=> "COMMENTKARMA ANON: $post_str"
-			});
-		} elsif ($posters_uid != $constants->{anonymous_coward_uid} && $user->{state}{commentkarma_no_post}) {
-			$slashdb->createCommentLog({
-				cid	=> $maxCid,
-				logtext	=> "COMMENTKARMA USER: $post_str"
-			});
-		}
-	}
-	if ($constants->{comment_is_troll_disable_and_log}) {
-		$slashdb->createCommentLog({
-			cid	=> $maxCid,
-			logtext	=> "ISTROLL"
-		});
-	}
-
-#print STDERR scalar(localtime) . " $$ G maxCid=$maxCid\n";
-
-	# make the formkeys happy
-	$form->{maxCid} = $maxCid;
-
-	$slashdb->setUser($user->{uid}, {
-		'-expiry_comm'	=> 'expiry_comm-1',
-	}) if allowExpiry();
-
-	if ($maxCid == -1) {
-		# What vars should be accessible here?
-		if (!$header_emitted) {
-			header('Comments', $discussion->{section}) or return;
-		}
-		print getError('submission error');
-		return(0);
-
-	} elsif (!$maxCid) {
-		# This site has more than 2**32 comments.  Wow.
-		if (!$header_emitted) {
-			header('Comments', $discussion->{section}) or return;
-		}
-		print getError('maxcid exceeded');
-		return(0);
-	}
-
 	if ($do_emit_html) {
 		slashDisplay('comment_submit', {
 			metamod_elig => metamod_elig($user),
 		});
-	}
 
-	my $saved_comment = $slashdb->getComment($maxCid);
+ 		print $error_message if $error_message;
 
-	slashHook('comment_save_success', { comment => $saved_comment });
-
-	my $moddb = getObject("Slash::$constants->{m1_pluginname}");
-	if ($moddb) {
-		my $text = $moddb->checkDiscussionForUndoModeration($sid);
-		print $text if $text;
-	}
-
-	if ($do_emit_html) {
-		printComments($discussion, $maxCid, $maxCid,
+		printComments($discussion, $saved_comment->{cid}, $saved_comment->{cid},
 			{ force_read_from_master => 1, just_submitted => 1 }
 		);
 	}
 
-	my $tc = $slashdb->getVar('totalComments', 'value', 1);
-	$slashdb->setVar('totalComments', ++$tc);
-
-	# This is for stories. If a sid is only a number
-	# then it belongs to discussions, if it has characters
-	# in it then it belongs to stories and we should
-	# update to help with stories/hitparade.
-	# -Brian
-	if ($discussion->{sid}) {
-		$slashdb->setStory($discussion->{sid}, { writestatus => 'dirty' });
-	}
-
-	$slashdb->setUser($clean_comment->{uid}, {
-		-totalcomments => 'totalcomments+1',
-	}) if !isAnon($clean_comment->{uid});
-
-	my($messages, $reply, %users);
-	my $kinds = $reader->getDescriptions('discussion_kinds');
-	if ($form->{pid}
-		|| $kinds->{ $discussion->{dkid} } =~ /^journal/
-		|| $constants->{commentnew_msg}) {
-		$messages = getObject('Slash::Messages');
-		$reply = $slashdb->getCommentReply($form->{sid}, $maxCid);
-	}
-
-	$clean_comment->{pointsorig} = $clean_comment->{points};
-
-	# reply to comment
-	if ($messages && $form->{pid}) {
-		my $parent = $slashdb->getCommentReply($sid, $form->{pid});
-		my $users  = $messages->checkMessageCodes(MSG_CODE_COMMENT_REPLY, [$parent->{uid}]);
-		if (_send_comment_msg($users->[0], \%users, $pts, $clean_comment)) {
-			my $data  = {
-				template_name	=> 'reply_msg',
-				subject		=> { template_name => 'reply_msg_subj' },
-				reply		=> $reply,
-				parent		=> $parent,
-				discussion	=> $discussion,
-			};
-
-			$messages->create($users->[0], MSG_CODE_COMMENT_REPLY, $data);
-			$users{$users->[0]}++;
-		}
-	}
-
-	# reply to journal
-	if ($messages && $kinds->{ $discussion->{dkid} } =~ /^journal/) {
-		my $users  = $messages->checkMessageCodes(MSG_CODE_JOURNAL_REPLY, [$discussion->{uid}]);
-		if (_send_comment_msg($users->[0], \%users, $pts, $clean_comment)) {
-			my $data  = {
-				template_name	=> 'journrep',
-				subject		=> { template_name => 'journrep_subj' },
-				reply		=> $reply,
-				discussion	=> $discussion,
-			};
-
-			$messages->create($users->[0], MSG_CODE_JOURNAL_REPLY, $data);
-			$users{$users->[0]}++;
-		}
-	}
-
-	# comment posted
-	if ($messages && $constants->{commentnew_msg}) {
-		my $users = $messages->getMessageUsers(MSG_CODE_NEW_COMMENT);
-
-		my $data  = {
-			template_name	=> 'commnew',
-			subject		=> { template_name => 'commnew_subj' },
-			reply		=> $reply,
-			discussion	=> $discussion,
-		};
-
-		my @users_send;
-		for my $usera (@$users) {
-			next if $users{$usera};
-			push @users_send, $usera;
-			$users{$usera}++;
-		}
-		$messages->create(\@users_send, MSG_CODE_NEW_COMMENT, $data) if @users_send;
-	}
-
-	if ($constants->{validate_html}) {
-		my $validator = getObject('Slash::Validator');
-		my $test = parseDomainTags($comment->{comment});
-		$validator->isValid($test, {
-			data_type	=> 'comment',
-			data_id		=> $maxCid,
-			message		=> 1
-		}) if $validator;
-	}
-
 	# OK -- if we make it all the way here, and there were
 	# no errors so no header has been emitted, and we were
 	# asked to redirect to a new URL, NOW we can finally
@@ -1148,40 +643,6 @@
 
 
 ##################################################################
-# Decide whether or not to send a given message to a given user
-sub _send_comment_msg {
-	my($uid, $uids, $pts, $C) = @_;
-	my $constants	= getCurrentStatic();
-	my $reader	= getObject('Slash::DB', { db_type => 'reader' });
-	my $user	= getCurrentUser();
-
-	return unless $uid;			# no user
-	return if $uids->{$uid};		# user not already being msgd
-	return if $user->{uid} == $uid;		# don't msg yourself
-
-	my $otheruser = $reader->getUser($uid);
-
-	# use message_threshold in vars, unless user has one
-	# a message_threshold of 0 is valid, but "" is not
-	my $message_threshold = length($otheruser->{message_threshold})
-		? $otheruser->{message_threshold}
-		: length($constants->{message_threshold})
-			? $constants->{message_threshold}
-			: undef;
-
-	my $mod_reader = getObject("Slash::$constants->{m1_pluginname}", { db_type => 'reader' });
-	my $newpts = getPoints($C, $otheruser,
-		$constants->{comment_minscore}, $constants->{comment_maxscore},
-		$reader->countUsers({ max => 1 }), $mod_reader->getReasons,
-	);
-
-	# only if reply pts meets message threshold
-	return if defined $message_threshold && $newpts < $message_threshold;
-
-	return 1;
-}
-
-##################################################################
 sub moderate {
 	my($form, $slashdb, $user, $constants, $discussion) = @_;
 	my $moddb = getObject("Slash::$constants->{m1_pluginname}");

Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/images/comments.js
===================================================================
(Binary files differ)

Modified: slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/themes/slashcode/templates/dispLinkComment;misc;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -28,7 +28,7 @@
 				op	=> 'Reply',
 				subject	=> 'Reply to This',
 				subject_only => 1,
-				#onclick	=> (discussion2 ? "return replyTo($cid)" : '')
+				onclick	=> ((discussion2 && user.test_code) ? "replyTo($cid); return false;" : '')
 			}) %]
 		[% END %]
 
@@ -68,4 +68,4 @@
 __seclev__
 10000
 __version__
-$Id: dispLinkComment;misc;default,v 1.39 2007/07/10 19:02:44 pudge Exp $
+$Id: dispLinkComment;misc;default,v 1.40 2008/02/28 19:26:58 pudge Exp $

Modified: slashjp/branches/upstream/current/themes/slashcode/templates/help_anon;misc;default
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/templates/help_anon;misc;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/themes/slashcode/templates/help_anon;misc;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -15,7 +15,7 @@
 
 <br>
 
-<h3><a href="[% constants.rootdir %]/login.pl" style="text-decoration: none;">Login</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_login'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="[% constants.rootdir %]/login.pl" style="text-decoration: none;">Login</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_login'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_login" class="modalprefhelp" style="display: none;">
         Logged in users have a variety of benefits on Slashdot that are unavailable to users who don't bother logging in.
@@ -27,7 +27,7 @@
 
 <br>
 
-<h3><a href="/faq/accounts.shtml" target="_blank" style="text-decoration: none;">Accounts</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_accounts'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/faq/accounts.shtml" target="_blank" style="text-decoration: none;">Accounts</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_accounts'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_accounts" class="modalprefhelp" style="display: none;">
         Having trouble with your account? Learn about account security, how to change your password, and how to avoid getting banned.
@@ -39,4 +39,4 @@
 __seclev__
 500
 __version__
-$Id: help_anon;misc;default,v 1.1 2008/02/12 21:45:30 entweichen Exp $
+$Id: help_anon;misc;default,v 1.2 2008/02/28 17:16:26 entweichen Exp $

Modified: slashjp/branches/upstream/current/themes/slashcode/templates/help_main;misc;default
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/templates/help_main;misc;default	2008-03-03 11:14:27 UTC (rev 526)
+++ slashjp/branches/upstream/current/themes/slashcode/templates/help_main;misc;default	2008-03-04 09:02:07 UTC (rev 527)
@@ -24,32 +24,32 @@
 
 <br>
 
-<h3><a href="/faq" target="_blank" style="text-decoration: none;">FAQ</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_1'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/faq" style="text-decoration: none;">FAQ</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_1'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_1" class="modalprefhelp" style="display: none;">
         Herein lies everything you've ever wanted to know about Slashdot but were afraid to ask. Read about our hardware, traffic, the comments and moderation system,
         or the mighty Firehose. Learn how to submit book reviews and suggest interview guests.<br>
         </div>
 
-        <div style="padding-left: 15px;"><a href="/faq/com-mod.shtml" target="_blank">Comments and Moderation</a>, <a href="/faq/editorial.shtml#ed100" target="_blank">Submissions</a>, <a href="/faq/interviews.shtml" target="_blank">Interviews</a>, <a href="/faq/tech.shtml" target="_blank">Technology</a>.</div>
+        <div style="padding-left: 15px;"><a href="/faq/com-mod.shtml">Comments and Moderation</a>, <a href="/faq/editorial.shtml#ed100">Submissions</a>, <a href="/faq/interviews.shtml">Interviews</a>, <a href="/faq/tech.shtml">Technology</a>.</div>
 
 </div>
 
 <br>
 
-<h3><a href="/about.shtml" target="_blank" style="text-decoration: none;">About Slashdot</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_2'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/about.shtml" style="text-decoration: none;">About Slashdot</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_2'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_2" class="modalprefhelp" style="display: none;">
         Slashdot was originally created in September of 1997 by <a href="http://cmdrtaco.net/" target="_blank">Rob "CmdrTaco" Malda</a>. Today it is owned by <a href="http://sourceforge.com/" target="_blank">Sourceforge Inc</a>.<br>
         </div>
 
-        <div style="padding-left: 15px;"><a href="/faq/slashmeta.shtml#sm100" target="_blank">Who does this?</a>, <a href="faq/slashmeta.shtml#sm330" target="_blank">Why are you so successful?</a>, <a href="http://web.sourceforge.com/privacy.php" target="_blank">Privacy policy</a>.</div>
+        <div style="padding-left: 15px;"><a href="/faq/slashmeta.shtml#sm100">Who does this?</a>, <a href="/faq/slashmeta.shtml#sm330">Why are you so successful?</a>, <a href="http://web.sourceforge.com/privacy.php" target="_blank">Privacy policy</a>.</div>
 
 </div>
 
 <br>
 
-<h3><a href="/code.shtml" target="_blank" style="text-decoration: none;">About Slashcode</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_3'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/code.shtml" style="text-decoration: none;">About Slashcode</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_3'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_3" class="modalprefhelp" style="display: none;">
         Slashcode is wrangled and various other deeds of a technical nature are committed by the <a href="http://sourceforge.com/" target="_blank">SourceForce Inc.</a> Slashteam.<br>
@@ -61,43 +61,43 @@
 
 <br>
 
-<h3><a href="http://sourceforge.net/projects/slashcode/" target="_blank" style="text-decoration: none;">Bug Reports</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_6'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="http://sourceforge.net/projects/slashcode/" target="_blank" style="text-decoration: none;">Bug Reports</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_6'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_6" class="modalprefhelp" style="display: none;">
         Have you found a bug? You may let us know about it by submitting to our bug tracker. Please remember, this is for bug submissions and <b>not</b> for feature requests. You
         will need a valid email address if you're submitting a bug anonymously.<br>
         </div>
 
-        <div style="padding-left: 15px;"><a href="/faq/suggestions.shtml#su1500" target="_blank">I have found a bug. Who do I contact?</a></div></div>
+        <div style="padding-left: 15px;"><a href="/faq/suggestions.shtml#su1500">I have found a bug. Who do I contact?</a></div></div>
 
 <br>
 
-<h3><a href="/faq/subscriptions.shtml" target="_blank" style="text-decoration: none;">Subscriptions</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_7'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/faq/subscriptions.shtml" style="text-decoration: none;">Subscriptions</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_7'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_7" class="modalprefhelp" style="display: none;">
         Read about why we offer subscriptions and how you may get one. Want to give a subscription to a friend? Having trouble with your subscription or payment?<br>
         </div>
 
-        <div style="padding-left: 15px;"><a href="/faq/subscriptions.shtml#ss100" target="_blank">Why do you offer subscriptions?</a>, <a href="/faq/subscriptions.shtml#ss300" target="_blank">How much does a subscription cost?</a>, <a href="/faq/subscriptions.shtml#ss700" target="_blank">Do I have to subscribe?</a>, <a href="/subscribe.pl" target="_blank">Subscribe</a>.</div>
+        <div style="padding-left: 15px;"><a href="/faq/subscriptions.shtml#ss100">Why do you offer subscriptions?</a>, <a href="/faq/subscriptions.shtml#ss300">How much does a subscription cost?</a>, <a href="/faq/subscriptions.shtml#ss700">Do I have to subscribe?</a>, <a href="/subscribe.pl">Subscribe</a>.</div>
 </div>
 
 <br>
 
-<h3><a href="http://web.sourceforge.com/media_kit.php" target="_blank" style="text-decoration: none;">Advertising&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_8'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="http://web.sourceforge.com/media_kit.php" target="_blank" style="text-decoration: none;">Advertising&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_8'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_8" class="modalprefhelp" style="display: none;">
         Ever wonder why there are banner ads on Slashdot? Would you like to see yours up there?<br>
         </div>
 
-        <div style="padding-left: 15px;"><a href="/faq/advertising.shtml#ad100" target="_blank">Can I advertise on Slashdot</a>, <a href="/faq/advertising.shtml#ad600" target="_blank">A banner ad is distorting my browser!</a>, <a href="http://web.sourceforge.com/media_kit.php" target="_blank">Advertise</a>.</div>
+        <div style="padding-left: 15px;"><a href="/faq/advertising.shtml#ad100">Can I advertise on Slashdot</a>, <a href="/faq/advertising.shtml#ad600">A banner ad is distorting my browser!</a>, <a href="http://web.sourceforge.com/media_kit.php" target="_blank">Advertise</a>.</div>
 </div>
 
 <br>
 
-<h3><a href="/supporters.shtml" target="_blank" style="text-decoration: none;">Supporters</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_5'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3>
+<h3><a href="/supporters.shtml" style="text-decoration: none;">Supporters</a>&nbsp;<a href="#" onclick="displayModalPrefHelp('modalprefhelp_5'); return false" title="Click To Expand Help" class="help">?</a></h3>
 <div style="padding-left: 10px;">
         <div id="modalprefhelp_5" class="modalprefhelp" style="display: none;">
-        Browse the multitude of sites that have linked to us by using one of our snazzy <a href="http://slashdot.org/prettypictures.shtml" target="_blank">banners</a>.
+        Browse the multitude of sites that have linked to us by using one of our snazzy <a href="/prettypictures.shtml">banners</a>.
         </div>
 
         <div style="padding-left: 15px;"><a href="http://sourceforge.net/" target="_blank">SourceForge.net</a>, <a href="http://www.thinkgeek.com/" target="_blank">ThinkGeek</a>, <a href="http://freshmeat.net/" target="_blank">Freshmeat</a>, <a href="http://www.itmanagersjournal.com/" target="_blank">IT Manager's Journal</a>, <a href="http://www.linux.com/" target="_blank">Linux.com</a>.</div>
@@ -115,4 +115,4 @@
 __seclev__
 500
 __version__
-$Id: help_main;misc;default,v 1.2 2008/02/20 16:57:19 entweichen Exp $
+$Id: help_main;misc;default,v 1.4 2008/02/28 17:15:25 entweichen Exp $


Slashdotjp-dev メーリングリストの案内
Back to archive index