Permalink
Browse files

D2 updates

  • Loading branch information...
1 parent 2ba7388 commit 95a11dcea21f6d3653f1e3a0511285b439233240 @pudge pudge committed Oct 5, 2007
View
7 Slash/Utility/Environment/Environment.pm
@@ -1568,17 +1568,16 @@ sub prepareUser {
$user->{karma_bonus} = '+1' unless defined($user->{karma_bonus});
# see Slash::discussion2()
$user->{state}{no_d2} = $form->{no_d2} ? 1 : 0;
+ $user->{discussion2} ||= 'none';
# pct of anon users get this
if ($user->{is_anon} && !$user->{state}{no_d2}) {
- $user->{discussion2} = 'none';
-
# my $i = hex(substr($user->{srcids}{16}, -2));
$hostip =~ /^(\d+).(\d+).(\d+).(\d+)$/;
my $i = $2;
-# # for (0..255) { $x = ((($_-1)/256) < .01); last if !$x; printf "%d:%d\n", $_, $x; }
- if (0 && $ENV{GATEWAY_INTERFACE} && (($i-1)/256) < .01 ) { # 1 percent, x.(0..3).y.z
+# # for (0..255) { $x = ((($_-1)/256) < .1); last if !$x; printf "%d:%d\n", $_, $x; }
+ if ($ENV{GATEWAY_INTERFACE} && ( $i == 144 || $i == 113 || ((($i-1)/256) < .1) ) ) { # 10 percent, x.(0..3).y.z
my $d2 = 'slashdot';
# get user-agent (ENV not populated yet)
View
3 sql/mysql/upgrades
@@ -4879,8 +4879,6 @@ UPDATE vars SET value = 'T_2_5_0_176' WHERE name = 'cvs_tag_currentcode';
# PUDGE LAST UPDATED HERE
-# SLASHDOT LAST UPDATED HERE
-
# For plugins/Tags
UPDATE tagboxes SET clid=2 WHERE name='FirstMover';
@@ -4889,3 +4887,4 @@ UPDATE vars SET value = 'T_2_5_0_177' WHERE name = 'cvs_tag_currentcode';
# SLASHCODE/USEPERL LAST UPDATED HERE
+# SLASHDOT LAST UPDATED HERE
View
8 themes/slashcode/templates/printCommentsMain;misc;default
@@ -149,13 +149,15 @@ __template__
<small>
<b>The Fine Print:</b> [% fineprint %]
</small>
-[% IF !user.state.no_d2 %]<noscript><br><small>This page requires JavaScript to view properly. You can also see the [% Slash.linkComment({
+Without JavaScript enabled, you might want to use <a>the classic discussion system</a> instead. If you login, you can remember this preference
+
+[% IF !user.state.no_d2 %]<noscript><br><small>Without JavaScript enabled, you might want to use [% Slash.linkComment({
sid => sid,
pid => pid,
- subject => 'rest of the discussion',
+ subject => 'the classic discussion system',
subject_only => 1,
no_d2 => 1
-}) %].</small></noscript>[% END %]
+}) %] instead. If you <a href="[% gSkin.rootdir %]/login.pl">login</a>, you can remember this preference.</small></noscript>[% END %]
</div>
</div>
[% IF discussion2 %]

0 comments on commit 95a11dc

Please sign in to comment.