logo       

CVS: phpwiki/lib Theme.php,1.123,1.124: msg#00169

web.wiki.phpwiki.checkins

Subject: CVS: phpwiki/lib Theme.php,1.123,1.124

Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18668

Modified Files:
Theme.php
Log Message:
especially for Google: nofollow on unauthenticated edit,diff,create,pdf

Index: Theme.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/Theme.php,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -2 -b -p -d -r1.123 -r1.124
--- Theme.php 25 Jan 2005 07:03:02 -0000 1.123
+++ Theme.php 27 Jan 2005 16:28:15 -0000 1.124
@@ -1185,4 +1185,8 @@ class Button extends HtmlElement {
if ($request->getArg('frame'))
$this->setAttr('target', '_top');
+ // Google honors this
+ if (in_array(strtolower($text), array('edit','create','diff','pdf'))
+ and !$request->_user->isAuthenticated())
+ $this->setAttr('rel', 'nofollow');
$this->pushContent($GLOBALS['WikiTheme']->maybeSplitWikiWord($text));
}
@@ -1207,4 +1211,8 @@ class ImageButton extends Button {
if ($class)
$this->setAttr('class', $class);
+ // Google honors this
+ if (in_array(strtolower($text), array('edit','create','diff','pdf'))
+ and !$GLOBALS['request']->_user->isAuthenticated())
+ $this->setAttr('rel', 'nofollow');

if (!is_array($img_attr))
@@ -1402,4 +1410,7 @@ function listAvailableLanguages() {

// $Log$
+// Revision 1.124 2005/01/27 16:28:15 rurban
+// especially for Google: nofollow on unauthenticated edit,diff,create,pdf
+//
// Revision 1.123 2005/01/25 07:03:02 rurban
// change addMoreAttr() to support named attr, to remove DoubleClickEdit for
htmldumps



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise