[Slashdotjp-dev 897] [414] merged from upstream T_2_5_0_189

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 16日 (水) 02:47:29 JST


Revision: 414
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=414
Author:   tach
Date:     2008-01-16 02:47:28 +0900 (Wed, 16 Jan 2008)

Log Message:
-----------
merged from upstream T_2_5_0_189

Modified Paths:
--------------
    slashjp/branches/upstream/current/Slash/DB/Static/MySQL/MySQL.pm
    slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm
    slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js
    slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js
    slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml
    slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml
    slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm
    slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default
    slashjp/branches/upstream/current/plugins/FireHose/templates/portalmap;firehose;default
    slashjp/branches/upstream/current/plugins/ScheduleShifts/ScheduleShifts.pm
    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/sbin/portald
    slashjp/branches/upstream/current/sql/mysql/defaults.sql
    slashjp/branches/upstream/current/sql/mysql/slashschema_create.sql
    slashjp/branches/upstream/current/sql/mysql/upgrades
    slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm
    slashjp/branches/upstream/current/themes/slashcode/htdocs/images/comments.js
    slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl
    slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql
    slashjp/branches/upstream/current/themes/slashcode/tasks/ircslash.pl
    slashjp/branches/upstream/current/themes/slashcode/templates/getUserAdmin;users;default
    slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default


-------------- next part --------------
Modified: slashjp/branches/upstream/current/Slash/DB/Static/MySQL/MySQL.pm
===================================================================
--- slashjp/branches/upstream/current/Slash/DB/Static/MySQL/MySQL.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/Slash/DB/Static/MySQL/MySQL.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -1,7 +1,7 @@
 # This code is a part of Slash, and is released under the GPL.
 # Copyright 1997-2005 by Open Source Technology Group. See README
 # and COPYING for more information, or see http://slashcode.com/.
-# $Id: MySQL.pm,v 1.262 2007/12/20 22:07:32 pudge Exp $
+# $Id: MySQL.pm,v 1.263 2008/01/09 18:11:10 entweichen Exp $
 
 package Slash::DB::Static::MySQL;
 
@@ -20,7 +20,7 @@
 use vars qw($VERSION);
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.262 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.263 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # FRY: Hey, thinking hurts 'em! Maybe I can think of a way to use that.
 
@@ -809,19 +809,19 @@
 
 ########################################################
 # For portald
-sub getTop10Comments {
+sub getTopComments {
 	my($self) = @_;
 	my $constants = getCurrentStatic();
 
 	my($min_score, $max_score) =
 		($constants->{comment_minscore}, $constants->{comment_maxscore});
 
-	my $num_wanted = $constants->{top10comm_num} || 10;
-	my $daysback = $constants->{top10comm_days} || 1;
+	my $num_wanted = $constants->{topcomm_num} || 5;
+	my $daysback = $constants->{topcomm_days} || 1;
 
 	my $cids = [];
 	my $comments = [];
-	my $num_top10_comments = 0;
+	my $num_top_comments = 0;
 	my $max_cid = $self->getMaxCid();
 
 	# To make this select a LOT faster, we limit not only by date
@@ -832,7 +832,7 @@
 
 	while (1) {
 		# Select the latest comments with high scores.  If we
-		# can't get 10 of them, our standards are too high;
+		# can't get 5 of them, our standards are too high;
 		# lower our minimum score requirement and re-SELECT.
 		$cids = $self->sqlSelectAll(
 			'cid',
@@ -842,8 +842,8 @@
 				AND points >= $max_score",
 			'ORDER BY date DESC');
 
-		$num_top10_comments = scalar(@$cids);
-		last if $num_top10_comments >= $num_wanted;
+		$num_top_comments = scalar(@$cids);
+		last if $num_top_comments >= $num_wanted;
                 # Didn't get $num_wanted... try again with lower standards.
                 --$max_score;
                 # If this is as low as we can get... take what we have.
@@ -863,22 +863,22 @@
 	}
 
 	@$cids = sort { $a->[1] <=> $b->[1] } @$cids;
-	$num_top10_comments = 0;
+	$num_top_comments = 0;
 
 	while (@$cids
-		&& $cids->[$num_top10_comments]
-		&& @{$cids->[$num_top10_comments]}
-		&& $num_top10_comments < $num_wanted
+		&& $cids->[$num_top_comments]
+		&& @{$cids->[$num_top_comments]}
+		&& $num_top_comments < $num_wanted
 	) {
 		my $comment = $self->sqlSelectArrayRef(
 			"stories.sid, title, cid, subject, date, nickname, comments.points, comments.reason",
 			"comments, stories, story_text, users",
-			"cid=$cids->[$num_top10_comments]->[0]
+			"cid=$cids->[$num_top_comments]->[0]
 				AND stories.stoid = story_text.stoid
 				AND users.uid=comments.uid
                                 AND comments.sid=stories.discussion");
 		push @$comments, $comment if $comment;
-		++$num_top10_comments;
+		++$num_top_comments;
 	}
 
 	formatDate($comments, 4, 4);

Modified: slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm
===================================================================
--- slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -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.223 2007/10/24 21:19:34 jamiemccarthy Exp $
+# $Id: Environment.pm,v 1.226 2008/01/09 19:57:54 jamiemccarthy Exp $
 
 package Slash::Utility::Environment;
 
@@ -33,7 +33,7 @@
 use base 'Exporter';
 use vars qw($VERSION @EXPORT);
 
-($VERSION) = ' $Revision: 1.223 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.226 $ ' =~ /\$Revision:\s+([^\s]+)/;
 @EXPORT	   = qw(
 
 	dbAvailable
@@ -1856,9 +1856,9 @@
 
 	# fields that have ONLY a-zA-Z0-9_
 	my %alphas = map {($_ => 1)} qw(
-		fieldname formkey commentstatus filter
-		hcanswer mode op section thisname type reskey
-		comments_control
+		commentstatus comments_control content_type
+		fieldname filter formkey hcanswer id
+		mode op reskey section thisname type
 	),
 	# Survey
 	qw(
@@ -1878,6 +1878,12 @@
 		query		=> sub { $_[0] =~ s|[\000-\040<>\177-\377]+| |g;
 			        	 $_[0] =~ s|\s+| |g;				},
 		colorblock	=> sub { $_[0] =~ s|[^\w#,]+||g				},
+# What I actually want to do for userfield is allow it to match
+# [\w.]+, or pass emailValid(), or be changed to the return value
+# from nickFix().  For technical reasons I'm putting that off
+# until probably next week.  Until then this breaks some very
+# minor functionality. - Jamie 2008-01-09
+		userfield	=> sub { $_[0] =~ s|[^\w.@ -]||g			},
 	);
 
 
@@ -3500,4 +3506,4 @@
 
 =head1 VERSION
 
-$Id: Environment.pm,v 1.223 2007/10/24 21:19:34 jamiemccarthy Exp $
+$Id: Environment.pm,v 1.226 2008/01/09 19:57:54 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js	2008-01-15 17:47:28 UTC (rev 414)
@@ -1,25 +1,29 @@
 // _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_
-// $Id: common.js,v 1.155 2007/12/20 18:46:54 tvroom Exp $
+// $Id: common.js,v 1.159 2008/01/09 21:01:25 pudge Exp $
 
+// global settings, but a firehose might use a local settings object instead
+var firehose_settings = {};
+  firehose_settings.updates = Array(0);
+  firehose_settings.updates_size = 0;
+  firehose_settings.ordered = Array(0);
+  firehose_settings.before = Array(0);
+  firehose_settings.after = Array(0);
+  firehose_settings.startdate = '';
+  firehose_settings.duration = '';
+  firehose_settings.issue = '';
+  firehose_settings.removed_first = '0';
+  firehose_settings.future = null;
+  firehose_settings.removals = null;
+  firehose_settings.is_embedded = 0;
+  firehose_settings.not_id = 0;
+
+// globals we haven't yet decided to move into |firehose_settings|
 var fh_play = 0;
 var fh_is_timed_out = 0;
 var fh_is_updating = 0;
 var fh_update_timerids = Array(0);
 var fh_is_admin = 0;
 var console_updating = 0;
-var firehose_updates = Array(0);
-var firehose_updates_size = 0;
-var firehose_ordered = Array(0);
-var firehose_before = Array(0);
-var firehose_after = Array(0);
-var firehose_startdate = '';
-var firehose_issue = '';
-var firehose_duratiton = '';
-var firehose_removed_first = '0';
-var firehose_future;
-var firehose_removals;
-var firehose_is_embedded = 0;
-var firehose_not_id = 0;
 var fh_colorslider; 
 var fh_ticksize;
 var fh_pageval = 0;
@@ -587,17 +591,17 @@
 	if (name == "color" || name == "tab" || name == "pause" || name == "startdate" || name == "duration" || name == "issue" || name == "pagesize") { 
 		params[name] = value;
 		if (name == "startdate") {
-			firehose_startdate = value;
+			firehose_settings.startdate = value;
 		}
 		if (name == "duration")  {
-			firehose_duration = value;
+			firehose_settings.duration = value;
 		}
 		if (name == "issue") {
-			firehose_issue = value;
-			firehose_startdate = value;
+			firehose_settings.issue = value;
+			firehose_settings.startdate = value;
 			duration = 1;
 			page = 0;
-			var issuedate = firehose_issue.substr(5,2) + "/" + firehose_issue.substr(8,2) + "/" + firehose_issue.substr(10,2);
+			var issuedate = firehose_settings.issue.substr(5,2) + "/" + firehose_settings.issue.substr(8,2) + "/" + firehose_settings.issue.substr(10,2);
 
 			if ($('fhcalendar')) {
 				$('fhcalendar')._widget.setDate(issuedate, "day");
@@ -853,7 +857,7 @@
 		for (el in response.html_append_substr) {
 			if ($(el)) {
 				var this_html = $(el).innerHTML;
-				var i = $(el).innerHTML.search(/<span class="substr"> <\/span>[\s\S]*$/i);
+				var i = $(el).innerHTML.search(/<span class="?substr"?> ?<\/span>[\s\S]*$/i);
 				if (i == -1) {
 					$(el).innerHTML += response.html_append_substr[el];
 				} else {
@@ -875,15 +879,15 @@
 
 
 function firehose_handle_update() {
-	if (firehose_updates.length > 0) {
-		var el = firehose_updates.pop();
+	if (firehose_settings.updates.length > 0) {
+		var el = firehose_settings.updates.pop();
 		var fh = 'firehose-' + el[1];
 		var wait_interval = 800;
 		if(el[0] == "add") {
-			if (firehose_before[el[1]] && $('firehose-' + firehose_before[el[1]])) {
-				new Insertion.After('firehose-' + firehose_before[el[1]], el[2]);
-			} else if (firehose_after[el[1]] && $('firehose-' + firehose_after[el[1]])) {
-				new Insertion.Before('firehose-' + firehose_after[el[1]], el[2]);
+			if (firehose_settings.before[el[1]] && $('firehose-' + firehose_settings.before[el[1]])) {
+				new Insertion.After('firehose-' + firehose_settings.before[el[1]], el[2]);
+			} else if (firehose_settings.after[el[1]] && $('firehose-' + firehose_settings.after[el[1]])) {
+				new Insertion.Before('firehose-' + firehose_settings.after[el[1]], el[2]);
 			} else if (insert_new_at == "bottom") {
 				new Insertion.Bottom('firehoselist', el[2]);
 			} else {
@@ -902,16 +906,16 @@
 			var myAnim = new YAHOO.util.Anim(fh, attributes); 
 			myAnim.duration = 0.7;
 
-			if (firehose_updates_size > 10) {
+			if (firehose_settings.updates_size > 10) {
 				myAnim.duration = myAnim.duration / 2;
 				wait_interval = wait_interval / 2;
 			}
-			if (firehose_updates_size > 20) {
+			if (firehose_settings.updates_size > 20) {
 				myAnim.duration = myAnim.duration / 2;
 				wait_interval = wait_interval / 2;
 
 			}
-			if (firehose_updates_size > 30) {
+			if (firehose_settings.updates_size > 30) {
 				myAnim.duration = myAnim.duration / 1.5;
 				wait_interval = wait_interval / 2;
 			}
@@ -935,16 +939,16 @@
 				myAnim.duration = 0.4;
 				wait_interval = 500;
 				
-				if (firehose_updates_size > 10) {
+				if (firehose_settings.updates_size > 10) {
 					myAnim.duration = myAnim.duration * 2;
-					if (!firehose_removed_first) {
+					if (!firehose_settings.removed_first) {
 						wait_interval = wait_interval * 2;
 					} else {
 						wait_interval = 50;
 					}
 				}
-				firehose_removed_first = 1;
-				if (firehose_removals < 10 ) {
+				firehose_settings.removed_first = 1;
+				if (firehose_settings.removals < 10 ) {
 					myAnim.onComplete.subscribe(function() {
 						var elem = this.getEl();
 						if (elem && elem.parentNode) {
@@ -969,25 +973,25 @@
 }
 
 function firehose_reorder() {
-	if (firehose_ordered) {
+	if (firehose_settings.ordered) {
 		var fhlist = $('firehoselist');
 		if (fhlist) {
 			var item_count = 0;
-			for (i = 0; i < firehose_ordered.length; i++) {
-				if (/^\d+$/.test(firehose_ordered[i])) {
+			for (i = 0; i < firehose_settings.ordered.length; i++) {
+				if (/^\d+$/.test(firehose_settings.ordered[i])) {
 					item_count++;
 				}
-				var fhel = $('firehose-' + firehose_ordered[i]);
+				var fhel = $('firehose-' + firehose_settings.ordered[i]);
 				if (fhlist && fhel) {
 					fhlist.appendChild(fhel);
 				}
-				if ( firehose_future[firehose_ordered[i]] ) {
-					if ($("ttype-" + firehose_ordered[i])) {
-						$("ttype-" + firehose_ordered[i]).className = "future";	
+				if ( firehose_settings.future[firehose_settings.ordered[i]] ) {
+					if ($("ttype-" + firehose_settings.ordered[i])) {
+						$("ttype-" + firehose_settings.ordered[i]).className = "future";	
 					}
 				} else {
-					if ($("ttype-" + firehose_ordered[i]) && $("ttype-" + firehose_ordered[i]).className == "future") {
-						$("ttype-" + firehose_ordered[i]).className = "story";	
+					if ($("ttype-" + firehose_settings.ordered[i]) && $("ttype-" + firehose_settings.ordered[i]).className == "future") {
+						$("ttype-" + firehose_settings.ordered[i]).className = "story";	
 					}
 				}
 			}
@@ -1015,17 +1019,17 @@
 	}
 	var response = eval_response(transport);
 	var processed = 0;
-	firehose_removals = response.update_data.removals;
-	firehose_ordered = response.ordered;
-	firehose_future = response.future;
-	firehose_before = Array(0);
-	firehose_after = Array(0);
-	for (i = 0; i < firehose_ordered.length; i++) {
+	firehose_settings.removals = response.update_data.removals;
+	firehose_settings.ordered = response.ordered;
+	firehose_settings.future = response.future;
+	firehose_settings.before = Array(0);
+	firehose_settings.after = Array(0);
+	for (i = 0; i < firehose_settings.ordered.length; i++) {
 		if (i > 0) {
-			firehose_before[firehose_ordered[i]] = firehose_ordered[i - 1];
+			firehose_settings.before[firehose_settings.ordered[i]] = firehose_settings.ordered[i - 1];
 		}
-		if (i < (firehose_ordered.length - 1)) {
-			firehose_after[firehose_ordered[i]] = firehose_ordered[i + 1];
+		if (i < (firehose_settings.ordered.length - 1)) {
+			firehose_settings.after[firehose_settings.ordered[i]] = firehose_settings.ordered[i + 1];
 		}
 	}
 	if (response.html) {
@@ -1033,9 +1037,9 @@
 		processed = processed + 1;
 	}
 	if (response.updates) {
-		firehose_updates = response.updates;
-		firehose_updates_size = firehose_updates.length;
-		firehose_removed_first = 0;
+		firehose_settings.updates = response.updates;
+		firehose_settings.updates_size = firehose_settings.updates.length;
+		firehose_settings.removed_first = 0;
 		processed = processed + 1;
 		firehose_handle_update();
 	}
@@ -1083,12 +1087,12 @@
 	params['op'] = 'firehose_get_updates';
 	params['ids'] = firehose_get_item_idstring();
 	params['updatetime'] = update_time;
-	params['startdate'] = firehose_startdate;
-	params['duration'] = firehose_duration;
-	params['issue'] = firehose_issue;
+	params['startdate'] = firehose_settings.startdate;
+	params['duration'] = firehose_settings.duration;
+	params['issue'] = firehose_settings.issue;
 	params['page'] = page;
-	params['not_id'] = firehose_not_id;
-	if ( firehose_is_embedded ) {
+	params['not_id'] = firehose_settings.not_id;
+	if ( firehose_settings.is_embedded ) {
 		params['embed'] = 1;
 	}
 	params['fh_pageval'] = fh_pageval;
@@ -1183,10 +1187,12 @@
 function firehose_collapse_entry(id) {
 	var fhbody = $('fhbody-'+id);
 	var fh = $('firehose-'+id);
-	if (fhbody.className == "body") {
+	if (fhbody && fhbody.className == "body") {
 		fhbody.className = "hide";
+	}
+	if (fh) {	
 		fh.className = "briefarticle";
-	}	
+	}
 	tagsHideBody(id)
 
 }
@@ -1210,7 +1216,7 @@
 
 var firehose_cal_select_handler = function(type,args,obj) { 
 	var selected = args[0];
-	firehose_issue = '';
+	firehose_settings.issue = '';
 	firehose_set_options('startdate', selected.startdate);
 	firehose_set_options('duration', selected.duration);
 }; 
@@ -1471,3 +1477,30 @@
 	};
 	ajax_update(params, '', handlers);
 }
+
+function ajaxSaveSlashboxes() {
+	var wrapper = document.getElementById('slashboxes');
+	var titles = YAHOO.util.Dom.getElementsByClassName('title', 'div', wrapper);
+	var sep = "";
+	var all = "";
+	for ( i=0; i<titles.length; ++i) {
+		var bid = titles[i].id.slice(0,-6);
+		all += sep + bid;
+		sep = ",";
+	}
+
+	var params = [];
+	params['op'] = 'page_save_user_boxes';
+	params['reskey'] = reskey_static;
+	params['bids'] = all;
+	ajax_update(params, '');
+}
+
+function ajaxRemoveSlashbox( id ) {
+	var slashboxes = document.getElementById('slashboxes');
+	var box = document.getElementById(id);
+	if ( box.parentNode === slashboxes ) {
+		slashboxes.removeChild(box);
+		ajaxSaveSlashboxes();
+	}
+}

Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js
===================================================================
--- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/slashbox.js	2008-01-15 17:47:28 UTC (rev 414)
@@ -97,20 +97,5 @@
 
 YAHOO.slashdot.SlashBox.prototype.onDragDrop = function(e, id)
   {
-    var wrapper = document.getElementById('slashboxes');
-    var titles = YAHOO.util.Dom.getElementsByClassName('title', 'div', wrapper);
-    var sep = "";
-    var all = "";
-    for ( i=0; i<titles.length; ++i)
-      {
-        var bid = titles[i].id.slice(0,-6);
-        all += sep + bid;
-        sep = ",";
-      }
-
-    var params = [];
-    params['op'] = 'page_save_user_boxes';
-    params['reskey'] = reskey_static;
-    params['bids'] = all;
-    ajax_update(params, '');
+    ajaxSaveSlashboxes();
   }

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/badges.shtml	2008-01-15 17:47:28 UTC (rev 414)
@@ -3,7 +3,7 @@
 <html>
 <head>
         <title>Slashdot FAQ - Badges How-To</title>
-<!-- $Id: badges.shtml,v 1.2 2007/10/10 18:34:45 scc Exp $ -->
+<!-- $Id: badges.shtml,v 1.3 2008/01/07 17:41:52 scc Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
@@ -50,7 +50,15 @@
 </script>
 <script src="http://slashdot.org/slashdot-it.js" type="text/javascript"></script></xmp></p>
 
+<p>The examples above show the (default) horizontal style badge.
+Alternatively, you can have vertical badges by setting <i>slashdot_badge_style</i>:
+<xmp>slashdot_badge_style='v0';</xmp>
+Vertical badges look like this:</p>
 
+<p><img src="http://images.slashdot.org/sditv2u.png" style="padding-left:2em;"
+alt="sample Slashdot badge" title="a vertical Slashdot badge looks like this"/></p>
+
+
 <h2><a name="ba101" id="ba101">Links</a></h2>
 <p>For security or control reasons, you might wish to use your own image and formatting
 with a plain HTML link.  This snippet builds the appropriate link automatically, you can

Modified: slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml
===================================================================
--- slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/FAQSlashdot/faq/metamod.shtml	2008-01-15 17:47:28 UTC (rev 414)
@@ -3,7 +3,7 @@
 <html>
 <head>
         <title>Slashdot FAQ - Meta-moderation</title>
-<!-- $Id: metamod.shtml,v 1.6 2005/10/11 02:32:13 tvroom Exp $ -->
+<!-- $Id: metamod.shtml,v 1.7 2008/01/07 16:15:16 jamiemccarthy Exp $ -->
 <!--#include virtual="/slashcssbase.inc"-->
 <!--#include virtual="/slashhead-gen-full.inc"-->
 
@@ -44,10 +44,10 @@
         </small></em></p>
 
 <h2><a name="mm400" id="mm400">How can I metamoderate?</a></h2>
-        <p>If you're eligible, and you're logged in, you can meta-moderate. You should see a link at the top of the main page that says "Have you Meta Moderated Recently?" Click that link, and you should be taken to the M2 page.</p>
+        <p>If you're eligible, and you're logged in, you can meta-moderate. You will occasionally see a link at the top of the main page that says "Have you Meta Moderated Recently?" Click that link, and you should be taken to the M2 page.</p>
         <p><em><small>
                 Answered by: <a href="mailto:jamie****@slash*****">Jamie</a><br>
-                Last Modified: 5/21/03
+                Last Modified: 1/07/08
         </small></em></p>
 
 <h2><a name="mm500" id="mm500">How often can I M2?</a></h2>

Modified: slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -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.196 2007/12/20 18:50:18 tvroom Exp $
+# $Id: FireHose.pm,v 1.197 2008/01/09 20:04:51 jamiemccarthy Exp $
 
 package Slash::FireHose;
 
@@ -41,7 +41,7 @@
 use base 'Slash::DB::MySQL';
 use vars qw($VERSION);
 
-($VERSION) = ' $Revision: 1.196 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.197 $ ' =~ /\$Revision:\s+([^\s]+)/;
 sub createFireHose {
 	my($self, $data) = @_;
 	$data->{dept} ||= "";
@@ -666,9 +666,22 @@
 	return($items, $results, $count);
 }
 
+# A single-globjid wrapper around getUserFireHoseVotesForGlobjs.
+
+sub getUserFireHoseVoteForGlobjid {
+	my($self, $uid, $globjid) = @_;
+	my $vote_hr = $self->getUserFireHoseVotesForGlobjs($uid, [ $globjid ]);
+	return $vote_hr->{$globjid};
+}
+
+# This isn't super important but I'd prefer the method name to
+# be getUserFireHoseVotesForGlobjids.  We spelled out "Globjid"
+# in the methods getTagsByGlobjid and getFireHoseIdFromGlobjid.
+# Not worth changing right now - Jamie 2008-01-09
+
 sub getUserFireHoseVotesForGlobjs {
 	my($self, $uid, $globjs) = @_;
-	my $constants = getCurrentUser();
+	my $constants = getCurrentStatic();
 
 	return {} if !$globjs;
 	$globjs = [$globjs] if !ref $globjs;
@@ -686,7 +699,8 @@
 	my $results = $self->sqlSelectAllKeyValue(
 		"globjid,tagnameid",
 		"tags", 
-		"globjid in ($glob_str) and inactivated is NULL AND uid = $uid_q AND tagnameid IN ($upid,$dnid)"
+		"globjid IN ($glob_str) AND inactivated IS NULL
+		 AND uid = $uid_q AND tagnameid IN ($upid,$dnid)"
 	);
 
 	foreach (keys %$results) {
@@ -811,13 +825,12 @@
 sub getPrimaryFireHoseItemByUrl {
 	my($self, $url_id) = @_;
 	my $ret_val = 0;
-	my $constants = getCurrentUser();
 	if ($url_id) {
 		my $url_id_q = $self->sqlQuote($url_id);
 		my $count = $self->sqlCount("firehose", "url_id=$url_id_q");
 		if ($count > 0) {
 			my($uid, $id) = $self->sqlSelect("uid,id", "firehose", "url_id = $url_id_q", "order by id asc");
-			if ($uid == $constants->{anon_coward_uid}) {
+			if (isAnon($uid)) {
 				$ret_val = $id;
 			} else {
 				# Logged in, give precedence to most recent submission
@@ -2430,4 +2443,4 @@
 
 =head1 VERSION
 
-$Id: FireHose.pm,v 1.196 2007/12/20 18:50:18 tvroom Exp $
+$Id: FireHose.pm,v 1.197 2008/01/09 20:04:51 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default	2008-01-15 17:47:28 UTC (rev 414)
@@ -153,9 +153,9 @@
 </span>
 [% PROCESS paginate options = options ulid = "fh-paginate" divid = "fh-pag-div" num_items = itemnum fh_page = fh_page %]
 <script type="text/javascript">
-	firehose_startdate = '[% options.startdate.replace('-','') %]';
-	firehose_issue = '[% options.issue %]';
-	firehose_duration = '[% options.duration %]';
+	firehose_settings.startdate = '[% options.startdate.replace('-','') %]';
+	firehose_settings.issue = '[% options.issue %]';
+	firehose_settings.duration = '[% options.duration %]';
 	[% IF fh_page == "console.pl" %]
 		fh_pageval = 1;
 	[% ELSIF fh_page == "users.pl" %]
@@ -176,7 +176,7 @@
 	var fh_view_mode = '[% options.mode %]';
 	var page = '[% page %]';
 	[% IF form.embed %]
-	firehose_is_embedded = 1; // defined in common.js
+	firehose_settings.is_embedded = 1; // defined in common.js
 	[% END %]
 	fh_is_admin = [% IF user.is_admin && !user.firehose_usermode %]1[% ELSE %]0[% END %];
 	var updateIntervalType = [% IF user.is_admin && !user.firehose_usermode %]1[% ELSE %]2[% END %];
@@ -199,4 +199,4 @@
 </script>
 
 __version__
-$Id: list;firehose;default,v 1.106 2007/11/26 18:26:36 scc Exp $
+$Id: list;firehose;default,v 1.107 2008/01/09 18:26:57 scc Exp $

Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/portalmap;firehose;default
===================================================================
--- slashjp/branches/upstream/current/plugins/FireHose/templates/portalmap;firehose;default	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/FireHose/templates/portalmap;firehose;default	2008-01-15 17:47:28 UTC (rev 414)
@@ -16,8 +16,9 @@
 __template__
 
 [% title %]
+<span class="closebox" onClick="ajaxRemoveSlashbox('[% bid %]-container')"></span>
 
 __seclev__
 500
 __version__
-$Id: portalmap;firehose;default,v 1.1 2007/02/23 02:47:36 scc Exp $
+$Id: portalmap;firehose;default,v 1.2 2008/01/09 20:07:02 scc Exp $

Modified: slashjp/branches/upstream/current/plugins/ScheduleShifts/ScheduleShifts.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/ScheduleShifts/ScheduleShifts.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/ScheduleShifts/ScheduleShifts.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -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: ScheduleShifts.pm,v 1.5 2006/01/12 21:31:22 jamiemccarthy Exp $
+# $Id: ScheduleShifts.pm,v 1.6 2008/01/09 21:01:05 pudge Exp $
 
 package Slash::ScheduleShifts;
 
@@ -19,7 +19,7 @@
 use constant SHIFT_DEFAULT		=> -2;
 use constant SHIFT_NOTSET		=> -1;
 
-our($VERSION) = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/;
+our($VERSION) = ' $Revision: 1.6 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 our @DOW = qw(sun mon tue wed thu fri sat);
 our %DOW;
@@ -389,7 +389,7 @@
 
 	# hr begin in our defined TZ, length in hours
 	my @shifts = map {
-		[ @{ %{ $self->{shift_defs}{$_} } }{qw(start length)} ]
+		[ @{ $self->{shift_defs}{$_} }{qw(start length)} ]
 	} @{ $self->{shift_types} };
 
 	# we only need to find out needed week, day of week, and hour

Modified: slashjp/branches/upstream/current/plugins/Stats/Stats.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/Stats/Stats.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/Stats/Stats.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -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.186 2007/11/29 23:26:30 jamiemccarthy Exp $
+# $Id: Stats.pm,v 1.187 2008/01/07 16:15:52 jamiemccarthy Exp $
 
 package Slash::Stats;
 
@@ -22,7 +22,7 @@
 use base 'Slash::DB::Utility';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.186 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.187 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 sub new {
 	my($class, $user, $options) = @_;
@@ -1709,7 +1709,8 @@
 	my %count = ( );
 	for my $duple (@$top_ar) {
 		my($uri, $c) = @$duple;
-		my $host = URI->new($uri)->host();
+		my $uri_obj = URI->new($uri);
+		my $host = $uri_obj ? $uri_obj->host() : $uri;
 		$count{$host} += $c;
 	}
 	my @top_hosts = (sort { $count{$b} <=> $count{$a} || $a <=> $b } keys %count);
@@ -2147,4 +2148,4 @@
 
 =head1 VERSION
 
-$Id: Stats.pm,v 1.186 2007/11/29 23:26:30 jamiemccarthy Exp $
+$Id: Stats.pm,v 1.187 2008/01/07 16:15:52 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/plugins/Tags/Tags.pm
===================================================================
--- slashjp/branches/upstream/current/plugins/Tags/Tags.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/Tags/Tags.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -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.94 2007/12/20 20:37:48 jamiemccarthy Exp $
+# $Id: Tags.pm,v 1.96 2008/01/09 20:04:51 jamiemccarthy Exp $
 
 package Slash::Tags;
 
@@ -17,7 +17,7 @@
 use base 'Slash::DB::Utility';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.94 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.96 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # FRY: And where would a giant nerd be? THE LIBRARY!
 
@@ -293,9 +293,9 @@
 #
 # This method assumes that the tag does not already exist,
 # and thus the first action it tries is creating that tag.
-# If it is likely or even possible that the tag does
-# already exist, this method will be less efficient than
-# getTagnameidCreate.
+# If you _don't_ have reason to believe that the tag does
+# _not_ already exist, this method will be less efficient
+# than getTagnameidCreate.
 
 sub createTagname {
 	my($self, $name) = @_;
@@ -1532,32 +1532,50 @@
 	my $max_num =         $options->{max_num}         || 100;
 	my $seconds =         $options->{seconds}         || (3600*6);
 	my $include_private = $options->{include_private} || 0;
+	my $min_slice =       $options->{min_slice}       || 0;
+	$min_slice = 0 if !$constants->{plugin}{FireHose};
 
 	# This seems like a horrendous query, but I _think_ it will run
 	# in acceptable time, even under fairly heavy load.
 	# Round off time to the last minute.
-	my $the_time = $self->getTime({ unix_format => 1 });
-	substr($the_time, -2) = '00';
-	my $next_minute_q = $self->sqlQuote( time2str( '%Y-%m-%d %H:%M:00', $the_time + 60, 'GMT') );
+	my $now_ut = $self->getTime({ unix_format => 1 });
+	my $next_minute_ut = int($now_ut/60+1)*60;
+	my $next_minute_q = $self->sqlQuote( time2str( '%Y-%m-%d %H:%M:00', $next_minute_ut, 'GMT') );
 	my $private_clause = $include_private ? '' : " AND private='no'";
+
+	# If we are asked to only look at tags on firehose items of a
+	# particular color slice or better, then 
+	my $slice_table_clause = '';
+	my $slice_where_clause = '';
+	if ($min_slice) {
+		$slice_table_clause = ', firehose';
+		my $firehose_reader = getObject('Slash::FireHose', { db_type => 'reader' });
+		my $min_pop = $firehose_reader->getMinPopularityForColorLevel($min_slice);
+		$slice_where_clause =
+			"AND tags.globjid=firehose.globjid
+			 AND firehose.popularity >= $min_pop";
+	}
+
 	my $ar = $self->sqlSelectAllHashrefArray(
 		"tagnames.tagname AS tagname,
 		 tags.tagid AS tagid,
 		 tags.tagnameid AS tagnameid,
 		 users_info.uid AS uid,
-		 UNIX_TIMESTAMP($next_minute_q) - UNIX_TIMESTAMP(tags.created_at) AS secsago",
+		 $next_minute_ut - UNIX_TIMESTAMP(tags.created_at) AS secsago",
 		"users_info,
 		 tags LEFT JOIN tag_params
 		 	ON (tags.tagid=tag_params.tagid AND tag_params.name='tag_clout'),
 		 tagnames LEFT JOIN tagname_params
-			ON (tagnames.tagnameid=tagname_params.tagnameid AND tagname_params.name='tag_clout')",
+			ON (tagnames.tagnameid=tagname_params.tagnameid AND tagname_params.name='tag_clout')
+		 $slice_table_clause",
 		"tagnames.tagnameid=tags.tagnameid
 		 AND tags.uid=users_info.uid
 		 AND inactivated IS NULL $private_clause
 		 AND tags.created_at >= DATE_SUB($next_minute_q, INTERVAL $seconds SECOND)
 		 AND users_info.tag_clout > 0
 		 AND IF(tag_params.value     IS NULL, 1, tag_params.value)     > 0
-		 AND IF(tagname_params.value IS NULL, 1, tagname_params.value) > 0");
+		 AND IF(tagname_params.value IS NULL, 1, tagname_params.value) > 0
+		 $slice_where_clause");
 	return [ ] unless $ar && @$ar;
 	$self->addCloutsToTagArrayref($ar, $clout_type);
 
@@ -1956,7 +1974,7 @@
 
 sub getExcludedTags {
 	my($self) = @_;
-	return $self->getTagnamesByParam('excluded', '1');
+	return $self->getTagnamesByParam('exclude', '1');
 }
 
 sub getNegativeTags {

Modified: slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql
===================================================================
--- slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/plugins/Tags/mysql_dump.sql	2008-01-15 17:47:28 UTC (rev 414)
@@ -1,9 +1,10 @@
 #
-# $Id: mysql_dump.sql,v 1.32 2007/12/11 22:38:40 jamiemccarthy Exp $
+# $Id: mysql_dump.sql,v 1.33 2008/01/09 20:04:51 jamiemccarthy Exp $
 #
 
 INSERT INTO vars (name, value, description) VALUES ('memcached_exptime_tags', '3600', 'Seconds to cache tag data in memcached');
 INSERT INTO vars (name, value, description) VALUES ('memcached_exptime_tags_brief', '300', 'Seconds to cache tag data that only needs brief caching, in memcached');
+INSERT INTO vars (name, value, description) VALUES ('tags_active_mincare', '5', 'Minimum color slice number to "care" about tags for the Slashdot Recent Tags box (only matters if FireHose installed and if you are Slashdot)');
 INSERT INTO vars (name, value, description) VALUES ('tags_admin_private_tags', '', 'List of tags separated by | that are private for admins');
 INSERT INTO vars (name, value, description) VALUES ('tags_admin_autoaddstorytopics', '1', 'Auto-add tags for story topic keywords?');
 INSERT INTO vars (name, value, description) VALUES ('tags_cache_expire', '180', 'Local data cache expiration for tags');

Modified: slashjp/branches/upstream/current/sbin/portald
===================================================================
--- slashjp/branches/upstream/current/sbin/portald	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/sbin/portald	2008-01-15 17:47:28 UTC (rev 414)
@@ -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: portald,v 1.50 2007/01/25 16:26:53 tvroom Exp $
+# $Id: portald,v 1.51 2008/01/09 18:07:20 entweichen Exp $
 
 ###############################################################################
 # portald  - this is the "daemon" responsible for retrieving portal and site
@@ -69,9 +69,9 @@
 
 ################################################################################
 
-sub getTop10Comments {
+sub getTopComments {
 	my $constants = getCurrentStatic();
-	my $A =	$backupdb->getTop10Comments;
+	my $A =	$backupdb->getTopComments;
 
 	my $moddb = getObject("Slash::$constants->{m1_pluginname}");
 	my $reasons = $moddb->getReasons;
@@ -90,7 +90,7 @@
 EOT
 	}
 	$block .= '</ul>';
-	setblock('top10comments', $block);
+	setblock('topcomments', $block);
 
 }
 

Modified: slashjp/branches/upstream/current/sql/mysql/defaults.sql
===================================================================
--- slashjp/branches/upstream/current/sql/mysql/defaults.sql	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/sql/mysql/defaults.sql	2008-01-15 17:47:28 UTC (rev 414)
@@ -3,7 +3,7 @@
 #--------------------------------------------------------
 # Server version	3.23.26-beta-log
 #
-# $Id: defaults.sql,v 1.383 2007/12/20 22:06:55 pudge Exp $
+# $Id: defaults.sql,v 1.385 2008/01/09 21:02:35 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_188','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_189','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?');
@@ -1095,8 +1095,8 @@
 INSERT INTO vars (name, value, description) VALUES ('titlebar_width','100%','The width of the titlebar');
 INSERT INTO vars (name, value, description) VALUES ('tokenspercomment','6','Number of tokens to feed the system for each comment');
 INSERT INTO vars (name, value, description) VALUES ('tokensperpoint','8','Number of tokens per point');
-INSERT INTO vars (name, value, description) VALUES ('top10comm_days','1','Look back (n) days to display the Top 10 Comments slashbox');
-INSERT INTO vars (name, value, description) VALUES ('top10comm_num','10','Number of comments wanted for the Top 10 Comments slashbox (if not 10, you ought to rename it maybe)');
+INSERT INTO vars (name, value, description) VALUES ('topcomm_days','1','Look back (n) days to display the Hot Comments slashbox');
+INSERT INTO vars (name, value, description) VALUES ('topcomm_num','5','Number of comments wanted for the Hot Comments slashbox. Defaults to 5.');
 INSERT INTO vars (name, value, description) VALUES ('top_sid','','The sid of the most recent story on the homepage');
 INSERT INTO vars (name, value, description) VALUES ('topiclist_ignore_prefix', '', 'prefix of any topic keywords that should not show up on topic list or hierarchy, leave blank if you don\'t want any ignored');
 INSERT INTO vars (name, value, description) VALUES ('totalComments','0','Total number of comments posted');

Modified: slashjp/branches/upstream/current/sql/mysql/slashschema_create.sql
===================================================================
--- slashjp/branches/upstream/current/sql/mysql/slashschema_create.sql	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/sql/mysql/slashschema_create.sql	2008-01-15 17:47:28 UTC (rev 414)
@@ -4,7 +4,7 @@
 #--------------------------------------------------------
 # Server version	3.23.26-beta
 #
-# $Id: slashschema_create.sql,v 1.255 2007/10/30 20:30:08 tvroom Exp $
+# $Id: slashschema_create.sql,v 1.256 2008/01/07 16:16:52 jamiemccarthy Exp $
 #
 
 #
@@ -38,7 +38,7 @@
 	dat varchar(254),
 	uid mediumint UNSIGNED NOT NULL,
 	ts datetime DEFAULT '1970-01-01 00:00:00' NOT NULL,
-	query_string varchar(50),
+	query_string varchar(254),
 	user_agent varchar(50),
 	skid SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
 	bytes mediumint UNSIGNED DEFAULT 0 NOT NULL,

Modified: slashjp/branches/upstream/current/sql/mysql/upgrades
===================================================================
--- slashjp/branches/upstream/current/sql/mysql/upgrades	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/sql/mysql/upgrades	2008-01-15 17:47:28 UTC (rev 414)
@@ -10,7 +10,7 @@
 #      after X started at the same time that X was tagged.
 
 #
-# $Id: upgrades,v 1.1293 2007/12/20 22:05:51 pudge Exp $
+# $Id: upgrades,v 1.1297 2008/01/09 21:02:36 pudge Exp $
 #
 
 # BEGIN tf23's additions 
@@ -463,7 +463,7 @@
 ALTER TABLE vars CHANGE COLUMN name name varchar(48) DEFAULT '' NOT NULL;
 INSERT INTO vars (name, value, description) VALUES ('lonetags','P|LI|BR|IMG','Tags that don\'t need to be closed');
 
-INSERT INTO vars (name, value, description) VALUES ('top10comm_num','10','Number of comments wanted for the Top 10 Comments slashbox (if not 10, you ought to rename it maybe)');
+INSERT INTO vars (name, value, description) VALUES ('topcomm_num','5','Number of comments wanted for the Hot Comments slashbox. Defaults to 5.');
 INSERT INTO vars (name, value, description) VALUES ('anon_name_alt','An anonymous coward','Name of anonymous user to be displayed in stories');
 
 # End of T_2_3_0_28, Start of T_2_3_0_29
@@ -2480,7 +2480,7 @@
 UPDATE vars SET name='m1_pointgrant_factor_upfairratio', description='Factor of upmods fairness ratio in deciding who is eligible for moderation (1=irrelevant, 2=top user twice as likely)' WHERE name='m1_pointgrant_factor_fairratio';
 INSERT INTO vars (name,value,description) SELECT 'm1_pointgrant_factor_downfairratio', value, 'Factor of downmods fairness ratio in deciding who is eligible for moderation (1=irrelevant, 2=top user twice as likely)' FROM vars WHERE name='m1_pointgrant_factor_upfairratio';
 
-INSERT INTO vars (name, value, description) VALUES ('top10comm_days','1','Look back (n) days to display the Top 10 Comments slashbox');
+INSERT INTO vars (name, value, description) VALUES ('topcomm_days','1','Look back (n) days to display the Hot Comments slashbox');
 INSERT INTO vars (name, value, description) VALUES ('dbs_revive_seconds','30','After a DB goes from isalive=no to yes, ramp up accesses to it over how many seconds?');
 
 # Only run these on your search db.  If the latter throws a
@@ -5074,13 +5074,11 @@
 # 2007-12-13
 UPDATE vars SET value = 'T_2_5_0_187' WHERE name = 'cvs_tag_currentcode';
 
-# SLASHCODE/USEPERL LAST UPDATED HERE
+# for plugins/Metamod
+INSERT INTO vars (name, value, description) VALUES ('m2_only_perdec', '10', 'What perdecage of mods should get M2d? 1=1/10th, 10=all');
 
 # SLASHDOT LAST UPDATED HERE
 
-# for plugins/Metamod
-INSERT INTO vars (name, value, description) VALUES ('m2_only_perdec', '10', 'What perdecage of mods should get M2d? 1=1/10th, 10=all');
-
 # for plugins/Tags
 # perl -MSlash::Test=virtusername -le 'map { $tags->setTagname($_, { exclude => 1 }) } map { $tags->getTagnameidCreate($_) } split / /, $constants->{tagbox_top_excludetagnames}; map { $tags->setTagname($_, { posneg => "-" }) } map { $tags->getTagnameidCreate($_) } split ",", $constants->{tags_negative_tagnames}; $tags->setTagname($tags->getTagnameidCreate("nod"), { posneg => "+" }); map { $tags->setTagname($_, { popup => 1, posneg => "+" }) } map { $tags->getTagnameidCreate($_) } qw(interesting fresh funny insightful); map { $tags->setTagname($_, { popup => 1, posneg => "-" }) } map { $tags->getTagnameidCreate($_) } qw(binspam dupe notthebest offtopic stupid slownewsday stale)'
 DELETE FROM vars WHERE name IN ('tagbox_top_excludetagnames', 'tags_negative_tagnames');
@@ -5088,3 +5086,18 @@
 # 2007-12-20
 UPDATE vars SET value = 'T_2_5_0_188' WHERE name = 'cvs_tag_currentcode';
 
+# SLASHCODE/USEPERL LAST UPDATED HERE
+
+ALTER TABLE accesslog CHANGE query_string query_string VARCHAR(254) DEFAULT NULL;
+
+# For portald and the Hot Comments slashbox.
+UPDATE vars SET name = 'topcomm_num', value = 5, description = 'Number of comments wanted for the Hot Comments slashbox. Defaults to 5.' WHERE name = 'top10comm_num';
+UPDATE vars SET name = 'topcomm_days', description = 'Look back (n) days to display the Hot Comments slashbox' WHERE name = 'top10comm_days';
+UPDATE blocks SET bid = 'topcomments', title = 'Hot Comments' WHERE bid = 'top10comments';
+
+# for plugins/Tags
+INSERT INTO vars (name, value, description) VALUES ('tags_active_mincare', '5', 'Minimum color slice number to "care" about tags for the Slashdot Recent Tags box (only matters if FireHose installed and if you are Slashdot)');
+
+# 2007-01-09
+UPDATE vars SET value = 'T_2_5_0_189' WHERE name = 'cvs_tag_currentcode';
+

Modified: slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm
===================================================================
--- slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm	2008-01-15 17:47:28 UTC (rev 414)
@@ -2,7 +2,7 @@
 # This code is a part of Slash, and is released under the GPL.
 # Copyright 1997-2005 by Open Source Technology Group. See README
 # and COPYING for more information, or see http://slashcode.com/.
-# $Id: Despam.pm,v 1.4 2007/12/12 22:01:57 jamiemccarthy Exp $
+# $Id: Despam.pm,v 1.5 2008/01/07 16:17:56 jamiemccarthy Exp $
 
 package Slash::Tagbox::Despam;
 
@@ -28,7 +28,7 @@
 use Data::Dumper;
 
 use vars qw( $VERSION );
-$VERSION = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
+$VERSION = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 use base 'Slash::DB::Utility';	# first for object init stuff, but really
 				# needs to be second!  figure it out. -- pudge
@@ -151,8 +151,8 @@
 	my $submitter_uid = $fhitem->{uid};
 	my $submitter_srcid = $fhitem->{srcid_32};
 
-	main::tagboxLog(sprintf("%s->run marking fhid %d as is_spam", ref($self), $fhid));
-	$slashdb->sqlUpdate('firehose', { is_spam => 'yes' }, "id=$fhid");
+	main::tagboxLog(sprintf("%s->run marking fhid %d (%d) as is_spam", ref($self), $fhid, $affected_id));
+	$firehose_db->setFireHose($fhid, { is_spam => 'yes' });
 
 	if (isAnon($submitter_uid)) {
 		# Non-logged-in user, check by IP (srcid_32)

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

Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl	2008-01-15 17:47:28 UTC (rev 414)
@@ -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: users.pl,v 1.343 2007/11/29 20:31:50 tvroom Exp $
+# $Id: users.pl,v 1.344 2008/01/09 19:55:15 jamiemccarthy Exp $
 
 use strict;
 use Digest::MD5 'md5_hex';
@@ -3594,6 +3594,8 @@
 		$ipid_karma = $reader->getNetIDKarma("ipid", $ipid) if $ipid;
 	}
 
+	my $clout_types_ar = [ sort grep /\D/, keys %{$slashdb->getCloutTypes} ];
+
 	return slashDisplay('getUserAdmin', {
 		field			=> $field,
 		useredit		=> $user_edit,
@@ -3623,7 +3625,9 @@
 		proxy_check		=> $proxy_check,
 		subnet_karma		=> $subnet_karma,
 		ipid_karma		=> $ipid_karma,
-		post_restrictions	=> $post_restrictions
+		post_restrictions	=> $post_restrictions,
+
+		clout_types_ar		=> $clout_types_ar,
 	}, 1);
 }
 

Modified: slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql	2008-01-15 17:47:28 UTC (rev 414)
@@ -4,7 +4,7 @@
 #--------------------------------------------------------
 # Server version	3.23.26-beta-log
 #
-# $Id: datadump.sql,v 1.53 2007/11/13 17:25:04 jamiemccarthy Exp $
+# $Id: datadump.sql,v 1.54 2008/01/09 18:34:48 entweichen Exp $
 #
 
 
@@ -35,7 +35,7 @@
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('index_qlinks','<!-- begin quicklinks block -->\r\n\r\nYou should put some links here to other sites that your users might enjoy.\r\n\r\n<!-- end quicklinks block -->\r\n\r\n',10000,'static',NULL,'mainpage',7,'Quick Links',1,NULL,NULL,0);
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('mysite','By editing the section called \"User Space\" on the user\r\npreferences page, you can cause this space to be filled\r\nwith some HTML code. Personal URLs?  Your Credit Card\r\nNumbers and Social Security numbers?  Well, maybe you\r\nbetter stick to URLs.\r\n',10000,'static',NULL,'mainpage',-10,'User Space',1,NULL,NULL,0);
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('poll','<FORM ACTION=\"//www.example.com/pollBooth.pl\">\r\n	<INPUT TYPE=\"hidden\" NAME=\"qid\" VALUE=\"1\"\r\n<B>Are you happy?</B>\r\n<BR><INPUT TYPE=\"radio\" NAME=\"aid\" VALUE=\"1\">No\r\n<BR><INPUT TYPE=\"radio\" NAME=\"aid\" VALUE=\"2\">Yes\r\n<BR><INPUT TYPE=\"radio\" NAME=\"aid\" VALUE=\"3\">thorazine\r\n<BR><INPUT TYPE=\"radio\" NAME=\"aid\" VALUE=\"4\">apathy\r\n<BR><INPUT TYPE=\"radio\" NAME=\"aid\" VALUE=\"5\">manic depressive\r\n<BR><INPUT TYPE=\"submit\" VALUE=\"Vote\"> [ <A HREF=\"//www.example.com/pollBooth.pl?qid=1&aid=-1\"><B>Results</B></A> | <A HREF=\"//www.example.com/pollBooth.pl?\"><B>Polls</B></A>  ] <BR>\r\nComments:<B>0</B> | Votes:<B>43</B>\r\n</FORM>\r\n',1000,'portald',NULL,'mainpage',2,'Poll',1,NULL,NULL,0);
-INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('top10comments','',500,'portald','','mainpage',0,'10 Hot Comments',1,'',NULL,0);
+INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('topcomments','',500,'portald','','mainpage',0,'Hot Comments',1,'',NULL,0);
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve, all_skins) VALUES ('userlogin','',1000,'static','','mainpage',4,'Login',1,NULL,NULL,0,1);
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('newestthree','<!-- newestthree -->',100,'static','','',0,'Newest Three',1,NULL,NULL,0);
 INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('recenttopics','none yet',500,'static','Recent Topics','mainpage',0,'Recent Topics',1,'',NULL,0);

Modified: slashjp/branches/upstream/current/themes/slashcode/tasks/ircslash.pl
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/tasks/ircslash.pl	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/themes/slashcode/tasks/ircslash.pl	2008-01-15 17:47:28 UTC (rev 414)
@@ -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: ircslash.pl,v 1.45 2007/09/21 15:21:14 jamiemccarthy Exp $
+# $Id: ircslash.pl,v 1.46 2008/01/09 21:00:06 pudge Exp $
 
 use strict;
 
@@ -14,12 +14,12 @@
 use Slash::Utility;
 
 use vars qw(
-	%task	$me	$task_exit_flag	$parent_pid	$has_proc_processtable
-	$hushed	%stoid	$clean_exit_flag	%success
-	$irc	$conn	$nick	$channel
-	$jnick	$jabber	$jconn	$jtime	$jid	$jserver	$jchannel	$jchanserver
-	$remarks_active	$next_remark_id	$next_handle_remarks
-	$shifts
+        %task   $me     $task_exit_flag $parent_pid $has_proc_processtable
+        $hushed %stoid  $clean_exit_flag %success
+        $irc    $conn   $nick   $channel
+        $jname  $jnick  $jabber $jconn  $jtime  $jid $juserserver $jserver $jchannel $jchanserver
+        $remarks_active $next_remark_id $next_handle_remarks
+        $shifts
 );
 
 $! = 0;
@@ -136,20 +136,24 @@
 
 	require Net::Jabber;
 
-	$jserver =	$constants->{jabberslash_server}
+	$jserver =      $constants->{jabberslash_server}
 				|| 'jabber.org';
-	my $port =	$constants->{jabberslash_port}
+	$juserserver =  $constants->{jabberslash_user_server}
+				|| $jserver;
+	my $port =      $constants->{jabberslash_port}
 				|| 5222;
-	my $jname =	$constants->{jabberslash_ircname}
+	$jname =        $constants->{jabberslash_ircname}
 				|| "$constants->{sitename} slashd";
-	$jnick =	$constants->{jabberslash_nick}
+	$jnick =        $constants->{jabberslash_nick}
 				|| $constants->{ircslash_nick}
 				|| ( map { s/\W+//g; $_ } $jname )[0];
-	my $password =	$constants->{jabberslash_password}
+	my $password =  $constants->{jabberslash_password}
 				|| '';
-	my $tls =	$constants->{jabberslash_tls}
+	my $tls =       $constants->{jabberslash_tls}
 				|| 0;
 
+	$jtime = timeCalc(scalar(localtime(time())), '%Y-%m-%d %H:%M:%S', 0);
+
 	$jabber = new Net::Jabber::Client (
 #		debuglevel	=> 2,
 #		debugfile	=> 'stdout',
@@ -250,8 +254,10 @@
 	# we want to msg ourselves to catch the current time from the
 	# Jabber server, so we can skip messages from the channel log
 	# when we enter the channel
+	my $to = "$jchannel\@$jchanserver/$jnick";
+	slashdLog("sending to: $to");
 	$jabber->MessageSend(
-		to		=> "$jchannel\@$jserver/$jnick",
+		to		=> $to,
 		type		=> 'chat',
 		body		=> 'timestamp',
 	);
@@ -272,6 +278,7 @@
 	my $fromJID = $message->GetFrom('jid');
 	my $from = $fromJID->GetResource;
 	my $body = $message->GetBody;
+	#slashdLog("msg: [$from] $body");
 
 	return if !$from || !$body;
 
@@ -280,10 +287,11 @@
 	eval { $time = $message->GetTimeStamp };
 	if ($time) {
 		$time = timeCalc($time, '%Y-%m-%d %H:%M:%S', 0);
+		#slashdLog("time: $time");
 
 		# save time we enter the channel, if timestamp message
 		if ($from eq $jnick && $body eq 'timestamp') {
-			print "Setting timestamp to $time\n";
+			slashdLog("Setting timestamp to $time");
 			$jtime = $time;
 			return;
 		}
@@ -414,9 +422,9 @@
 
 			for my $to (keys %users) {
 				if ($to =~ m|(\w+)/(\w+)|) {
-					$to = "$1\@$jserver/$2";
+					$to = "$1\@$juserserver/$2";
 				} else {
-					$to = "$to\@$jserver";
+					$to = "$to\@$juserserver";
 				}
 				push @to, $to;
 			}

Modified: slashjp/branches/upstream/current/themes/slashcode/templates/getUserAdmin;users;default
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/templates/getUserAdmin;users;default	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/themes/slashcode/templates/getUserAdmin;users;default	2008-01-15 17:47:28 UTC (rev 414)
@@ -9,6 +9,7 @@
 * nickname_checked = whether or not nickname is checked
 * author_flag = current user is author
 * authoredit_flag = current user can edit authors
+* clout_types_ar = arrayref of alphabetic clout types
 
 __title__
 users admin
@@ -152,10 +153,16 @@
 			[% IF useredit.uid %]
 				<b>Tokens:</b>
 				<input type="text" name="tokens" size="6" value="[% useredit.tokens | strip_attribute %]">&nbsp;&nbsp;
-				<b>Tagclout:</b>
-				<input type="text" name="tag_clout" size="6" value="[% useredit.tag_clout | strip_attribute %]">&nbsp;&nbsp;
 				<b>M2Info:</b>
 				<input type="text" name="m2info" value="[% useredit.m2info | strip_attribute %]">
+
+				<p><b>Clout, Manual:</b>
+				<input type="text" name="tag_clout" size="6" value="[% useredit.tag_clout | strip_attribute %]">&nbsp;&nbsp;
+				<b>Automated:</b>
+				[% FOREACH clout_type IN clout_types_ar %]
+				&nbsp;[% clout_type %]
+				[% useredit.clout.$clout_type.defined ? useredit.clout.$clout_type : '(none)' %]
+				[% END %]
 			[% END %]
 				<p>
 				<input type="submit" name="saveuseradmin" value="Save [% IF useredit.nickname; useredit.nickname | strip_attribute; END %]" class="button">
@@ -295,4 +302,4 @@
 __seclev__
 10000
 __version__
-$Id: getUserAdmin;users;default,v 1.79 2006/11/16 17:01:12 tvroom Exp $
+$Id: getUserAdmin;users;default,v 1.80 2008/01/09 19:55:15 jamiemccarthy Exp $

Modified: slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default
===================================================================
--- slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default	2008-01-11 08:15:10 UTC (rev 413)
+++ slashjp/branches/upstream/current/themes/slashcode/templates/printCommentsMain;misc;default	2008-01-15 17:47:28 UTC (rev 414)
@@ -20,7 +20,9 @@
 printCommentsMain
 __template__
 [% horiz = 0; rooted = 0;
-   IF user.comments_control;
+   IF gSkin.name == 'idle';
+   	horiz = 1;
+   ELSIF user.comments_control;
    	rooted = 1 IF user.comments_control == 'rooted';
    	horiz = 1 IF rooted || user.comments_control == 'horizontal';
    ELSE;
@@ -302,4 +304,4 @@
 __seclev__
 10000
 __version__
-$Id: printCommentsMain;misc;default,v 1.98 2007/12/03 23:47:50 pudge Exp $
+$Id: printCommentsMain;misc;default,v 1.99 2008/01/07 16:25:17 scc Exp $


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