www: b1cadda2: removing unvisited blog page in news sec...

caseyho at pidgin.im caseyho at pidgin.im
Fri Dec 26 19:40:49 EST 2008


-----------------------------------------------------------------
Revision: b1cadda28ca638799ff58603b9783ab1a17f2827
Ancestor: 6d5133b6a4bbe217eec8185fad91089e331b8487
Author: caseyho at pidgin.im
Date: 2008-12-27T00:37:52
Branch: im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/b1cadda28ca638799ff58603b9783ab1a17f2827

Deleted entries:
        htdocs/news/blogs htdocs/news/blogs/index.php
Modified files:
        inc/section.inc inc/section.news.inc

ChangeLog: 

removing unvisited blog page in news section

-------------- next part --------------
============================================================
--- inc/section.inc	0abba62e841f02416306bbccade01e63b21d9d65
+++ inc/section.inc	cffa6f62a6d4adbec3b4d638e8a38097fce34058
@@ -21,10 +21,25 @@ if (!array_key_exists('subsect', $page))
     if ($page['abslink'] && !preg_match("%^[a-z]+:%", $link)) {
       $link = $page['siteroot'] . $link;
     }
+
+    $external = 0;
+    // An imperfect way of detecting external URLs.  This works for our current urls.
+    if (preg_match("/com/", $link)) {
+    	$external = 1;
+    }
+    
     if ($page['subsect'] == $name) {
-      echo '  <li class="active"><a href="' . $link . '">' . $escaped . "</a></li>\n";
+      echo '  <li class="active"><a ';
+      if ($external > 0) {
+         echo 'rel=nofollow ';
+      }
+      echo 'href="' . $link . '">' . $escaped . "</a></li>\n";
     } else {
-      echo '  <li><a href="' . $link . '">' . $escaped . "</a></li>\n";
+      echo '  <li><a ';
+      if ($external > 0) {
+        echo 'rel=nofollow ';
+      }
+      echo 'href="' . $link . '">' . $escaped . "</a></li>\n";
     }
   }
 ?>
============================================================
--- inc/section.news.inc	f045a3d23845eb363de715ca82ee6e10bf3f03c6
+++ inc/section.news.inc	05b73594e5af4025a7558b1b32f71010c5aa66f3
@@ -3,7 +3,7 @@ $sub_sections['Security Advisories'] = "
 // Define Sub Sections
 $sub_sections['Latest News']         = "http://planet.pidgin.im/";
 $sub_sections['Security Advisories'] = "/news/security/";
-$sub_sections['Blogs']               = "/news/blogs/";
+$sub_sections['Developer Blogs (external)']               = "http://www.planet-im.com/";
 
 include("section.inc");
 


More information about the Commits mailing list