Skip to content
Browse files

fixes for D2 counts

  • Loading branch information...
1 parent b21b3d9 commit d10c96be23d8572a0af021a09e85241bb9bb1935 @pudge pudge committed Apr 2, 2008
View
6 Slash/Utility/Comments/Comments.pm
@@ -319,16 +319,14 @@ sub selectComments {
# && !$options->{existing}{ $C->{pid} }
while ($C->{pid}) {
my $parent = $comments->{ $C->{pid} } || {};
- # parents of our main cid!
- if ($cid && $C->{pid} < $cid) {
- $user->{state}{d2_defaultclass}{$C->{pid}} = 'oneline';
- }
if (!$parent || !$parent->{kids} || !$parent->{cid} || !defined($parent->{pid}) || !defined($parent->{points})) {
# parents of our main cid, so spend time
# finding it ...
if ($cid && $C->{pid} < $cid) {
+ $user->{state}{d2_defaultclass}{$C->{pid}} = 'oneline';
$parent = $old_comments{ $C->{pid} };
+ $count++;
} else {
$parent = {
cid => $C->{pid},
View
2 plugins/Ajax/templates/edit_comment;ajax;default
@@ -64,6 +64,8 @@ __template__
<input type="button" name="preview_[% pid %]" id="preview_[% pid %]" value="Preview" class="button" onclick="previewReply([% pid %]); return false;">
[%- IF pid # not for root-level reply %]
<input type="button" name="quotereply_[% pid %]" id="quotereply_[% pid %]" value="Quote Parent" class="button" onclick="quoteReply([% pid %]); return false;">[% END %]
+ [%- UNLESS user.is_anon %]
+ <input type="button" name="prefs_[% pid %]" id="prefs_[% pid %]" value="Options" class="button" onclick="getModalPrefs('d2_posting', 'Discussion 2'); return false;">[% END %]
</span>
<span id="replyto_buttons_2_[% pid %]" style="display: none">
<input type="button" name="submit_[% pid %]" id="submit_[% pid %]" value="Submit" class="button" onclick="submitReply([% pid %]); return false;">
View
4 sql/mysql/upgrades
@@ -5191,8 +5191,6 @@ CREATE TABLE tagname_cache (
# 2008-03-19
UPDATE vars SET value = 'T_2_5_0_198' WHERE name = 'cvs_tag_currentcode';
-# SLASHCODE/USEPERL LAST UPDATED HERE
-
# PUDGE LAST UPDATED HERE
# SLASHDOT LAST UPDATED HERE
@@ -5242,3 +5240,5 @@ CREATE TABLE user_event_types (
# 2008-04-02
UPDATE vars SET value = 'T_2_5_0_199' WHERE name = 'cvs_tag_currentcode';
+# SLASHCODE/USEPERL LAST UPDATED HERE
+
View
12 themes/slashcode/htdocs/comments.css
@@ -118,7 +118,7 @@ html > body .commentwrap table {
margin: 0 0 0 -.3em;
padding: 0 .3em;
text-decoration: none;
- background: url("http://images.slashcode.com/comm-minus.gif") 0 .2em no-repeat;
+ background: url("/images/comm-minus.gif") 0 .2em no-repeat;
right: -1.4em;
z-index: 2;
cursor: pointer;
@@ -129,7 +129,7 @@ html > body .commentwrap table {
margin: 0;
padding: 0 .3em;
text-decoration: none;
- background: url("http://images.slashcode.com/comm-plus.gif") 0 .2em no-repeat;
+ background: url("/images/comm-plus.gif") 0 .2em no-repeat;
right: -1.4em;
z-index: 1;
cursor: pointer;
@@ -385,23 +385,23 @@ div.ccw-panel, #ccw-control,
/* Action Buttons */
.nbutton{
- background: #666 url("/images/corner_w_tl.png") top left no-repeat;
+ background: #666 none top left no-repeat;
color:#fff;
margin:0.25em;
padding: .4em 0;
}
.nbutton p{
display:inline;
- background: transparent url("/images/corner_w_tr.png") top right no-repeat;
+ background: transparent none top right no-repeat;
padding: .4em 0;
}
.nbutton p b{
display:inline;
- background: transparent url("/images/corner_w_bl.png") bottom left no-repeat;
+ background: transparent none bottom left no-repeat;
padding: .4em 0;
}
.nbutton p b a {
- background: transparent url("/images/corner_w_br.png") bottom right no-repeat !important;
+ background: transparent none bottom right no-repeat !important;
padding: .4em 1em;
color:#fff !important;
font-weight:normal;
View
5 themes/slashcode/htdocs/images/comments.js
@@ -1292,7 +1292,6 @@ function finishLoading() {
if (more_comments_num)
updateMoreNum(more_comments_num);
- updateTotals();
enableControls();
//setTimeout('ajaxFetchComments()', 10*1000);
@@ -1685,6 +1684,10 @@ YAHOO.slashdot.ThresholdWidget.prototype.setOrientation = function( newAxis ) {
this._getEl(prefix+"-count-pos").style.top = 0;
}
this._setTs();
+ // setOrientation can rewrite our totals for us, even if they
+ // are different from defaults, so let's set them again
+ // sure they are correct
+ updateTotals();
}
}
View
3 themes/slashcode/templates/printCommComments;misc;default
@@ -149,8 +149,7 @@ __template__
pieces_comments = [[% user.state.comments.pieces.join(',') %]];
init_hiddens = [[% user.state.comments.hiddens.join(',') %]];
- [% IF discussion2 == "slashdot" %]d2act();
- [% END -%]finishLoading();
+ finishLoading();
//-->
</script>
[% END %]
View
1 themes/slashcode/templates/printCommentsMain;misc;default
@@ -214,6 +214,7 @@ YAHOO.slashdot.ThresholdApp = function() {
init: function() {
gCommentControlWidget = new YAHOO.slashdot.ThresholdWidget([% "'X'" IF horiz %]);
gCommentControlWidget.setTHT(user_threshold, user_highlightthresh);
+ updateTotals();
}
};
}();

0 comments on commit d10c96b

Please sign in to comment.
Something went wrong with that request. Please try again.