Skip to content
Browse files

d2 stuff

  • Loading branch information...
1 parent 02d1579 commit d1142f185882320e15077fe2ebf21cf3832de96c @pudge pudge committed Nov 22, 2006
View
2 Slash/Utility/Data/Data.pm
@@ -1468,7 +1468,7 @@ sub processCustomTagsPre {
return $str;
}
-sub processCustomTagsPostat {
+sub processCustomTagsPost {
my($str) = @_;
my $constants = getCurrentStatic();
View
2 plugins/Ajax/htdocs/images/common.js
@@ -446,7 +446,7 @@ function firehose_set_options(name, value) {
// set page
page = 0;
var attributes = {
- opacity: { from: 1, to: 0 },
+ opacity: { from: 1, to: 0 }
};
var myAnim = new YAHOO.util.Anim("firehoselist", attributes);
myAnim.duration = 1;
View
6 sql/mysql/upgrades
@@ -4224,6 +4224,9 @@ ALTER TABLE people MODIFY COLUMN id int unsigned not null auto_increment;
INSERT INTO globj_types VALUES (NULL, 'discussions');
+# 2006-11-15
+UPDATE vars SET value = 'T_2_5_0_134' WHERE name = 'cvs_tag_currentcode';
+
# SLASHCODE/USEPERL LAST UPDATED HERE
# for FireHose plugin
@@ -4241,6 +4244,7 @@ INSERT INTO vars (name, value, description) VALUES ('tags_list_mintc', '4', 'Min
# SLASHDOT LAST UPDATED HERE
+UPDATE vars SET value=CONCAT(value,'|QUOTE') WHERE name='approvedtags';
+
# 2006-11-21
UPDATE vars SET value = 'T_2_5_0_135' WHERE name = 'cvs_tag_currentcode';
-
View
10 themes/slashcode/htdocs/comments.css
@@ -90,6 +90,14 @@ html > body .commentwrap table {
.commentshrunk, .commentstatus { font-weight: bold }
+.quote {
+ margin-bottom: .75em;
+ padding-left: .75em;
+ color: #555;
+ border-left: 3px solid #ddd;
+ position: relative;
+ display: block;
+}
#commentlisting {
padding: 0px;
@@ -135,7 +143,7 @@ html > body .commentwrap table {
display: none;
}
-.comment > .oneline .commentSub, .comment > .oneline .otherdetails, .comment > .oneline .sig {
+.comment > .oneline .commentSub, .comment > .oneline .otherdetails, .comment > .oneline .sig, .comment > .oneline .quote, .comment > .oneline .zooicon {
display: none;
}
View
34 themes/slashcode/htdocs/comments.pl
@@ -473,11 +473,43 @@ sub editComment {
# moderation elements for this instance of the comment.
my $pid = $form->{pid} || 0; # this is guaranteed numeric, from filter_params
my $reply = $slashdb->getCommentReply($sid, $pid) || { };
+ my $pid_reply = '';
# An attempt to reply to a comment that doesn't exist is an error.
if ($pid && !%$reply) {
print getError('no such parent');
return;
+ } elsif ($pid) {
+ $pid_reply = $reply->{comment};
+ # XXX: maybe move this elsewhere, like Slash::Utility::Data
+ # this converts back to <quote>
+ while ($pid_reply =~ m|(<div class="quote">)(.+)$|sig) {
+ my($found, $rest) = ($1, $2);
+ my $pos = pos($pid_reply) - (length($found) + length($rest));
+ substr($pid_reply, $pos, length($found)) = '<quote>';
+ pos($pid_reply) = $pos + length('<quote>');
+
+ my $c = 0;
+ while ($pid_reply =~ m|(<(/?)div.*?>)|sig) {
+ my($found, $end) = ($1, $2);
+ if ($end && !$c) {
+ my $len = length($found);
+ substr($pid_reply, pos($pid_reply) - $len, $len) = '</quote>';
+ pos($pid_reply) = 0;
+ last;
+ } elsif ($end) {
+ $c--;
+ } else {
+ $c++;
+ }
+ }
+ }
+ $pid_reply =~ s|\\|\\\\|g;
+ $pid_reply =~ s|'|\\'|g;
+ $pid_reply =~ s|([\r\n])|\\$1|g;
+ #my $nick = strip_literal($reply->{nickname});
+ #$pid_reply = "<div>$nick ($reply->{uid}) wrote: <quote>$pid_reply</quote></div>";
+ $pid_reply = "<quote>$pid_reply</quote>";
}
# calculate proper points value ... maybe this should be a public,
@@ -529,7 +561,9 @@ sub editComment {
my $gotmodwarning;
$gotmodwarning = 1 if $form->{gotmodwarning}
|| $error_message && $error_message eq getError("moderations to be lost");
+
slashDisplay('edit_comment', {
+ pid_reply => $pid_reply,
error_message => $error_message,
label => $label,
discussion => $discussion,
View
4 themes/slashcode/htdocs/images/comments.js
@@ -16,6 +16,7 @@ var viewmodevalue = { full: 3, oneline: 2, hidden: 1};
var currents = { full: 0, oneline: 0, hidden: 0 };
var commentelements = {};
+var comment_body_reply = [];
var root_comment = 0;
var discussion_id = 0;
var user_is_admin = 0;
@@ -695,3 +696,6 @@ function doModerate(el) {
return false;
}
+function quoteReply(pid) {
+ $('postercomment').value = comment_body_reply[pid] + "\n\n" + $('postercomment').value;
+}
View
12 themes/slashcode/templates/edit_comment;comments;default
@@ -143,7 +143,7 @@ END %]
[% END %]
[% PROCESS formLabel value => 'Comment' %]
- <textarea wrap="virtual" name="postercomment" rows="[% user.textarea_rows || constants.textarea_rows %]" cols="[% user.textarea_cols || constants.textarea_cols %]">[% form.postercomment | strip_literal %]</textarea>
+ <textarea wrap="virtual" name="postercomment" id="postercomment" rows="[% user.textarea_rows || constants.textarea_rows %]" cols="[% user.textarea_cols || constants.textarea_cols %]">[% form.postercomment | strip_literal %]</textarea>
[% PROCESS formNote note => 'Use the Preview Button! Check those URLs!' %]
<br>
[% IF user.is_anon %]
@@ -201,6 +201,16 @@ IF do_br %]<br>[% END %]
[% IF !user.is_anon || (user.is_anon && preview) %]
<input type="submit" name="op" value="Submit" class="button">
[% END %]
+ [% IF form.pid && user.discussion2 && user.discussion2 == "slashdot" %]
+ <script src="[% constants.imagedir %]/comments.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script>
+ <script type="text/javascript">
+<!--
+ comment_body_reply[[% form.pid %]] = '[% pid_reply %]';
+//-->
+ </script>
+ <input type="button" name="quotereply" id="quotereply" value="Quote" class="button" onclick="quoteReply([% form.pid %])">
+ [% END %]
+
</p>
[% END %]
<div class="notes">

0 comments on commit d1142f1

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