|
Cookbook /
NewGroupWarningSummary: Display a warning when a user is creating a page in a non-existent wiki group.
Version: 2008-01-29
Prerequisites:
Status:
Maintainer: Petko
Questions answered by this recipeCan PmWiki warn editors when they are creating new pages in non-existent wiki groups? DescriptionLess experienced editors sometimes create links that, if followed, will lead to the inadvertent creation of pages in non-existent wiki groups. Example: by placing dots (".") or slashes ("/") in links. A link like [[Mr.Nobody]] is expected to link to a new page in the current group, and not to a page "Nobody" in a "Mr" group.
Example: by including formatting markup inside link-forming brackets. A link like [[%red%Main/Archives%%]] is expected to link to the page Archives in the Main group, not to a page Archives in a "RedMain" group.
This recipe displays a warning in with a thick red border when a new page in a new group is edited. Additionally, the warning message contains a list of the wiki pages that link to the currently edited page, making it easy for the user to find and correct bad links. This recipe will not stop the user from creating a new page, if he wishes to. 1. Site.NewGroupWarningCreate on your wiki a page "Site.NewGroupWarning" containing something like:
2. Site.EditFormPlace the following code in the beginning of the page Site.EditForm on your wiki:
(:if !exists $[{*$Group}/RecentChanges]:)
(:include $[{$SiteGroup}/NewGroupWarning]:)
(:if:)
NotesThe recipe works this way: the page Site.EditForm (with the text area where the pages are edited) checks whether there is a page RecentChanges in the current group. If not, it includes the Site.NewGroupWarning. Since the warning will display when editing a page in any group that lacks a RecentChanges page, you should make sure you do have a Group.RecentChanges page for every Group that exists when this recipe is put into place. Once users have created pages in a wrong group, then even after deleting the pages there is the special page WrongGroup.RecentChanges that persists and usually cannot be deleted. See the recipe RecentChanges Deletion on how authors can delete this page. Release NotesSee AlsoContributors
Comments
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |