Commit info for scoop/lib/Scoop:
Modified Files:
Comments.pm
Log Message:
Moved comment post form to database
-janra
Index: Comments.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Comments.pm,v
retrieving revision 1.128
retrieving revision 1.129
diff -r1.128 -r1.129
12a13,14
> my $post = $S->cgi->param('post');
> my $preview = $S->cgi->param('preview');
61,63d62
< #Make sure comment controls are set
< #$S->_set_comment_mode();
<
77c76,79
< $mode = 'Preview' if $S->{CGI}->param('spellcheck');
---
> if ( $S->{CGI}->param('spellcheck') ) {
> $preview = 'Preview';
> $post = '';
> }
85c87,88
< $mode = 'Preview';
---
> $preview = 'Preview';
> $post = '';
88c91
< if ($tool eq 'post' && $mode eq 'Post') {
---
> if ( $tool eq 'post' && $post ) {
96c99,100
< $mode = 'Preview';
---
> $preview = 'Preview';
> $post = '';
105c109,110
< $mode = 'Preview';
---
> $preview = 'Preview';
> $post = '';
109c114
< if ($mode ne 'Preview') {
---
> if ( !$preview ) {
120c125,126
< $mode = 'Preview';
---
> $preview = 'Preview';
> $post = '';
126c132,133
< $mode = 'Preview';
---
> $preview = 'Preview';
> $post = '';
135,138c142
< $S->{UI}->{BLOCKS}->{COMM_ERR} = qq|
< <table cellpadding="1" cellspacing="0" border="0" width="100%">
< <tr><td>$err</td></tr>
< </table>| if ($err);
---
> $S->{UI}->{BLOCKS}->{COMM_ERR} = $err if ($err);
153c157,158
< $S->{PARAMS}->{'mode'} = $mode;
---
> $S->{PARAMS}->{'post'} = $post;
> $S->{PARAMS}->{'preview'} = $preview;
155,164c160,165
< if ($tool eq 'post' && ($mode eq 'Preview' || $mode eq '') && $S->have_perm( 'comment_post' ) && $sect_post_perm && !$S->_check_archivestatus($sid) ) {
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|
< <table cellpadding="1" cellspacing="0" border="0" width="100\%">
< <tr>
< <td bgcolor="%%title_bgcolor%%" width="100%">
< %%title_font%%<b>Replying To:</b>%%title_font_end%%
< </td>
< </tr>
< <tr>
< <td>|;
---
> my $page;
> my $keys;
>
> if ($tool eq 'post' && !$post && $S->have_perm( 'comment_post' ) && $sect_post_perm && !$S->_check_archivestatus($sid) ) {
> $page = $S->{UI}->{BLOCKS}->{commentreply_display};
>
166c167
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->displaystory($sid);
---
> $keys->{'replying_to'} = $S->displaystory($sid);
168c169
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->display_comments($sid, $pid, 'alone');
---
> $keys->{'replying_to'} = $S->display_comments($sid, $pid, 'alone');
170,172c171,172
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|
< </td></tr>|;
< $S->{UI}->{BLOCKS}->{CONTENT} .= '<tr><td>'.$S->post_form().'</td></tr></table>';
---
>
> $keys->{'post_form'} = $S->post_form();
174,178c174,175
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->comment_controls($sid, 'top');
< #$S->{UI}->{BLOCKS}->{BOXES} .= $S->comment_choices_box($sid);
< #$S->{UI}->{BLOCKS}->{BOXES} .= '<P>';
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|
< <table cellpadding="1" cellspacing="0" border="0" width="100\%">|;
---
> $page = $S->{UI}->{BLOCKS}->{comment_posted_display};
> $keys->{'comment_controls'} = $S->comment_controls($sid, 'top');
180,187c177
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|
< <tr>
< <td bgcolor="%%title_bgcolor%%" width="100%">
< %%title_font%%$S->{UI}->{BLOCKS}->{untrusted_post_message}%%title_font_end%%
< </td>
< </tr>
< <tr>
< <td>|;
---
> $keys->{'post_msg'} = $S->{UI}->{BLOCKS}->{untrusted_post_message};
189c179
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->{UI}->{BLOCKS}->{comment_posted_message};
---
> $keys->{'post_msg'} = $S->{UI}->{BLOCKS}->{comment_posted_message};
192,194c182
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->display_comments($sid, $pid, 'alone', $cid);
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|
< </td></tr></table>|;
---
> $keys->{'new_comment'} = $S->display_comments($sid, $pid, 'alone', $cid);
196c184
< $S->{UI}->{BLOCKS}->{CONTENT} = qq|<p><b>%%norm_font%%Sorry, you don't have permission to see comments in the queue.%%norm_font_end%%</b></p>|;
---
> $page = qq|<p><b>%%norm_font%%Sorry, you don't have permission to see comments in the queue.%%norm_font_end%%</b></p>|;
201c189
< $S->{UI}->{BLOCKS}->{CONTENT} = $S->display_comments($sid, $pid, 'collapsed');
---
> $page = $S->display_comments($sid, $pid, 'collapsed');
213c201
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->comment_controls($sid, 'top');
---
> $page .= $S->comment_controls($sid, 'top');
216,217c204,205
< $S->{UI}->{BLOCKS}->{CONTENT} .= "<p>$delete_confirm</p>" if $delete_confirm;
< $S->{UI}->{BLOCKS}->{CONTENT} .= qq|$comments|;
---
> $page .= "<p>$delete_confirm</p>" if $delete_confirm;
> $page .= qq|$comments|;
220,221c208,209
< $S->{UI}->{BLOCKS}->{CONTENT} .= '<p>';
< $S->{UI}->{BLOCKS}->{CONTENT} .= $S->comment_controls($sid, 'top');
---
> $page .= '<p>';
> $page .= $S->comment_controls($sid, 'top');
223,224d210
< #$S->{UI}->{BLOCKS}->{BOXES} .= $S->comment_choices_box($sid);
< #$S->{UI}->{BLOCKS}->{BOXES} .= '<P>';
228c214
< $S->{UI}->{BLOCKS}->{CONTENT} = qq|
---
> $page = qq|
231c217
< $S->{UI}->{BLOCKS}->{CONTENT} = qq|
---
> $page = qq|
234c220
< $S->{UI}->{BLOCKS}->{CONTENT} = qq|<b>%%norm_font%%Sorry, I couldn't find that story.%%norm_font_end%%</b>|;
---
> $page = qq|<b>%%norm_font%%Sorry, I couldn't find that story.%%norm_font_end%%</b>|;
244a231,232
> $page = $S->interpolate($page,$keys);
> $S->{UI}->{BLOCKS}->{CONTENT} = $page;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Scoop-checkins mailing list
Scoop-checkins at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scoop-checkins