[Home]WikiPatches/UniversalEditButton

UseModWiki | WikiPatches | RecentChanges | Preferences

Universal Edit Button Patch

Description

The /UniversalEditButton is an emerging standard, similar to the RSS link that is available on certain websites and wikis (see also: /RssLinkInHeader). This allows browsers that support the standard to provide an "edit this page" link similar to the RSS icon.

A FireFox? extension for this exists.

Details at: http://universaleditbutton.org/Universal_Edit_Button.

In Add-ons for Firefox at: https://addons.mozilla.org/en-US/firefox/addon/7804.

Patch

--- wiki.pl     2007-09-12 00:44:07.000000000 +0200
+++ UniversalEditButton.pl      2008-09-23 14:45:58.000000000 +0200
@@ -1357,6 +1357,12 @@
   if ($FavIcon ne '') {
     $html .= '<LINK REL="SHORTCUT ICON" HREF="' . $FavIcon . '">'
   }
+  if ($OpenPageName and &UserCanEdit($OpenPageName, 0)) {
+    $html .= '<link rel="alternate" type="application/x-wiki" title="'
+      . T('Edit text of this page') . '" href="'
+      . $ScriptName . &ScriptLinkChar() . &UriEscape("action=edit&id=$id")
+      . '">';
+  }
   if ($MetaKeywords) {
       my $keywords = $OpenPageName;
       $keywords =~ s/([a-z])([A-Z])/$1, $2/g;

Author

UngarPeter

Logs

  1. addons.mozilla.org: this add-on is for older versions of Firefox (Version 1.2; Works with Firefox: 2.0 3.1b3; Updated April 14, 2009). See http://universaleditbutton.org/Universal_Edit_Button.

This patch requires determine $id through environment variable.

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 17, 2009 6:37 am by JuanmaMP (diff)
Search: