UniversalEditButton

Summary: Provide support for the Universal Edit Button in PmWiki
Version: 2008-06-23
Prerequisites:
Status: Beta
Maintainer: Breyten
Categories: Editing

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

The Universal Edit Button is a green pencil icon in the address bar that indicates a web page is editable. It is similar to the orange "broadcast" RSS icon that indicates there is an RSS feed available. This cookbook recipe adds support for PmWiki sites to enable this kind of behavior.

Notes

To install, simply copy ueb.phpΔ to your cookbook directory, and add the following line to your config.php:

include_once("$FarmD/cookbook/ueb.php");

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also

FeedLinks

Contributors

Comments

Alternatively, if using AuthUser or some other authentication system that limits editing rights, you could use something like this in a config file:

if ( ( $action != 'edit' ) && ( $action != 'login' ) )
  $HTMLHeaderFmt['ueblink'] = "\n"
    . '<link rel="alternate" type="application/x-wiki" title="'
    . ( CondAuth('',"edit $pagename") ? 'Edit this page' : 'Log in to edit this page' )
    . '" href="$PageUrl?action=edit" />';

--Eemeli Aro March 10, 2009, at 09:37 AM

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.