Committer: amyshkin
LJSUP-8857: Updating commenting formU trunk/cgi-bin/LJ/S2/EntryPage.pm U trunk/htdocs/talkread.bml
Modified: trunk/cgi-bin/LJ/S2/EntryPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-08-31 02:16:18 UTC (rev 19898) +++ trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-08-31 02:19:12 UTC (rev 19899) @@ -7,11 +7,19 @@ use LJ::TimeUtil; use LJ::UserApps; -sub EntryPage -{ +sub EntryPage { my ($u, $remote, $opts) = @_; my $get = $opts->{'getargs'}; + if ( $get->{'screen'} ) { + LJ::need_string(qw{ + /talkpost_do.bml.success.screened.comm.anon2 + /talkpost_do.bml.success.screened.comm2 + /talkpost_do.bml.success.screened.user.anon2 + /talkpost_do.bml.success.screened.user2 + }); + } + my $p = Page($u, $opts); $p->{'_type'} = "EntryPage"; $p->{'view'} = "entry"; @@ -40,7 +48,7 @@ $p->{'page_id'} = 'journal-' . $u->username . '-' . $entry->ditemid; $p->{'multiform_on'} = $entry->comments_manageable_by($remote); - + my $itemid = $entry->jitemid; my $permalink = $entry->url; my $stylemine = $get->{'style'} eq "mine" ? "style=mine" : ""; @@ -73,7 +81,7 @@ )); if($remote) { - LJ::need_string(qw/ + LJ::need_string(qw/ comment.cancel comment.delete comment.delete.q @@ -255,7 +263,7 @@ 'edit_url' => $edit_url, }; - # don't show info from suspended users, and from users who deleted their journals + # don't show info from suspended users, and from users who deleted their journals # and choosed to delete their comments in other journals if (!$viewsome && $pu) { my $hide_comment; @@ -267,7 +275,7 @@ $hide_comment = 1; } } - + if ($hide_comment) { $s2com->{'text'} = ""; $s2com->{'subject'} = ""; @@ -362,7 +370,7 @@ $p->{'LJ_cmtinfo'} = $js if $opts->{'need_cmtinfo'}; $entry_cminfo .= $js; } - + $p->{head_content}->set_options( { entry_cmtinfo => $entry_cminfo} ); $p->{head_content}->set_options( { entry_metadata => $entry->extract_metadata } ); @@ -517,14 +525,14 @@ } my $subject = $entry->subject_html; - - my $no_cut_expand = !$get->{cut_expand} && $get->{page} && $get->{page} > 1 ? 1 : 0; + my $no_cut_expand = !$get->{cut_expand} && $get->{page} && $get->{page} > 1 ? 1 : 0; + my $event = $entry->event_html({ no_cut_expand => $no_cut_expand, page => $get->{page}, }); - + if ($get->{'nohtml'}) { # quote all non-LJ tags $subject =~ s{<(?!/?lj)(.*?)>} {<$1>}gi; Modified: trunk/htdocs/talkread.bml =================================================================== --- trunk/htdocs/talkread.bml 2011-08-31 02:16:18 UTC (rev 19898) +++ trunk/htdocs/talkread.bml 2011-08-31 02:19:12 UTC (rev 19899) @@ -224,9 +224,9 @@ js/quickreply.js )); } - + if($remote) { - LJ::need_string(qw/ + LJ::need_string(qw/ comment.cancel comment.delete comment.delete.q @@ -245,6 +245,15 @@ comment.delete/); } + if ( $GET{'screen'} ) { + LJ::need_string(qw{ + /talkpost_do.bml.success.screened.comm.anon2 + /talkpost_do.bml.success.screened.comm2 + /talkpost_do.bml.success.screened.user.anon2 + /talkpost_do.bml.success.screened.user2 + }); + } + my $showmultiform = $remote && ($remote->{'user'} eq $u->{'user'} || $remote->{'user'} eq $up->{'user'} || @@ -255,7 +264,7 @@ my $event = $item->{'event'}; my $suspend_msg = $entry && $entry->should_show_suspend_msg_to($remote) ? 1 : 0; my $no_cut_expand = !$GET{cut_expand} && $GET{page} && $GET{page} > 1 ? 1 : 0; - + if($no_cut_expand) { $talkurl .= '?page=' . $GET{page} . '&cut_expand=1'; } @@ -265,8 +274,8 @@ { preformatted => $props->{'opt_preformatted'}, suspend_msg => $suspend_msg, - unsuspend_supportid => $suspend_msg ? $entry->prop("unsuspend_supportid") : 0, - cuturl => $entry->prop('reposted_from') || $talkurl, + unsuspend_supportid => $suspend_msg ? $entry->prop("unsuspend_supportid") : 0, + cuturl => $entry->prop('reposted_from') || $talkurl, expand_cut => !$no_cut_expand, journalid => $entry->journalid, posterid => $entry->posterid, @@ -362,8 +371,8 @@ $moodname ||= LJ::mood_name($val); my %pic; if (LJ::get_mood_picture($themeid, $val, \%pic)) { - $moodpic = "<img src=\"$pic{'pic'}\" align='absmiddle' " . - LJ::mood_size_attributes(%pic) . + $moodpic = "<img src=\"$pic{'pic'}\" align='absmiddle' " . + LJ::mood_size_attributes(%pic) . " vspace='1' alt='' /> "; } } @@ -416,9 +425,9 @@ my $curkey = "talk.curname_" . $_; my $curname = BML::ml($curkey); $curname = "<b>Current $_:</b>" unless $curname; - + $ret .= "<tr><td align=right>$curname</td>"; - + if ($_ eq 'Music') { $ret .= "<td>" . LJ::LastFM::format_current_music_string($current{$_}) . "</td></tr>\n"; } else { @@ -473,16 +482,16 @@ if (@verticals) { $LJ::REQ_GLOBAL{verticals_of_first_public_post} = join(",", @verticals); } - + my $ad = LJ::get_ads ({ location => 'bml.talkread.ebox', nowrap => 1, - journalu => $u, - vertical => $LJ::REQ_GLOBAL{verticals_of_first_public_post}, + journalu => $u, + vertical => $LJ::REQ_GLOBAL{verticals_of_first_public_post}, interests_extra => $qotd ? { qotd => $qotd } : {}, s1_view => 'entry', }); - + if ($ad) { $ret .= $ad; $ret .= "<hr width='100%' size='2' align='center' />"; @@ -526,7 +535,7 @@ ); return $output->{error} if $output->{error}; - + my $page = $output->{page}; my $pages = $output->{pages}; $multiform_selects ||= $output->{multiform_selects}; @@ -586,7 +595,7 @@ my $showspamurl = LJ::Talk::talkargs($talkurl, "mode=showspam", $stylemine, $formatlight); my $hidespamurl = LJ::Talk::talkargs($talkurl, "", $stylemine, $formatlight); my $spam_counter = $entry->prop('spam_counter') || 0; - + my $readspamlink = ''; if ($spam_counter > 0 && LJ::Talk::can_unmark_spam($remote, $u, $up)) { if ($showspam) { @@ -637,7 +646,7 @@ if ($remote) { $rated_count .= " (<a href=\"#\" class=\"i_like_this i_like_this_".$ditemid."\" onclick=\"return ILikeThis.rate(event,this,'$ditemid','".$u->{'user'}."')\" title=\"$i_like_this_title\">+1"; - if (LJ::get_eventrates( + if (LJ::get_eventrates( journalid => $u->{'userid'}, itemid => $ditemid, userids => [ $remote->{'userid'} ], )) @@ -736,7 +745,7 @@ $ret .= " " . LJ::html_submit('', $ML{'.talkmulti.submit'}); $ret .= "</p>"; } - + my $ad = LJ::get_ads({ location => 'bml.talk.bottom', journalu => $u, s1_view => 'entry', }); if ($ad) { $ret .= "<hr width='100%' size='2' align='center' />" if $showmultiform && $multiform_selects; @@ -745,7 +754,7 @@ } $ret .= "</form>"; - + if ($navcrap) { $ret .= "<p>$navcrap</p>"; }