PmWiki
pmwiki.org
edit SideBar
https://www.jetphotos.com/photographer/598301
https://www.jetphotos.com/photographer/598304
https://www.jetphotos.com/photographer/598305
https://www.jetphotos.com/photographer/598307
https://www.jetphotos.com/photographer/598310
https://www.jetphotos.com/photographer/598312
https://www.jetphotos.com/photographer/598317
https://www.jetphotos.com/photographer/598318
https://www.jetphotos.com/photographer/598320
https://www.jetphotos.com/photographer/598321
https://www.jetphotos.com/photographer/598322
https://www.jetphotos.com/photographer/598324
https://www.jetphotos.com/photographer/598328
https://www.jetphotos.com/photographer/598340
https://www.jetphotos.com/photographer/598341
https://www.jetphotos.com/photographer/598346
https://www.jetphotos.com/photographer/598349
https://www.jetphotos.com/photographer/598357
https://www.jetphotos.com/photographer/598366
https://www.jetphotos.com/photographer/598372
https://www.jetphotos.com/photographer/598374
https://www.jetphotos.com/photographer/598378
https://www.jetphotos.com/photographer/600028
https://www.jetphotos.com/photographer/600031
https://www.jetphotos.com/photographer/600032
https://www.jetphotos.com/photographer/600034
https://www.jetphotos.com/photographer/600036
https://www.jetphotos.com/photographer/600037
https://www.jetphotos.com/photographer/600039
https://www.jetphotos.com/photographer/600041
https://www.jetphotos.com/photographer/600042
https://www.jetphotos.com/photographer/600045
https://www.jetphotos.com/photographer/600046
https://www.jetphotos.com/photographer/600047
https://www.jetphotos.com/photographer/600048
https://www.jetphotos.com/photographer/600050
https://www.jetphotos.com/photographer/600051
https://www.jetphotos.com/photographer/600052
https://www.jetphotos.com/photographer/600053
https://www.jetphotos.com/photographer/600055
https://www.jetphotos.com/photographer/600057
https://www.jetphotos.com/photographer/600641
https://www.jetphotos.com/photographer/600644
https://www.jetphotos.com/photographer/600645
https://www.jetphotos.com/photographer/600646
https://www.jetphotos.com/photographer/602231
https://www.jetphotos.com/photographer/602240
https://www.jetphotos.com/photographer/602244
https://www.jetphotos.com/photographer/602247
https://www.jetphotos.com/photographer/602261
https://www.jetphotos.com/photographer/602265
https://www.jetphotos.com/photographer/602279
https://www.jetphotos.com/photographer/602307
https://www.jetphotos.com/photographer/602315
https://www.jetphotos.com/photographer/602323
https://www.jetphotos.com/photographer/602340
https://www.jetphotos.com/photographer/602346
https://www.jetphotos.com/photographer/602741
https://www.jetphotos.com/photographer/602743
https://www.jetphotos.com/photographer/602744
https://www.jetphotos.com/photographer/602745
https://www.jetphotos.com/photographer/602746
https://www.jetphotos.com/photographer/602748
https://www.jetphotos.com/photographer/602749
https://www.jetphotos.com/photographer/602750
https://www.jetphotos.com/photographer/602757
https://www.jetphotos.com/photographer/602758
https://www.jetphotos.com/photographer/602762
https://www.jetphotos.com/photographer/602763
https://www.jetphotos.com/photographer/602764
https://www.jetphotos.com/photographer/602769
https://www.jetphotos.com/photographer/602770
https://www.jetphotos.com/photographer/602772
https://www.jetphotos.com/photographer/602773
https://www.jetphotos.com/photographer/602774
https://www.jetphotos.com/photographer/602775
https://www.jetphotos.com/photographer/601186
https://www.jetphotos.com/photographer/601188
https://www.jetphotos.com/photographer/601189
https://www.jetphotos.com/photographer/601191
https://www.jetphotos.com/photographer/601192
https://www.jetphotos.com/photographer/601194
https://www.jetphotos.com/photographer/601196
https://www.jetphotos.com/photographer/601197
https://www.jetphotos.com/photographer/601248
https://www.jetphotos.com/photographer/601249
https://www.jetphotos.com/photographer/601250
https://www.jetphotos.com/photographer/601251
https://www.jetphotos.com/photographer/601252
https://www.jetphotos.com/photographer/601254
https://www.jetphotos.com/photographer/601255
https://www.jetphotos.com/photographer/601256
https://www.jetphotos.com/photographer/601258
https://www.jetphotos.com/photographer/601260
https://www.jetphotos.com/photographer/601261
https://www.jetphotos.com/photographer/601263
https://www.jetphotos.com/photographer/601264
https://www.jetphotos.com/photographer/601265
https://www.jetphotos.com/photographer/601266
https://www.jetphotos.com/photographer/601267
https://www.jetphotos.com/photographer/601268
https://www.jetphotos.com/photographer/601269
https://www.jetphotos.com/photographer/601270
https://www.jetphotos.com/photographer/601272
https://www.jetphotos.com/photographer/601273
https://www.jetphotos.com/photographer/602779
https://www.jetphotos.com/photographer/602780
https://www.jetphotos.com/photographer/602781
https://www.jetphotos.com/photographer/602782
https://www.jetphotos.com/photographer/600111
https://www.jetphotos.com/photographer/600112
https://www.jetphotos.com/photographer/600148
https://www.jetphotos.com/photographer/600151
https://www.jetphotos.com/photographer/600155
https://www.jetphotos.com/photographer/600157
https://www.jetphotos.com/photographer/600159
https://www.jetphotos.com/photographer/600161
https://www.jetphotos.com/photographer/600163
https://www.jetphotos.com/photographer/600647
https://www.jetphotos.com/photographer/600648
https://www.jetphotos.com/photographer/600649
https://www.jetphotos.com/photographer/600650
https://www.jetphotos.com/photographer/602889
https://www.jetphotos.com/photographer/602890
https://www.jetphotos.com/photographer/602891
https://www.jetphotos.com/photographer/602895
https://www.jetphotos.com/photographer/602897
https://www.jetphotos.com/photographer/602900
https://www.jetphotos.com/photographer/602904
https://www.jetphotos.com/photographer/602907
https://www.jetphotos.com/photographer/602913
https://www.jetphotos.com/photographer/602916
https://www.jetphotos.com/photographer/602918
https://www.jetphotos.com/photographer/602922
https://www.jetphotos.com/photographer/602923
https://www.jetphotos.com/photographer/602925
https://www.jetphotos.com/photographer/602926
https://www.jetphotos.com/photographer/600534
https://www.jetphotos.com/photographer/600535
https://www.jetphotos.com/photographer/600536
https://www.jetphotos.com/photographer/600538
https://www.jetphotos.com/photographer/600539
https://www.jetphotos.com/photographer/600540
https://www.jetphotos.com/photographer/600542
https://www.jetphotos.com/photographer/600543
https://www.jetphotos.com/photographer/600544
https://www.jetphotos.com/photographer/600547
https://www.jetphotos.com/photographer/600548
https://www.jetphotos.com/photographer/600549
https://www.jetphotos.com/photographer/600550
https://www.jetphotos.com/photographer/600552
https://www.jetphotos.com/photographer/600553
https://www.jetphotos.com/photographer/600555
https://www.jetphotos.com/photographer/600558
https://www.jetphotos.com/photographer/600565
https://www.jetphotos.com/photographer/600566
https://www.jetphotos.com/photographer/600567
https://www.jetphotos.com/photographer/600568
https://www.jetphotos.com/photographer/600571
https://www.jetphotos.com/photographer/600573
https://www.jetphotos.com/photographer/600575
https://www.jetphotos.com/photographer/600576
https://www.jetphotos.com/photographer/600577
https://www.jetphotos.com/photographer/600578
https://www.jetphotos.com/photographer/600666
https://www.jetphotos.com/photographer/600668
https://www.jetphotos.com/photographer/600669
https://www.jetphotos.com/photographer/600670
https://www.jetphotos.com/photographer/602963
https://www.jetphotos.com/photographer/601276
https://www.jetphotos.com/photographer/601280
https://www.jetphotos.com/photographer/601281
https://www.jetphotos.com/photographer/601284
https://www.jetphotos.com/photographer/601285
https://www.jetphotos.com/photographer/601286
https://www.jetphotos.com/photographer/601287
https://www.jetphotos.com/photographer/601288
https://www.jetphotos.com/photographer/601291
https://www.jetphotos.com/photographer/601293
https://www.jetphotos.com/photographer/602776
https://www.jetphotos.com/photographer/602777
https://www.jetphotos.com/photographer/602955
https://www.jetphotos.com/photographer/602956
https://www.jetphotos.com/photographer/602957
https://www.jetphotos.com/photographer/602959
https://www.jetphotos.com/photographer/602960
https://www.jetphotos.com/photographer/602961
|
To set many of the variables below specify them in config.php .
$EnableReadOnly - Set to 1 to disable editing. Note this doesn't automatically prevent changes to the wiki by recipes, unless they use the core Lock() function correctly.
-
-
$EnableReadOnly = 1; # disable editing
$EnableNotSavedWarning - Set to 1 to warn the editors if they are about to leave the edit form without saving their changes. Based on Cookbook:NotSavedWarning. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:NotSavedWarning.
-
-
$EnableNotSavedWarning = 0; # disable warning, default 1 (enabled, since 2.3.0)
$EnableEditAutoText - Set to 1 to enable basic predictive editing like automatically inserted list bullets, see Cookbook:EditHelp. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:EditHelp.
-
-
$EnableEditAutoText = 1;
$EnableMergeLastMinorEdit - When set to 1, and an author has checked the "This is a minor edit" checkbox, and the previous edit was by the same author (same name, IP address, browser version), then the previous and current edits will be merged into a single page history entry. This way an author can make many small changes one after another without creating multiple separate history entries.
-
-
$EnableMergeLastMinorEdit = 1;
-
- To only allow this for a limited time between edits, set this variable to the number of seconds. If a longer time has passed, a separate history entry will be added as usual:
-
-
$EnableMergeLastMinorEdit = 2*3600; # at most 2 hours between merged edits
-
- See also
$EnableDraftAtomicDiff .
$AutoCreate - Used in conjunction with the AutoCreateTargets edit function, this array records any sets of pages which should be created automatically if they don't exist. The syntax is
$AutoCreate[REGEXP] = PAGE_PARAMETERS;
where REGEXP is a regular expression which will identify the pages to be autocreated, and PAGE_PARAMETERS is an array of attributes for the page to be created. For example
$AutoCreate['/^Category\\./'] = array('ctime' => $Now);
will create a blank page with a current creation time for any missing Category page.
$DefaultPageTextFmt - The text that should be displayed when browsing non-existent pages. As default PmWiki uses the contents of Site.PageNotFound:
$DefaultPageTextFmt = '(:include $[{$SiteGroup}.PageNotFound]:)';
$DeleteKeyPattern - The pattern used to determine if a page should be deleted. The default is to remove pages that contain only the single word "delete" (and optional spaces).
## Change delete word to "remove":
$DeleteKeyPattern = "^\\s*remove\\s*$";
## Delete any page with no visible text, i.e., empty:
$DeleteKeyPattern = "^\\s*$";
$DiffKeepDays - The
$DiffKeepDays variable sets the minimum length of time that a page's revision history is kept. By default it is set to 3650 days, or a little less than ten years. You can change this value in a customization file to be something smaller, e.g.:
$DiffKeepDays = 30; # keep revisions at least 30 days
If you want to suppress a page's revision history, you can insert into a customization file
$DiffKeepDays = $DiffKeepNum = -1; # suppress revision history
Note that a specific page revision isn't removed from the page until the first edit after the time specified by $DiffKeepDays has elapsed. Thus, it's still possible for some pages to have revisions older than $DiffKeepDays -- such revisions will be removed the next time those pages are edited.
$DiffKeepNum - This variable contains the minimum number of changes to be kept in the page history, even if some of them are older than the limit defined by
$DiffKeepDays . It prevents lost history of pages that are older, but have few changes.
$DiffKeepNum = 50; # keep at least 50 revisions (default is 20)
To suppress page's revision history with $DiffKeepNum = -1 see $DiffKeepDays above.
$DraftActionsPattern - The actions which allow full loading of the draft.php functionality for custom actions. Default is 'edit'. You can enable drafts for other actions like:
$DraftActionsPattern = 'edit|pmform|translate';
# Enable drafts for actions 'edit', 'pmform' and 'translate'.
$DraftSuffix - The suffix to use for draft versions of pages (default "-Draft").
$EditFunctions - This array contains the sequence of functions that are called when a page is edited. It can be customized to provide additional functions to be called as part of the editing process. The standard setting is:
$EditFunctions = array('EditTemplate', 'RestorePage', 'ReplaceOnSave',
'SaveAttributes', 'PostPage', 'PostRecentChanges', 'AutoCreateTargets', 'PreviewPage');
Many recipes manipulate this array, so it is recommended, instead of redefining the complete array to add your custom functions, to call InsertEditFunction() with your function name. See also UpdatePage().
$EditRedirectFmt - The page to which an author is sent after pressing "Save" or "Cancel" from an edit form. Defaults to "$FullName", which sends the author to the page just edited, but can be changed to specify another page.
## Redirect to Main.HomePage:
$EditRedirectFmt = 'Main.HomePage';
## Redirect to HomePage of current group:
$EditRedirectFmt = '{$Group}.HomePage';
$EditTemplatesFmt - Name of the page (or an array of names) to be used as the default text for any newly created pages.
## Use 'Main.NewPageTemplate' as default text of all new pages:
$EditTemplatesFmt = 'Main.NewPageTemplate';
## Use 'Template' in the current group for new pages:
$EditTemplatesFmt = '$Group.Template';
## Use 'Template' in the current group if it exists, otherwise
## use 'Main.NewPageTemplate':
$EditTemplatesFmt = array('$Group.Template', 'Main.NewPageTemplate');
$EnableDrafts - When set to '1', enables the "Save draft" button and built-in handling of "draft" versions of pages, where:
- Initial "Save draft" of an existing page ("PageName") saves changes to a new name ("PageName-Draft").
- Subsequent attempts to edit PageName causes PageName-Draft to be edited.
- Subsequent selections of "Save draft" cause PageName-Draft to be saved.
- Pressing "Publish" causes PageName-Draft to be posted to PageName, and deleted.
Turn on draft edits:
$EnableDrafts = 1;
A related variable, $EnablePublishAttr , adds a new "publish" authorization level to distinguish editing of drafts from publishing them.
$EnableDraftAtomicDiff - When set to 1, "publishing" a draft version will clear the "draft" history, leaving a single "diff" between the latest and the previous "published" versions. Note that this will delete the author names, dates and contributions of the intermediate, unpublished versions. (Drafts need to be enabled, see
$EnableDrafts .) See also $EnableMergeLastMinorEdit .
$EnableGUIButtons - When set to '1', turns on the graphical buttons in the "Edit Page" form.
## Turn on graphical edit buttons:
$EnableGUIButtons = 1;
$EnableGuiEditFixUrl - Enables an icon "%2" that can help encoding special characters in URL links, see Cookbook:FixURL.
$EnableGUIButtons need to be enabled.
-
-
$EnableGuiEditFixUrl = 2000; # place the button near the end of the Edit toolbar
$EnablePreviewChanges - When set to '1', the "Preview" function will show the highlighted changes in the wiki markup before the rendered page preview. See Cookbook:PreviewChanges.
$EnablePreviewChanges = 1;
$EnableListIncludedPages - When set to '1', inserts in the edit form a list with pages included in the currently edited page either via the include markup, or via page text variables (and any nested pages and variables). The list appears in a collapsed
<details> element between the text area and the summary field.
$EnablePostAuthorRequired - When set to '1', posting of pages (and uploading files since 2.2.117) requires the author to provide an author name. Otherwise, authors can post without a name.
## Require authors to provide a name:
$EnablePostAuthorRequired = 1;
$EnableUploadAuthorRequired - Whether uploading files requires the name of the uploader to be entered (added in 2.2.117). If unset, will use the value of
$EnablePostAuthorRequired .
$EnableRevUserAgent - When set to '1', the page history will store the "User agent" string from the browser of the writer (by default this feature is disabled). This can be useful for tracking bugs in custom applications, by examining the disk files in wiki.d.
## Store browser user agent with page diffs:
$EnableRevUserAgent = 1;
$GUIButtons - Allows the configuration of the buttons which appear at the top of the text area when editing a page. See
scripts/guiedit.php for the default definition. Note that the 5th element can be HTML code rather than just the url of a gif - this allows more flexibility in defining the related JavaScript.
$HandleEditFmt - Like $HandleBrowseFmt, this specifies the entire output format for
?action=edit for a page.
$IsPagePosted - Set to a true value if the page is actually saved (e.g., this is used to tell the RecentChanges handlers if they need to update).
$PageEditFmt - By default, this is the HTML to be displayed for an edit form.
$PageEditForm - Specifies the edit form for
?action=edit . Defaults to '$SiteGroup .EditForm '.
$ROEPatterns - With this array you can add a pattern as key and set a text value which replace it on every edit request, using
preg_replace () function. Specifically it is replaced when the page is loaded into the editform, whenever a preview is done, and when the page is saved (from PmWiki 2.2.0beta45). See Cookbook:ROSPatterns for examples.
$ROSPatterns - With this array you can add patterns as key and set a text value which will replace it when the edited page is posted (as signaled by $EnablePost). It is not replaced when the page is loaded into the editform nor when a preview is done, but it is replaced only when the page is saved. See Cookbook:ROSPatterns for examples.
$EnableROSEscape - If set to 1, the
$ROEPatterns and $ROSPatterns replacements will skip escaped text (surrounded by [=...=] or [@...@] ). If not set, or if set to 0, the replacements will happen even inside escaped text.
Categories: PmWiki Developer
|