svnno****@sourc*****
svnno****@sourc*****
2008年 2月 8日 (金) 15:23:53 JST
Revision: 500 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=500 Author: tach Date: 2008-02-08 15:23:49 +0900 (Fri, 08 Feb 2008) Log Message: ----------- merged from upstream T_2_5_0_193 Modified Paths: -------------- slashjp/branches/upstream/current/Slash/Apache/User/User.pm slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm slashjp/branches/upstream/current/Slash/Slash.pm slashjp/branches/upstream/current/Slash/Utility/Data/Data.pm slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm 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_authors;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_messages;ajax;default slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_sectional;ajax;default slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_slashboxes;ajax;default slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;ajax;default slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm slashjp/branches/upstream/current/plugins/FireHose/firehose.css slashjp/branches/upstream/current/plugins/FireHose/templates/firehose_tabs;misc;default slashjp/branches/upstream/current/plugins/FireHose/templates/nodnix_menus;firehose;default slashjp/branches/upstream/current/plugins/Login/templates/changePasswd;login;default slashjp/branches/upstream/current/plugins/Login/templates/newUserForm;login;default slashjp/branches/upstream/current/plugins/PollBooth/templates/pollplug;misc;default slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/AL2.pm slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm slashjp/branches/upstream/current/plugins/Stats/adminmail.pl slashjp/branches/upstream/current/plugins/Subscribe/subscribe.pl slashjp/branches/upstream/current/plugins/Tags/Tags.pm slashjp/branches/upstream/current/sql/mysql/defaults.sql slashjp/branches/upstream/current/sql/mysql/upgrades slashjp/branches/upstream/current/themes/slashcode/htdocs/badge.pl slashjp/branches/upstream/current/themes/slashcode/htdocs/base.css slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl slashjp/branches/upstream/current/themes/slashcode/htdocs/images/comments.js slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl slashjp/branches/upstream/current/themes/slashcode/tasks/process_file_queue.pl slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default slashjp/branches/upstream/current/themes/slashcode/templates/html-header;misc;default slashjp/branches/upstream/current/themes/slashcode/templates/newUserForm;users;default slashjp/branches/upstream/current/themes/slashcode/templates/prefs_titlebar;misc;default slashjp/branches/upstream/current/themes/slashcode/templates/titles;users;default Added Paths: ----------- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/nodnix.js slashjp/branches/upstream/current/plugins/Ajax/htdocs/preferences.pl slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default -------------- next part -------------- Modified: slashjp/branches/upstream/current/Slash/Apache/User/User.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Apache/User/User.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/Slash/Apache/User/User.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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: User.pm,v 1.169 2007/12/06 02:24:42 jamiemccarthy Exp $ +# $Id: User.pm,v 1.170 2008/02/07 17:21:59 entweichen Exp $ package Slash::Apache::User; @@ -24,7 +24,7 @@ @ISA = qw(DynaLoader); $VERSION = '2.003000'; # v2.3.0 -($REVISION) = ' $Revision: 1.169 $ ' =~ /\$Revision:\s+([^\s]+)/; +($REVISION) = ' $Revision: 1.170 $ ' =~ /\$Revision:\s+([^\s]+)/; bootstrap Slash::Apache::User $VERSION; @@ -710,8 +710,13 @@ my $filter = fixparam("user:"); $r->args("op=userfirehose"); $r->uri('users.pl'); - $r->filename($constants->{basedir} . '/users.pl') + $r->filename($constants->{basedir} . '/users.pl'); + } elsif ($op eq 'preferences') { + $r->args("op=displayprefs"); + $r->uri('/preferences.pl'); + $r->filename($constants->{basedir} . '/preferences.pl'); + } else { $r->args("op=edituser"); $r->uri('/users.pl'); Modified: slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm =================================================================== --- slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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.1003 2008/01/30 22:38:59 jamiemccarthy Exp $ +# $Id: MySQL.pm,v 1.1005 2008/02/07 16:52:27 tvroom Exp $ package Slash::DB::MySQL; use strict; @@ -20,7 +20,7 @@ use base 'Slash::DB::Utility'; use Slash::Constants ':messages'; -($VERSION) = ' $Revision: 1.1003 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.1005 $ ' =~ /\$Revision:\s+([^\s]+)/; # Fry: How can I live my life if I can't tell good from evil? @@ -3411,6 +3411,14 @@ ######################################################## sub deleteStory { my($self, $id) = @_; + my $constants = getCurrentStatic(); + if ($constants->{plugin}{FireHose}) { + my $stoid = $self->getStoidFromSidOrStoid($id); + my $firehose = getObject("Slash::FireHose"); + my $globjid = $self->getGlobjidCreate("stories", $stoid); + my $fhid = $firehose->getFireHoseIdFromGlobjid($globjid); + $firehose->setFireHose($fhid, { public => "no", rejected => "yes"}); + } return $self->setStory($id, { in_trash => 'yes' }); } @@ -6140,7 +6148,7 @@ my $possible_chop = !$opt->{full} && !($opt->{mode} && $opt->{mode} eq 'archive'); my $abbreviate_ok = $opt->{discussion2} && $possible_chop; my $abbreviate_len = 256; - my $max_len = $user->{maxcommentsize}; + my $max_len = $constants->{default_maxcommentsize}; # We have to get the comment text we need (later we'll search/replace # them into the text). @@ -6157,8 +6165,7 @@ my $mcd = $self->getMCD(); $mcd = undef if $opt->{mode} && $opt->{mode} eq 'archive' - || $user->{domaintags} != 2 - || $user->{maxcommentsize} != $constants->{default_maxcommentsize}; + || $user->{domaintags} != 2; # loop here, pull what cids we can my($mcd_debug, $mcdkey, $mcdkey_abbrev, $mcdkey_full, $mcdkeylen); Modified: slashjp/branches/upstream/current/Slash/Slash.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Slash.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/Slash/Slash.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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: Slash.pm,v 1.345 2008/01/31 20:16:26 pudge Exp $ +# $Id: Slash.pm,v 1.347 2008/02/07 21:25:05 pudge Exp $ package Slash; @@ -77,6 +77,8 @@ my $discussion2 = discussion2($user); +#slashProf("sC setup"); + # it's a bit of a drag, but ... oh well! # print_cchp gets messed up with d2, so we just punt and have # selectComments called twice if necessary, the first time doing @@ -121,11 +123,14 @@ one_cid_only => $options->{one_cid_only}, }; $gcfu_opt->{discussion2} = $discussion2; +#slashProf("sC getCommentsForUser"); if ($options->{force_read_from_master}) { $thisComment = $slashdb->getCommentsForUser($discussion->{id}, $cid, $gcfu_opt); } else { $thisComment = $reader->getCommentsForUser($discussion->{id}, $cid, $gcfu_opt); } +#slashProf("", "sC getCommentsForUser"); +#slashProfBail() if $cid || @$thisComment < 100; if (!$thisComment) { _print_cchp($discussion); @@ -165,6 +170,7 @@ } } +#slashProf("sC main sort", "sC setup"); my($oldComment, %old_comments); # XXXd2 disable for sub-threads for now ($cid) if ($discussion2 && !$cid && !$options->{no_d2}) { @@ -229,6 +235,8 @@ } @$thisComment; } } +##slashProf("sC fudging", "sC main sort"); +#slashProf("", "sC main sort"); # This loop mainly takes apart the array and builds # a hash with the comments in it. Each comment is @@ -267,6 +275,7 @@ # Just a point rule -Brian $user->{points} = 0 if $C->{uid} == $user->{uid}; # Mod/Post Rule } +##slashProf("sC more fudging", "sC fudging"); # After that loop, there may be comments in the $comments hashref # which have no visible parents and thus which incremented an @@ -282,6 +291,7 @@ my $count = @$thisComment; +##slashProf("sC counting", "sC more fudging"); # Cascade comment point totals down to the lowest score, so # (2, 1, 3, 5, 4, 2, 1) becomes (18, 16, 15, 12, 7, 3, 1). # We do a bit of a weird thing here, returning this data in @@ -295,8 +305,12 @@ _print_cchp($discussion, $count, $comments->{0}{totals}); +##slashProf("sC reparenting", "sC counting"); +#slashProf("sC reparenting"); reparentComments($comments, $reader, $options); +##slashProf("sC d2 fudging", "sC reparenting"); +#slashProf("", "sC reparenting"); if ($oldComment) { for my $cid (sort { $a <=> $b } keys %$comments) { my $C = $comments->{$cid}; @@ -329,10 +343,13 @@ } } +##slashProf("", "sC d2 fudging"); + return($comments, $count); } 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 @@ -428,6 +445,7 @@ (my $url = $constants->{run_ads_inline_comments}) =~ s/<topic>/$gSkin->{name}/g; $extra .= "adTimerUrl = '$url';\n"; } +#slashProf("", "jsSelectComments"); return <<EOT; comments = $anon_comments; @@ -917,6 +935,9 @@ my $discussion2 = discussion2($user); +#slashProfInit(); +#slashProf("printComments: $discussion2, $discussion->{id}"); + if ($discussion2 && $user->{mode} ne 'metamod') { $user->{mode} = $form->{mode} = 'thread'; $user->{commentsort} = 0; @@ -943,7 +964,9 @@ # read it here, don't use the one_cid_only optimization feature. $sco->{one_cid_only} = 0; +#slashProf("selectComments"); my($comments, $count) = selectComments($discussion, $cidorpid, $sco); +#slashProf("", "selectComments"); if ($discussion2) { $user->{state}{selectComments} = { comments => $comments, @@ -989,6 +1012,7 @@ slashDisplay('printCommNoArchive', { discussion => $discussion }); } +#slashProf("printCommentsMain"); slashDisplay('printCommentsMain', { comments => $comments, title => $discussion->{title}, @@ -999,6 +1023,7 @@ pid => $pid, lvl => $lvl, }); +#slashProf("", "printCommentsMain"); return if $user->{state}{nocomment} || $user->{mode} eq 'nocomment'; @@ -1040,6 +1065,7 @@ } } +#slashProf("printCommComments"); my $anon_dump; if ($discussion2) { require Data::JavaScript::Anon; @@ -1064,12 +1090,14 @@ anon_dump => $anon_dump, }, { Return => 1 }); +#slashProf("getCommentTextCached", "printCommComments"); # We have to get the comment text we need (later we'll search/replace # them into the text). my $comment_text = $slashdb->getCommentTextCached( $comments, [ grep { !$comments->{$_}{dummy} } @{$user->{state}{cids}} ], { mode => $form->{mode}, cid => $form->{cid}, discussion2 => $discussion2 } ); +#slashProf("comment regexes", "getCommentTextCached"); # OK we have all the comment data in our hashref, so the search/replace # on the nearly-fully-rendered page will work now. @@ -1079,17 +1107,25 @@ if ($discussion2) { my @abbrev = grep { defined($comments->{$_}{abbreviated}) && $comments->{$_}{abbreviated} != -1 } keys %$comments; my @not_abbrev = grep { defined($comments->{$_}{abbreviated}) && $comments->{$_}{abbreviated} == -1 } keys %$comments; - for my $cid (@abbrev, @not_abbrev) { - $comment_html =~ s|<div id="comment_shrunk_$cid" class="commentshrunk">.+?</div>||; - $comment_html =~ s|<div id="comment_sig_$cid" class="sig hide">|<div id="comment_sig_$cid" class="sig">|; - } + my %abbrev_and_not = map { $_ => 1 } (@abbrev, @not_abbrev); + $comment_html =~ s|(<div id="comment_shrunk_(\d+)" class="commentshrunk">.+?</div>)|$abbrev_and_not{$2} ? '' : $1|eg; + $comment_html =~ s|((<div id="comment_sig_(\d+)" class="sig) hide">)|$abbrev_and_not{$3} ? qq{$2">} : $1|eg; +# for my $cid (@abbrev, @not_abbrev) { +# $comment_html =~ s|<div id="comment_shrunk_$cid" class="commentshrunk">.+?</div>||; +# $comment_html =~ s|<div id="comment_sig_$cid" class="sig hide">|<div id="comment_sig_$cid" class="sig">|; +# } + if (@abbrev) { my $abbrev_comments = join ',', map { "$_:$comments->{$_}{abbreviated}" } @abbrev; $comment_html =~ s|abbrev_comments = {};|abbrev_comments = {$abbrev_comments};|; } } +#slashProf("", "comment regexes"); +#slashProf("", "printComments: $discussion2, $discussion->{id}"); +#slashProfEnd(); + print $comment_html; } @@ -1136,6 +1172,7 @@ =cut sub displayThread { +#slashProf("displayThread"); my($sid, $pid, $lvl, $comments, $const) = @_; my $constants = getCurrentStatic(); my $user = getCurrentUser(); @@ -1296,6 +1333,7 @@ $return .= $const->{cagebigend} if $cagedkids; } } +#slashProf("", "displayThread"); return $return; } @@ -1340,7 +1378,7 @@ my $user = getCurrentUser(); my $form = getCurrentForm(); my $gSkin = getCurrentSkin(); - my $maxcommentsize = $options->{maxcommentsize} || $user->{maxcommentsize}; + my $maxcommentsize = $options->{maxcommentsize} || $constants->{default_maxcommentsize}; my $comment_shrunk; Modified: slashjp/branches/upstream/current/Slash/Utility/Data/Data.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Utility/Data/Data.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/Slash/Utility/Data/Data.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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: Data.pm,v 1.212 2008/01/31 15:17:45 jamiemccarthy Exp $ +# $Id: Data.pm,v 1.214 2008/02/07 00:51:21 pudge Exp $ package Slash::Utility::Data; @@ -62,7 +62,7 @@ $HTML::Tagset::linkElements{slash} = ['src', 'href']; } -($VERSION) = ' $Revision: 1.212 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.214 $ ' =~ /\$Revision:\s+([^\s]+)/; @EXPORT = qw( addDomainTags createStoryTopicData @@ -103,6 +103,7 @@ noFollow regexSid revertQuote + prepareQuoteReply root2abs roundrand set_rootdir @@ -867,7 +868,7 @@ return 1 if md5_hex($passwd) eq $md5; my $slashdb = getCurrentDB(); my $vu = $slashdb->{virtual_user}; - my $salt_ar = Slash::Apache::User::PasswordSalt::getSalts($vu); + my $salt_ar = Slash::Apache::User::PasswordSalt::getPwSalts($vu); for my $salt (reverse @$salt_ar) { return 1 if md5_hex("$salt$passwd") eq $md5; } @@ -1636,6 +1637,23 @@ } +sub prepareQuoteReply { + my($reply) = @_; + my $pid_reply = $reply->{comment} = parseDomainTags($reply->{comment}, 0, 1, 1); + $pid_reply = revertQuote($pid_reply); + + # prep for JavaScript + $pid_reply =~ s|\\|\\\\|g; + $pid_reply =~ s|'|\\'|g; + $pid_reply =~ s|([\r\n])|\\n|g; + + $pid_reply =~ s{<nobr> <wbr></nobr>(\s*)} {$1 || ' '}gie; + #my $nick = strip_literal($reply->{nickname}); + #$pid_reply = "<div>$nick ($reply->{uid}) wrote: <quote>$pid_reply</quote></div>"; + $pid_reply = "<quote>$pid_reply</quote>"; +} + + #======================================================================== =head2 breakHtml(TEXT, MAX_WORD_LENGTH) @@ -4442,4 +4460,4 @@ =head1 VERSION -$Id: Data.pm,v 1.212 2008/01/31 15:17:45 jamiemccarthy Exp $ +$Id: Data.pm,v 1.214 2008/02/07 00:51:21 pudge Exp $ Modified: slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm =================================================================== --- slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/Slash/Utility/Environment/Environment.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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.229 2008/01/28 14:45:31 jamiemccarthy Exp $ +# $Id: Environment.pm,v 1.233 2008/02/08 04:27:03 jamiemccarthy Exp $ package Slash::Utility::Environment; @@ -33,7 +33,7 @@ use base 'Exporter'; use vars qw($VERSION @EXPORT); -($VERSION) = ' $Revision: 1.229 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.233 $ ' =~ /\$Revision:\s+([^\s]+)/; @EXPORT = qw( dbAvailable @@ -88,6 +88,7 @@ debugHash slashProf + slashProfBail slashProfInit slashProfEnd @@ -3299,25 +3300,39 @@ } #======================================================================== -{my @prof; +{my($prof_ok, @prof) = (0); sub slashProf { - return unless getCurrentStatic('use_profiling'); + return unless getCurrentStatic('use_profiling') && $prof_ok; my($begin, $end) = @_; $begin ||= ''; $end ||= ''; push @prof, [ Time::HiRes::time(), (caller(0))[0, 1, 2, 3], $begin, $end ]; } +sub slashProfBail { + return unless getCurrentStatic('use_profiling') && $prof_ok; + $prof_ok = 0; +} + sub slashProfInit { return unless getCurrentStatic('use_profiling'); + $prof_ok = 1; @prof = (); } sub slashProfEnd { + my($prefixstr, $silent) = @_; my $use_profiling = getCurrentStatic('use_profiling'); - return unless $use_profiling; - return unless @prof; + return unless $use_profiling && $prof_ok && @prof; + if ($silent) { + # Output is disabled for this profile. And after we + # did all that work! What a shame :) + $prof_ok = 0; + @prof = (); + return; + } + my $first = $prof[0][0]; my $last = $first; # Matthew 20:16 my $end = $prof[-1][0]; @@ -3336,10 +3351,15 @@ local $\; - print STDERR "\n*** Begin profiling ($$)\n"; - print STDERR "*** Begin ordered ($$)\n" if $use_profiling > 1; - printf STDERR <<"EOT", "PID", "what", "this #", "pct", "tot. #", "pct" if $use_profiling > 1; -%-6.6s: %-64.64s % 6.6s $unit (%6.6s%%) / % 6.6s $unit (%6.6s%%) + my $user = getCurrentUser(); + my $vislen = getCurrentStatic('id_md5_vislength') || 5; + my $prefix = sprintf("PROF %d:%d:%s:%s:", + $$, $user->{uid}, substr($user->{ipid}, 0, $vislen), ($prefixstr || '')); + + print STDERR "\n$prefix *** Begin profiling\n"; + print STDERR "$prefix *** Begin ordered\n" if $use_profiling > 1; + printf STDERR <<"EOT", "what", "this #", "pct", "tot. #", "pct" if $use_profiling > 1; +$prefix %-64.64s % 6.6s $unit (%6.6s%%) / % 6.6s $unit (%6.6s%%) EOT my(%totals, %begin); @@ -3388,29 +3408,29 @@ # mark new beginning $begin{$prof->[5]} = $t1 if $prof->[5]; - printf STDERR <<"EOT", $$, $where, $t2, $s2, $t1, $s1 if $use_profiling > 1; -%-6d: %-64.64s % 6d $unit (%6.6s%%) / % 6d $unit (%6.6s%%) + printf STDERR <<"EOT", $where, $t2, $s2, $t1, $s1 if $use_profiling > 1; +$prefix %-64.64s % 6d $unit (%6.6s%%) / % 6d $unit (%6.6s%%) EOT } - print STDERR "\n*** Begin summary ($$)\n"; - printf STDERR <<"EOT", "PID", "what", "time", "pct"; -%-6.6s: %-64.64s % 6.6s $unit (%6.6s%%) + print STDERR "\n*** Begin summary\n"; + printf STDERR <<"EOT", "what", "time", "pct"; +$prefix %-64.64s % 6.6s $unit (%6.6s%%) EOT - printf STDERR <<"EOT", $$, 'total', $total, '100.00'; -%-6d: %-64.64s % 6d $unit (%6.6s%%) + printf STDERR <<"EOT", 'total', $total, '100.00'; +$prefix %-64.64s % 6d $unit (%6.6s%%) EOT for (sort { $totals{$b} <=> $totals{$a} } keys %totals) { my $p = $totals{$_} / $total * 100; my $s = sprintf('%.2f', $p); - printf STDERR <<"EOT", $$, $_, $totals{$_}, $s; -%-6d: %-64.64s % 6d $unit (%6.6s%%) + printf STDERR <<"EOT", $_, $totals{$_}, $s; +$prefix %-64.64s % 6d $unit (%6.6s%%) EOT } + print STDERR "$prefix *** End profiling\n\n"; - print STDERR "*** End profiling ($$)\n\n"; - + $prof_ok = 0; @prof = (); } } @@ -3504,4 +3524,4 @@ =head1 VERSION -$Id: Environment.pm,v 1.229 2008/01/28 14:45:31 jamiemccarthy Exp $ +$Id: Environment.pm,v 1.233 2008/02/08 04:27:03 jamiemccarthy Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/PLUGIN =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/PLUGIN 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/PLUGIN 2008-02-08 06:23:49 UTC (rev 500) @@ -1,4 +1,4 @@ -# $Id: PLUGIN,v 1.34 2008/01/31 16:23:28 entweichen Exp $ +# $Id: PLUGIN,v 1.38 2008/02/07 17:32:03 entweichen Exp $ name=Ajax description="Ajax (Asynchronous Javascript and XML)" mysql_dump=mysql_dump.sql @@ -11,6 +11,7 @@ image=htdocs/images/yui/calrt.gif image=htdocs/images/yui/calx.gif htdoc=htdocs/ajax.pl +htdoc=htdocs/preferences.pl htdoc=htdocs/images/admin.js htdoc=htdocs/images/yui/yahoo.js htdoc=htdocs/images/yui/dom.js @@ -26,20 +27,22 @@ htdoc=htdocs/images/sd_calendar.js htdoc=htdocs/images/slashbox.js htdoc=htdocs/images/common.js +htdoc=htdocs/images/nodnix.js htdoc=htdocs/images/prototype.js htdoc=htdocs/images/sectionprefs.js requiresplugin=ResKey template=templates/ajax_reskey_signoff;misc;default template=templates/ajax_reskey_tag;misc;default template=templates/data;ajax;default -template=templates/sectionpref;ajax;default template=templates/datewidget;misc;default +template=templates/modal_footer;misc;default template=templates/prefs_d2;ajax;default template=templates/prefs_d2_posting;ajax;default template=templates/prefs_messages;ajax;default -template=templates/modal_footer;misc;default template=templates/prefs_user;ajax;default template=templates/prefs_sectional;ajax;default template=templates/prefs_home;ajax;default template=templates/prefs_slashboxes;ajax;default template=templates/prefs_authors;ajax;default +template=templates/prefs_main;ajax;default +template=templates/sectionpref;ajax;default Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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.66 2008/01/18 22:36:50 pudge Exp $ +# $Id: ajax.pl,v 1.67 2008/02/06 16:13:10 entweichen Exp $ use strict; use warnings; @@ -14,7 +14,7 @@ use Slash::Utility; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.66 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.67 $ ' =~ /\$Revision:\s+([^\s]+)/; ################################################################## sub main { @@ -549,8 +549,64 @@ { Return => 1 } ); } elsif ($form->{'section'} eq 'sectional') { + 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} || ""; + + 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 $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 } + ); + + } 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}); + + return + slashDisplay('prefs_authors', { + aid_order => \@aid_order, + author_hr => $author_hr, + story_never_author => \%story_never_author, + tabbed => $form->{'tabbed'}, + }, + { Return => 1 } + ); + } else { + return slashDisplay('prefs_' . $form->{'section'}, { user => $user, @@ -747,6 +803,89 @@ } } + 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 = ( ); + + 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 $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 =~ 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 = ''; + } + + $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} = '' unless defined $user_edits_table->{mylinks}; + + } + + 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}); + } + + $#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 $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, + }; + + } + # Everything but Sections is saved here. if ($params{'formname'} ne "sectional") { $slashdb->setUser($params{uid}, $user_edits_table); Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2008-02-08 06:23:49 UTC (rev 500) @@ -1,5 +1,5 @@ // _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_ -// $Id: common.js,v 1.165 2008/01/31 19:02:35 pudge Exp $ +// $Id: common.js,v 1.167 2008/02/06 15:48:42 entweichen Exp $ // global settings, but a firehose might use a local settings object instead var firehose_settings = {}; @@ -690,99 +690,7 @@ } -var nodmenu = null; -var nixmenu = null; -function get_nod_menu() { - if ( !nodmenu ) - nodmenu = document.getElementById('nodmenu'); - return nodmenu; -} - -function get_nix_menu() { - if ( !nixmenu ) - nixmenu = document.getElementById('nixmenu'); - return nixmenu; -} - - - -var g_elem_for_pending_showmenu = null; -var g_menu_for_pending_showmenu = null; -var g_id_for_pending_showmenu = null; -var g_pending_showmenu = null; -var g_pending_hidemenu = null; - -var g_nodnix_item_id = null; - -function nodnix_tag( tag, up_down ) { - createTag(tag, g_nodnix_item_id, "firehose"); - if ( up_down !== undefined ) - firehose_up_down(g_nodnix_item_id, up_down); -} - -function hide_nod_menu() { - get_nod_menu().style.display = 'none'; -} - -function hide_nix_menu() { - get_nix_menu().style.display = 'none'; -} - -function hide_nodnix_menu( delay ) { - if ( delay == undefined || !delay ) { - hide_nod_menu(); - hide_nix_menu(); - } else { - if ( g_pending_hidemenu ) - clearTimeout(g_pending_hidemenu); - g_pending_hidemenu = setTimeout("hide_nodnix_menu()", delay); - } -} - -function dont_hide_nodnix_menu() { - clearTimeout(g_pending_hidemenu); - g_pending_hidemenu = null; -} - - - -function show_nodnix_menu(elem, id, menu, show_delay, hide_delay) { - if ( show_delay == undefined || !show_delay ) { - var pos = YAHOO.util.Dom.getXY(elem); - menu.style.display = 'block'; - YAHOO.util.Dom.setXY(menu, pos); - g_nodnix_item_id = id; - } else { - g_elem_for_pending_showmenu = elem; - g_menu_for_pending_showmenu = menu; - g_id_for_pending_showmenu = id; - if ( g_pending_showmenu ) - clearTimeout(g_pending_showmenu); - g_pending_showmenu = setTimeout("show_nodnix_menu(g_elem_for_pending_showmenu, g_id_for_pending_showmenu, g_menu_for_pending_showmenu)", show_delay); - } - - if ( hide_delay != undefined && hide_delay != 0 ) { - hide_nodnix_menu(hide_delay); - } -} - -function dont_show_nodnix_menu() { - clearTimeout(g_pending_showmenu); - g_pending_showmenu = null; -} - -function show_nod_menu(elem, id, show_delay, hide_delay) { - hide_nix_menu(); - show_nodnix_menu(elem, id, get_nod_menu(), show_delay, hide_delay); -} - -function show_nix_menu(elem, id, show_delay, hide_delay) { - hide_nod_menu(); - show_nodnix_menu(elem, id, get_nix_menu(), show_delay, hide_delay); -} - - // firehose functions end // helper functions @@ -1545,3 +1453,9 @@ ajaxSaveSlashboxes(); } } + +function displayModalPrefHelp(element) { + var elem = document.getElementById(element); + var vis = elem.style; + vis.display = (!vis.display || vis.display == 'block') ? 'none' : 'block'; +} Added: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/nodnix.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/nodnix.js 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/nodnix.js 2008-02-08 06:23:49 UTC (rev 500) @@ -0,0 +1,156 @@ +// _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_ +// $Id: nodnix.js,v 1.2 2008/02/06 19:14:49 scc Exp $ + +var nodmenu = null; +var nixmenu = null; +var nodnix_listener = null; + +function get_nod_menu() { + if ( !nodmenu ) + nodmenu = document.getElementById('nodmenu'); + return nodmenu; +} + +function get_nix_menu() { + if ( !nixmenu ) + nixmenu = document.getElementById('nixmenu'); + return nixmenu; +} + +function get_nodnix_listener() { + if ( !nodnix_listener ) { + var keylist = new Array(); // must be an actual Array(), not just [], for YUI to do-the-right-thing + keylist.push(YAHOO.util.KeyListener.KEY.SPACE); + keylist.push('!'.charCodeAt(0)); + + var a='A'.charCodeAt(0), z='Z'.charCodeAt(0); + for ( var kc = a; kc <= z; ++kc ) + keylist.push(kc); + + // allow the following when we allow admin commands as well, e.g., #sometag + //keylist.push('_'.charCodeAt(0)); + //keylist.push('#'.charCodeAt(0)); + //keylist.push('_'.charCodeAt(0)); + //keylist.push('*'.charCodeAt(0)); + //keylist.push('+'.charCodeAt(0)); + + nodnix_listener = new YAHOO.util.KeyListener(document, {keys:keylist}, + {fn:begin_nodnix_editing}); + } + return nodnix_listener; +} + + + +var g_elem_for_pending_showmenu = null; +var g_menu_for_pending_showmenu = null; +var g_id_for_pending_showmenu = null; +var g_pending_showmenu = null; +var g_pending_hidemenu = null; + +var g_nodnix_item_id = null; + +function nodnix_tag( tag, up_down ) { + createTag(tag, g_nodnix_item_id, "firehose"); + if ( up_down !== undefined ) + firehose_up_down(g_nodnix_item_id, up_down); +} + +function hide_nod_menu() { + get_nod_menu().style.display = 'none'; +} + +function hide_nix_menu() { + get_nix_menu().style.display = 'none'; +} + +function hide_nodnix_menu( delay ) { + if ( delay == undefined || !delay ) { + hide_nod_menu(); + hide_nix_menu(); + end_nodnix_editing(); + get_nodnix_listener().disable(); + } else { + if ( g_pending_hidemenu ) + clearTimeout(g_pending_hidemenu); + g_pending_hidemenu = setTimeout("hide_nodnix_menu()", delay); + } +} + +function dont_hide_nodnix_menu() { + clearTimeout(g_pending_hidemenu); + g_pending_hidemenu = null; +} + + + +function show_nodnix_menu(elem, id, menu, show_delay, hide_delay) { + if ( show_delay == undefined || !show_delay ) { + var pos = YAHOO.util.Dom.getXY(elem); + menu.style.display = 'block'; + YAHOO.util.Dom.setXY(menu, pos); + g_nodnix_item_id = id; + menu.focus(); + // temporarily disable listener, so live behavior won't change + // get_nodnix_listener().enable(); + } else { + g_elem_for_pending_showmenu = elem; + g_menu_for_pending_showmenu = menu; + g_id_for_pending_showmenu = id; + if ( g_pending_showmenu ) + clearTimeout(g_pending_showmenu); + g_pending_showmenu = setTimeout("show_nodnix_menu(g_elem_for_pending_showmenu, g_id_for_pending_showmenu, g_menu_for_pending_showmenu)", show_delay); + } + + if ( hide_delay != undefined && hide_delay != 0 ) { + hide_nodnix_menu(hide_delay); + } +} + +function dont_show_nodnix_menu() { + clearTimeout(g_pending_showmenu); + g_pending_showmenu = null; +} + +function show_nod_menu(elem, id, show_delay, hide_delay) { + hide_nix_menu(); + show_nodnix_menu(elem, id, get_nod_menu(), show_delay, hide_delay); +} + +function show_nix_menu(elem, id, show_delay, hide_delay) { + hide_nod_menu(); + show_nodnix_menu(elem, id, get_nix_menu(), show_delay, hide_delay); +} + +function current_nodnix_input() { + var menu; + ((menu=get_nod_menu()).style.display != 'none') + || ((menu=get_nix_menu()).style.display != 'none') + || (menu=null); + + return YAHOO.util.Dom.hasClass(menu, 'editing') ? m.getElementsByTagName('input')[0] : null; +} + +function begin_nodnix_editing( type, args, obj ) { + if ( args ) { + var event = args[1]; + // swallow the space character, if that's how they initiated editing, + // otherwise, let the key propogate so the newly focused text edit field can have it + if ( event && event.keyCode==YAHOO.util.KeyListener.KEY.SPACE ) { + YAHOO.util.Event.stopEvent(event); + } + } + + get_nodnix_listener().disable(); + YAHOO.util.Dom.addClass(get_nod_menu(), 'editing'); + YAHOO.util.Dom.addClass(get_nix_menu(), 'editing'); + dont_hide_nodnix_menu(); + + var input = current_nodnix_input(); + input.focus(); +} + +function end_nodnix_editing() { + YAHOO.util.Dom.removeClass(get_nod_menu(), 'editing'); + YAHOO.util.Dom.removeClass(get_nix_menu(), 'editing'); +} Added: slashjp/branches/upstream/current/plugins/Ajax/htdocs/preferences.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/preferences.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/preferences.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -0,0 +1,69 @@ +#!/usr/bin/perl -w +# 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: preferences.pl,v 1.2 2008/02/07 07:12:55 pudge Exp $ + +use strict; + +use Slash; +use Slash::Display; +use Slash::Utility; + +sub main { + my $user = getCurrentUser(); + my $form = getCurrentForm(); + my $slashdb = getCurrentDB(); + my $constants = getCurrentStatic(); + # lc just in case + my $op = lc($form->{op}); + + my $ops = { + displayprefs => { + function => \&display_prefs, + seclev => 1, + }, + default => { + function => \&display_prefs, + seclev => 1, + }, + }; + + if ($user->{is_anon}) { + my $rootdir = getCurrentSkin('rootdir'); + redirect("$rootdir/users.pl"); + return; + } + + if ($op ne 'pause') { + # "pause" is special, it does a 302 redirect so we need + # to not output any HTML. Everything else gets this, + # header and menu. + header("Preferences") or return; + print createMenu('users', { + style => 'tabbed', + justify => 'right', + color => 'colored', + tab_selected => 'preferences', + }); + } + + $op = 'default' unless $ops->{$op}; + + my $retval = $ops->{$op}{function}->($form, $slashdb, $user, $constants); + + footer(); + writeLog($user->{uid}, $op); +} + +sub display_prefs { + my($form, $slashdb, $user, $constants) = @_; + + slashDisplay('prefs_main', { discussion2 => $user->{discussion2}}, { Page => "ajax" }); + +} + +createEnvironment(); +main(); +1; + Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_authors;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_authors;ajax;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_authors;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -20,8 +20,6 @@ [% IF tabbed == 1 %] <div style="text-align: center;"> - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('user', 'User', 1); return false;">User</a> - | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('home', 'Homepage', 1); return false;">Homepage</a> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('slashboxes', 'Slashboxes', 1); return false;">Slashboxes</a> @@ -29,8 +27,6 @@ <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('sectional', 'Sectional Display', 1); return false;">Sections</a> | <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Authors</span> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('messages', 'Messages', 1); return false;">Messages</a> </div> [% END %] @@ -69,4 +65,4 @@ __seclev__ 500 __version__ -$Id: prefs_authors;ajax;default,v 1.1 2008/01/31 16:26:05 entweichen Exp $ +$Id: prefs_authors;ajax;default,v 1.2 2008/02/06 18:19:30 entweichen 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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -11,6 +11,15 @@ prefs_d2 __template__ + [% IF tabbed == 1 %] + <div style="text-align: center;"> + + <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('d2_posting', 'Discussion 2', 1); return false;">Posting</a> + | + <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Viewing</span> + </div> + [% END %] + <form id ="modal_prefs" method="post"> <input type="hidden" name="formname" value="d2_display"> @@ -47,20 +56,30 @@ s_check = constants.markup_checked_attribute; END %] - <label><input type="checkbox" name="nosigs"[% s_check %]> Disable Sigs</label> - [% PROCESS formNote note='Strip sig quotes from comments' %] + <br> - <p> + input type="checkbox" name="nosigs"[% s_check %]> <b>Disable Sigs</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_sigs');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_sigs" class="modalprefhelp" style="display: none;"> + Strip sig quotes from comments. + </div> + <br> + [% n_check = ''; IF user.noscores; n_check = constants.markup_checked_attribute; END %] - <label><input type="checkbox" name="noscores"[% n_check %]> Do Not Display Scores</label> - [% PROCESS formNote note="Hides score: They still <b>apply</b> you just don't see them." %] - <p> + <input type="checkbox" name="noscores"[% n_check %]> <b>Do Not Display Scores</b><a href="#" onclick="displayModalPrefHelp('modalprefhelp_scores');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_scores" class="modalprefhelp" style="display: none;"> + Hides score: They still <b>apply</b> you just don't see them. + </div> + + <br> + [% UNLESS user.domaintags.defined; user.domaintags = 2; END %] [% domaintags.${user.domaintags} = constants.markup_checked_attribute -%] @@ -89,4 +108,4 @@ __seclev__ 500 __version__ -$Id: prefs_d2;ajax;default,v 1.9 2007/11/29 17:47:40 entweichen Exp $ +$Id: prefs_d2;ajax;default,v 1.10 2008/02/06 18:34:06 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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2_posting;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -15,6 +15,15 @@ [% lo = '-' _ hi %] [% range = [ lo .. hi ] %] + [% IF tabbed == 1 %] + <div style="text-align: center;"> + + <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Posting</span> + | + <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('d2', 'Discussion 2', 1); return false;">Viewing</a> + </div> + [% END %] + <form id ="modal_prefs" method="post"> <input type="hidden" name="formname" value="d2_posting"> @@ -76,9 +85,12 @@ textarea_rows = user.textarea_rows; END %] - Columns: <input type="text" name="textarea_cols" size="4" value="[% user.textarea_cols || constants.textarea_cols %]"> - Rows: <input type="text" name="textarea_rows" size="4" value="[% user.textarea_rows || constants.textarea_rows %]"> - [% PROCESS formNote note="Also applies to other large text boxes" %] + Columns: <input type="text" name="textarea_cols" size="4" value="[% user.textarea_cols || constants.textarea_cols %]"> + Rows: <input type="text" name="textarea_rows" size="4" value="[% user.textarea_rows || constants.textarea_rows %]"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_textarea');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_textarea" class="modalprefhelp" style="display: none;"> + Also applies to other large text boxes. + </div> <label>Comment Post Mode</label> [% @@ -117,4 +129,4 @@ __seclev__ 500 __version__ -$Id: prefs_d2_posting;ajax;default,v 1.2 2007/11/29 17:31:07 entweichen Exp $ +$Id: prefs_d2_posting;ajax;default,v 1.3 2008/02/06 18:38:25 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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_home;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -20,8 +20,6 @@ [% IF tabbed == 1 %] <div style="text-align: center;"> - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('user', 'User', 1); return false;">User</a> - | <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Homepage</span> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('slashboxes', 'Slashboxes', 1); return false;">Slashboxes</a> @@ -29,8 +27,6 @@ <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('sectional', 'Sectional Display', 1); return false;">Sections</a> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('authors', 'Authors', 1); return false;">Authors</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('messages', 'Messages', 1); return false;">Messages</a> </div> [% END %] @@ -70,7 +66,7 @@ }, user.dst, 1); %] - <br> + <br><br> [% sd_check = ''; IF user.simpledesign; @@ -78,85 +74,90 @@ END %] - <label> - <input type="checkbox" name="simpledesign"[% sd_check %]> Simple Design - </label> - <div class="note"> - Simplifies the design of [% constants.sitename %] to strip away some of the excesses -of the UI. + <input type="checkbox" name="simpledesign"[% sd_check %]> <b>Simple Design</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_simpledesign');" style="text-decoration: none;">[?]</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. </div> + <br> + [% lb_check = ''; IF user.lowbandwidth; lb_check = constants.markup_checked_attribute; END %] - <label> - <input type="checkbox" name="lowbandwidth"[% lb_check %]> Low Bandwidth - </label> - <div class="note"> + <input type="checkbox" name="lowbandwidth"[% lb_check %]> <b>Low Bandwidth</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_lowbandwidth');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_lowbandwidth" class="modalprefhelp" style="display: none;"> Reduces the size of pages for people with slower network connections </div> + <br> + [% i_check = ''; IF user.noicons; i_check = constants.markup_checked_attribute; END %] - <label> - <input type="checkbox" name="noicons"[% i_check %]> No Icons - </label> - <div class="notes"> + <input type="checkbox" name="noicons"[% i_check %]> <b>No Icons</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_noicons');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_noicons" class="modalprefhelp" style="display: none;"> Disable topic icon images on stories. </div> - <label> - Maximum Stories <input type="text" name="maxstories" size="3" value="[% user.maxstories %]"> - </label> - <div class="notes"> + <br> + + <b>Maximum Stories</b> <input type="text" name="maxstories" size="3" value="[% user.maxstories %]"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_maxstories');" style="text-decoration: none;">[?]</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. </div> + <br> + [% w_check = ''; IF user.willing; w_check = constants.markup_checked_attribute; END %] - <label> - <input type="checkbox" name="willing"[% w_check %]> Willing to Moderate - </label> - - <div class="notes"> + <input type="checkbox" name="willing"[% w_check %]> <b>Willing to Moderate</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_moderate');" style="text-decoration: none;">[?]</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. </div> + <br> + [% tag_check = ''; IF !user.tags_turnedoff; tag_check = constants.markup_checked_attribute; END %] - <label> - <input type="checkbox" name="showtags"[%tag_check %]> Show Tags - </label> + <input type="checkbox" name="showtags"[%tag_check %]> <b>Show Tags</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_showtags');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_showtags" class="modalprefhelp" style="display: none;"> + Turn this off to ignore all tags. + </div> - <div class="notes">Turn this off to ignore all tags.</div> - + <br> + [% osdn_navbar_check = ''; IF user.opt_osdn_navbar; osdn_navbar_check = constants.markup_checked_attribute; END %] - <label> - <input type="checkbox" name="opt_osdn_navbar"[% osdn_navbar_check %]> OSTG Navbar - </label> + <input type="checkbox" name="opt_osdn_navbar"[% osdn_navbar_check %]> <b>OSTG Navbar</b> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_ostg');" style="text-decoration: none;">[?]</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. + </div> - <div class="notes">Turn this on to display the OSTG nav bar at the top of the screen.</div> - <br> <input type="button" value="Save" onclick="saveModalPrefs()"> @@ -164,4 +165,4 @@ __seclev__ 500 __version__ -$Id: prefs_home;ajax;default,v 1.2 2008/01/31 16:29:07 entweichen Exp $ +$Id: prefs_home;ajax;default,v 1.3 2008/02/06 18:29:02 entweichen Exp $ Added: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_main;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -0,0 +1,62 @@ +__section__ +default +__description__ +__title__ + +__page__ +ajax +__lang__ +en_US +__name__ +prefs_main +__template__ + +[% PROCESS prefs_titlebar title='Preferences' %] + +<br> + +<h3>User Info <a href="/users.pl?op=edituser" onclick="displayModalPrefHelp('modalprefhelp_userinfo'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3> + +<div style="padding-left: 10px;"> + <div id="modalprefhelp_userinfo" class="modalprefhelp" style="display: none;"> + Configure your real name, email address, instant messaging nicks, your sig, and more. You may also change your password and manage your subscriptions from here.<br> + <img src="/images/sic_edit.png"> <a href="javascript:getModalPrefs('user', 'User', 1)">Configure your User preferences</a> + </div> + + <div style="padding-left: 15px;"><a href="/my/messages" onclick="getModalPrefs('messages', 'Messages'); return false">Messages</a>, <a href="/subscribe.pl">Subscriptions</a>, <a href="/my/password">Password</a></div> +</div> + +<br> + +<h3>Index <a href="/users.pl?op=edithome" onclick="displayModalPrefHelp('modalprefhelp_index'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3> + +<div style="padding-left: 10px;"> + <div id="modalprefhelp_index" class="modalprefhelp" style="display: none;"> + Configure the homepage's general look and feel. Set your date and time, toggle off tags, and set up your Slashboxes. + You also have the ability to choose how much or how little content you want to see from each section. Further, you have + the ability to choose if you want to view each type of article in 'Full Text' or 'Abbreviated' format.<br> + <img src="/images/sic_edit.png"> <a href="javascript:getModalPrefs('home', 'Homepage', 1)">Configure your Index preferences</a> + </div> + + <div style="padding-left: 15px;"><a href="/users.pl?op=edithome" onclick="getModalPrefs('slashboxes', 'Slashboxes'); return false">Slashboxes</a>, <a href="/users.pl?op=edithome" onclick="getModalPrefs('sectional', 'Sectional Display'); return false">Sections</a>, <a href="/users.pl?op=edithome" onclick="getModalPrefs('authors', 'Authors'); return false">Authors</a></div> +</div> + +<br> + +<h3>Discussions <a href="/users.pl?op=editcomm" onclick="displayModalPrefHelp('modalprefhelp_discussions'); return false" title="Click To Expand Help" style="text-decoration: none;">[?]</a></h3> + +<div style="padding-left: 10px;"> + <div id="modalprefhelp_discussions" class="modalprefhelp" style="display: none;"> + Change which discussion style you prefer to use, hide your email address, display your sig, and apply karma and subscriber + bonuses to comments. You may also sort comments by their score or date, and choose how many to retrieve at one time.<br> + <img src="/images/sic_edit.png"> <a href="[% gSkin.rootdir %]/my/comments"[% IF discussion2 == 'slashdot' %] onclick="getModalPrefs('d2', 'Discussion 2', 1); return false"[% END %]>Configure your Discussion preferences</a> + </div> + + <div style="padding-left: 15px;"><a href="[% gSkin.rootdir %]/my/comments"[% IF discussion2 == 'slashdot' %] onclick="getModalPrefs('d2_posting', 'Discussion 2'); return false"[% END %]>Posting</a>, <a href="[% gSkin.rootdir %]/my/comments"[% IF discussion2 == 'slashdot' %] onclick="getModalPrefs('d2', 'Discussion 2'); return false"[% END %]>Viewing</a></div> +</div> + + +__seclev__ +500 +__version__ +$Id: prefs_main;ajax;default,v 1.1 2008/02/06 16:17:43 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_messages;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_messages;ajax;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_messages;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -25,14 +25,6 @@ <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('user', 'User', 1); return false;">User</a> | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('home', 'Homepage', 1); return false;">Homepage</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('slashboxes', 'Slashboxes', 1); return false;">Slashboxes</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('sectional', 'Sectional Display', 1); return false;">Sections</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('authors', 'Authors', 1); return false;">Authors</a> - | <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Messages</span> </div> [% END %] @@ -111,4 +103,4 @@ __seclev__ 500 __version__ -$Id: prefs_messages;ajax;default,v 1.5 2008/01/31 16:30:01 entweichen Exp $ +$Id: prefs_messages;ajax;default,v 1.6 2008/02/06 18:14:03 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_sectional;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_sectional;ajax;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_sectional;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -20,8 +20,6 @@ [% IF tabbed == 1 %] <div style="text-align: center;"> - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('user', 'User', 1); return false;">User</a> - | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('home', 'Homepage', 1); return false;">Homepage</a> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('slashboxes', 'Slashboxes', 1); return false;">Slashboxes</a> @@ -29,8 +27,6 @@ <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Sections</span> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('authors', 'Authors', 1); return false;">Authors</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('messages', 'Messages', 1); return false;">Messages</a> </div> [% END %] @@ -107,4 +103,4 @@ __seclev__ 500 __version__ -$Id: prefs_sectional;ajax;default,v 1.3 2008/01/31 16:31:17 entweichen Exp $ +$Id: prefs_sectional;ajax;default,v 1.4 2008/02/06 18:15:41 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_slashboxes;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_slashboxes;ajax;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_slashboxes;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -20,8 +20,6 @@ [% IF tabbed == 1 %] <div style="text-align: center;"> - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('user', 'User', 1); return false;">User</a> - | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('home', 'Homepage', 1); return false;">Homepage</a> | <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">Slashboxes</span> @@ -29,8 +27,6 @@ <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('sectional', 'Sectional Display', 1); return false;">Sections</a> | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('authors', 'Authors', 1); return false;">Authors</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('messages', 'Messages', 1); return false;">Messages</a> </div> [% END %] @@ -91,4 +87,4 @@ __seclev__ 500 __version__ -$Id: prefs_slashboxes;ajax;default,v 1.2 2008/01/31 17:02:34 entweichen Exp $ +$Id: prefs_slashboxes;ajax;default,v 1.3 2008/02/06 18:17:50 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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_user;ajax;default 2008-02-08 06:23:49 UTC (rev 500) @@ -16,14 +16,6 @@ <span style="font-weight: bold; text-decoration: none; font-size: 14px; color: #ccc">User</span> | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('home', 'Homepage', 1); return false;">Homepage</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('slashboxes', 'Slashboxes', 1); return false;">Slashboxes</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('sectional', 'Sectional Display', 1); return false;">Sections</a> - | - <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('authors', 'Authors', 1); return false;">Authors</a> - | <a href="" style="font-weight: bold; text-decoration: none; font-size: 14px;" onclick="getModalPrefs('messages', 'Messages', 1); return false;">Messages</a> </div> [% END %] @@ -34,88 +26,103 @@ [% END %] <form id ="modal_prefs" method="post"> - <input type="hidden" name="formname" value="user"> + <input type="hidden" name="formname" value="user"> <input type="hidden" name="uid" value="[% user.uid %]"> <input type="hidden" name="name" value="[% user.nickname | strip_attribute %]"> - <p> + <p> - <b>Real Name</b> <input type="text" name="realname" value="[% user.realname | strip_attribute %]" size="40"> + <b>Real Name</b> <input type="text" name="realname" value="[% user.realname | strip_attribute %]" size="40"> - <p><br> + <p><br> - <b>Email Address</b> <input type="text" name="realemail" value="[% user.realemail | strip_attribute %]" size="40"> - <div class="notes"> - 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. - </div> - - <p> + <b>Email Address</b> <input type="text" name="realemail" value="[% user.realemail | strip_attribute %]" size="40"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_email');" style="text-decoration: none;">[?]</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. + </div> - <b>Homepage</b> <input type="text" name="homepage" value="[% user.homepage | strip_attribute %]" size="40"> - <div class="notes"> - You must enter a fully qualified URL. - </div> + <p> - <p> + <b>Homepage</b> <input type="text" name="homepage" value="[% user.homepage | strip_attribute %]" size="40"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_homepage');" style="text-decoration: none;" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_homepage" class="modalprefhelp" style="display: none;"> + You must enter a fully qualified URL. + </div> + <p> + [% IF user.is_admin && constants.slashbox_whatsplaying %] <b>What I'm Playing For</b> - <input type="text" name="playing" value="[% user.playing | strip_attribute %]" size="40"> - <div class="notes"> + <input type="text" name="playing" value="[% user.playing | strip_attribute %]" size="40"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_playing');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_playing" class="modalprefhelp" style="display: none;"> A pipe ("|") separated list of games you're currently enthralled with. This'll be used for the "What We're Playing" Slashbox. </div> <p> [% END %] - <b>AIM</b> <input type="text" name="aim" value="[% user.aim | strip_attribute %]" size="40"> - <br> + <b>AIM</b> <input type="text" name="aim" value="[% user.aim | strip_attribute %]" size="40"> + <br> - <span style="padding-left: 15px;"><input type="checkbox" name="aimdisplay" value="1"[% IF user.aimdisplay %] checked="checked" [% END %]> <b>Do not make this AIM nick public</b></span> + <span style="padding-left: 15px;"><input type="checkbox" name="aimdisplay" value="1"[% IF user.aimdisplay %] checked="checked" [% END %]> <b>Do not make this AIM nick public</b></span> - <p><br> + <p><br> - <b>ICQ UIN</b> <input type="text" name="icq" value="[% user.icq | strip_attribute %]" size="40"> + <b>ICQ UIN</b> <input type="text" name="icq" value="[% user.icq | strip_attribute %]" size="40"> - <p><br> + <p><br> - <b>Yahoo! ID</b> <input type="text" name="yahoo" value="[% user.yahoo | strip_attribute %]" size="40"> + <b>Yahoo! ID</b> <input type="text" name="yahoo" value="[% user.yahoo | strip_attribute %]" size="40"> - <p><br> + <p><br> - <b>Jabber</b> <input type="text" name="jabber" value="[% user.jabber | strip_attribute %]" size="40"> + <b>Jabber</b> <input type="text" name="jabber" value="[% user.jabber | strip_attribute %]" size="40"> - <p><br> + <p><br> - <b>Public Calendar</b> <input type="text" name="calendar_url" value="[% user.calendar_url | strip_attribute %]" size="40"> - <div class="notes"> - You must enter a fully qualified URL, for an iCal calendar. - </div> + <b>Public Calendar</b> <input type="text" name="calendar_url" value="[% user.calendar_url | strip_attribute %]" size="40"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_calendar');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_calendar" class="modalprefhelp" style="display: none;"> + You must enter a fully qualified URL, for an iCal calendar. + </div> - <p> + <p> - <b>Mobile Text Address</b> <input type="text" name="mobile_text_address" value="[% user.mobile_text_address | strip_attribute %]" size="40"> + <b>Mobile Text Address</b> <input type="text" name="mobile_text_address" value="[% user.mobile_text_address | strip_attribute %]" size="40"> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_mobile');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_mobile" class="modalprefhelp" style="display: none;"> + Set this if you plan to have Messages sent to your mobile device. + </div> - <p><br> + <p> - <b>Sig</b> - <br> - <textarea name="sig" rows="2" cols="30">[% user.sig | strip_literal %]</textarea> - <div class="notes">Appended to the end of comments you post. 120 chars.</div> + <b>Sig</b> + <br> + <textarea name="sig" rows="2" cols="30">[% user.sig | strip_literal %]</textarea> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_sig');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_sig" class="modalprefhelp" style="display: none;"> + Appended to the end of comments you post. 120 chars. + </div> - <p> + <p> - <b>Bio</b> - <br> - <textarea name="bio" rows="5" cols="30" wrap="virtual">[% user.bio | strip_literal %]</textarea> - <div class="notes">This information is publicly displayed on your user page. 255 chars.</div> + <b>Bio</b> + <br> + <textarea name="bio" rows="5" cols="30" wrap="virtual">[% user.bio | strip_literal %]</textarea> <a href="#" onclick="displayModalPrefHelp('modalprefhelp_bio');" style="text-decoration: none;">[?]</a> + <br> + <div id="modalprefhelp_bio" class="modalprefhelp" style="display: none;"> + This information is publicly displayed on your user page. 255 chars. + </div> <p> - <input type="button" value="Save" onclick="saveModalPrefs()"> + <input type="button" value="Save" onclick="saveModalPrefs()"> - </form> + </form> + __seclev__ 500 __version__ -$Id: prefs_user;ajax;default,v 1.4 2008/01/31 16:32:19 entweichen Exp $ +$Id: prefs_user;ajax;default,v 1.5 2008/02/06 18:12:58 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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.211 2008/01/31 17:57:01 jamiemccarthy Exp $ +# $Id: FireHose.pm,v 1.213 2008/02/06 21:47:48 tvroom Exp $ package Slash::FireHose; @@ -41,7 +41,7 @@ use base 'Slash::DB::MySQL'; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.211 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.213 $ ' =~ /\$Revision:\s+([^\s]+)/; sub createFireHose { my($self, $data) = @_; $data->{dept} ||= ""; @@ -1802,20 +1802,14 @@ $user_tabs = $self->getUserTabs(); - - my $tab_compare = { - color => "color", - filter => "fhfilter" - }; - my $skin_prefix=""; if ($the_skin && $the_skin->{name} && $the_skin->{skid} != $constants->{mainpage_skid}) { $skin_prefix = "$the_skin->{name} "; } my $system_tabs = [ - { tabtype => 'tabsection', color => 'black', filter => $skin_prefix . "story"}, - { tabtype => 'tabpopular', color => 'black', filter => "$skin_prefix\-story"}, - { tabtype => 'tabrecent', color => 'indigo', filter => "$skin_prefix\-story"}, + { tabtype => 'tabsection', color => 'black', filter => $skin_prefix . "story", orderby => 'createtime'}, + { tabtype => 'tabpopular', color => 'black', filter => "$skin_prefix\-story", orderby => 'popularity'}, + { tabtype => 'tabrecent', color => 'indigo', filter => "$skin_prefix\-story", orderby => 'createtime'}, ]; if (!$user->{is_anon}) { @@ -1824,12 +1818,24 @@ my $sel_tabtype; + my $tab_compare = { + color => "color", + filter => "fhfilter" + }; + my $tab_match = 0; foreach my $tab (@$user_tabs, @$system_tabs) { my $equal = 1; - foreach (keys %$tab_compare) { - $options->{$tab_compare->{$_}} ||= ""; - if ($tab->{$_} ne $options->{$tab_compare->{$_}}) { + + my $this_tab_compare; + %$this_tab_compare = %$tab_compare; + + $this_tab_compare->{orderby} = 'orderby' if defined $tab->{tabtype}; + + + foreach (keys %$this_tab_compare) { + $options->{$this_tab_compare->{$_}} ||= ""; + if ($tab->{$_} ne $options->{$this_tab_compare->{$_}}) { $equal = 0; } } @@ -2554,4 +2560,4 @@ =head1 VERSION -$Id: FireHose.pm,v 1.211 2008/01/31 17:57:01 jamiemccarthy Exp $ +$Id: FireHose.pm,v 1.213 2008/02/06 21:47:48 tvroom Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/firehose.css =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2008-02-08 06:23:49 UTC (rev 500) @@ -61,7 +61,7 @@ #firehose_pages a { color: #bbb; border: 1px solid #444; background: #444; padding: 3px !important; } #firehose_pages a:hover { color: #ccc; border: 1px solid #666; background: #555;} #firehose_pages a.fh_cur_page { margin: 0; color: #fff !important; border: 1px solid #555; background: #666 url('//images.slashdot.org/block-title-bg.png') repeat-x;} -#firehose_pages a b {color: #888; font-size: 130%; font-family: georgia; sans-serif} +#firehose_pages a b {color: #888; font-size: 130%; font-family: georgia, sans-serif} #fhcalendar_pag {float: left !important;} @@ -326,7 +326,7 @@ #fh-paginate .day.date-tab.active {padding: 10px 17px 10px 0 !important} span.date-tab.active div.tab-button { background: #066; } -#.date-widget.all span.date-tab, .date-widget.now span.date-tab { display: none; } +.date-widget.all span.date-tab, .date-widget.now span.date-tab { display: none; } .firemenu #fhcalendar-calendar-pane {right: 1em} #fh_change_range { font-size: 80% } .firemenu .date-tab-bar {float: right; padding: 0 15px .5em 0; margin-right: .6em} @@ -424,6 +424,10 @@ #firehoselist {position: relative} /* nodmenu */ +#nod-input, #nix-input {display: none; position: absolute; font-size: 11px; top:-55px; width: 101px;} +#nod-input {left: -150px;} +#nix-input {left: 58px;} +#nodmenu.editing #nod-input, #nixmenu.editing #nix-input {display: block;} #nodmenu, #nixmenu {display: none; width: 200px; z-index: 100000; position: absolute !important; font-size: 11px} #nodmenu .menu, #nixmenu .menu {top: -35px; width: 150px; height: 15em; z-index: 1000000 !important; position: absolute !important; font-size: 11px} #nodmenu .menu {left: -150px !important; background: url('//images.slashdot.org/popup_nod.png') no-repeat;} Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/firehose_tabs;misc;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/firehose_tabs;misc;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/firehose_tabs;misc;default 2008-02-08 06:23:49 UTC (rev 500) @@ -23,6 +23,7 @@ rss_param_str = rss_param_str _ "=" _ Slash.strip_attribute(options.${rss_options.$param}); END %] [% END %] +[% active_set = 0; %] [% UNLESS nodiv %]<ul class="menu" id="fhtablist">[% END %] [% IF options.smalldevices %] [% FOREACH tab = tabs; @@ -33,32 +34,33 @@ END; Slash.createSelect('tab', tabnames, { default => tab_current, return => 1, onchange => "firehose_set_options('tab', this.options[this.selectedIndex].value])"}); ELSE %] - <li id="fhtab-section" [% IF options.sel_tabtype == "tabsection" %]class="active"[% END %]>[% UNLESS options.sel_tabtype == "tabsection" %]<a href="/firehose.pl?tabtype=tabsection[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" + <li id="fhtab-section" [% IF options.sel_tabtype == "tabsection" && !active_set; active_set = 1; %]class="active"[% END %]>[% UNLESS options.sel_tabtype == "tabsection" %]<a href="/firehose.pl?tabtype=tabsection[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabsection',firehose_settings.section); return false">Stories</a>[% END %] <noscript><form action="/firehose.pl" method="post"><input type="hidden" name="tabtype" value="tabsection"></noscript> [% fh.createSectionSelect(section) %] <noscript><input type="submit" name="change" value="change"></form></noscript> [% IF options.sel_tabtype == "tabsection" && !user.is_anon && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for Section"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] </li> - <li id="fhtab-recent" [% IF options.sel_tabtype == "tabrecent" %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabrecent[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabrecent'); return false">Recent</a> + <li id="fhtab-recent" [% IF options.sel_tabtype == "tabrecent" && !active_set; active_set = 1; %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabrecent[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabrecent'); return false">Recent</a> [% IF options.sel_tabtype == "tabrecent" && !user.is_anon && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for Recent"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] </li> - <li id="fhtab-popular" [% IF options.sel_tabtype == "tabpopular" %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabpopular[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabpopular'); return false">Popular</a> + <li id="fhtab-popular" [% IF options.sel_tabtype == "tabpopular" && !active_set; active_set = 1; %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabpopular[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabpopular'); return false">Popular</a> [% IF options.sel_tabtype == "tabpopular" && !user.is_anon && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for Popular"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] </li> [% IF !user.is_anon %] - <li id="fhtab-user" [% IF options.sel_tabtype == "tabuser" %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabuser[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabuser'); return false">[% user.nickname | strip_literal %]</a> + <li id="fhtab-user" [% IF options.sel_tabtype == "tabuser" && !active_set; active_set = 1; %]class="active"[% END %]><a href="/firehose.pl?tabtype=tabuser[% IF form.section %]&section=[% form.section | strip_attribute %][% END %]" onclick="firehose_set_options('tabtype','tabuser'); return false">[% user.nickname | strip_literal %]</a> [% IF options.sel_tabtype == "tabuser" && !user.is_anon && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for [% user.nickname | strip_literal %]"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] </li> [% END %] [% FOREACH tab = tabs %] - <li id="fhtab-[% tab.tabid %]"[% IF tab.active %] class="active"[% END %]> - [% IF tab.active %]<span id="tab-form-[% tab.tabid %]" class="hide"><input type="text" onfocus="focusCompleter(this, '[% tab.tabid %]', '[% user.is_admin && !user.firehose_usermode %]','firehosetab', 7, { yui:{minQueryLength:0, autoHighlight:false }, action1:completer_save_tab } )" id="tab-input-[% tab.tabid %]" size="12" value="[% tab.tabname | strip_literal %]"></span>[% END %] + [% this_tab_active = 0 %] + <li id="fhtab-[% tab.tabid %]"[% IF tab.active && !active_set; active_set = 1; this_tab_active = 1; %] class="active"[% END %]> + [% IF this_tab_active %]<span id="tab-form-[% tab.tabid %]" class="hide"><input type="text" onfocus="focusCompleter(this, '[% tab.tabid %]', '[% user.is_admin && !user.firehose_usermode %]','firehosetab', 7, { yui:{minQueryLength:0, autoHighlight:false }, action1:completer_save_tab } )" id="tab-input-[% tab.tabid %]" size="12" value="[% tab.tabname | strip_literal %]"></span>[% END %] <a href="[% IF tab.active %]#[% ELSE %]?tab=[% tab.tabname | strip_attribute %][% END %]" id="tab-text-[% tab.tabid %]" onClick="[% IF tab.active %]firehose_open_tab('[% tab.tabid %]');[% ELSE %]firehose_set_options('tab','[% tab.tabname %]');[% END %] return false;" [% IF tab.active %]title="Edit this tab"[% END %]>[% tab.tabname | strip_literal %][% IF tab.active %]<img src="[% constants.imagedir %]/sic_edit.png" alt="Edit">[% END %]</a> - [% IF tab.active && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for [% tab.tabname | strip_literal %]"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] - [% IF tab.active && tab.tabname != "untitled" %]<span id="fhtabdel" class="close" title="Close this tab"><a href="#" onclick="firehose_remove_tab([% tab.tabid %])">[X]</a></span>[% END %]</li> + [% IF this_tab_active && rss_param_str %]<a href="[% Slash.root2abs() %]/firehose.pl?op=rss&content_type=rss[% rss_param_str %]&logtoken=[% Slash.getPublicLogToken() | strip_paramattr %]" title="RSS for [% tab.tabname | strip_literal %]"><img src="[% constants.imagedir %]/feed.png" alt="rss"></a>[% END %] + [% IF this_tab_active && tab.tabname != "untitled" %]<span id="fhtabdel" class="close" title="Close this tab"><a href="#" onclick="firehose_remove_tab([% tab.tabid %])">[X]</a></span>[% END %]</li> [% END %] [% END %] [% UNLESS nodiv %]</ul>[% END %] __version__ -$Id: firehose_tabs;misc;default,v 1.22 2008/01/30 18:35:28 tvroom Exp $ +$Id: firehose_tabs;misc;default,v 1.24 2008/02/06 18:09:04 scc Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/nodnix_menus;firehose;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/nodnix_menus;firehose;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/nodnix_menus;firehose;default 2008-02-08 06:23:49 UTC (rev 500) @@ -20,6 +20,7 @@ negtags = tags_reader.getNegativePopupTags.sort; IF postags.size %]<div id="nodmenu"> + <input id="nod-input" type="text"> <div class="menu" onmouseover="dont_hide_nodnix_menu()" onmouseout="hide_nodnix_menu(750)" onmousedown="hide_nodnix_menu()"> <ul> [%- FOR postag IN postags %] @@ -29,6 +30,7 @@ </div> </div> [% END; IF negtags.size %]<div id="nixmenu"> + <input id="nix-input" type="text"> <div class="menu" onmouseover="dont_hide_nodnix_menu()" onmouseout="hide_nodnix_menu(750)" onmousedown="hide_nodnix_menu()"> <ul> [%- FOR negtag IN negtags %] @@ -39,4 +41,4 @@ </div> [% END %] __version__ -$Id: nodnix_menus;firehose;default,v 1.8 2007/12/21 04:17:37 pudge Exp $ +$Id: nodnix_menus;firehose;default,v 1.9 2008/02/06 19:14:49 scc Exp $ Modified: slashjp/branches/upstream/current/plugins/Login/templates/changePasswd;login;default =================================================================== --- slashjp/branches/upstream/current/plugins/Login/templates/changePasswd;login;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Login/templates/changePasswd;login;default 2008-02-08 06:23:49 UTC (rev 500) @@ -16,7 +16,7 @@ [% PROCESS userboxes %] </div> [% thisnickname = user.nickname | strip_literal; - title = "Change password for $thisnickname ($user.uid)" %] + title = "Configuring Password For $thisnickname ($user.uid)" %] <div id="users-blocks"> [% PROCESS prefs_titlebar tab_selected='password' %] <div class="generalbody"> @@ -82,4 +82,4 @@ __seclev__ 500 __version__ -$Id: changePasswd;login;default,v 1.8 2006/02/17 22:26:04 pudge Exp $ +$Id: changePasswd;login;default,v 1.9 2008/02/06 16:41:02 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/Login/templates/newUserForm;login;default =================================================================== --- slashjp/branches/upstream/current/plugins/Login/templates/newUserForm;login;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Login/templates/newUserForm;login;default 2008-02-08 06:23:49 UTC (rev 500) @@ -31,7 +31,7 @@ <label> Nick Name </label> - <input type="text" name="newusernick" value=""> + <input type="text" name="newusernick" value="" maxlength="[% constants.nick_maxlen %]"> <div class="note"> (Note: only the characters <tt>[% chars | strip_literal %]</tt>, plus space, are allowed in nicknames, and all others will be stripped out.) </div> @@ -100,4 +100,4 @@ __seclev__ 10000 __version__ -$Id: newUserForm;login;default,v 1.5 2005/08/24 22:21:36 pudge Exp $ +$Id: newUserForm;login;default,v 1.7 2008/02/06 13:31:29 scc Exp $ Modified: slashjp/branches/upstream/current/plugins/PollBooth/templates/pollplug;misc;default =================================================================== --- slashjp/branches/upstream/current/plugins/PollBooth/templates/pollplug;misc;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/PollBooth/templates/pollplug;misc;default 2008-02-08 06:23:49 UTC (rev 500) @@ -33,9 +33,24 @@ maxvotes = votes || ""; END; END %] -[% percent %]% Voted '[% poll_option %]' for '<a href="[% gSkin.rootdir %]/pollBooth.pl?op=vote&qid=[% qid %]&aid=-1">[% poll.question %]</a>' +<div id="pollplug"> +[% percent %]% Voted '[% poll_option %]' for '<a href="[% gSkin.rootdir %]/pollBooth.pl?op=vote&qid=[% qid %]&aid=-1" onclick="$('pollplug_pb').style.display='block'; $('pollplug').style.display='none'; return false;">[% poll.question %]</a>' +</div> +<div id="pollplug_pb" style="display:none"> +[% is_open = pb.isPollOpen(qid) + has_activated = pb.hasPollActivated(qid); + pollfull = pb.getPoll(qid); + commentcnt = 0; + disc = Slash.db.getDiscussion(pollfull.discussion); + IF disc; + commentcnt = disc.commentcount; + END; +%] +[% PROCESS pollbooth question = poll.question answers = pollfull.answers qid = qid has_activated = has_activated poll_open = is_open voters = poll.voters comments = commentcnt %] +</div> + __seclev__ 10000 __version__ -$Id: pollplug;misc;default,v 1.3 2007/12/14 22:05:31 tvroom Exp $ +$Id: pollplug;misc;default,v 1.7 2008/02/05 19:10:34 tvroom Exp $ Modified: slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/AL2.pm =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/AL2.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/ResKey/ResKey/Checks/AL2.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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: AL2.pm,v 1.5 2005/11/10 04:32:27 pudge Exp $ +# $Id: AL2.pm,v 1.6 2008/02/07 00:51:22 pudge Exp $ package Slash::ResKey::Checks::AL2; @@ -13,7 +13,8 @@ use Slash::Utility; use Slash::Constants ':reskey'; -our($VERSION) = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/; +our($VERSION) = ' $Revision: 1.6 $ ' =~ /\$Revision:\s+([^\s]+)/; +our @ISA = qw(Exporter); our @EXPORT = qw(AL2Check); # simple AL2 check that others can inherit; returns death if check returns true Modified: slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm =================================================================== --- slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/ResKey/ResKey/Key.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Key.pm,v 1.22 2006/12/05 00:04:59 pudge Exp $ +# $Id: Key.pm,v 1.23 2008/02/07 00:51:22 pudge Exp $ package Slash::ResKey::Key; @@ -118,7 +118,7 @@ use Slash::Utility; our($AUTOLOAD); -our($VERSION) = ' $Revision: 1.22 $ ' =~ /\$Revision:\s+([^\s]+)/; +our($VERSION) = ' $Revision: 1.23 $ ' =~ /\$Revision:\s+([^\s]+)/; #======================================================================== sub new { @@ -254,7 +254,7 @@ goto &$sub; } elsif (!$can) { - errorLog("no method $name") unless + errorLog("no method $name : [$AUTOLOAD @_]") unless $name =~ /^(?:DESTROY)$/; return; } @@ -985,4 +985,4 @@ =head1 VERSION -$Id: Key.pm,v 1.22 2006/12/05 00:04:59 pudge Exp $ +$Id: Key.pm,v 1.23 2008/02/07 00:51:22 pudge Exp $ Modified: slashjp/branches/upstream/current/plugins/Stats/adminmail.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Stats/adminmail.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Stats/adminmail.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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: adminmail.pl,v 1.218 2008/01/30 22:56:18 jamiemccarthy Exp $ +# $Id: adminmail.pl,v 1.219 2008/02/07 17:55:29 jamiemccarthy Exp $ use strict; use Slash::Constants qw( :messages :slashd ); @@ -408,6 +408,27 @@ $statsSave->createStatDaily("other_bytes", $bytes); $statsSave->createStatDaily("other_page", $pages); } + my %combo = ( + ind => [ ['index'], [] ], + ind_no_art => [ ['index'], ['article'] ], + ind_no_rss => [ ['index'], ['rss'] ], + indart => [ ['index','article'], [] ], + indart_no_rss => [ ['index','article'], ['rss'] ], + art => [ ['article'], [] ], + art_no_ind => [ ['article'], ['index'] ], + art_no_rss => [ ['article'], ['rss'] ], + rss => [ ['rss'], [] ], + rss_no_ind => [ ['rss'], ['index'] ], + rss_no_art => [ ['rss'], ['article'] ], + rss_no_indart => [ ['rss'], ['index','article'] ], + rssart => [ ['rss','article'], [] ], + rssart_no_ind => [ ['rss','article'], ['index'] ], + ); + for my $key (sort keys %combo) { + my @args = @{ $combo{$key} }; + $statsSave->createStatDaily("opcombo_$key", + $logdb->getOpCombinationStats(@args)); + } slashdLog("Page Counting End"); # Not yet Modified: slashjp/branches/upstream/current/plugins/Subscribe/subscribe.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Subscribe/subscribe.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Subscribe/subscribe.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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: subscribe.pl,v 1.33 2005/03/11 19:58:21 pudge Exp $ +# $Id: subscribe.pl,v 1.34 2008/02/06 16:27:15 entweichen Exp $ use strict; @@ -105,7 +105,7 @@ ? $user->{hits_bought_today_max} : ""; - titlebar("100%", "Editing Subscription...", { + titlebar("100%", "Configuring Subscription", { template => 'prefs_titlebar', tab_selected => 'subscription', }); @@ -170,7 +170,7 @@ $hbtm; $slashdb->setUser($user_edit->{uid}, $user_update); - titlebar("100%", "Editing Subscription...", { + titlebar("100%", "Configuring Subscription", { template => 'prefs_titlebar', tab_selected => 'subscription', }); Modified: slashjp/branches/upstream/current/plugins/Tags/Tags.pm =================================================================== --- slashjp/branches/upstream/current/plugins/Tags/Tags.pm 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/plugins/Tags/Tags.pm 2008-02-08 06:23:49 UTC (rev 500) @@ -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.97 2008/01/18 21:28:17 jamiemccarthy Exp $ +# $Id: Tags.pm,v 1.98 2008/02/07 18:12:28 jamiemccarthy Exp $ package Slash::Tags; @@ -17,7 +17,7 @@ use base 'Slash::DB::Utility'; use base 'Slash::DB::MySQL'; -($VERSION) = ' $Revision: 1.97 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.98 $ ' =~ /\$Revision:\s+([^\s]+)/; # FRY: And where would a giant nerd be? THE LIBRARY! @@ -1810,10 +1810,15 @@ AND cmdtype REGEXP '#'"); my %tagname_bad = ( map { ($tagnameid_to_name->{$_}, 1) } @$tagnameid_bad_ar ); + # Build a hash identifying topic tagnames. + my $topics = $self->getTopics(); + my %tagname_topic = ( map { ($topics->{$_}{keyword}, 1) } keys %$topics ); + # Using the hashes, build a list of all recent tagnames which # are of interest. my @tagnames_of_interest = grep { - !$tagname_adminok{$_} + !$tagname_adminok{$_} + && !$tagname_topic{$_} && ( $tagname_bad{$_} || $tagname_startauthor{$_} || $tagname_firstrecent{$_} Modified: slashjp/branches/upstream/current/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/upstream/current/sql/mysql/defaults.sql 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/sql/mysql/defaults.sql 2008-02-08 06:23:49 UTC (rev 500) @@ -3,7 +3,7 @@ #-------------------------------------------------------- # Server version 3.23.26-beta-log # -# $Id: defaults.sql,v 1.388 2008/01/31 20:07:02 pudge Exp $ +# $Id: defaults.sql,v 1.389 2008/02/07 21:47:18 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_192','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_193','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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/sql/mysql/upgrades 2008-02-08 06:23:49 UTC (rev 500) @@ -10,7 +10,7 @@ # after X started at the same time that X was tagged. # -# $Id: upgrades,v 1.1307 2008/01/31 20:07:02 pudge Exp $ +# $Id: upgrades,v 1.1310 2008/02/08 04:31:16 pudge Exp $ # # BEGIN tf23's additions @@ -5114,10 +5114,6 @@ # 2008-01-24 UPDATE vars SET value = 'T_2_5_0_191' WHERE name = 'cvs_tag_currentcode'; -# SLASHCODE/USEPERL LAST UPDATED HERE - -# SLASHDOT LAST UPDATED HERE - # for plugins/Admin INSERT INTO vars (name, value, description) VALUES ('topics_sectional_weight', '10', 'Minimum weight for sectional stories'); @@ -5130,3 +5126,10 @@ # 2008-01-31 UPDATE vars SET value = 'T_2_5_0_192' WHERE name = 'cvs_tag_currentcode'; +# 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 + Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/badge.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/badge.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/badge.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -1,5 +1,5 @@ #!/usr/local/bin/perl -# $Id: badge.pl,v 1.1 2007/12/13 15:55:16 scc Exp $ +# $Id: badge.pl,v 1.2 2008/02/05 23:15:59 scc Exp $ use strict; use Slash; @@ -105,16 +105,25 @@ my $style = 'v0'; if ($form->{style} =~ m/^([hv][01])/i) { - $style = $1; + $style = lc($1); } my $firehose = getObject('Slash::FireHose'); my $fh_id = $firehose->getFireHoseIdFromUrl($form->{url}); + + # Set $voted to 'up' or 'down' depending on how the user + # voted this firehose item (if it is a firehose item, and + # if the user is logged-in). my $voted = ''; - - if ( $fh_id && $user->{uid} ) { + my $sid = ''; + if ( $fh_id ) { my $fh_item = $firehose->getFireHose($fh_id); - $voted = $firehose->getUserFireHoseVotesForGlobjs($user->{uid}, [$fh_item->{globjid}])->{$fh_item->{globjid}}; + if ( $fh_item ) { + $voted = $firehose->getUserFireHoseVoteForGlobjid($user->{uid}, $fh_item->{globjid}) + if !$user->{is_anon}; + $sid = $slashdb->getStory($fh_item->{stoid}, 'sid') + if $fh_item->{stoid} && $slashdb->checkStoryViewable($fh_item->{stoid}); + } } my $reskey = getObject("Slash::ResKey"); @@ -125,7 +134,8 @@ style => $style, url => $url, fireHoseId => $fh_id, - voted => $voted + voted => $voted, + sid => $sid }, {Page => 'badge'}); } Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/base.css =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/base.css 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/base.css 2008-02-08 06:23:49 UTC (rev 500) @@ -772,3 +772,10 @@ #login_box #login_box_content fieldset {margin: 0;padding: 0;border: none;} #login_box #login_box_content {background-color: #fff;padding: 0 2em 2em 2em; border-top: 1px solid #222;} +/* modal preference help */ +div.modalprefhelp { + padding: 15px 15px 15px 15px; + width: 550px; + border-style: solid; + border-width: 2px; +} Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/comments.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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.267 2008/01/31 19:24:59 pudge Exp $ +# $Id: comments.pl,v 1.268 2008/02/07 00:51:22 pudge Exp $ use strict; use Slash 2.003; # require Slash 2.3.x @@ -469,18 +469,7 @@ print getError('no such parent'); return; } elsif ($pid) { - $pid_reply = $reply->{comment} = parseDomainTags($reply->{comment}, 0, 1, 1); - $pid_reply = revertQuote($pid_reply); - - # prep for JavaScript - $pid_reply =~ s|\\|\\\\|g; - $pid_reply =~ s|'|\\'|g; - $pid_reply =~ s|([\r\n])|\\n|g; - - $pid_reply =~ s{<nobr> <wbr></nobr>(\s*)} {$1 || ' '}gie; - #my $nick = strip_literal($reply->{nickname}); - #$pid_reply = "<div>$nick ($reply->{uid}) wrote: <quote>$pid_reply</quote></div>"; - $pid_reply = "<quote>$pid_reply</quote>"; + $pid_reply = prepareQuoteReply($reply); } # calculate proper points value ... maybe this should be a public, @@ -748,7 +737,7 @@ my $kickin = $constants->{comments_min_line_len_kicks_in}; if ($constants->{comments_min_line_len} && length($$comm) > $kickin) { - my $max_comment_len = getCurrentAnonymousCoward('maxcommentsize'); + 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} 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-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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.344 2008/01/09 19:55:15 jamiemccarthy Exp $ +# $Id: users.pl,v 1.345 2008/02/07 00:51:23 pudge Exp $ use strict; use Digest::MD5 'md5_hex'; @@ -1436,7 +1436,7 @@ # defaults to 4K) and can't have too many line-breaking # tags. my $art_shrunk = $lastjournal->{article}; - my $maxsize = int($user->{maxcommentsize} / 25); + my $maxsize = int($constants->{default_maxcommentsize} / 25); $maxsize = 80 if $maxsize < 80; $maxsize = 600 if $maxsize > 600; $art_shrunk = chopEntity($art_shrunk, $maxsize); @@ -2767,7 +2767,6 @@ emaildisplay => $form->{emaildisplay} || undef, fakeemail => $new_fakeemail, highlightthresh => $form->{highlightthresh}, - maxcommentsize => $form->{maxcommentsize}, mode => $form->{umode}, posttype => $form->{posttype}, threshold => $form->{uthreshold}, @@ -2800,7 +2799,6 @@ my $defaults = { posttype => 2, highlightthresh => 4, - maxcommentsize => 4096, reparent => 1, commentlimit => 100, commentspill => 50, Modified: slashjp/branches/upstream/current/themes/slashcode/tasks/process_file_queue.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/tasks/process_file_queue.pl 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/tasks/process_file_queue.pl 2008-02-08 06:23:49 UTC (rev 500) @@ -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: process_file_queue.pl,v 1.6 2007/10/31 20:27:40 tvroom Exp $ +# $Id: process_file_queue.pl,v 1.7 2008/02/05 20:15:53 tvroom Exp $ use File::Path; use File::Temp; @@ -145,6 +145,12 @@ my @files; my $file = $cmd->{file}; + if ($file =~ /\.(gif|jpg)$/i) { + my $filepng = $file; + $filepng =~s /\.(gif|jpg)$/\.png/; + system("/usr/bin/convert $file $filepng"); + $file = $filepng; + } if ($story->{sid}) { my $destpath = getStoryFileDir($story->{sid}); Modified: slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default 2008-02-08 06:23:49 UTC (rev 500) @@ -238,9 +238,6 @@ <input type="text" name="clbig" value="[% user_edit.clbig %]" size="6"> (length of comment in bytes)<br> [% long_length_bonus_select %] (modifier assigned)<br> - <label>Max Comment Size <input type="text" name="maxcommentsize" size="6" value="[% user_edit.maxcommentsize %]"></label> - [% PROCESS formNote note='Truncates long comments, and adds a "Read the rest" link. Set really big to disable.' %] - <label>Comment Box Size</label> Columns: <input type="text" name="textarea_cols" size="4" value="[% user_edit.textarea_cols || constants.textarea_cols %]"> Rows: <input type="text" name="textarea_rows" size="4" value="[% user_edit.textarea_rows || constants.textarea_rows %]"> @@ -305,4 +302,4 @@ __seclev__ 500 __version__ -$Id: editComm;users;default,v 1.66 2007/11/13 19:49:11 entweichen Exp $ +$Id: editComm;users;default,v 1.67 2008/02/07 00:51:23 pudge Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/html-header;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/html-header;misc;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/templates/html-header;misc;default 2008-02-08 06:23:49 UTC (rev 500) @@ -47,6 +47,7 @@ <script src="[% constants.imagedir %]/slashbox.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> [% END -%] <script src="[% constants.imagedir %]/common.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> +<script src="[% constants.imagedir %]/nodnix.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> [% IF user.is_admin -%] <script src="[% constants.imagedir %]/admin.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script> [% END %] @@ -55,4 +56,4 @@ __seclev__ 10000 __version__ -$Id: html-header;misc;default,v 1.37 2008/01/29 21:01:21 scc Exp $ +$Id: html-header;misc;default,v 1.38 2008/02/04 14:50:17 scc Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/newUserForm;users;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/newUserForm;users;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/templates/newUserForm;users;default 2008-02-08 06:23:49 UTC (rev 500) @@ -25,7 +25,7 @@ <tr> <td> <b>Nick Name</b><br> - <input type="text" name="newusernick" value=""> + <input type="text" name="newusernick" value="" maxlength="[% constants.nick_maxlen %]"> </td> </tr> <tr> @@ -96,4 +96,4 @@ __seclev__ 10000 __version__ -$Id: newUserForm;users;default,v 1.16 2005/07/27 22:54:48 pudge Exp $ +$Id: newUserForm;users;default,v 1.18 2008/02/06 13:31:29 scc Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/prefs_titlebar;misc;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/prefs_titlebar;misc;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/templates/prefs_titlebar;misc;default 2008-02-08 06:23:49 UTC (rev 500) @@ -13,48 +13,27 @@ __name__ prefs_titlebar __template__ -[% thisnickname = user.nickname | strip_literal; - title = title || "$thisnickname (This is you!)"; + +[% +thisnickname = user.nickname | strip_literal; +title = title || "$thisnickname (This is you!)"; PROCESS titlebar title=title; -'<div id="usermenu">'; +%] -user_link = '/users.pl?op=edituser'; -IF constants.modal_prefs_active; - user_link = user_link _ "\" onclick=\"getModalPrefs('user', 'User', 1)\; return false"; -END; +[% IF title != 'Preferences' %] +<div id="usermenu"> -tabs = [ - { link = user_link, label = "User", sel_label = "user" }, - { link = "/users.pl?op=edithome", label = "Homepage", sel_label = "home" }, - { link = "/users.pl?op=editcomm", label = "Comments", sel_label = "comments" } -]; -IF constants.plugin.Messages; - messages_link = "/my/messages"; - IF constants.modal_prefs_active; - messages_link = messages_link _ "\" onclick=\"getModalPrefs('messages', 'Messages', 1)\; return false"; - END; - tabs.push( - { link = messages_link, label = "Messages", sel_label = "messages" }, -); END; -IF constants.plugin.Journal; tabs.push( - { link = "/journal.pl?op=editprefs", label = "Journal", sel_label = "journal" }, -); END; -IF Slash.db.getMiscUserOpts.size; tabs.push( - { link = "/users.pl?op=editmiscopts", label = "Misc", sel_label = "misc" }, -); END; -IF constants.plugin.Subscribe; tabs.push( - { link = "/subscribe.pl", label = "Subscription", sel_label = "subscription" }, -); END; -tabs.push( - { link = "/my/password", label = "Password", sel_label = "password" }, -); -IF constants.plugin.Tags; tabs.push( - { link = "/users.pl?op=edittags", label = "Tags", sel_label = "tags" }, -); END; +[% +tabs = [ { link = '/my/preferences', label = "Return to Help & Preferences", sel_label = "preferences" }, ] +%] -PROCESS tabbedmenu tabs=tabs color='white' justify='left' tab_selected=tab_selected; '</div>' %] +[% PROCESS tabbedmenu tabs=tabs color='white' justify='left' tab_selected=tab_selected %] +</div> + +[% END %] + __seclev__ 10000 __version__ -$Id: prefs_titlebar;misc;default,v 1.15 2007/12/12 20:39:57 entweichen Exp $ +$Id: prefs_titlebar;misc;default,v 1.16 2008/02/07 17:36:41 entweichen Exp $ Modified: slashjp/branches/upstream/current/themes/slashcode/templates/titles;users;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/titles;users;default 2008-02-08 06:09:55 UTC (rev 499) +++ slashjp/branches/upstream/current/themes/slashcode/templates/titles;users;default 2008-02-08 06:23:49 UTC (rev 500) @@ -39,7 +39,7 @@ User Info for [% md5id_vis %] ([% id %]) [% CASE 'editUser_title' %] - Editing [% user_edit.nickname | strip_literal %] ([% user_edit.uid %]) [% user_edit.realemail | strip_literal %] + Configuring User Preferences For [% user_edit.nickname | strip_literal %] ([% user_edit.uid %]) [% user_edit.realemail | strip_literal %] [% CASE 'changePasswd_title' %] Change password for [% user_edit.nickname | strip_literal %] ( [% user_edit.uid %]) @@ -51,10 +51,10 @@ Customize Slashboxes [% CASE 'editHome_title' %] - Customize [% constants.sitename %]'s Display + Configuring [% constants.sitename %]'s Homepage [% CASE 'editComm_title' %] - Comment Options + Configuring Comments [% CASE 'editMiscOpts_title' %] Miscellaneous Options @@ -88,4 +88,4 @@ __seclev__ 10000 __version__ -$Id: titles;users;default,v 1.14 2007/05/09 20:57:04 pudge Exp $ +$Id: titles;users;default,v 1.15 2008/02/06 17:51:56 entweichen Exp $