ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[livejournal] r18813: LJSUP-8279: Deny indexation of the tech ...

Committer: ssafronova
LJSUP-8279: Deny indexation of the tech and duplicated links
U   trunk/bin/upgrading/s1styles.dat
U   trunk/cgi-bin/LJ/S2.pm
U   trunk/cgi-bin/LJ/Talk.pm
U   trunk/cgi-bin/weblib.pl
Modified: trunk/bin/upgrading/s1styles.dat
===================================================================
--- trunk/bin/upgrading/s1styles.dat	2011-04-06 10:13:53 UTC (rev 18812)
+++ trunk/bin/upgrading/s1styles.dat	2011-04-06 10:51:20 UTC (rev 18813)
@@ -6384,7 +6384,7 @@
 
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><a href="%%urlread%%">%%messagecount%% Comment%%mc-plural-s%%</a> -
+LASTN_TALK_READLINK=><a href="%%urlread%%" rel="nofollow">%%messagecount%% Comment%%mc-plural-s%%</a> -
 
 LASTN_SKIP_BACKWARD<=
 <li><a href="%%url%%">Previous %%numitems%% Entries</a></li>
@@ -6393,7 +6393,7 @@
 
 LASTN_SUBJECT=> <span class="subject">%%subject%%</span><br>
 
-LASTN_TALK_LINKS=><div class="talklinks" clear="all">%%readlink%% <a href="%%urlpost%%">Comment on this</a></div>
+LASTN_TALK_LINKS=><div class="talklinks" clear="all">%%readlink%% <a href="%%urlpost%%" rel="nofollow">Comment on this</a></div>
 
 
 .
@@ -6537,7 +6537,7 @@
 </HTML>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><B><A HREF="%%urlread%%">%%messagecount%% Comment%%mc-plural-s%%</A></B> |
+LASTN_TALK_READLINK=><B><A HREF="%%urlread%%" rel="nofollow">%%messagecount%% Comment%%mc-plural-s%%</A></B> |
 
 LASTN_SKIP_BACKWARD=><A HREF="%%url%%">&lt;&lt; Previous %%numitems%%</A>
 
@@ -6545,7 +6545,7 @@
 
 LASTN_TALK_LINKS<=
 <DIV STYLE="text-align:right">
-  <FONT SIZE=-2>(%%readlink%%<A HREF="%%urlpost%%">Comment on this</A>)</FONT></DIV>
+  <FONT SIZE=-2>(%%readlink%%<A HREF="%%urlpost%%" rel="nofollow">Comment on this</A>)</FONT></DIV>
 <=LASTN_TALK_LINKS
 
 
@@ -6867,13 +6867,13 @@
 </html>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><a href="%%urlread%%">Read %%messagecount%%</a>&nbsp;-&nbsp;
+LASTN_TALK_READLINK=><a href="%%urlread%%" rel="nofollow">Read %%messagecount%%</a>&nbsp;-&nbsp;
 
 LASTN_SKIP_BACKWARD=><a href="%%url%%">Backward</a>
 
 LASTN_SUBJECT=>%%subject%%
 
-LASTN_TALK_LINKS=>%%readlink%%<a href="%%urlpost%%">Post</a>
+LASTN_TALK_LINKS=>%%readlink%%<a href="%%urlpost%%" rel="nofollow">Post</a>
 
 
 .
@@ -7258,7 +7258,7 @@
 </html>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><a href="%%urlread%%"><b>%%messagecount%% comment%%mc-plural-s%%</b></a>|
+LASTN_TALK_READLINK=><a href="%%urlread%%" rel="nofollow"><b>%%messagecount%% comment%%mc-plural-s%%</b></a>|
 
 LASTN_SKIP_BACKWARD=><a href="%%url%%">earlier</a>
 
@@ -7267,7 +7267,7 @@
 LASTN_TALK_LINKS<=
 <tr>
 <td align="right" colspan="2" width="100%" bgcolor="%%color:weak_back%%" class="comments">
-%%readlink%%<a href="%%urlpost%%">post comment</a>
+%%readlink%%<a href="%%urlpost%%" rel="nofollow">post comment</a>
 </td>
 </tr>
 <=LASTN_TALK_LINKS
@@ -7429,14 +7429,14 @@
 </html>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><a href="%%urlread%%">%%messagecount%%&nbsp;comment%%mc-plural-s%%</a>&nbsp;|&nbsp;
+LASTN_TALK_READLINK=><a href="%%urlread%%" rel="nofollow">%%messagecount%%&nbsp;comment%%mc-plural-s%%</a>&nbsp;|&nbsp;
 
 LASTN_SKIP_BACKWARD=><a href="%%url%%">Previous&nbsp;%%numitems%%&nbsp;entries</a>
 
 LASTN_SUBJECT=> - <em>%%subject%%</em>
 
 LASTN_TALK_LINKS<=
-    <div class="Comment">(%%readlink%%<a href="%%urlpost%%">comment&nbsp;on&nbsp;this</a>)</div>
+    <div class="Comment">(%%readlink%%<a href="%%urlpost%%" rel="nofollow">comment&nbsp;on&nbsp;this</a>)</div>
 
 <=LASTN_TALK_LINKS
 
@@ -7597,13 +7597,13 @@
 </HTML>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><A HREF="%%urlread%%">Read %%messagecount%% Note%%mc-plural-s%%</A> -
+LASTN_TALK_READLINK=><A HREF="%%urlread%%" rel="nofollow">Read %%messagecount%% Note%%mc-plural-s%%</A> -
 
 LASTN_SKIP_BACKWARD=><A HREF="%%url%%">Back A Page</A>
 
 LASTN_SUBJECT=> <FONT COLOR="red">%%subject%%</FONT>
 
-LASTN_TALK_LINKS=><P>%%readlink%%<A HREF="%%urlpost%%">Make Notes</A></P>
+LASTN_TALK_LINKS=><P>%%readlink%%<A HREF="%%urlpost%%" rel="nofollow">Make Notes</A></P>
 
 
 .
@@ -7813,13 +7813,13 @@
 </HTML>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><A HREF="%%urlread%%">%%messagecount%%&nbsp;comment%%mc-plural-s%%</A>&nbsp;|&nbsp;
+LASTN_TALK_READLINK=><A HREF="%%urlread%%" rel="nofollow">%%messagecount%%&nbsp;comment%%mc-plural-s%%</A>&nbsp;|&nbsp;
 
 LASTN_SKIP_BACKWARD=><A HREF="%%url%%">&gt; previous %%numitems%% entries</A>
 
 LASTN_SUBJECT=><B> - <FONT COLOR="%%color:page_text_em%%">%%subject%%</FONT></B>
 
-LASTN_TALK_LINKS=><P ALIGN="RIGHT"><FONT FACE="Verdana,Arial,Helvetica" SIZE=1>(%%readlink%%<A HREF="%%urlpost%%">comment&nbsp;on&nbsp;this</A>)</FONT></P>
+LASTN_TALK_LINKS=><P ALIGN="RIGHT"><FONT FACE="Verdana,Arial,Helvetica" SIZE=1>(%%readlink%%<A HREF="%%urlpost%%" rel="nofollow">comment&nbsp;on&nbsp;this</A>)</FONT></P>
 
 
 .
@@ -8102,13 +8102,13 @@
 </html>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><a href="%%urlread%%">%%messagecount%% comment%%mc-plural-s%%</a>&nbsp;|&nbsp;
+LASTN_TALK_READLINK=><a href="%%urlread%%" rel="nofollow">%%messagecount%% comment%%mc-plural-s%%</a>&nbsp;|&nbsp;
 
 LASTN_SKIP_BACKWARD=><a href="%%url%%">back %%lc:numitems%% entries</a>
 
 LASTN_SUBJECT=>%%subject%%
 
-LASTN_TALK_LINKS=>%%readlink%%<a href="%%urlpost%%">post a comment</a>
+LASTN_TALK_LINKS=>%%readlink%%<a href="%%urlpost%%" rel="nofollow">post a comment</a>
 
 
 .
@@ -8334,7 +8334,7 @@
 </HTML>
 <=LASTN_PAGE
 
-LASTN_TALK_READLINK=><A HREF="%%urlread%%">Read %%messagecount%%</A> or 
+LASTN_TALK_READLINK=><A HREF="%%urlread%%" rel="nofollow">Read %%messagecount%%</A> or 
 
 LASTN_SKIP_BACKWARD=><A HREF="%%url%%">back %%numitems%% entries</A>
 
@@ -8345,7 +8345,7 @@
 <TD BGCOLOR="%%color:weak_back%%">
 <FONT COLOR="%%color:weak_text%%">
 <NOBR>
-Comments: %%readlink%%<A HREF="%%urlpost%%">Add Your Own</A>.
+Comments: %%readlink%%<A HREF="%%urlpost%%" rel="nofollow">Add Your Own</A>.
 </NOBR>
 </FONT>
 </TD>
@@ -8512,7 +8512,7 @@
 LASTN_SUBJECT=><b>%%subject%%</b>
 
 LASTN_TALK_LINKS<=
-<a href="%%urlread%%">
+<a href="%%urlread%%" rel="nofollow">
 <img src="%%cons:img%%/style/webley/jwc%%readlink%%.png" border="0" /></a>
 <=LASTN_TALK_LINKS
 

Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2011-04-06 10:13:53 UTC (rev 18812)
+++ trunk/cgi-bin/LJ/S2.pm	2011-04-06 10:51:20 UTC (rev 18813)
@@ -3345,9 +3345,9 @@
     my $bp = LJ::bad_password_redirect({ 'returl' => 1 });
 
     if ($bp) {
-        $S2::pout->("<a href='$bp'>$linktext</a>");
+        $S2::pout->("<a href='$bp' rel=\"nofollow\">$linktext</a>");
     } else {
-        $S2::pout->("<a$onclick href=\"$replyurl\"$opt_class>$linktext</a>");
+        $S2::pout->("<a$onclick href=\"$replyurl\"$opt_class rel=\"nofollow\">$linktext</a>");
     }
 }
 
@@ -3484,7 +3484,7 @@
     my $expand_url = $this->{thread_url};
     $expand_url =~ s/(?=#)/&expand=$banners_off/;
     
-    return "<a href='$this->{thread_url}'$title$class onClick=\"Expander.make(this,'$expand_url','$this->{talkid}'); return false;\">$text</a>";
+    return "<a href='$this->{thread_url}'$title$class onClick=\"Expander.make(this,'$expand_url','$this->{talkid}'); return false;\" rel=\"nofollow\">$text</a>";
 }
 
 sub Comment__print_expand_link

Modified: trunk/cgi-bin/LJ/Talk.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk.pm	2011-04-06 10:13:53 UTC (rev 18812)
+++ trunk/cgi-bin/LJ/Talk.pm	2011-04-06 10:51:20 UTC (rev 18813)
@@ -2589,56 +2589,56 @@
                 if ($post->{'state'} ne 'B') {
                     $text .= " <font size='-1'>(<a href='" .
                              LJ::Talk::talkargs($talkurl, "thread=$dtid", $formatlight) .
-                             "#t$dtid'>" .
+                             "#t$dtid' rel='nofollow'>" .
                              BML::ml('talk.commentpermlink') . "</a>)</font> ";
                 }
                 
                 if ($comment->remote_can_edit) {
                     $text .= "<a href='" .
                              LJ::Talk::talkargs($comment->edit_url, $stylemine, $formatlight) .
-                             "'>" .
+                             "' rel='nofollow'>" .
                              LJ::img("editcomment", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) . "</a>";
                 }
 
                 if (LJ::Talk::can_delete($remote, $u, $up, $userpost)) {
                     $text .= "<a href='$LJ::SITEROOT/delcomment.bml?${jargent}id=$dtid" .
-                             ($opts->{'showspam'} ? '&spam=1' : '') . "'>" .
+                             ($opts->{'showspam'} ? '&spam=1' : '') . "' rel='nofollow'>" .
                              LJ::img("btn_del", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) .
                              "</a>";
                 }
 
                 if ($post->{'state'} ne 'B' && LJ::is_enabled('spam_button') && $userpost && LJ::Talk::can_mark_spam($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/delcomment.bml?${jargent}id=$dtid&spam=1'>" .
+                    $text .= "<a href='$LJ::SITEROOT/delcomment.bml?${jargent}id=$dtid&spam=1' rel='nofollow'>" .
                              LJ::img("btn_spam", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) .
                              "</a>";
                 }
 
                 if ($post->{'state'} eq 'B' && LJ::is_enabled('spam_button') && LJ::Talk::can_unmark_spam($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/spamcomment.bml?mode=unspam&amp;${jargent}talkid=$dtid'>" .
+                    $text .= "<a href='$LJ::SITEROOT/spamcomment.bml?mode=unspam&amp;${jargent}talkid=$dtid' rel='nofollow'>" .
                              LJ::img("btn_unspam", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) .
                              "</a>";
                 }
 
                 if ($post->{'state'} ne 'F' && ($LJ::DISABLED{'spam_button'} || $post->{'state'} ne 'B') && LJ::Talk::can_freeze($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=freeze&amp;${jargent}talkid=$dtid'>" .
+                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=freeze&amp;${jargent}talkid=$dtid' rel='nofollow'>" .
                              LJ::img("btn_freeze", "", { align => 'absmiddle', hspace => 2, vspace => }) .
                              "</a>";
                 }
                     
                 if ($post->{'state'} eq 'F' && LJ::Talk::can_unfreeze($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=unfreeze&amp;${jargent}talkid=$dtid'>" .
+                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=unfreeze&amp;${jargent}talkid=$dtid' rel='nofollow'>" .
                              LJ::img("btn_unfreeze", "", { align => 'absmiddle', hspace => 2, vspace => }) .
                              "</a>";
                 }
 
                 if ($post->{'state'} ne 'S' && ($LJ::DISABLED{'spam_button'} || $post->{'state'} ne 'B') && LJ::Talk::can_screen($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=screen&amp;${jargent}talkid=$dtid'>" .
+                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=screen&amp;${jargent}talkid=$dtid' rel='nofollow'>" .
                              LJ::img("btn_scr", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) .
                              "</a>";
                 }
                    
                 if ($post->{'state'} eq 'S' && LJ::Talk::can_unscreen($remote, $u, $up, $userpost)) {
-                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=unscreen&amp;${jargent}talkid=$dtid'>" .
+                    $text .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=unscreen&amp;${jargent}talkid=$dtid' rel='nofollow'>" .
                              LJ::img("btn_unscr", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) .
                              "</a>";
                 }
@@ -2684,7 +2684,7 @@
                     }
 
                     my $track_url = "$LJ::SITEROOT/manage/subscriptions/comments.bml?journal=$u->{'user'}&amp;talkid=$dtid";
-                    $text .= "<a href='$track_url'>" . LJ::img($track_img, '', {'align' => 'absmiddle'}) . "</a>";
+                    $text .= "<a href='$track_url' rel='nofollow'>" . LJ::img($track_img, '', {'align' => 'absmiddle'}) . "</a>";
                 }
 
                 if ($showmultiform) {
@@ -2737,7 +2737,7 @@
                         # See if we want to force them to change their password
                         my $bp = LJ::bad_password_redirect({ 'returl' => 1 });
                         if ($bp) {
-                            $text .= "(<a href='$bp'>" . BML::ml('talk.replytothis') . "</a>) ";
+                            $text .= "(<a href='$bp' rel='nofollow'>" . BML::ml('talk.replytothis') . "</a>) ";
                         }
                         else {
                             if ($post->{state} eq 'S') {
@@ -2754,19 +2754,19 @@
                         }
                     }
                     else {
-                        $text .= "(<a href='$replyurl'>" . BML::ml('talk.replytothis') . "</a>) ";
+                        $text .= "(<a href='$replyurl' rel='nofollow'>" . BML::ml('talk.replytothis') . "</a>) ";
                     }
                 }
 
                 my $parentid = $post->{'parenttalkid'} || $post->{'parenttalkid_actual'};
                 if ($parentid != 0) {
                     my $dpid = $parentid * 256 + $anum;
-                    $text .= "(<a href='" . LJ::Talk::talkargs($talkurl, "thread=$dpid", $stylemine, $formatlight) . "#t$dpid'>" . BML::ml('talk.parentlink') . "</a>) ";
+                    $text .= "(<a href='" . LJ::Talk::talkargs($talkurl, "thread=$dpid", $stylemine, $formatlight) . "#t$dpid' rel='nofollow'>" . BML::ml('talk.parentlink') . "</a>) ";
                 }
    
                 my $has_closed_children = 0;
                 if ($post->{'children'} && @{$post->{'children'}}) {
-                    $text .= "(<a href='$thread_url'>" . BML::ml('talk.threadlink') . "</a>) ";
+                    $text .= "(<a href='$thread_url' rel='nofollow'>" . BML::ml('talk.threadlink') . "</a>) ";
 
                     if (grep {! $_->{_loaded} and !($_->{state} eq "D")} @{$post->{'children'}}) {
                         $has_closed_children = 1;
@@ -2799,7 +2799,7 @@
                 $html->{header} = $comment_header->();
                 $html->{footer} = $comment_footer->();
 
-                my $text = "<a href='$thread_url'>" . LJ::ehtml($post->{'subject'} || BML::ml('.nosubject')) . "</a> - $user, <i>$datepost</i> ";
+                my $text = "<a href='$thread_url' rel='nofollow'>" . LJ::ehtml($post->{'subject'} || BML::ml('.nosubject')) . "</a> - $user, <i>$datepost</i> ";
 
                 if (LJ::run_hook('show_thread_expander', { is_s1 => 1 })) {
                     $text .= ' ' . $get_expand_link->();

Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-04-06 10:13:53 UTC (rev 18812)
+++ trunk/cgi-bin/weblib.pl	2011-04-06 10:51:20 UTC (rev 18813)
@@ -868,9 +868,9 @@
         $ju = LJ::load_userid(LJ::Request->notes('journalid')) if LJ::Request->is_inited and LJ::Request->notes('journalid');
 
         $onclick = "" if $ju->{'opt_whocanreply'} eq 'friends' and $remote and not LJ::is_friend($ju, $remote);
-        return "<a href=\"$replyurl\" onclick=\"$onclick\">$linktext</a>";
+        return "<a href=\"$replyurl\" onclick=\"$onclick\" rel='nofollow'>$linktext</a>";
     } else { # QR Disabled
-        return "<a href=\"$replyurl\">$linktext</a>";
+        return "<a href=\"$replyurl\" rel='nofollow'>$linktext</a>";
     }
 }
 

Tags: dat, livejournal, pl, pm, ssafronova
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments