diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-02-25 06:47:33 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-02-25 06:47:33 +0000 |
commit | 5ab33f376d94f0e81971ad83b790bcbf8b51443a (patch) | |
tree | 34d9ecc9339749fa226aa6f5ff485490bed61347 | |
parent | 0321ff9176f15083e8e9e230ab6e443c236714b8 (diff) | |
download | pmwiki.svn-5ab33f376d94f0e81971ad83b790bcbf8b51443a.tar.bz2 |
Documentation update.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4660 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r-- | wikilib.d/PmWiki.ChangeLog | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.LayoutVariables | 10 | ||||
-rw-r--r-- | wikilib.d/PmWiki.MailingLists | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.MarkupExpressions | 14 | ||||
-rw-r--r-- | wikilib.d/PmWiki.WikiStyles | 12 |
5 files changed, 30 insertions, 30 deletions
diff --git a/wikilib.d/PmWiki.ChangeLog b/wikilib.d/PmWiki.ChangeLog index 3b544274..3bd00569 100644 --- a/wikilib.d/PmWiki.ChangeLog +++ b/wikilib.d/PmWiki.ChangeLog @@ -1,9 +1,9 @@ -version=pmwiki-2.3.30 ordered=1 urlencoded=1 +version=pmwiki-2.3.31 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=2.3.31 (+184) +csum= (+146) name=PmWiki.ChangeLog -rev=1824 -targets=Cookbook.RecentChanges,PmWiki.MailingLists,PmWiki.LayoutVariables,PITS.01498,PmWiki.EditVariables,PmWiki.WikiStyles,PmWiki.UploadVariables,PITS.01497,Cookbook.DarkColorScheme,PmWiki.LinkVariables,Cookbook.PmSyntax-Talk,PmWiki.OtherVariables,PmWiki.Notify,PITS.01431,PITS.01495,PITS.01493,PmWiki.PagelistVariables,PITS.01494,Cookbook.FuseEdit,PmWiki.BasicVariables,PmWiki.SecurityVariables,PITS.01488,PITS.01489,Cookbook.SectionEdit,PITS.01486,PITS.01297,PITS.01485,Cookbook.EditHelp,PITS.01484,PITS.01208,PITS.01483,PITS.01480,PmWiki.PageVariables,PITS.01478,PITS.01477,Cookbook.PmSyntax,Cookbook.CustomSyntax,PITS.01418,PITS.00447,PITS.01475,PITS.00908,PITS.01095,PmWiki.ChangeLogArchive -text=(:Summary: Log of changes made to PmWiki by [[Release(Notes)]]:)\%0aSee [[Cookbook:RecentChanges | the cookbook recent changes page]] for additional updates and activity by other developers, or join the [[PmWiki (/) mailing lists]] to discuss feature development with us.%0a%0a(:Prerelease:Changes made to the [[PmWiki:Subversion | subversion pre-release]] of PmWiki. You can get \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-latest-svn.zip|a full ZIP archive]] of the nightly version, or \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-nightly.zip|a partial export]] with only the files changed since {$Version}.:)\%0a{$:xPrerelease}%0a%0a[[#svn-revision-4653]]%0a%0a!!! Version 2.3.31 (2024-02-23) [[#v2331]]%0a* Add $EnableDarkThemeToggle, enable 3-way theme toggle, "Light", "Dark" and "Auto", add annotation tooltip showing the current theme on tap and on mouse over.%0a* Refactor config data passed to pmwiki-utils.php, refactor dark toggle functions into a separate script. %0a* Responsive skin add body attributes for group and page name, update dark theme, enable auto theme (browser preferences) by default.%0a* PmSyntax improve dark theme thanks to a script by Said Achmiz; expose color properties for reuse.%0a* Refactor redirect quiet (PITS:01498).%0a* Page attributes passwords form: allow for +addition and -removal of passwords, users, groups.%0a* Allow $EditTemplatesFmt entries to apply to specific pages with name= specification (suggested by Simon).%0a* Forms add attribute "form".%0a* Refactor $PostConfig to allow called functions to update it.%0a* Update RecipeCheck to also list skins, suggested by Simon.%0a* Refactor PrintFmt, add $EnablePrePrintFmt.%0a* [[WikiStyles]] add 'columns'.%0a* When Highlight.js is enabled, Vardoc links will be the same color as variables in highlighted code blocks.%0a* Refactor $EnableUploadVersions.%0a* Update documentation.%0a%0a!!! Version 2.3.30 (2024-01-22) [[#v2330]]%0a* Add prototype for dark theme toggle. See PITS:01497 and Cookbook:DarkColorScheme.%0a** PmWiki-responsive skin converted CSS colors to variables, added dark theme styles.%0a** Add skins/pmwiki/pmwiki-32.svg, enable default for $PageLogoUrl.%0a** PmSyntax added dark theme styles.%0a* $EnableUploadMimeMatch with Fileinfo not enabled to deny uploads.%0a* upload.php fix warning for PHP 8.%0a* RecipeCheck use https, suggested by Simon.%0a* PrintDiff() add $since argument.%0a* Add $EnableRedirectQuiet = 2. Prevent infinite redirect loops.%0a* Fix Attach: links with escaped path and filename.%0a* Improved readability for inline diffs in page history.%0a* Forms enable input e_author not only for action=edit, fix unquoted positional form action URL.%0a* Update documentation.%0a%0a!!! Version 2.3.29 (2023-12-18) [[#v2329]]%0a* Fix urlapprove.php for PHP 8.2. %0a* PmSyntax textarea remove styles for width, height (Cookbook:PmSyntax-Talk), allow for fractional dimensions of the highlighted area.%0a* $MarkupDirectiveFunctions allow dashes in attribute names.%0a* Update documentation.%0a%0a!!! Version 2.3.28 (2023-11-27) [[#v2328]]%0a* Add input ''month'' and ''color'' fields.%0a* Add $NotifyRelatedTrailFmt.%0a* Reverse simpletable row backgrounds when there is a thead element.%0a* Fix pmwiki-utils.js when window.localStorage is disabled.%0a* UrlApprovals allow https: URLs if the http: URL for the same domain has been approved (PITS:01431).%0a* Update documentation.%0a%0a!!! Version 2.3.27 (2023-10-23) [[#v2327]]%0a* When merging last edit, if there is no change summary, reuse the last one. %0a* Keep unknown date/time formats for undefined timezone (PITS:01495).%0a* DiffRenderSource() fix for PHP 8, keep ins/del tags on the same line.%0a* The ".diffmarkup" element now has the style "white-space: pre-wrap".%0a* Add new keyword shortcuts Ctrl+B (bold), Ctrl+I (italic), Ctrl+K (link/unlink).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.26 (2023-09-28) [[#v2326]]%0a* Add configurable $InputLabelFmt snippet (PITS:01493).%0a* Add configurable $TrailFmt snippets.%0a* Add $EnableSearchAtLeastOneTerm, default disabled.%0a* Unset upload extensions if size for the extension is set to 0.%0a* Update feeds.php for PHP 8.2 (PITS:01494).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.25 (2023-07-29) [[#v2325]]%0a* Updates for PHP 8.2.%0a* Fix pagelist when 2+ directives on the same line, reported by Simon.%0a* Fix possible bug with internal group(header|footer) directives caused by PRR().%0a* Update documentation.%0a%0a%0a!!! Version 2.3.24 (2023-06-06) [[#v2324]]%0a* Add $EnableUploadMimeMatch.%0a* Add $EnableMergeLastMinorEdit, edit functions MergeLastMinorEdit (based on Cookbook:FuseEdit), SaveChangeSummary (refactored out of HandleEdit).%0a* Fix LogoutCookies() doesn't use a $pagename argument.%0a* PmForm add condition 'validemail' for use in template require.%0a* Add $PmCryptAlgo, pmcrypt() to call password_verify() if it exists. %0a* Refactor HandleDownload() split ServeDownload($filepath, $upname).%0a* Add InsertEditFunction($newfn, $where='%3cPostPage').%0a* Add $AuthFormRespCode.%0a* Add $EnableDownloadRanges, default 1.%0a* When the token is expired, reopen edit form rather than abort.%0a* LocalTimes add $EnableRCListLastEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.23 (2023-05-03) [[#v2323]]%0a* Refactor pmtoken() to use session tokens, enable for core actions.%0a* Add %25pmhlt%25[@(:input pmtoken:)@] helper.%0a* PmForm add $PmFormEnablePmToken.%0a* Refactor @@HandleLogoutA()@@ split @@LogoutCookies()@@. %0a* Fix PRCB() for PHP %3c 7.4.%0a* Update documentation.%0a%0a!!! Version 2.3.22 (2023-04-06) [[#v2322]]%0a* Add scripts/pmform.php, Site.PmFormTemplates.%0a* FmtDateTimeZ() can now accept Unix timestamps.%0a* Pagelists fix bug with multiple category=+A,+B entries.%0a* Update for PHP 8.1 (PITS:01488).%0a* MarkupDirectiveFunctions will now cast numeric arguments to floats.%0a* Prevent errors in custom PageVariables from generating internal server errors (PITS:01489).%0a* Improve inline diff for rare cases (end of page).%0a* Forms/buttons with @@data-pmconfirm="Question"@@ will ask the question before they are submitted.%0a* Update documentation.%0a%0a%0a!!! Version 2.3.21 (2023-03-06) [[#v2321]]%0a* Add $IsPmArchive, $PmArchiveDir.%0a* Sortable tables with %3ctime datetime=""> elements can be sorted by the datetime attribute. Fix for tables with preexisting %3cthead> element.%0a* Updates for PHP8.%0a* Add CSV upload extension.%0a* LocalTimes add mode=3 to show old dates as MM'YY.%0a* Fix bug with multiline $MarkupDirectiveFunctions, reported by Antti Tikanmäki.%0a* Add $EnableCopyCode and Copy code button to %3cpre> blocks, suggested by Alex Doré.%0a* Update PmTOC to work better with Cookbook:SectionEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.20 (2023-02-12) [[#v2320]]%0a* Fix undefined variable warning, reported by Gregor Klarič.%0a%0a!!! Version 2.3.19 (2023-02-11) [[#v2319]]%0a* Only set cookie params if headers not sent. %0a* Update for PHP8.2, reported by Dfaure. PageVar() update for PHP 8.%0a* Add variable $DiffPrepareInlineFunction.%0a* PageListCache() remove unused global $PageIndexFile.%0a* Add configurable $LocalCSSDir, $LocalCSSDirUrl.%0a* DownloadUrl() add $FmtV['$LinkDownload'] with current or future download link.%0a* Add pm_recode() helper function (based on PageStore::recodefn), check for more transcode options.%0a* HandleBrowse() add $FmtV['$PageSourceText'].%0a* Add helper function KeepBlock().%0a* Add $FarmPubDirPrefix, pm_servefile(), $ServeFileExts.%0a* Update documentation.%0a%0a!!! Version 2.3.18 (2023-01-15) [[#v2318]]%0a* Refactor scripts/utils.php, add pm_json_encode() (PITS:01486).%0a* EditAutoText() fix for lines ending with multiple backslashes.%0a* PmSyntax optimize/refactor for large pages (cont.), fix inline escaped texts could ignore line markups, add EnableStopwatch.%0a* Notify fix typo in regular expression.%0a* {-Add $EnableUploadVersions >=10 to rename base.ext to base-1.ext, base-2.ext,...-} ''Redesigned in 2.3.31''%0a* CondAuth() fix bug with global $AuthList.%0a* Add helper function PRCB() for simpler preg_replace_callback passing variables.%0a* Update scripts/refcount.php for PHP 8, reported by George Murray.%0a* Add PageVariable $PageLogoUrl (PITS:01297).%0a* Update documentation.%0a%0a!!! Version 2.3.17 (2022-12-17) [[#v2317]]%0a* WikiStyles trim class names (PITS:01485).%0a* GUIEditButtons refactor to enable Undo in textarea; allow for custom functions to configure mopen, mclose, and unselect for their buttons.%0a* [[Cookbook:EditHelp|EditHelp]] refactor to allow undo; add shortcuts Ctrl+L convert selection to lowercase, Ctrl+Shift+L to uppercase, Ctrl+Shift+ArrowUp and ArrowDown to swap lines.%0a* Skip upgrade check if $EnableReadOnly.%0a* Fix bug with multiple $MarkupDirectiveFunctions.%0a* Add $EnableBaseNameConfig.%0a* PmSyntax optimize for larger pages (cont.).%0a* Input password add class "inputbox" like the other fields.%0a* CondAuth() added way to check for usergroup permissions.%0a* Update in pagelist.php for PHP 8.%0a* Documentation update.%0a%0a!!! Version 2.3.16 (2022-11-28) [[#v2316]]%0a* Class PPRC add generic callbacks.%0a* IncludeText() update for PHP 8, reported by V.Krishn.%0a* WikiStyle add 'overflow', 'notoc'.%0a* Add PmNonce().%0a* PmTOC update indented link style->classname. %0a* Responsive skin: replace %25pmhlt%25[@[[%3c%3c]]@] with %25hlt html%25[@%3cbr class='clearboth' />@], update PmTOC styles.%0a* $EnableListIncludedPages use class name instead of style. %0a* guiedit.js remove unneeded style.%0a* PmSyntax realign font for nested programming languages in the edit form, optimize for large pages.%0a* Only call session_status() if function exists.%0a* Edit form remove unsafe-inline script.%0a* Revert WikiStyleToClassName(), PrePrintFmt() -- need more work (PITS:01484).%0a* Documentation update.%0a%0a!!! Version 2.3.15 (2022-11-21) [[#v2315]]%0a* CSS pre, code relative/scalable font-size (pmwiki-responsive skin).%0a* PmSyntax add variable --pmsyntax-fontsize-editform and split from --pmsyntax-fontsize [[https://www.pmichaud.com/pipermail/pmwiki-users/2022-November/064936.html|#]].%0a* PmSyntax fix [@[[Highlight]]@] label font size and family (reported by Hans).%0a* Add variable $CookieSameSite default to 'Lax'%0a* Add argument $samesite to pmsetcookie(), default to $CookieSameSite, refactor for old and new PHP versions. %0a* Add function pm_session_start() respecting local configuration.%0a* CSP header add base-uri=self; object-src 'none'.%0a* Add $HTTPHeaders['XSSP'] = 'X-XSS-Protection: 1; mode=block'.%0a* Rewrite GUIButtons logic to avoid unsafe-inline JavaScript.%0a* Refactor WikiStyles, replace inline styles with class names to avoid unsafe-inline CSS.%0a* Refactor PQA(), tables, cells, to replace inline style="..." with class names to avoid unsafe-inline CSS.%0a* Add PrePrintFmt(), refactor PrintFmt(), PrintSkin() to process wiki pages, skin parts, and skin functions to HTML before outputting headers.%0a* Fix XSS vulnerability.%0a* Documentation update.%0a%0a!!! Version 2.3.14 (2022-11-03) [[#v2314]]%0a* Searchbox also escape custom field names.%0a* Prevent double-encoded entities in searchbox (reported by Simon).%0a* Trim $Author (PITS:01208).%0a* Replace autofocus inline JavaScript with attributes.%0a* Edit form: the label next to the "Minor edit" checkbox now toggles the checkbox.%0a* PmSyntax recognize %25pmhlt%25[@(:template requires? ...:)@].%0a* Update for PHP 8. %0a* Obsolete PCCF() from PHP 7.2 not 8.0.%0a* Add array $ObsoleteMarkups, function TraceMarkup(), update Markup(), Markup_e() and ObsoleteMarkup(), to retrieve and show files and line numbers for obsolete/disabled markup rules.%0a* Fix bug with PSFT format %25L.%0a* Update documentation.%0a%0a!!! Version 2.3.13 (2022-10-07) [[#v2313]]%0a* Close potential XSS vulnerability, reported by lukystreik (PITS:01483).%0a* Refactor $MultiFactorAuthFunction, add $FailedLoginsFunction.%0a* Update documentation.%0a%0a!!! Version 2.3.12 (2022-09-25) [[#v2312]]%0a* Stripmagic() cast null to "" and other fixes for PHP 8.%0a* Fix parse error for complex conditionals with empty variables (PITS:01480).%0a* PSFT() and MarkupExpression [@ftime@] add %25L as human readable local timestamp. %0a* MarkupRestore() fix wrong cast to empty string of false-ish values.%0a* PrintAuthForm() split from PmWikiAuth(). %0a* Fix warning for unneeded session_regenerate_id() (reported by George Murray).%0a* Update documentation.%0a%0a!!! Version 2.3.11 (2022-08-30) [[#v2311]]%0a* Add [[PageVariables]] %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a* Add $MarkupDirectiveFunctions.%0a* Fix stripmagic() for arrays recently broke after PHP8 update.%0a* Update documentation.%0a%0a!!! Version 2.3.10 (2022-08-20) [[#v2310]]%0a* Update for PHP 8.1 (reported by Armin Bühler).%0a* Forms will now prefill wildcard variables from $DefaultUnsetPageTextVars or $DefaultEmptyPageTextVars.%0a* $EnablePmSyntax = 3; will enable syntax highlighting in the edit form by default, without the user clicking on "Highlight". Fix occasional text mis-alignment between the text area and the highlighted block.%0a* Update documentation.%0a%0a!!! Version 2.3.9 (2022-08-18) [[#v239]]%0a* Add non-wildcard $DefaultUnsetPageTextVars to %25pmhlt%25[@(:input default:)@] (reported by Johnny).%0a* PmSyntax handles new selectors pre.pmhlt, code.pmhlt.%0a* Update for PHP 8 (PITS:01478).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.8 (2022-07-22) [[#v238]]%0a* PmSyntax fix for 2 different %25pmhlt%25 [@%25hlt%25@] on the same line (reported by Simon).%0a* Fix broken include when the first page doesn't exist.%0a* Update documentation.%0a%0a!!! Version 2.3.7 (2022-06-28) [[#v237]]%0a* $HTTPHeaders add X-Frame-Options (suggested by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default.%0a* $EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* $EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a* Update documentation.%0a%0a!!! Version 2.3.6 (2022-06-19) [[#v236]]%0a* Fixes for PHP 8.%0a* Add form attribute "lang".%0a* Sortable tables allow for table headers to have markup such as bold (except links). It will now use a case-insensitive natural ordering.%0a* Allow for $UploadVerifyFunction to modify $upname.%0a* Add variable $PageIndexTermsFunction.%0a* Searchbox allow for removal of submit button if [@label=""@]; add default [@placeholder="$[Search]"@].%0a* Fix author.php may be included before some variables are defined, reported by Said Achmiz.%0a* $EnableHighlight convert code blocks to plain text, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* Documentation update.%0a%0a%0a!!! Version 2.3.5 (2022-05-23) [[#v235]]%0a* Fix broken list=grouphomes (PITS:01477).%0a* Add DisableSkinParts() helper function for recipes.%0a* HandlePostUpload: add @@$FmtV["$filepath"]@@ and @@$FmtV["$upurl"]@@ with the file path and direct URL to the newly uploaded file.%0a* In pmwiki-utils.js, replace forgotten ''let'' with ''var'' (suggested by SteP).%0a* Update for PHP 8.1.%0a* Update documentation.%0a%0a!!! Version 2.3.4 (2022-04-22) [[#v234]]%0a* Fixes for PHP 8 warnings, reported by Siegfried Seibert.%0a* Update documentation.%0a%0a!!! Version 2.3.3 (2022-03-26) [[#v233]]%0a* Fix for PHP 8 warnings, reported by Jean-Patrick Charrey, Dominique Faure and Siegfried Seibert.%0a* Update README.txt and docs/ files, suggested by Simon Davis.%0a* Update documentation.%0a%0a!!! Version 2.3.2 (2022-02-09) [[#v232]]%0a* Allow for $EnableLocalTimes to define custom duration of the pulled page history.%0a* Rename variable $EnableIncludedPages to $EnableListIncludedPages (avoid ambiguity).%0a* Remove $LinkAlt when an embedded picture without an alternative text fails to load.%0a* PmSyntax:%0a** Allow for line breaks \\ inside headings, tables, list items (like the core).%0a** Parallel processing of multiple blocks.%0a* Add scripts/utils.php; move loading of pmwiki-utils.js and PmSyntax to scripts/utils.js.%0a** Add $EnablePmUtils, default enabled.%0a** Parallel processing of the pmwiki-utils.js utility functions.%0a** Move pmwiki-utils.js move to $HTMLHeaderFmt (often prevents page redraw with the TOC/PmToggle/LocalTimes).%0a* Fix bug causing invalid page name when the name is "Group.0".%0a* Fix PHP 8.1.2 warnings, reported by Jürgen Godau and Dominique Faure.%0a* LocaltTimes fix "rcnew" classes for wikis with the older format.%0a* Update documentation.%0a%0a!!! Version 2.3.1 (2022-01-15) [[#v231]]%0a%0a* Fix the release script which broke the $VersionNum variable and the [@[[#anchor]]@] markup with the PmWiki-responsive skin.%0a%0a!!! Version 2.3.0 (2022-01-15) [[#v230]]%0a* Add PmSyntax, $EnablePmSyntax, $CustomSyntax, [@{$EnabledIMap}@], see Cookbook:PmSyntax, Cookbook:CustomSyntax.%0a* [@(:markup:)@] can now have @@class=norender@@ to only show the source code without processing it.%0a* Updates for PHP 8.1, hide warnings, add PSFT() replacement for strftime() and 2 callbacks, $EnableFTimeNew, update core function calls, add [@%25o@] for the ordinal suffix of the date (PITS:01418).%0a* Notify: @@tz=@@ (timezone) per-user.%0a* PageList add category= argument (PITS:00447, PITS:01475); link= and category= now accept multiple pages, wildcards, and negations (PITS:00908).%0a* [=[[!Category]]=] links can have alternative text (PITS:01095).%0a* Simplify/optimize pmwiki-utils.js when using datasets, simplify sorting of table rows without cloning, add LocalTimes().%0a* Page history diff anchors to also have "id=" attributes in addition to "name=".%0a* Add $EnableLocalTimes (default disabled) and styles, add HandleDiffList().%0a* Add markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as %3ctime>; localized if $EnableLocalTimes.%0a** Add $CurrentLocalTime in the above format, used by default in $RecentChangesFmt.%0a* Add $EnableRecentUploads (only Site.AllRecentChanges, only if $RecentUploadsFmt not defined).%0a* PmTOC update CSS for properly indented subheadings.%0a* Edit form $EnableIncludedPages, add placeholders to e_changesummary and e_author. Enable $EnableNotSavedWarning, add to sample-config.php. EditHelp to behave more like a word processor, typing "Enter" twice without writing text removes the preceding bullet.%0a* Responsive skin details>summary:hover {color:navy, cursor: pointer;}.%0a* PrintDiff() add classes for the delay between edits: diffday, diffweek, diffmonth, diffyear.%0a* Add helper function @@DownloadUrl($pagename, $path)@@ moved from @@LinkUpload()@@.%0a* Add [=$[ULby]=] i18n string 'uploaded by'.%0a* Update documentation.%0a%0a!!! [[#older]] Older versions%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.3.0.%0a -time=1708682998 +rev=1825 +targets=Cookbook.RecentChanges,PmWiki.MailingLists,PmWiki.OtherVariables,PmWiki.LayoutVariables,PITS.01498,PmWiki.EditVariables,PmWiki.WikiStyles,PmWiki.UploadVariables,PITS.01497,Cookbook.DarkColorScheme,PmWiki.LinkVariables,Cookbook.PmSyntax-Talk,PmWiki.Notify,PITS.01431,PITS.01495,PITS.01493,PmWiki.PagelistVariables,PITS.01494,Cookbook.FuseEdit,PmWiki.BasicVariables,PmWiki.SecurityVariables,PITS.01488,PITS.01489,Cookbook.SectionEdit,PITS.01486,PITS.01297,PITS.01485,Cookbook.EditHelp,PITS.01484,PITS.01208,PITS.01483,PITS.01480,PmWiki.PageVariables,PITS.01478,PITS.01477,Cookbook.PmSyntax,Cookbook.CustomSyntax,PITS.01418,PITS.00447,PITS.01475,PITS.00908,PITS.01095,PmWiki.ChangeLogArchive +text=(:Summary: Log of changes made to PmWiki by [[Release(Notes)]]:)\%0aSee [[Cookbook:RecentChanges | the cookbook recent changes page]] for additional updates and activity by other developers, or join the [[PmWiki (/) mailing lists]] to discuss feature development with us.%0a%0a(:Prerelease:Changes made to the [[PmWiki:Subversion | subversion pre-release]] of PmWiki. You can get \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-latest-svn.zip|a full ZIP archive]] of the nightly version, or \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-nightly.zip|a partial export]] with only the files changed since {$Version}.:)\%0a{$:xPrerelease}%0a%0a* Dark theme: replace label %3cmark> with an inverted %3cspan>, add toggleImages(), add $ImgDarkSuffix, $FmtV['$PathUpload'].%0a[[#svn-revision-4659]]%0a* Update documentation.%0a%0a!!! Version 2.3.31 (2024-02-23) [[#v2331]]%0a* Add $EnableDarkThemeToggle, enable 3-way theme toggle, "Light", "Dark" and "Auto", add annotation tooltip showing the current theme on tap and on mouse over.%0a* Refactor config data passed to pmwiki-utils.php, refactor dark toggle functions into a separate script. %0a* Responsive skin add body attributes for group and page name, update dark theme, enable auto theme (browser preferences) by default.%0a* PmSyntax improve dark theme thanks to a script by Said Achmiz; expose color properties for reuse.%0a* Refactor redirect quiet (PITS:01498).%0a* Page attributes passwords form: allow for +addition and -removal of passwords, users, groups.%0a* Allow $EditTemplatesFmt entries to apply to specific pages with name= specification (suggested by Simon).%0a* Forms add attribute "form".%0a* Refactor $PostConfig to allow called functions to update it.%0a* Update RecipeCheck to also list skins, suggested by Simon.%0a* Refactor PrintFmt, add $EnablePrePrintFmt.%0a* [[WikiStyles]] add 'columns'.%0a* When Highlight.js is enabled, Vardoc links will be the same color as variables in highlighted code blocks.%0a* Refactor $EnableUploadVersions.%0a* Update documentation.%0a%0a!!! Version 2.3.30 (2024-01-22) [[#v2330]]%0a* Add prototype for dark theme toggle. See PITS:01497 and Cookbook:DarkColorScheme.%0a** PmWiki-responsive skin converted CSS colors to variables, added dark theme styles.%0a** Add skins/pmwiki/pmwiki-32.svg, enable default for $PageLogoUrl.%0a** PmSyntax added dark theme styles.%0a* $EnableUploadMimeMatch with Fileinfo not enabled to deny uploads.%0a* upload.php fix warning for PHP 8.%0a* RecipeCheck use https, suggested by Simon.%0a* PrintDiff() add $since argument.%0a* Add $EnableRedirectQuiet = 2. Prevent infinite redirect loops.%0a* Fix Attach: links with escaped path and filename.%0a* Improved readability for inline diffs in page history.%0a* Forms enable input e_author not only for action=edit, fix unquoted positional form action URL.%0a* Update documentation.%0a%0a!!! Version 2.3.29 (2023-12-18) [[#v2329]]%0a* Fix urlapprove.php for PHP 8.2. %0a* PmSyntax textarea remove styles for width, height (Cookbook:PmSyntax-Talk), allow for fractional dimensions of the highlighted area.%0a* $MarkupDirectiveFunctions allow dashes in attribute names.%0a* Update documentation.%0a%0a!!! Version 2.3.28 (2023-11-27) [[#v2328]]%0a* Add input ''month'' and ''color'' fields.%0a* Add $NotifyRelatedTrailFmt.%0a* Reverse simpletable row backgrounds when there is a thead element.%0a* Fix pmwiki-utils.js when window.localStorage is disabled.%0a* UrlApprovals allow https: URLs if the http: URL for the same domain has been approved (PITS:01431).%0a* Update documentation.%0a%0a!!! Version 2.3.27 (2023-10-23) [[#v2327]]%0a* When merging last edit, if there is no change summary, reuse the last one. %0a* Keep unknown date/time formats for undefined timezone (PITS:01495).%0a* DiffRenderSource() fix for PHP 8, keep ins/del tags on the same line.%0a* The ".diffmarkup" element now has the style "white-space: pre-wrap".%0a* Add new keyword shortcuts Ctrl+B (bold), Ctrl+I (italic), Ctrl+K (link/unlink).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.26 (2023-09-28) [[#v2326]]%0a* Add configurable $InputLabelFmt snippet (PITS:01493).%0a* Add configurable $TrailFmt snippets.%0a* Add $EnableSearchAtLeastOneTerm, default disabled.%0a* Unset upload extensions if size for the extension is set to 0.%0a* Update feeds.php for PHP 8.2 (PITS:01494).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.25 (2023-07-29) [[#v2325]]%0a* Updates for PHP 8.2.%0a* Fix pagelist when 2+ directives on the same line, reported by Simon.%0a* Fix possible bug with internal group(header|footer) directives caused by PRR().%0a* Update documentation.%0a%0a%0a!!! Version 2.3.24 (2023-06-06) [[#v2324]]%0a* Add $EnableUploadMimeMatch.%0a* Add $EnableMergeLastMinorEdit, edit functions MergeLastMinorEdit (based on Cookbook:FuseEdit), SaveChangeSummary (refactored out of HandleEdit).%0a* Fix LogoutCookies() doesn't use a $pagename argument.%0a* PmForm add condition 'validemail' for use in template require.%0a* Add $PmCryptAlgo, pmcrypt() to call password_verify() if it exists. %0a* Refactor HandleDownload() split ServeDownload($filepath, $upname).%0a* Add InsertEditFunction($newfn, $where='%3cPostPage').%0a* Add $AuthFormRespCode.%0a* Add $EnableDownloadRanges, default 1.%0a* When the token is expired, reopen edit form rather than abort.%0a* LocalTimes add $EnableRCListLastEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.23 (2023-05-03) [[#v2323]]%0a* Refactor pmtoken() to use session tokens, enable for core actions.%0a* Add %25pmhlt%25[@(:input pmtoken:)@] helper.%0a* PmForm add $PmFormEnablePmToken.%0a* Refactor @@HandleLogoutA()@@ split @@LogoutCookies()@@. %0a* Fix PRCB() for PHP %3c 7.4.%0a* Update documentation.%0a%0a!!! Version 2.3.22 (2023-04-06) [[#v2322]]%0a* Add scripts/pmform.php, Site.PmFormTemplates.%0a* FmtDateTimeZ() can now accept Unix timestamps.%0a* Pagelists fix bug with multiple category=+A,+B entries.%0a* Update for PHP 8.1 (PITS:01488).%0a* MarkupDirectiveFunctions will now cast numeric arguments to floats.%0a* Prevent errors in custom PageVariables from generating internal server errors (PITS:01489).%0a* Improve inline diff for rare cases (end of page).%0a* Forms/buttons with @@data-pmconfirm="Question"@@ will ask the question before they are submitted.%0a* Update documentation.%0a%0a%0a!!! Version 2.3.21 (2023-03-06) [[#v2321]]%0a* Add $IsPmArchive, $PmArchiveDir.%0a* Sortable tables with %3ctime datetime=""> elements can be sorted by the datetime attribute. Fix for tables with preexisting %3cthead> element.%0a* Updates for PHP8.%0a* Add CSV upload extension.%0a* LocalTimes add mode=3 to show old dates as MM'YY.%0a* Fix bug with multiline $MarkupDirectiveFunctions, reported by Antti Tikanmäki.%0a* Add $EnableCopyCode and Copy code button to %3cpre> blocks, suggested by Alex Doré.%0a* Update PmTOC to work better with Cookbook:SectionEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.20 (2023-02-12) [[#v2320]]%0a* Fix undefined variable warning, reported by Gregor Klarič.%0a%0a!!! Version 2.3.19 (2023-02-11) [[#v2319]]%0a* Only set cookie params if headers not sent. %0a* Update for PHP8.2, reported by Dfaure. PageVar() update for PHP 8.%0a* Add variable $DiffPrepareInlineFunction.%0a* PageListCache() remove unused global $PageIndexFile.%0a* Add configurable $LocalCSSDir, $LocalCSSDirUrl.%0a* DownloadUrl() add $FmtV['$LinkDownload'] with current or future download link.%0a* Add pm_recode() helper function (based on PageStore::recodefn), check for more transcode options.%0a* HandleBrowse() add $FmtV['$PageSourceText'].%0a* Add helper function KeepBlock().%0a* Add $FarmPubDirPrefix, pm_servefile(), $ServeFileExts.%0a* Update documentation.%0a%0a!!! Version 2.3.18 (2023-01-15) [[#v2318]]%0a* Refactor scripts/utils.php, add pm_json_encode() (PITS:01486).%0a* EditAutoText() fix for lines ending with multiple backslashes.%0a* PmSyntax optimize/refactor for large pages (cont.), fix inline escaped texts could ignore line markups, add EnableStopwatch.%0a* Notify fix typo in regular expression.%0a* {-Add $EnableUploadVersions >=10 to rename base.ext to base-1.ext, base-2.ext,...-} ''Redesigned in 2.3.31''%0a* CondAuth() fix bug with global $AuthList.%0a* Add helper function PRCB() for simpler preg_replace_callback passing variables.%0a* Update scripts/refcount.php for PHP 8, reported by George Murray.%0a* Add PageVariable $PageLogoUrl (PITS:01297).%0a* Update documentation.%0a%0a!!! Version 2.3.17 (2022-12-17) [[#v2317]]%0a* WikiStyles trim class names (PITS:01485).%0a* GUIEditButtons refactor to enable Undo in textarea; allow for custom functions to configure mopen, mclose, and unselect for their buttons.%0a* [[Cookbook:EditHelp|EditHelp]] refactor to allow undo; add shortcuts Ctrl+L convert selection to lowercase, Ctrl+Shift+L to uppercase, Ctrl+Shift+ArrowUp and ArrowDown to swap lines.%0a* Skip upgrade check if $EnableReadOnly.%0a* Fix bug with multiple $MarkupDirectiveFunctions.%0a* Add $EnableBaseNameConfig.%0a* PmSyntax optimize for larger pages (cont.).%0a* Input password add class "inputbox" like the other fields.%0a* CondAuth() added way to check for usergroup permissions.%0a* Update in pagelist.php for PHP 8.%0a* Documentation update.%0a%0a!!! Version 2.3.16 (2022-11-28) [[#v2316]]%0a* Class PPRC add generic callbacks.%0a* IncludeText() update for PHP 8, reported by V.Krishn.%0a* WikiStyle add 'overflow', 'notoc'.%0a* Add PmNonce().%0a* PmTOC update indented link style->classname. %0a* Responsive skin: replace %25pmhlt%25[@[[%3c%3c]]@] with %25hlt html%25[@%3cbr class='clearboth' />@], update PmTOC styles.%0a* $EnableListIncludedPages use class name instead of style. %0a* guiedit.js remove unneeded style.%0a* PmSyntax realign font for nested programming languages in the edit form, optimize for large pages.%0a* Only call session_status() if function exists.%0a* Edit form remove unsafe-inline script.%0a* Revert WikiStyleToClassName(), PrePrintFmt() -- need more work (PITS:01484).%0a* Documentation update.%0a%0a!!! Version 2.3.15 (2022-11-21) [[#v2315]]%0a* CSS pre, code relative/scalable font-size (pmwiki-responsive skin).%0a* PmSyntax add variable --pmsyntax-fontsize-editform and split from --pmsyntax-fontsize [[https://www.pmichaud.com/pipermail/pmwiki-users/2022-November/064936.html|#]].%0a* PmSyntax fix [@[[Highlight]]@] label font size and family (reported by Hans).%0a* Add variable $CookieSameSite default to 'Lax'%0a* Add argument $samesite to pmsetcookie(), default to $CookieSameSite, refactor for old and new PHP versions. %0a* Add function pm_session_start() respecting local configuration.%0a* CSP header add base-uri=self; object-src 'none'.%0a* Add $HTTPHeaders['XSSP'] = 'X-XSS-Protection: 1; mode=block'.%0a* Rewrite GUIButtons logic to avoid unsafe-inline JavaScript.%0a* Refactor WikiStyles, replace inline styles with class names to avoid unsafe-inline CSS.%0a* Refactor PQA(), tables, cells, to replace inline style="..." with class names to avoid unsafe-inline CSS.%0a* Add PrePrintFmt(), refactor PrintFmt(), PrintSkin() to process wiki pages, skin parts, and skin functions to HTML before outputting headers.%0a* Fix XSS vulnerability.%0a* Documentation update.%0a%0a!!! Version 2.3.14 (2022-11-03) [[#v2314]]%0a* Searchbox also escape custom field names.%0a* Prevent double-encoded entities in searchbox (reported by Simon).%0a* Trim $Author (PITS:01208).%0a* Replace autofocus inline JavaScript with attributes.%0a* Edit form: the label next to the "Minor edit" checkbox now toggles the checkbox.%0a* PmSyntax recognize %25pmhlt%25[@(:template requires? ...:)@].%0a* Update for PHP 8. %0a* Obsolete PCCF() from PHP 7.2 not 8.0.%0a* Add array $ObsoleteMarkups, function TraceMarkup(), update Markup(), Markup_e() and ObsoleteMarkup(), to retrieve and show files and line numbers for obsolete/disabled markup rules.%0a* Fix bug with PSFT format %25L.%0a* Update documentation.%0a%0a!!! Version 2.3.13 (2022-10-07) [[#v2313]]%0a* Close potential XSS vulnerability, reported by lukystreik (PITS:01483).%0a* Refactor $MultiFactorAuthFunction, add $FailedLoginsFunction.%0a* Update documentation.%0a%0a!!! Version 2.3.12 (2022-09-25) [[#v2312]]%0a* Stripmagic() cast null to "" and other fixes for PHP 8.%0a* Fix parse error for complex conditionals with empty variables (PITS:01480).%0a* PSFT() and MarkupExpression [@ftime@] add %25L as human readable local timestamp. %0a* MarkupRestore() fix wrong cast to empty string of false-ish values.%0a* PrintAuthForm() split from PmWikiAuth(). %0a* Fix warning for unneeded session_regenerate_id() (reported by George Murray).%0a* Update documentation.%0a%0a!!! Version 2.3.11 (2022-08-30) [[#v2311]]%0a* Add [[PageVariables]] %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a* Add $MarkupDirectiveFunctions.%0a* Fix stripmagic() for arrays recently broke after PHP8 update.%0a* Update documentation.%0a%0a!!! Version 2.3.10 (2022-08-20) [[#v2310]]%0a* Update for PHP 8.1 (reported by Armin Bühler).%0a* Forms will now prefill wildcard variables from $DefaultUnsetPageTextVars or $DefaultEmptyPageTextVars.%0a* $EnablePmSyntax = 3; will enable syntax highlighting in the edit form by default, without the user clicking on "Highlight". Fix occasional text mis-alignment between the text area and the highlighted block.%0a* Update documentation.%0a%0a!!! Version 2.3.9 (2022-08-18) [[#v239]]%0a* Add non-wildcard $DefaultUnsetPageTextVars to %25pmhlt%25[@(:input default:)@] (reported by Johnny).%0a* PmSyntax handles new selectors pre.pmhlt, code.pmhlt.%0a* Update for PHP 8 (PITS:01478).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.8 (2022-07-22) [[#v238]]%0a* PmSyntax fix for 2 different %25pmhlt%25 [@%25hlt%25@] on the same line (reported by Simon).%0a* Fix broken include when the first page doesn't exist.%0a* Update documentation.%0a%0a!!! Version 2.3.7 (2022-06-28) [[#v237]]%0a* $HTTPHeaders add X-Frame-Options (suggested by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default.%0a* $EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* $EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a* Update documentation.%0a%0a!!! Version 2.3.6 (2022-06-19) [[#v236]]%0a* Fixes for PHP 8.%0a* Add form attribute "lang".%0a* Sortable tables allow for table headers to have markup such as bold (except links). It will now use a case-insensitive natural ordering.%0a* Allow for $UploadVerifyFunction to modify $upname.%0a* Add variable $PageIndexTermsFunction.%0a* Searchbox allow for removal of submit button if [@label=""@]; add default [@placeholder="$[Search]"@].%0a* Fix author.php may be included before some variables are defined, reported by Said Achmiz.%0a* $EnableHighlight convert code blocks to plain text, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* Documentation update.%0a%0a%0a!!! Version 2.3.5 (2022-05-23) [[#v235]]%0a* Fix broken list=grouphomes (PITS:01477).%0a* Add DisableSkinParts() helper function for recipes.%0a* HandlePostUpload: add @@$FmtV["$filepath"]@@ and @@$FmtV["$upurl"]@@ with the file path and direct URL to the newly uploaded file.%0a* In pmwiki-utils.js, replace forgotten ''let'' with ''var'' (suggested by SteP).%0a* Update for PHP 8.1.%0a* Update documentation.%0a%0a!!! Version 2.3.4 (2022-04-22) [[#v234]]%0a* Fixes for PHP 8 warnings, reported by Siegfried Seibert.%0a* Update documentation.%0a%0a!!! Version 2.3.3 (2022-03-26) [[#v233]]%0a* Fix for PHP 8 warnings, reported by Jean-Patrick Charrey, Dominique Faure and Siegfried Seibert.%0a* Update README.txt and docs/ files, suggested by Simon Davis.%0a* Update documentation.%0a%0a!!! Version 2.3.2 (2022-02-09) [[#v232]]%0a* Allow for $EnableLocalTimes to define custom duration of the pulled page history.%0a* Rename variable $EnableIncludedPages to $EnableListIncludedPages (avoid ambiguity).%0a* Remove $LinkAlt when an embedded picture without an alternative text fails to load.%0a* PmSyntax:%0a** Allow for line breaks \\ inside headings, tables, list items (like the core).%0a** Parallel processing of multiple blocks.%0a* Add scripts/utils.php; move loading of pmwiki-utils.js and PmSyntax to scripts/utils.js.%0a** Add $EnablePmUtils, default enabled.%0a** Parallel processing of the pmwiki-utils.js utility functions.%0a** Move pmwiki-utils.js move to $HTMLHeaderFmt (often prevents page redraw with the TOC/PmToggle/LocalTimes).%0a* Fix bug causing invalid page name when the name is "Group.0".%0a* Fix PHP 8.1.2 warnings, reported by Jürgen Godau and Dominique Faure.%0a* LocaltTimes fix "rcnew" classes for wikis with the older format.%0a* Update documentation.%0a%0a!!! Version 2.3.1 (2022-01-15) [[#v231]]%0a%0a* Fix the release script which broke the $VersionNum variable and the [@[[#anchor]]@] markup with the PmWiki-responsive skin.%0a%0a!!! Version 2.3.0 (2022-01-15) [[#v230]]%0a* Add PmSyntax, $EnablePmSyntax, $CustomSyntax, [@{$EnabledIMap}@], see Cookbook:PmSyntax, Cookbook:CustomSyntax.%0a* [@(:markup:)@] can now have @@class=norender@@ to only show the source code without processing it.%0a* Updates for PHP 8.1, hide warnings, add PSFT() replacement for strftime() and 2 callbacks, $EnableFTimeNew, update core function calls, add [@%25o@] for the ordinal suffix of the date (PITS:01418).%0a* Notify: @@tz=@@ (timezone) per-user.%0a* PageList add category= argument (PITS:00447, PITS:01475); link= and category= now accept multiple pages, wildcards, and negations (PITS:00908).%0a* [=[[!Category]]=] links can have alternative text (PITS:01095).%0a* Simplify/optimize pmwiki-utils.js when using datasets, simplify sorting of table rows without cloning, add LocalTimes().%0a* Page history diff anchors to also have "id=" attributes in addition to "name=".%0a* Add $EnableLocalTimes (default disabled) and styles, add HandleDiffList().%0a* Add markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as %3ctime>; localized if $EnableLocalTimes.%0a** Add $CurrentLocalTime in the above format, used by default in $RecentChangesFmt.%0a* Add $EnableRecentUploads (only Site.AllRecentChanges, only if $RecentUploadsFmt not defined).%0a* PmTOC update CSS for properly indented subheadings.%0a* Edit form $EnableIncludedPages, add placeholders to e_changesummary and e_author. Enable $EnableNotSavedWarning, add to sample-config.php. EditHelp to behave more like a word processor, typing "Enter" twice without writing text removes the preceding bullet.%0a* Responsive skin details>summary:hover {color:navy, cursor: pointer;}.%0a* PrintDiff() add classes for the delay between edits: diffday, diffweek, diffmonth, diffyear.%0a* Add helper function @@DownloadUrl($pagename, $path)@@ moved from @@LinkUpload()@@.%0a* Add [=$[ULby]=] i18n string 'uploaded by'.%0a* Update documentation.%0a%0a!!! [[#older]] Older versions%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.3.0.%0a +time=1708843355 diff --git a/wikilib.d/PmWiki.LayoutVariables b/wikilib.d/PmWiki.LayoutVariables index b1822ebf..09f177a3 100644 --- a/wikilib.d/PmWiki.LayoutVariables +++ b/wikilib.d/PmWiki.LayoutVariables @@ -1,9 +1,9 @@ -version=pmwiki-2.3.30 ordered=1 urlencoded=1 +version=pmwiki-2.3.31 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=$EnableDarkThemeToggle = 3; (+100) +csum=See also $ImgDarkSuffix (+29) name=PmWiki.LayoutVariables -rev=178 +rev=179 targets=PmWiki.LayoutVariables,PmWiki.BasicVariables,PmWiki.PageDirectives,PmWiki.PageHistory,Cookbook.DarkColorScheme,Cookbook.LocalTimes,Cookbook.PmSyntax,Cookbook.CustomSyntax,PmWiki.WikiStyles,PmWiki.SkinTemplates,PmWiki.WikiGroup,PmWiki.Questions,Cookbook.CustomRecentChanges,Cookbook.RecentUploadsLog,PmWiki.CustomWikiStyles,Cookbook.LocalCSS,PmWiki.TableOfContents,Cookbook.ToggleNext,PmWiki.PathVariables,PmWiki.Tables,PITS.00638,Cookbook.RowspanInSimpleTables,PmWiki.TableDirectives,PmWiki.Skins,Skins.SkinChange,PmWiki.WikiTrails,PmWiki.OtherVariables,PmWiki.EditVariables -text=(:Summary:variables that control page layout:)%0aVariable substitutions in the skin template are all managed by the %25hlt php%25@@`FmtPageName()@@ %25%25function from @@pmwiki.php@@. Pmwiki variable substitutions available on pages are managed by the {$var} substitutions from @@stdmarkup.php@@ or superseded in @@local/config@@ files. %0a%0a:$ActionSkin:This array is used to override the current skin when performing a given action. The most common use is to set %25hlt php%25@@$ActionSkin['print']='foo'@@ to use the 'foo' skin when printing, regardless of what the @@$Skin@@ variable is set to.%0a%0a:$WikiTitle:A variable which contains the Wiki title as displayed in the browser tab and at the top of the browser window, e.g. "{$WikiTitle}"%0a%0a:$EnablePageTitlePriority:A variable defining how to treat multiple %25pmhlt%25[@(:title ...:)@] [[page directives]] (added in PmWiki 2.2.9).%0a: : %25hlt php%25@@$EnablePageTitlePriority = 0;@@ # PmWiki default, last encountered title wins (the title may be changed from included pages or GroupFooter).%0a: : %25hlt php%25@@$EnablePageTitlePriority = 1;@@ # First title wins; if a title is defined in the page, directives from included pages cannot change it.%0a%0a:$EnableDiffInline:If set to 0, this variable switches off the word-level highlighting on the markup in the [[page history]].%0a: : %25hlt php%25@@$EnableDiffInline = 0;@@ # Disable colors, show plain text differences%0a%0a:$EnableRCDiffBytes:If set to 1, @@(All)RecentChanges@@ pages will display the difference in bytes of the page content from the previous version like %25diffmarkup%25{+(+123)+} or {-(-42)-}%25%25%0a: : %25hlt php%25@@$EnableRCDiffBytes = 1;@@ # Show bytes difference from previous version%0a%0a: : The colors are the same as those in the page history; if your skin doesn't provide them, add to ''@@pub/css/local.css@@'' something like: %25hlt css%25[@%0a.diffmarkup { font-family: monospace; font-size: 0.9em; } %0a.diffmarkup del { background: #ff9; text-decoration: none; }%0a.diffmarkup ins { background: #9f9; text-decoration: none; }@]%0a%0a:$CurrentTime: This variable contains the current date and time formatted with $TimeFmt. It is used in @@RecentChanges@@ (before 2.3.0), and in user signatures.%0a%0a:$CurrentLocalTime: This variable contains the current date and time stamp, saved in @@RecentChanges@@ (since 2.3.0). This time stamp will be saved in the wiki source text in Greenwich Mean Time (UTC/GMT), but will be shown according to $TimeFmt in the timezone of the wiki. When $EnableLocalTimes is enabled, then it will be shown in the visitor's time zone. The same format is also saved in user signatures if $EnableLocalTimes is enabled.%0a%0a:$EnablePmUtils: This variable controls whether the script @@pub/pmwiki-utils.js@@ should be loaded or not. The script contains JavaScript utility functions for the table of contents, the syntax highlighting, the recent changes, and the email obfuscation, and the dark color theme. By default $EnablePmUtils is 1 (enabled), but most functions need to be enabled individually ($EnableLocalTimes, $EnableHighlight, $PmTOC, $LinkFunctions['mailto:'], $EnableCopyCode, $EnableSortable, $ToggleNextSelector, $EnablePmSyntax, $CustomSyntax, $EnableCopyCode, $EnableDarkThemeToggle). Set this variable to 0 to disable all these functions.%0a%0a:$EnableDarkThemeToggle: This variable enables the core functions for toggling a dark color scheme, if the skin supports this feature, see Cookbook:DarkColorScheme. Can be set in a skin.php file (as global variable) or in config.php:%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 0; @@ dark theme toggling is disabled, even the skin supports it%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 1; @@ dark theme toggling is enabled, with light theme by default%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 2; @@ dark theme toggling is enabled, with dark theme by default%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 3; @@ use automatically the theme preferred by the browser%0a%0a:$EnableLocalTimes: (Default disabled) Enables the rewriting of date and time stamps into the timezone of the visitor, see documentation at Cookbook:LocalTimes. Dates affected are in RecentChanges pages, in page histories, and in user signatures.%0a: : %25hlt php%25@@ $EnableLocalTimes = 2; @@ Enables '''long''' local times, as in MM/DD/YYYY HH:MM:SS.%0a: : %25hlt php%25@@ $EnableLocalTimes = 1; @@ Enables '''compact''' local times, either HH:MM (within 24 hours), MM/DD or DD/MM (within 11 months), and MM/DD/YYYY or DD/MM/YYYY if earlier than 11 months. The long format appears in a tooltip title when the mouse is over the short format.%0a: : %25hlt php%25@@ $EnableLocalTimes = 3; @@ Like the '''compact''' local times, but when the date is earlier than 11 months, shows MM'YY.%0a%0a:$EnablePmSyntax: (Not to be confused with $EnableHighlight) When set to 1, enables [[Cookbook:PmSyntax|PmSyntax]], a syntax highlighting for the PmWiki markup language, which makes the documentation easy to read (from 2.3.0). When set to 2, it also enables the experimental syntax highlighting in the basic edit form: %25hlt php%25[@%0a$EnablePmSyntax = 1; # highlight documentation blocks%0a$EnablePmSyntax = 2; # both documentation and edit form%0aif ($action=='edit') $EnablePmSyntax = 2; # only edit form@]%0a%0a:$CustomSyntax:(From 2.3.0) An array where custom rules for syntax highlighting can be defined. See documentation at Cookbook:CustomSyntax.%0a%0a:$EnableHighlight: (Not to be confused with $EnablePmSyntax) If set to 1, enables compatibility with the [[https://github.com/highlightjs/highlight.js|highlight.js]] library to highlight program code. In addition, you need to include the library and mark your code blocks with the wikistyle [@%25highlight%25@], see [[WikiStyles#highlight]].%0a%0a:$EnableCopyCode: (From 2.3.21) When set to 1, adds a [@[+]@] button near the top right of preformatted blocks. A user clicking on the button will have the text of the preformatted block copied to their system clipboard: %25hlt php%25[@%0a$EnableCopyCode = 1; # add a [+] copy code button to pre blocks@]%0a%0a:$HTMLTagAttr:A string containing attributes of the %25hlt html%25@@%3chtml...>@@ tag in the skin template, default empty. For example, to add a "lang" attribute, set in @@config.php@@: %25hlt php%25[@%0a$HTMLTagAttr = 'lang="en" xml:lang="en"';@]%0a: : For this variable to work in a custom skin, add it in the template file, for example:%25hlt html%25[@%0a%3chtml xmlns="http://www.w3.org/1999/xhtml" $HTMLTagAttr>@]%0a%0a:$HTMLStylesFmt:An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.%0a%0a:$HTMLHeaderFmt:An array of HTML text to be included in the page's %25hlt html%25@@%3chead>@@ section, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLHeader-->@] directive. This array provides an easy place for scripts to add custom HTML headers.%0a%0a->For example, if you want to specify a [[Wikipedia:Favicon|favicon]] for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['favicon'] =%0a'%3clink href="http://path/to/icon.png" type="image/png" rel="icon" />%0a %3clink href="http://path/to/icon.ico" type="image/x-icon" rel="shortcut icon" />';%0a@]%0a%0a->Another example, if you want to get the RSS notification on some browsers (the RSS icon in Firefox for instance):%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['rss'] =%0a'%3clink rel="alternate" type="application/rss+xml" title="Rss All recent Changes" %0a href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';%0a@]%0a%0a->Javascript example%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['the-javascript'] =%0a'%3cscript>%0a // the javascript code%0a %3c/script>';@]%0a%0a:$HTMLFooterFmt:Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the [[skin template(s)]] specifies a %25hlt php%25[@%3c!--HTMLFooter-->@] directive (usually just before a closing @@%3c/body>@@ tag). Primarily used by scripts to add custom HTML output after the body of the page output. %0a%0a:$MetaRobots:Sets the value of the %25hlt php%25[@%3cmeta name='robots' ... />@] tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki [[wiki group]]. Explicitly setting $MetaRobots overrides this default.%0a--> %25hlt php%25[@# never index this site%0a$MetaRobots = 'noindex,nofollow';%0a# disable the robots tag entirely%0a$MetaRobots = ''; @]%0a%0a:$MessagesFmt:An array of HTML text to be displayed at the point of any %25pmhlt%25[@(:messages:)@] markup. Commonly used for displaying messages with respect to editing pages.%0a%0a:$RecentChangesFmt:An array specifying the format of the RecentChanges listing.%0a%0a->The key of the array specifies the page where changes will be logged, as in%0a-->%25hlt php%25[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges']%0a@]%0a->The value of the array specifies the format in which the changes will be logged, as in%0a-->%25pmhlt%25[@%0a'* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'%0a@]%0a->Note the two consecutive spaces before the three dots (@@. . .@@). The two spaces separate two parts of the format: the first part doesn't change (e.g. a link to the changed page) and the second part does change (e.g. the date and author of the change). Upon saving a page, PmWiki removes a line that matches the first part and adds a line with the current format before the first line with 2 spaces. This way, any line without two consecutive spaces stays at the top of the recent changes page.%0a%0a->You can use and adapt the following to change the format (put it in config.php):%0a-->%25hlt php%25[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = %0a '* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$RecentChangesFmt['$Group.RecentChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a@]%0a-> Since PmWiki 2.3.0, the format uses $CurrentLocalTime by default which shows exactly what $CurrentTime previously showed, but when $EnableLocalTimes is set, will rewrite the time and date in the local format and timezone of the visitor. %0a%0a->Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit.%0a%0a->Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here [[PmWiki:Questions|PmWiki Questions]]. More informations on customizing RecentChanges pages here : [[Cookbook/CustomRecentChanges]].%0a%0a:$RecentUploadsFmt:An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information. See also $EnableRecentUploads.%0a%0a:$EnableRecentUploads: When set to 1, and when $RecentUploadsFmt is not set, it enables Recent uploads in a default format, only on the page Site.AllRecentChanges. This was added in 2.3.0 to easily enable the feature with some default settings that may be good enough for many wikis.%0a%0a:$DraftRecentChangesFmt:An array specifying the format of the RecentChanges listing when saving Draft pages.%0a%0a->$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved. For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:%0a-->%25hlt php%25[@%0a$DraftRecentChangesFmt['$Group.RecentDraftChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$DraftRecentChangesFmt['$Group.RecentChanges'] = '';%0a@]%0a%0a:$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages. The default is zero, meaning "no limit".%0a $RCLinesMax = 1000; # maintain at most 1000 recent changes%0a%0a:$PageRedirectFmt:The text to be used when a page is redirected via the [@(:redirect:)@] markup.%0a-->%25hlt php%25[@%0a$PageRedirectFmt = '%3cp>%3ci>redirected from $FullName%3c/p>';%0a$PageRedirectFmt = '';%0a@]%0a->For display options, see also the FAQ on [[(PmWiki:)PageDirectives(#faq)]].%0a%0a:$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.[[%3c%3c]]See: [[PmWiki.CustomWikiStyles]]%0a%0a:$WikiStyleApply:An array which defines the scope of wiki styling per HTML element. Default settings are:%0a->%25hlt php%25[@%0a'item' => 'li|dt',%0a'list' => 'ul|ol|dl',%0a'div' => 'div',%0a'pre' => 'pre',%0a'img' => 'img',%0a'block' => 'p(?!\\sclass=)|div|ul|ol|dl|li|dt|pre|h[1-6]',%0a'p' => 'p(?!\\sclass=)'%0a@]%0a%0a->This defines that we can apply wiki styling on:%0a* LI elements using the ''item'' keyword%0a* UL, OL, DL elements using the ''list'' keyword%0a* etc.%0a%0a->An example of applying scope to an LI element is below. For more information refer to [[PmWiki/WikiStyles#Scope | WikiStyle scope]].%0a(:markup class=horiz:) %0a* %25apply=item red%25Here is a red styled list item%0a* This item would not be styled.%0a(:markupend:)%0a%0a->You can [[PmWiki.WikiStyles#WikiStyleApply | add additional HTML elements to $WikiStyleApply]] to apply wiki styles to other HTML elements. For example to allow styling on table rows, or anchor tags.%0a%0a:$WikiPageCSSFmt: This variable holds a page name where you can add CSS rules applied to specific page patterns (default disabled). See Cookbook:LocalCSS as an example.%0a: : %25hlt php%25@@$WikiPageCSSFmt = 'Site.LocalCSS'; # global Site.LocalCSS page@@%0a: : %25hlt php%25@@$WikiPageCSSFmt = '[={$Group}=].LocalCSS'; # per-group LocalCSS pages@@%0a%0a:$WikiPageCSSVars: If a "wiki CSS page" is enabled with $WikiPageCSSFmt, this is an array with global PHP $variables available as pre-processor @variables in that page. By default the array contains: @@'FarmPubDirUrl', 'PubDirUrl', 'Skin', 'action', 'SkinDirUrl'@@.%0a%0a:$EnableSelfWikiPageCSS: If a "wiki CSS page" is enabled with $WikiPageCSSFmt, that specific page doesn't have CSS applied to itself when browsed or edited. In case a grave mistake is made in the styles and the site becomes unusable, this page will still be viewable and editable. People familiar with CSS can set this to 1 and the styles will be applied to the page itself, also in "Preview" mode:%0a: : %25hlt php%25@@$EnableSelfWikiPageCSS = 1; # Apply styles to the "wiki CSS page" itself@@%0a%0a:$PmTOC: Enable and configure the built-in table of contents, see [[Table of contents]] (TOC).%0a: : %25hlt php%25@@$PmTOC['Enable'] = 1; # Enable TOC; default is 0 (disabled).@@%0a%0a:$ToggleNextSelector: A CSS selector to enable interactive toggling of hidden sections, see Cookbook:ToggleNext. By default it is disabled.%0a%0a:$MaxIncludes:Controls the number of times that pages can be included via the %25pmhlt%25[@(:include:)@] and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.%0a--> %25hlt php%25[@$MaxIncludes = 50; # default%0a$MaxIncludes = 1000; # allow lots of includes%0a$MaxIncludes = 0; # turn off includes @]%0a%0a:$Skin:Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.%0a%0a:$SkinDirUrl:Set by ''@@scripts/skins.php@@'' to be the base url of the current skin's directory (i.e., within a '@@pub/skins/@@' directory). This variable is typically used inside of a skin @@.tmpl@@ file to provide access to @@.css@@ files and graphic images associated with the skin.%0a%0a:$SkinLibDirs:An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).%0a%0a->The array key is the directory containing the @@skin.tmpl@@ and @@skin.php@@ files, as seen by the PmWiki program. It does not have to be publicly accessible.%0a%0a-> The value is the URL (web address) of the directory containing the @@.css@@, @@.gif@@, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.%0a%0a->By default $SkinLibDirs is set to:%0a--> %25hlt php%25[@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a->Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.%0a%0a:$SkinTemplateIncludeLevel: how many levels of inclusion are allowed for [[skin templates]] with the %25hlt html%25[@%3c!--IncludeTemplate:...-->@]%25%25 directive. By default this directive is disabled. Setting it to 1 allows one level of inclusions, setting it to 2 allows included templates to include more templates. There can be up to 10 levels of inclusion. This variable can be defined either in @@local/config.php@@ or in @@pub/skins/skinname/skinname.php@@ (with SDV):%25hlt php%25[@%0a # in config.php, allow one level of inclusions%0a $SkinTemplateIncludeLevel = 1; %0a%0a # in skinname.php, allow 3 levels of inclusions%0a SDV($GLOBALS['SkinTemplateIncludeLevel'], 3); %0a@]%0a%0a:$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually), e.g. "{$PageLogoUrl}"%0a%0a:$EnablePathInfo:Changes the handling of the page URL. When set to @@1@@ page URL will be @@...wiki.php/Main/Main@@, when set to @@0@@ (default) it will be @@...wiki.php?n=Main.Main@@.%0a%0a:$EnableFixedUrlRedirect:When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting %25hlt php%25@@$EnableFixedUrlRedirect=0;@@ blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect. %0a%0a:$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:%0a [=$GroupHeaderFmt = '(:include {$Group}.GroupHeader self=0 basepage={*$FullName}:)(:nl:)';=]%0a%0a:$GroupPrintHeaderFmt:Defines the markup placed at the top of every page when [@action=print@]. Default value is:%0a [=SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader basepage={*$FullName}:)(:nl:)');=]%0a%0a:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:%0a [=$GroupFooterFmt = '(:nl:)(:include {$Group}.GroupFooter self=0 basepage={*$FullName}:)';=]%0a%0a:$GroupPrintFooterFmt:Defines the markup placed at the bottom of every page when [@action=print@]. Default value is:%0a [=SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter basepage={*$FullName}:)');=]%0a%0a:$PageNotFoundHeaderFmt:Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work.%0a%0a-->%25hlt php%25[@%0a# default%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';%0a# return all pages as found%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';%0a@]%0a%0a->Beware when expecting to return the content of a Group(header|footer) for an non existent page! By default PmWiki returns 404 (because the page does not exist), despite there is some content to show. Firefox shows the content, while Internet Explorer displays its default 404 page. $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.%0a%0a:$HTMLVSpace:Setting %25hlt php%25[@$HTMLVSpace = '';@]%25%25 in a local customizationfile (e.g., [@local/config.php@]) prevents insertion of spacer paragraphs (%25hlt html%25[@%3cp class='vspace'>%3c/p>@]%25%25) in generated HTML code. To limit this change to a single skin, place the %25hlt php%25[@$HTMLVSpace = '';@] statement in a @@skin.php@@ file, preceded by the statement %25hlt php%25[@global $HTMLVSpace;@].%0a%0a:$HTMLPNewline:This variable allows to enable linebreaks by default, i.e. without having the directive %25pmhlt%25[@(:linebreaks:)@] in a page or in a GroupHeader. To enable line breaks, add to @@config.php@@ such a line:\\%0a %25hlt php%25@@$HTMLPNewline = '%3cbr/>'; @@%0a%0a:$SimpleTableDefaultClassName:This variable can contain a CSS classname to be used for [[tables|simple tables]], if a "class=" attribute is not defined in the wiki page (default unset):\\%0a%25hlt php%25@@ $SimpleTableDefaultClassName = "wikisimpletable";@@\\%0aSee for sample code PITS:00638.%0a%0a:$EnableSimpleTableRowspan:If set to 1, will enable features replicating the recipe Cookbook:RowspanInSimpleTables (default disabled).\\%0a@@ $EnableSimpleTableRowspan = 1; @@ # See [[Cookbook:RowspanInSimpleTables|recipe]]%0a%0a:$EnableSortable:Set this variable to 1 to enable sortable tables, see [[Tables#sortable]] (default disabled):%25hlt php%25[@%0a$EnableSortable = 1; # Enable sortable tables@]%0a%0a:$TableCellAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctd>@@ or @@%3cth>@@ cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.%0a%0a:$TableCellAlignFmt:For [[Tables]], defines the HTML attributes for alignment of each @@%3ctd>@@ or @@%3cth>@@ cell. Default is @@" align='%25s'"@@ where %25s will be replaced with 'center', 'left' or 'right'. For a valid HTML5 output you may want to change this in @@config.php@@:\\%0a%25hlt php%25@@$TableCellAlignFmt = " class='%25s'";@@\\%0athen define the CSS classes td.center, td.right and td.left (also th).%0a%0a:$TableRowAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctr>@@ element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.%0a-> %25hlt php%25[@# Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )%0a$TableRowAttrFmt = "class='tr\$TableRowCount'";%0a# Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )%0a$TableRowIndexMax = 2;%0a$TableRowAttrFmt = "class='ti\$TableRowIndex'"; @]%0a%0a:$TableRowIndexMax:The maximum value for $TableRowIndex in [[Tables]].%0a-> %25hlt php%25[@# Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...%0a$TableRowIndexMax = 3; @]%0a%0a:$EnableTableAutoValignTop:[[TableDirectives|Advanced tables]] are intended for layout, and automatically insert the @@valign='top'@@ attribute if there is no @@valign@@ attribute defined in the markup source. Setting this variable to 0 in config.php will prevent the automatic addition.%0a-> %25hlt php%25@@$EnableTableAutoValignTop = 0; # disable automatic valign='top' attr@@%0a%0a:$EnableAutoSkinList:This variable enables the change of the [[PmWiki/skins|skin]] from the URL to any skin available on the wiki installation. See also $PageSkinList and Skins:SkinChange.%0a%0a:$PageSkinList:This is an array of allowed skins that can be changed by the visitor with @@?skin=@@ or @@?setskin=@@ URL query to the wiki. See also $EnableAutoSkinList and Skins:SkinChange.%0a%0a:$TrailFmt: An array of HTML snippets containing the layout of the [[WikiTrails]] output. If you define one or more custom values in config.php, they will be used. Here are the default values:\\%0a%25hlt php%25[@%0a$TrailFmt['%3c%3c|'] = "%3cspan class='wikitrail'><< \$prev | \$trailname | \$next >>%3c/span>";%0a$TrailFmt['%3c|'] = "%3cspan class='wikitrail'>\$prev\$trailname\$next%3c/span>";%0a$TrailFmt['^|'] = "%3cspan class='wikitrail'>\$crumbs%3c/span>";%0a@]%0a%0a:$TrailPathSep: the trail separator of the "path" trail ( %25pmhlt%25[@^|[[TrailIndexPage]]|^@] ). For instance @@$TrailPathSep = ' > ';@@ will output "[=TrailIndexPage > TrailPage2 > TrailPage4=]".%0a%0a:$InputLabelFmt: A HTML snippet containing the layout of the "label" after an input form field. If you define a custom value in config.php, it will be used. The default value has initial and trailing spaces: \\%0a%25hlt php%25[@$InputLabelFmt = ' %3clabel for="$LabelFor" $LabelTitle>$LabelText%3c/label> '; @]%0a%0a:$FmtV['$TableCellCount']:PMWiki internal variable - Horizontal column number of the current cell. For use in $TableCellAttrFmt and $TableRowAttrFmt. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@$TableCellAttrFmt = 'class=col\$TableCellCount';@@ %0a%0a:$FmtV['$TableRowCount']:PMWiki internal variable - Current row number. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@TableRowAttrFmt = "class='row\$TableRowCount'";@@%0a%0a:$FmtV['$TableRowIndex']:PMWiki internal variable - Row index number derived from $TableRowIndexMax. (1,2,3,1,2,3,...). Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@$TableRowAttrFmt = "class='ind\$TableRowIndex'";@@%0a%0aSee also: [[Edit Variables]]%0a -time=1707767893 +text=(:Summary:variables that control page layout:)%0aVariable substitutions in the skin template are all managed by the %25hlt php%25@@`FmtPageName()@@ %25%25function from @@pmwiki.php@@. Pmwiki variable substitutions available on pages are managed by the {$var} substitutions from @@stdmarkup.php@@ or superseded in @@local/config@@ files. %0a%0a:$ActionSkin:This array is used to override the current skin when performing a given action. The most common use is to set %25hlt php%25@@$ActionSkin['print']='foo'@@ to use the 'foo' skin when printing, regardless of what the @@$Skin@@ variable is set to.%0a%0a:$WikiTitle:A variable which contains the Wiki title as displayed in the browser tab and at the top of the browser window, e.g. "{$WikiTitle}"%0a%0a:$EnablePageTitlePriority:A variable defining how to treat multiple %25pmhlt%25[@(:title ...:)@] [[page directives]] (added in PmWiki 2.2.9).%0a: : %25hlt php%25@@$EnablePageTitlePriority = 0;@@ # PmWiki default, last encountered title wins (the title may be changed from included pages or GroupFooter).%0a: : %25hlt php%25@@$EnablePageTitlePriority = 1;@@ # First title wins; if a title is defined in the page, directives from included pages cannot change it.%0a%0a:$EnableDiffInline:If set to 0, this variable switches off the word-level highlighting on the markup in the [[page history]].%0a: : %25hlt php%25@@$EnableDiffInline = 0;@@ # Disable colors, show plain text differences%0a%0a:$EnableRCDiffBytes:If set to 1, @@(All)RecentChanges@@ pages will display the difference in bytes of the page content from the previous version like %25diffmarkup%25{+(+123)+} or {-(-42)-}%25%25%0a: : %25hlt php%25@@$EnableRCDiffBytes = 1;@@ # Show bytes difference from previous version%0a%0a: : The colors are the same as those in the page history; if your skin doesn't provide them, add to ''@@pub/css/local.css@@'' something like: %25hlt css%25[@%0a.diffmarkup { font-family: monospace; font-size: 0.9em; } %0a.diffmarkup del { background: #ff9; text-decoration: none; }%0a.diffmarkup ins { background: #9f9; text-decoration: none; }@]%0a%0a:$CurrentTime: This variable contains the current date and time formatted with $TimeFmt. It is used in @@RecentChanges@@ (before 2.3.0), and in user signatures.%0a%0a:$CurrentLocalTime: This variable contains the current date and time stamp, saved in @@RecentChanges@@ (since 2.3.0). This time stamp will be saved in the wiki source text in Greenwich Mean Time (UTC/GMT), but will be shown according to $TimeFmt in the timezone of the wiki. When $EnableLocalTimes is enabled, then it will be shown in the visitor's time zone. The same format is also saved in user signatures if $EnableLocalTimes is enabled.%0a%0a:$EnablePmUtils: This variable controls whether the script @@pub/pmwiki-utils.js@@ should be loaded or not. The script contains JavaScript utility functions for the table of contents, the syntax highlighting, the recent changes, and the email obfuscation, and the dark color theme. By default $EnablePmUtils is 1 (enabled), but most functions need to be enabled individually ($EnableLocalTimes, $EnableHighlight, $PmTOC, $LinkFunctions['mailto:'], $EnableCopyCode, $EnableSortable, $ToggleNextSelector, $EnablePmSyntax, $CustomSyntax, $EnableCopyCode, $EnableDarkThemeToggle). Set this variable to 0 to disable all these functions.%0a%0a:$EnableDarkThemeToggle: This variable enables the core functions for toggling a dark color scheme, if the skin supports this feature, see Cookbook:DarkColorScheme. Can be set in a skin.php file (as global variable) or in config.php:%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 0; @@ dark theme toggling is disabled, even the skin supports it%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 1; @@ dark theme toggling is enabled, with light theme by default%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 2; @@ dark theme toggling is enabled, with dark theme by default%0a: : %25hlt php%25@@ $EnableDarkThemeToggle = 3; @@ use automatically the theme preferred by the browser%0a: : See also $ImgDarkSuffix.%0a%0a:$EnableLocalTimes: (Default disabled) Enables the rewriting of date and time stamps into the timezone of the visitor, see documentation at Cookbook:LocalTimes. Dates affected are in RecentChanges pages, in page histories, and in user signatures.%0a: : %25hlt php%25@@ $EnableLocalTimes = 2; @@ Enables '''long''' local times, as in MM/DD/YYYY HH:MM:SS.%0a: : %25hlt php%25@@ $EnableLocalTimes = 1; @@ Enables '''compact''' local times, either HH:MM (within 24 hours), MM/DD or DD/MM (within 11 months), and MM/DD/YYYY or DD/MM/YYYY if earlier than 11 months. The long format appears in a tooltip title when the mouse is over the short format.%0a: : %25hlt php%25@@ $EnableLocalTimes = 3; @@ Like the '''compact''' local times, but when the date is earlier than 11 months, shows MM'YY.%0a%0a:$EnablePmSyntax: (Not to be confused with $EnableHighlight) When set to 1, enables [[Cookbook:PmSyntax|PmSyntax]], a syntax highlighting for the PmWiki markup language, which makes the documentation easy to read (from 2.3.0). When set to 2, it also enables the experimental syntax highlighting in the basic edit form: %25hlt php%25[@%0a$EnablePmSyntax = 1; # highlight documentation blocks%0a$EnablePmSyntax = 2; # both documentation and edit form%0aif ($action=='edit') $EnablePmSyntax = 2; # only edit form@]%0a%0a:$CustomSyntax:(From 2.3.0) An array where custom rules for syntax highlighting can be defined. See documentation at Cookbook:CustomSyntax.%0a%0a:$EnableHighlight: (Not to be confused with $EnablePmSyntax) If set to 1, enables compatibility with the [[https://github.com/highlightjs/highlight.js|highlight.js]] library to highlight program code. In addition, you need to include the library and mark your code blocks with the wikistyle [@%25highlight%25@], see [[WikiStyles#highlight]].%0a%0a:$EnableCopyCode: (From 2.3.21) When set to 1, adds a [@[+]@] button near the top right of preformatted blocks. A user clicking on the button will have the text of the preformatted block copied to their system clipboard: %25hlt php%25[@%0a$EnableCopyCode = 1; # add a [+] copy code button to pre blocks@]%0a%0a:$HTMLTagAttr:A string containing attributes of the %25hlt html%25@@%3chtml...>@@ tag in the skin template, default empty. For example, to add a "lang" attribute, set in @@config.php@@: %25hlt php%25[@%0a$HTMLTagAttr = 'lang="en" xml:lang="en"';@]%0a: : For this variable to work in a custom skin, add it in the template file, for example:%25hlt html%25[@%0a%3chtml xmlns="http://www.w3.org/1999/xhtml" $HTMLTagAttr>@]%0a%0a:$HTMLStylesFmt:An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.%0a%0a:$HTMLHeaderFmt:An array of HTML text to be included in the page's %25hlt html%25@@%3chead>@@ section, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLHeader-->@] directive. This array provides an easy place for scripts to add custom HTML headers.%0a%0a->For example, if you want to specify a [[Wikipedia:Favicon|favicon]] for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['favicon'] =%0a'%3clink href="http://path/to/icon.png" type="image/png" rel="icon" />%0a %3clink href="http://path/to/icon.ico" type="image/x-icon" rel="shortcut icon" />';%0a@]%0a%0a->Another example, if you want to get the RSS notification on some browsers (the RSS icon in Firefox for instance):%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['rss'] =%0a'%3clink rel="alternate" type="application/rss+xml" title="Rss All recent Changes" %0a href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';%0a@]%0a%0a->Javascript example%0a-->%25hlt php%25[@%0a$HTMLHeaderFmt['the-javascript'] =%0a'%3cscript>%0a // the javascript code%0a %3c/script>';@]%0a%0a:$HTMLFooterFmt:Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the [[skin template(s)]] specifies a %25hlt php%25[@%3c!--HTMLFooter-->@] directive (usually just before a closing @@%3c/body>@@ tag). Primarily used by scripts to add custom HTML output after the body of the page output. %0a%0a:$MetaRobots:Sets the value of the %25hlt php%25[@%3cmeta name='robots' ... />@] tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki [[wiki group]]. Explicitly setting $MetaRobots overrides this default.%0a--> %25hlt php%25[@# never index this site%0a$MetaRobots = 'noindex,nofollow';%0a# disable the robots tag entirely%0a$MetaRobots = ''; @]%0a%0a:$MessagesFmt:An array of HTML text to be displayed at the point of any %25pmhlt%25[@(:messages:)@] markup. Commonly used for displaying messages with respect to editing pages.%0a%0a:$RecentChangesFmt:An array specifying the format of the RecentChanges listing.%0a%0a->The key of the array specifies the page where changes will be logged, as in%0a-->%25hlt php%25[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges']%0a@]%0a->The value of the array specifies the format in which the changes will be logged, as in%0a-->%25pmhlt%25[@%0a'* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'%0a@]%0a->Note the two consecutive spaces before the three dots (@@. . .@@). The two spaces separate two parts of the format: the first part doesn't change (e.g. a link to the changed page) and the second part does change (e.g. the date and author of the change). Upon saving a page, PmWiki removes a line that matches the first part and adds a line with the current format before the first line with 2 spaces. This way, any line without two consecutive spaces stays at the top of the recent changes page.%0a%0a->You can use and adapt the following to change the format (put it in config.php):%0a-->%25hlt php%25[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = %0a '* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$RecentChangesFmt['$Group.RecentChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a@]%0a-> Since PmWiki 2.3.0, the format uses $CurrentLocalTime by default which shows exactly what $CurrentTime previously showed, but when $EnableLocalTimes is set, will rewrite the time and date in the local format and timezone of the visitor. %0a%0a->Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit.%0a%0a->Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here [[PmWiki:Questions|PmWiki Questions]]. More informations on customizing RecentChanges pages here : [[Cookbook/CustomRecentChanges]].%0a%0a:$RecentUploadsFmt:An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information. See also $EnableRecentUploads.%0a%0a:$EnableRecentUploads: When set to 1, and when $RecentUploadsFmt is not set, it enables Recent uploads in a default format, only on the page Site.AllRecentChanges. This was added in 2.3.0 to easily enable the feature with some default settings that may be good enough for many wikis.%0a%0a:$DraftRecentChangesFmt:An array specifying the format of the RecentChanges listing when saving Draft pages.%0a%0a->$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved. For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:%0a-->%25hlt php%25[@%0a$DraftRecentChangesFmt['$Group.RecentDraftChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$DraftRecentChangesFmt['$Group.RecentChanges'] = '';%0a@]%0a%0a:$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages. The default is zero, meaning "no limit".%0a $RCLinesMax = 1000; # maintain at most 1000 recent changes%0a%0a:$PageRedirectFmt:The text to be used when a page is redirected via the [@(:redirect:)@] markup.%0a-->%25hlt php%25[@%0a$PageRedirectFmt = '%3cp>%3ci>redirected from $FullName%3c/p>';%0a$PageRedirectFmt = '';%0a@]%0a->For display options, see also the FAQ on [[(PmWiki:)PageDirectives(#faq)]].%0a%0a:$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.[[%3c%3c]]See: [[PmWiki.CustomWikiStyles]]%0a%0a:$WikiStyleApply:An array which defines the scope of wiki styling per HTML element. Default settings are:%0a->%25hlt php%25[@%0a'item' => 'li|dt',%0a'list' => 'ul|ol|dl',%0a'div' => 'div',%0a'pre' => 'pre',%0a'img' => 'img',%0a'block' => 'p(?!\\sclass=)|div|ul|ol|dl|li|dt|pre|h[1-6]',%0a'p' => 'p(?!\\sclass=)'%0a@]%0a%0a->This defines that we can apply wiki styling on:%0a* LI elements using the ''item'' keyword%0a* UL, OL, DL elements using the ''list'' keyword%0a* etc.%0a%0a->An example of applying scope to an LI element is below. For more information refer to [[PmWiki/WikiStyles#Scope | WikiStyle scope]].%0a(:markup class=horiz:) %0a* %25apply=item red%25Here is a red styled list item%0a* This item would not be styled.%0a(:markupend:)%0a%0a->You can [[PmWiki.WikiStyles#WikiStyleApply | add additional HTML elements to $WikiStyleApply]] to apply wiki styles to other HTML elements. For example to allow styling on table rows, or anchor tags.%0a%0a:$WikiPageCSSFmt: This variable holds a page name where you can add CSS rules applied to specific page patterns (default disabled). See Cookbook:LocalCSS as an example.%0a: : %25hlt php%25@@$WikiPageCSSFmt = 'Site.LocalCSS'; # global Site.LocalCSS page@@%0a: : %25hlt php%25@@$WikiPageCSSFmt = '[={$Group}=].LocalCSS'; # per-group LocalCSS pages@@%0a%0a:$WikiPageCSSVars: If a "wiki CSS page" is enabled with $WikiPageCSSFmt, this is an array with global PHP $variables available as pre-processor @variables in that page. By default the array contains: @@'FarmPubDirUrl', 'PubDirUrl', 'Skin', 'action', 'SkinDirUrl'@@.%0a%0a:$EnableSelfWikiPageCSS: If a "wiki CSS page" is enabled with $WikiPageCSSFmt, that specific page doesn't have CSS applied to itself when browsed or edited. In case a grave mistake is made in the styles and the site becomes unusable, this page will still be viewable and editable. People familiar with CSS can set this to 1 and the styles will be applied to the page itself, also in "Preview" mode:%0a: : %25hlt php%25@@$EnableSelfWikiPageCSS = 1; # Apply styles to the "wiki CSS page" itself@@%0a%0a:$PmTOC: Enable and configure the built-in table of contents, see [[Table of contents]] (TOC).%0a: : %25hlt php%25@@$PmTOC['Enable'] = 1; # Enable TOC; default is 0 (disabled).@@%0a%0a:$ToggleNextSelector: A CSS selector to enable interactive toggling of hidden sections, see Cookbook:ToggleNext. By default it is disabled.%0a%0a:$MaxIncludes:Controls the number of times that pages can be included via the %25pmhlt%25[@(:include:)@] and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.%0a--> %25hlt php%25[@$MaxIncludes = 50; # default%0a$MaxIncludes = 1000; # allow lots of includes%0a$MaxIncludes = 0; # turn off includes @]%0a%0a:$Skin:Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.%0a%0a:$SkinDirUrl:Set by ''@@scripts/skins.php@@'' to be the base url of the current skin's directory (i.e., within a '@@pub/skins/@@' directory). This variable is typically used inside of a skin @@.tmpl@@ file to provide access to @@.css@@ files and graphic images associated with the skin.%0a%0a:$SkinLibDirs:An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).%0a%0a->The array key is the directory containing the @@skin.tmpl@@ and @@skin.php@@ files, as seen by the PmWiki program. It does not have to be publicly accessible.%0a%0a-> The value is the URL (web address) of the directory containing the @@.css@@, @@.gif@@, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.%0a%0a->By default $SkinLibDirs is set to:%0a--> %25hlt php%25[@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a->Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.%0a%0a:$SkinTemplateIncludeLevel: how many levels of inclusion are allowed for [[skin templates]] with the %25hlt html%25[@%3c!--IncludeTemplate:...-->@]%25%25 directive. By default this directive is disabled. Setting it to 1 allows one level of inclusions, setting it to 2 allows included templates to include more templates. There can be up to 10 levels of inclusion. This variable can be defined either in @@local/config.php@@ or in @@pub/skins/skinname/skinname.php@@ (with SDV):%25hlt php%25[@%0a # in config.php, allow one level of inclusions%0a $SkinTemplateIncludeLevel = 1; %0a%0a # in skinname.php, allow 3 levels of inclusions%0a SDV($GLOBALS['SkinTemplateIncludeLevel'], 3); %0a@]%0a%0a:$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually), e.g. "{$PageLogoUrl}"%0a%0a:$EnablePathInfo:Changes the handling of the page URL. When set to @@1@@ page URL will be @@...wiki.php/Main/Main@@, when set to @@0@@ (default) it will be @@...wiki.php?n=Main.Main@@.%0a%0a:$EnableFixedUrlRedirect:When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting %25hlt php%25@@$EnableFixedUrlRedirect=0;@@ blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect. %0a%0a:$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:%0a [=$GroupHeaderFmt = '(:include {$Group}.GroupHeader self=0 basepage={*$FullName}:)(:nl:)';=]%0a%0a:$GroupPrintHeaderFmt:Defines the markup placed at the top of every page when [@action=print@]. Default value is:%0a [=SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader basepage={*$FullName}:)(:nl:)');=]%0a%0a:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:%0a [=$GroupFooterFmt = '(:nl:)(:include {$Group}.GroupFooter self=0 basepage={*$FullName}:)';=]%0a%0a:$GroupPrintFooterFmt:Defines the markup placed at the bottom of every page when [@action=print@]. Default value is:%0a [=SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter basepage={*$FullName}:)');=]%0a%0a:$PageNotFoundHeaderFmt:Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work.%0a%0a-->%25hlt php%25[@%0a# default%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';%0a# return all pages as found%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';%0a@]%0a%0a->Beware when expecting to return the content of a Group(header|footer) for an non existent page! By default PmWiki returns 404 (because the page does not exist), despite there is some content to show. Firefox shows the content, while Internet Explorer displays its default 404 page. $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.%0a%0a:$HTMLVSpace:Setting %25hlt php%25[@$HTMLVSpace = '';@]%25%25 in a local customizationfile (e.g., [@local/config.php@]) prevents insertion of spacer paragraphs (%25hlt html%25[@%3cp class='vspace'>%3c/p>@]%25%25) in generated HTML code. To limit this change to a single skin, place the %25hlt php%25[@$HTMLVSpace = '';@] statement in a @@skin.php@@ file, preceded by the statement %25hlt php%25[@global $HTMLVSpace;@].%0a%0a:$HTMLPNewline:This variable allows to enable linebreaks by default, i.e. without having the directive %25pmhlt%25[@(:linebreaks:)@] in a page or in a GroupHeader. To enable line breaks, add to @@config.php@@ such a line:\\%0a %25hlt php%25@@$HTMLPNewline = '%3cbr/>'; @@%0a%0a:$SimpleTableDefaultClassName:This variable can contain a CSS classname to be used for [[tables|simple tables]], if a "class=" attribute is not defined in the wiki page (default unset):\\%0a%25hlt php%25@@ $SimpleTableDefaultClassName = "wikisimpletable";@@\\%0aSee for sample code PITS:00638.%0a%0a:$EnableSimpleTableRowspan:If set to 1, will enable features replicating the recipe Cookbook:RowspanInSimpleTables (default disabled).\\%0a@@ $EnableSimpleTableRowspan = 1; @@ # See [[Cookbook:RowspanInSimpleTables|recipe]]%0a%0a:$EnableSortable:Set this variable to 1 to enable sortable tables, see [[Tables#sortable]] (default disabled):%25hlt php%25[@%0a$EnableSortable = 1; # Enable sortable tables@]%0a%0a:$TableCellAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctd>@@ or @@%3cth>@@ cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.%0a%0a:$TableCellAlignFmt:For [[Tables]], defines the HTML attributes for alignment of each @@%3ctd>@@ or @@%3cth>@@ cell. Default is @@" align='%25s'"@@ where %25s will be replaced with 'center', 'left' or 'right'. For a valid HTML5 output you may want to change this in @@config.php@@:\\%0a%25hlt php%25@@$TableCellAlignFmt = " class='%25s'";@@\\%0athen define the CSS classes td.center, td.right and td.left (also th).%0a%0a:$TableRowAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctr>@@ element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.%0a-> %25hlt php%25[@# Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )%0a$TableRowAttrFmt = "class='tr\$TableRowCount'";%0a# Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )%0a$TableRowIndexMax = 2;%0a$TableRowAttrFmt = "class='ti\$TableRowIndex'"; @]%0a%0a:$TableRowIndexMax:The maximum value for $TableRowIndex in [[Tables]].%0a-> %25hlt php%25[@# Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...%0a$TableRowIndexMax = 3; @]%0a%0a:$EnableTableAutoValignTop:[[TableDirectives|Advanced tables]] are intended for layout, and automatically insert the @@valign='top'@@ attribute if there is no @@valign@@ attribute defined in the markup source. Setting this variable to 0 in config.php will prevent the automatic addition.%0a-> %25hlt php%25@@$EnableTableAutoValignTop = 0; # disable automatic valign='top' attr@@%0a%0a:$EnableAutoSkinList:This variable enables the change of the [[PmWiki/skins|skin]] from the URL to any skin available on the wiki installation. See also $PageSkinList and Skins:SkinChange.%0a%0a:$PageSkinList:This is an array of allowed skins that can be changed by the visitor with @@?skin=@@ or @@?setskin=@@ URL query to the wiki. See also $EnableAutoSkinList and Skins:SkinChange.%0a%0a:$TrailFmt: An array of HTML snippets containing the layout of the [[WikiTrails]] output. If you define one or more custom values in config.php, they will be used. Here are the default values:\\%0a%25hlt php%25[@%0a$TrailFmt['%3c%3c|'] = "%3cspan class='wikitrail'><< \$prev | \$trailname | \$next >>%3c/span>";%0a$TrailFmt['%3c|'] = "%3cspan class='wikitrail'>\$prev\$trailname\$next%3c/span>";%0a$TrailFmt['^|'] = "%3cspan class='wikitrail'>\$crumbs%3c/span>";%0a@]%0a%0a:$TrailPathSep: the trail separator of the "path" trail ( %25pmhlt%25[@^|[[TrailIndexPage]]|^@] ). For instance @@$TrailPathSep = ' > ';@@ will output "[=TrailIndexPage > TrailPage2 > TrailPage4=]".%0a%0a:$InputLabelFmt: A HTML snippet containing the layout of the "label" after an input form field. If you define a custom value in config.php, it will be used. The default value has initial and trailing spaces: \\%0a%25hlt php%25[@$InputLabelFmt = ' %3clabel for="$LabelFor" $LabelTitle>$LabelText%3c/label> '; @]%0a%0a:$FmtV['$TableCellCount']:PMWiki internal variable - Horizontal column number of the current cell. For use in $TableCellAttrFmt and $TableRowAttrFmt. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@$TableCellAttrFmt = 'class=col\$TableCellCount';@@ %0a%0a:$FmtV['$TableRowCount']:PMWiki internal variable - Current row number. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@TableRowAttrFmt = "class='row\$TableRowCount'";@@%0a%0a:$FmtV['$TableRowIndex']:PMWiki internal variable - Row index number derived from $TableRowIndexMax. (1,2,3,1,2,3,...). Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a-> Example: %25hlt php%25@@$TableRowAttrFmt = "class='ind\$TableRowIndex'";@@%0a%0aSee also: [[Edit Variables]]%0a +time=1708843411 diff --git a/wikilib.d/PmWiki.MailingLists b/wikilib.d/PmWiki.MailingLists index 919c320e..63e02fdd 100644 --- a/wikilib.d/PmWiki.MailingLists +++ b/wikilib.d/PmWiki.MailingLists @@ -1,10 +1,10 @@ -version=pmwiki-2.3.17 ordered=1 urlencoded=1 -author=simon +version=pmwiki-2.3.31 ordered=1 urlencoded=1 +author=Petko charset=UTF-8 -csum=hlt html, 2022 (+19) +csum=pmwiki-users: 235 messages in 2023 (+0) keywords=email lists name=PmWiki.MailingLists -rev=122 +rev=124 targets=PmWiki.PmWiki -text=(:Summary:The email discussion lists available and their archives:)(:keywords email lists:)%0aThere are several mailing lists available for [[PmWiki]].%0a %0a:[ [[(http://www.pmichaud.com/mailman/listinfo/)pmwiki-users]] ]: This is a great resource where a very helpful group of people will answer questions and discuss PmWiki development. As of 2022, traffic is around 20-40 messages a month. %0a->''If you ask a question on the list and it doesn't get answered, don't feel let down. Just'' '''''ask it again'''''. It probably slipped by unnoticed.%0a%0a->Archives are available from:%0a-->https://www.pmichaud.com/pipermail/pmwiki-users/ ([[https://www.pmwiki.org/search-ml.php|searchable here]])%0a-->https://www.mail-archive.com/pmwiki-users@pmichaud.com/info.html (searchable)%0a%0a%0a-->(:input form action='https://www.pmwiki.org/search-ml.php' method='get':)(:input text q:) (:input submit value='Search pmwiki-users archives':)(:input end:)%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-de]] ]: A mailing list for german-speaking users of PmWiki. Archived at%0a-->https://www.pmichaud.com/pipermail/pmwiki-users-de%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-es]] ]: Lista de usuarios PmWiki en Español.%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-fr]] ]: A mailing list for french-speaking users of PmWiki.%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-devel]] ]: This list was created to lower the traffic on pmwiki-users, it focuses on discussions surrounding code development for PmWiki (both core and recipe development).%0a%0a->Archives are available from:%0a-->https://www.pmichaud.com/pipermail/pmwiki-devel/ ([[https://www.pmwiki.org/search-ml.php|searchable]])%0a-->https://groups.google.com/group/pmwiki-devel (searchable)%0a-->https://www.mail-archive.com/pmwiki-devel@pmichaud.com/info.html (searchable)%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-announce]] ]: Announcements of new version releases and urgent information, about 1-2 messages per month. If you use PmWiki in a production environment, this low-volume list is highly recommended. The archive is at:%0a-->https://www.pmichaud.com/pipermail/pmwiki-announce%0a%0aSuggestions:%0a* If you reply to a digest message, please remove the messages irrelevant to your reply before sending it back to the list. %0a** It's also helpful to change "@@Re: pmwiki-users Digest, Vol [...]" to "Re: [the original subject]@@" because some mail programs determine threads based on the subject.%0a* If you address a reply to a single list member, please take the [pmwiki-users] off the subject line, or it's possible for your message to get lost in the mailing list traffic. Many people filter list traffic to a separate mailbox.%0a* If you ask a question, you should disable "digest" mode, this way you'll receive the replies as soon as people post them, and you could follow-up. In digest mode you might receive the replies a week or two later.%0a%0a!! Changing mail list settings%0a%0aHere are some tips regarding changing the mailing list settings:%0a%0a* Logging in...%0a** First go to [[https://www.pmichaud.com/mailman/listinfo/pmwiki-users]]%0a and enter your e-mail address in the field at the bottom of the page,%0a to the left of the button ''Unsubscribe or edit options''.%0a** Next you need to enter your password. As you've probably forgotten this,%0a use the button ''Remind'' at the bottom of the page to get a new password.%0a** Finally enter the password you should get momentarily via e-mail.%0a%0a* You can directly go to the options web page through a URI such as the%0a following:%0a-> %25hlt html%25[@https://www.pmichaud.com/mailman/options/pmwiki-users/%3cuser>%2540%3cdomain>@]%0a-> where [@%3cuser>@] is everything before the [@@@] in an e-mail address,%0a and [@%3cdomain>@] is everything after.%0a (For those who wonder, the [@%2540@] in the URI just stands for '[@@@]').%0a%0a* You can also obtain various help by sending an email to%0a @@mailto:pmwiki-users-request@pmichaud.com@@ with the text [@help@] in either%0a the subject or the body.%0a%0a!! Newsgroups (NNTP)%0aYou may be interested, that the lists are also accessible as newsgroups.%0a%0aThe NNTP server is:%0a* [[news.gmane.io -> https://news.gmane.io/]]%0a%0aThe [[pmwiki groups -> https://admin.gmane.io/]] are:%0a* gmane.comp.web.wiki.pmwiki.user%0a* gmane.comp.web.wiki.pmwiki.announce%0a* gmane.comp.web.wiki.pmwiki.user.de%0a* gmane.comp.web.wiki.pmwiki.user.es %0a* gmane.comp.web.wiki.pmwiki.user.fr %0a* gmane.comp.web.wiki.pmwiki.devel%0a%0a!!! Gmane%0aIf you find a dead link to the PmWiki user groups at Gmane, it is now%0apossible to look for the reference, at https://www.pmwiki.org/search-ml.php and find your%0aanswers and/or update the documentation.%0a%0aYou may have to use the [[WayBack machine -> https://web.archive.org/]] to search by the original URL.%0a%0aThis is a basic and quite fast search function for messages in the [pmwiki-users] and [pmwiki-devel] mailing lists.%0a%0aGmane was a searchable mailing list archive that we used extensively to%0afind information or older discussions, and we also linked to it a lot%0aboth in the documentation and in our everyday messages. It disappeared%0ain 2016 and was only partially restored, so most of the links to it do%0anot work anymore.%0a%0a%0a%0a -time=1672863925 +text=(:Summary:The email discussion lists available and their archives:)(:keywords email lists:)%0aThere are several mailing lists available for [[PmWiki]].%0a %0a:[ [[(http://www.pmichaud.com/mailman/listinfo/)pmwiki-users]] ]: This is a great resource where a very helpful group of people will answer questions and discuss PmWiki development. As of 2024, traffic is around 10-30 messages a month. %0a->''If you ask a question on the list and it doesn't get answered, don't feel let down. Just'' '''''ask it again'''''. It probably slipped by unnoticed.%0a%0a->Archives are available from:%0a-->https://www.pmichaud.com/pipermail/pmwiki-users/ ([[https://www.pmwiki.org/search-ml.php|searchable here]])%0a-->https://www.mail-archive.com/pmwiki-users@pmichaud.com/info.html (searchable)%0a%0a%0a-->(:input form action='https://www.pmwiki.org/search-ml.php' method='get':)(:input text q:) (:input submit value='Search pmwiki-users archives':)(:input end:)%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-de]] ]: A mailing list for german-speaking users of PmWiki. Archived at%0a-->https://www.pmichaud.com/pipermail/pmwiki-users-de%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-es]] ]: Lista de usuarios PmWiki en Español.%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-users-fr]] ]: A mailing list for french-speaking users of PmWiki.%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-devel]] ]: This list was created to lower the traffic on pmwiki-users, it focuses on discussions surrounding code development for PmWiki (both core and recipe development).%0a%0a->Archives are available from:%0a-->https://www.pmichaud.com/pipermail/pmwiki-devel/ ([[https://www.pmwiki.org/search-ml.php|searchable]])%0a-->https://groups.google.com/group/pmwiki-devel (searchable)%0a-->https://www.mail-archive.com/pmwiki-devel@pmichaud.com/info.html (searchable)%0a%0a:[ [[(https://www.pmichaud.com/mailman/listinfo/)pmwiki-announce]] ]: Announcements of new version releases and urgent information, about 1-2 messages per month. If you use PmWiki in a production environment, this low-volume list is highly recommended. The archive is at:%0a-->https://www.pmichaud.com/pipermail/pmwiki-announce%0a%0aSuggestions:%0a* If you reply to a digest message, please remove the messages irrelevant to your reply before sending it back to the list. %0a** It's also helpful to change "@@Re: pmwiki-users Digest, Vol [...]" to "Re: [the original subject]@@" because some mail programs determine threads based on the subject.%0a* If you address a reply to a single list member, please take the [pmwiki-users] off the subject line, or it's possible for your message to get lost in the mailing list traffic. Many people filter list traffic to a separate mailbox.%0a* If you ask a question, you should disable "digest" mode, this way you'll receive the replies as soon as people post them, and you could follow-up. In digest mode you might receive the replies a week or two later.%0a%0a!! Changing mail list settings%0a%0aHere are some tips regarding changing the mailing list settings:%0a%0a* Logging in...%0a** First go to [[https://www.pmichaud.com/mailman/listinfo/pmwiki-users]]%0a and enter your e-mail address in the field at the bottom of the page,%0a to the left of the button ''Unsubscribe or edit options''.%0a** Next you need to enter your password. As you've probably forgotten this,%0a use the button ''Remind'' at the bottom of the page to get a new password.%0a** Finally enter the password you should get momentarily via e-mail.%0a%0a* You can directly go to the options web page through a URI such as the%0a following:%0a-> %25hlt html%25[@https://www.pmichaud.com/mailman/options/pmwiki-users/%3cuser>%2540%3cdomain>@]%0a-> where [@%3cuser>@] is everything before the [@@@] in an e-mail address,%0a and [@%3cdomain>@] is everything after.%0a (For those who wonder, the [@%2540@] in the URI just stands for '[@@@]').%0a%0a* You can also obtain various help by sending an email to%0a @@mailto:pmwiki-users-request@pmichaud.com@@ with the text [@help@] in either%0a the subject or the body.%0a%0a!! Newsgroups (NNTP)%0aYou may be interested, that the lists are also accessible as newsgroups.%0a%0aThe NNTP server is:%0a* [[news.gmane.io -> https://news.gmane.io/]]%0a%0aThe [[pmwiki groups -> https://admin.gmane.io/]] are:%0a* gmane.comp.web.wiki.pmwiki.user%0a* gmane.comp.web.wiki.pmwiki.announce%0a* gmane.comp.web.wiki.pmwiki.user.de%0a* gmane.comp.web.wiki.pmwiki.user.es %0a* gmane.comp.web.wiki.pmwiki.user.fr %0a* gmane.comp.web.wiki.pmwiki.devel%0a%0a!!! Gmane%0aIf you find a dead link to the PmWiki user groups at Gmane, it is now%0apossible to look for the reference, at https://www.pmwiki.org/search-ml.php and find your%0aanswers and/or update the documentation.%0a%0aYou may have to use the [[WayBack machine -> https://web.archive.org/]] to search by the original URL.%0a%0aThis is a basic and quite fast search function for messages in the [pmwiki-users] and [pmwiki-devel] mailing lists.%0a%0aGmane was a searchable mailing list archive that we used extensively to%0afind information or older discussions, and we also linked to it a lot%0aboth in the documentation and in our everyday messages. It disappeared%0ain 2016 and was only partially restored, so most of the links to it do%0anot work anymore.%0a%0a%0a%0a +time=1708718964 diff --git a/wikilib.d/PmWiki.MarkupExpressions b/wikilib.d/PmWiki.MarkupExpressions index 41d651d6..0cfff7f2 100644 --- a/wikilib.d/PmWiki.MarkupExpressions +++ b/wikilib.d/PmWiki.MarkupExpressions @@ -1,10 +1,10 @@ -version=pmwiki-2.3.13 ordered=1 urlencoded=1 -author=Petko +version=pmwiki-2.3.31 ordered=1 urlencoded=1 +author=MFWolff charset=UTF-8 -csum=%25L, note about undefined formats into WikiStyles (+0) (+355) +csum=typo (+0) ctime=1176718061 name=PmWiki.MarkupExpressions -rev=105 -targets=Cookbook.LocalTimes,PmWiki.WikiStyles,PmWiki.BasicVariables,PmWiki.PageListTemplates,PmWiki.PageLists,PmWiki.ConditionalMarkup,Cookbook.MarkupExpressionSamples,Cookbook.MarkupExprPlus -text=(:Summary:String and formatting operations:)%0a(:Audience: authors (advanced) :)%0aThe %25pmhlt%25[@{(...)}@] "expression markup" allows for a variety of string and formatting operations to be performed from within markup. Operations defined by this recipe include ''[[#substr|substr]]'', ''[[#ftime|ftime]]'', ''[[#strlen|strlen]]'', ''[[#rand|rand]]'', ''[[#mod|mod]]'', ''[[#to|toupper / tolower]]'', ''[[#ucfirst|ucfirst]]'', ''[[#ucwords|ucwords]]'', ''[[#pagename|pagename]]'' and ''[[#asspaced|asspaced]]''.%0aMarkup expressions can be [[#nesting|nested]], using the markup [@{(...(...)...)}@].%0a%0a[[#substr]]%0a!! ''substr''%0a%0aThe "substr" expression extracts portions of a string. The arguments are%0a# the string to be processed. Always quote the string to be processed.%0a# the initial position of the substring. Note that the initial position argument is zero-based (i.e., the first character is referenced via a "0").%0a# the number of characters to extract%0a(:markup class="horiz":)%0a {(substr "PmWiki" 2 3)}%0a {(substr "PmWiki" 2)}%0a {(substr "{*$Group}" 2)}%0a {(substr "PmWiki" 0 1)}%0a {(substr "PmWiki" 0 -3)}%0a {(substr "PmWiki" -3)}%0a(:markupend:)%0a%0aTo obtain the last n characters of a string use %25pmhlt%25[@{(substr "string" -n)}@]%0a[[%3c%3c]]%0aTo truncate the last n characters of a string use %25pmhlt%25[@{(substr "string" 0 -n)}@]%0a%0a[[#ftime]]%0a!! ''ftime''%0a%0a"Ftime" expressions are used for date and time formatting. The generic form is%0a%0a->%25pmhlt%25[@{(ftime "fmt" "when")}@]%0a->%25pmhlt%25[@{(ftime fmt="fmt" when="when" tz="tz" locale="locale")}@]%0a%0awhere ''fmt'' is a formatting string and ''when'' is the time to be formatted. The arguments can be in either order and may use the optional "fmt=" and "when=" labels. %0a%0aThe "tz" (time zone) argument allows the setting of a different time zone, only available on installations running PHP 5.1 or newer. See [[https://www.php.net/timezones|the list of supported time zones]], any value not found there will be silently ignored.%0a%0aThe "locale" (language locale) argument allows the time format to be printed in a different language for names of weekdays and months, as long as that language locale is available on the server. You can set different locales to try, separated with commas or spaces, for example "fr_FR.utf8,fr_FR,fr". If none of the listed locales is available, the argument is silently ignored. %0a%0aWith international locales, if you see weird characters, try adding or removing the ".utf8" or ".UTF-8" part of the locale, e.g. try both "fr_FR.utf8" and "fr_FR" to see which one works for you. Wikis with UTF-8 enabled are more likely to need the ".utf8" part.%0a%0aExamples:%0a(:markup class="horiz":)%0a {(ftime)}%0a {(ftime fmt="%25F %25H:%25M")}%0a {(ftime %25Y)}%0a {(ftime fmt=%25T)}%0a {(ftime when=tomorrow)}%0a {(ftime fmt="%25Y-%25m-%25d" yesterday)}%0a {(ftime "+1 week" %25F)}%0a {(ftime fmt=%25D "+1 month")}%0a {(ftime fmt="%25a%25e %25b" when="next week")}%0a {(ftime fmt="%25A, %25d %25B %25Y, %25Hh%25M" locale=fr_FR.utf8 tz=Europe/Paris)}%0a(:markupend:)%0a%0aThe ''fmt'' parameter is whatever is given by "fmt=", the first parameter containing a '%25', or else the site's default. The formatting codes are described at PHP's %25newwin%25 [[https://www.php.net/manual/en/function.strftime.php | strftime]] function. In addition to those, '[=%25o=]' produces the ordinal suffix ("st" for 1st), '[=%25F=]' produces ISO-8601 dates like 2022-10-30, '[=%25s=]' produces Unix timestamps, and '[=%25L=]' produces a format like %25pmhlt%25[@@2022-10-30T01:27:34Z@] which can be displayed in the timezone of the visitor per Cookbook:LocalTimes.%0a%0aSome common formatting strings:%0a%0a [= %25F =] # ISO-8601 dates "{(ftime %25F)}"%0a [= %25s =] # Unix timestamp "{(ftime %25s)}"%0a [= %25H:%25M:%25S =] # time as hh:mm:ss "{(ftime %25H:%25M:%25S)}"%0a [= %25m/%25d/%25Y =] # date as mm/dd/yyyy "{(ftime %25m/%25d/%25Y)}"%0a [= "%25A, %25B %25e%25o, %25Y"=] # in words "{(ftime "%25A, %25B %25e%25o, %25Y")}"%0a%0aNote that if you use an undefined format string such as [@%25q@] or [@%25E@], it will be left unchanged by ''ftime'', but later PmWiki may process it as a [[WikiStyle(s)]] which may be unexpected.%0a%0aThe ''when'' parameter understands many different date %25newwin%25[[https://www.php.net/manual/en/datetime.formats.php|formats]]. The when parameter is whatever is given by "when=", or whatever parameter remains after determining the format parameter. Some examples:%0a%0a 2007-04-11 # ISO-8601 dates%0a 20070411 # dates without hyphens, slashes, or dots%0a 2007-03 # months%0a @1176304315 # Unix timestamps (seconds since 1-Jan-1970 00:00 UTC)%0a now # the current time%0a today # today @ 00:00:00%0a yesterday # yesterday @ 00:00:00%0a "next Monday" # relative dates%0a "last Thursday" # relative dates%0a "-3 days" # three days ago%0a "+2 weeks" # two weeks from now%0a%0a'''Note:''' If you want to convert a Unix timestamp you '''must''' prefix with the @. Thus, %25pmhlt%25[@"{(ftime "%25A, %25B %25d, %25Y" @1231116927)}"@].%0a%0aThe ''when'' parameter uses PHP's %25newwin%25[[https://www.php.net/strtotime | strtotime]] function to convert date strings according to the GNU [[https://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html|date input formats]]; as of this writing it only understands English phrases in date specifications.%0a%0aThe variable $FTimeFmt can be used to override the default date format used by the "ftime" function. The default $FTimeFmt is $TimeFmt.%0a%0a[[#strlen]]%0a!! ''strlen''%0a%0aThe "strlen" expression returns the length of a string. The first argument is the string to be measured.%0a%0a(:markup class="horiz":)%0a {(strlen "{$:Summary}")}%0a(:markupend:)%0a%0a[[#rand]]%0a!! ''rand''%0a%0aThe "rand" expression returns a random integer. The first argument is the minimum number to be returned and the second argument is the maximum number to be returned. If called without the optional min, max arguments rand() returns a pseudo-random integer between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use (rand 5 15).%0a%0a(:markup class="horiz":)%0a {(rand)}%0a {(rand 1 99)}%0a(:markupend:)%0a%0a[[#mod]]%0a!! ''mod''%0a%0aThe advanced "mod" expression returns the modulo (remainder) of the division of two numbers. It may be used in advanced [[PageList templates]] together with %25pmhlt%25[@{$$PageCount}@] to insert markup every (modulo) entries, for example to create alternate styled "zebra" table rows, or to insert a line/row break. (See also [[PageLists]], [[WikiStyles]] and [[ConditionalMarkup]].)%0a%0a(:markup class="horiz":)[@%0a>>comment%3c%3c%0a%25define=bg1 item bgcolor=#f88%25%0a%25define=bg2 item bgcolor=#ff8%25%0a%25define=bg0 item bgcolor=#8f8%25[=%0a[[#altrows]]%0a* %25bg{(mod {$$PageCount} 3)}%25 {=$Name} ({$$PageCount})%0a[[#altrowsend]]=]%0a>>%3c%3c%0a(:pagelist fmt=#altrows group=PmWiki count=10:)%0a@]%0a%0a[[#to]]%0a!! ''toupper'' / ''tolower''%0a%0aThe "toupper" and "tolower" expressions convert a string into uppercase or lowercase. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(toupper "{$:Summary}")}%0a {(tolower "{$:Summary}")}%0a(:markupend:)%0a%0a[[#ucfirst]][[#ucwords]]%0a!!''ucfirst'' / ''ucwords''%0a%0aThe "ucfirst" expression converts to uppercase the first character of the string, and "ucwords", the first character of each word. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(ucfirst "{$:Summary}")}%0a {(ucwords "{$:Summary}")}%0a(:markupend:)%0a%0a%0a[[#pagename]]%0a!! ''pagename''%0a%0aThe "pagename" expression builds a pagename from a string. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(pagename "{$:Summary}")}%0a(:markupend:)%0a%0a[[#asspaced]]%0a!! ''asspaced''%0a%0aThe "asspaced" expression formats wikiwords. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(asspaced "{$FullName}")}%0a(:markupend:)%0a%0a[[#nesting]]%0a!! Nesting expressions%0a%0aMarkup expressions can be nested. Omit the curly braces for the inner expressions:%0a%0a(:markup class="horiz":)%0a {(tolower (substr "Hello World" 2))}%0a(:markupend:)%0a%0a[[#notes]] %0a!! Notes%0a%0a* For PmWikis version 2.2.33 or older, the string-processing expressions may not work properly on multibyte UTF-8 characters. Newer versions should work fine.%0a%0a!! See also%0a(:pagelist group=PmWiki name=PageVariables,PageTextVariables,ConditionalMarkup fmt=#titlesummary:)%0a* Cookbook:MarkupExpressionSamples — '-custom markup expression samples-'%0a* Cookbook:MarkupExprPlus -time=1667098724 +rev=112 +targets=Cookbook.LocalTimes,PmWiki.BasicVariables,PmWiki.LayoutVariables,PmWiki.WikiStyles,PmWiki.PageListTemplates,PmWiki.PageLists,PmWiki.ConditionalMarkup,Cookbook.MarkupExpressionSamples,Cookbook.MarkupExprPlus +text=(:Summary:String and formatting operations:)%0a(:Audience: authors (advanced) :)%0aThe %25pmhlt%25[@{(...)}@] "expression markup" allows for a variety of string and formatting operations to be performed from within markup. Operations defined by this recipe include ''[[#substr|substr]]'', ''[[#ftime|ftime]]'', ''[[#strlen|strlen]]'', ''[[#rand|rand]]'', ''[[#mod|mod]]'', ''[[#to|toupper / tolower]]'', ''[[#ucfirst|ucfirst]]'', ''[[#ucwords|ucwords]]'', ''[[#pagename|pagename]]'' and ''[[#asspaced|asspaced]]''.%0aMarkup expressions can be [[#nesting|nested]], using the markup [@{(...(...)...)}@].%0a%0a[[#substr]]%0a!! ''substr''%0a%0aThe "substr" expression extracts portions of a string. The arguments are%0a# the string to be processed. Always quote the string to be processed.%0a# the initial position of the substring. Note that the initial position argument is zero-based (i.e., the first character is referenced via a "0").%0a# the number of characters to extract%0a(:markup class="horiz":)%0a {(substr "PmWiki" 2 3)}%0a {(substr "PmWiki" 2)}%0a {(substr "{*$Group}" 2)}%0a {(substr "PmWiki" 0 1)}%0a {(substr "PmWiki" 0 -3)}%0a {(substr "PmWiki" -3)}%0a(:markupend:)%0a%0aTo obtain the last n characters of a string use %25pmhlt%25[@{(substr "string" -n)}@]%0a[[%3c%3c]]%0aTo truncate the last n characters of a string use %25pmhlt%25[@{(substr "string" 0 -n)}@]%0a%0a[[#ftime]]%0a!! ''ftime''%0a%0a"Ftime" expressions are used for date and time formatting. The generic form is%0a%0a->%25pmhlt%25[@{(ftime "fmt" "when")}@]%0a->%25pmhlt%25[@{(ftime fmt="fmt" when="when" tz="tz" locale="locale")}@]%0a%0awhere ''fmt'' is a formatting string and ''when'' is the time to be formatted. The arguments can be in either order and may use the optional "fmt=" and "when=" labels. %0a%0aThe "tz" (time zone) argument allows the setting of a different time zone, only available on installations running PHP 5.1 or newer. See [[https://www.php.net/timezones|the list of supported time zones]], any value not found there will be silently ignored.%0a%0aThe "locale" (language locale) argument allows the time format to be printed in a different language for names of weekdays and months, as long as that language locale is available on the server. You can set different locales to try, separated with commas or spaces, for example "fr_FR.utf8,fr_FR,fr". If none of the listed locales is available, the argument is silently ignored. %0a%0aWith international locales, if you see weird characters, try adding or removing the ".utf8" or ".UTF-8" part of the locale, e.g. try both "fr_FR.utf8" and "fr_FR" to see which one works for you. Wikis with UTF-8 enabled are more likely to need the ".utf8" part.%0a%0aExamples:%0a(:markup class="horiz":)%0a {(ftime)}%0a {(ftime fmt="%25F %25H:%25M")}%0a {(ftime %25Y)}%0a {(ftime fmt=%25T)}%0a {(ftime when=tomorrow)}%0a {(ftime fmt="%25Y-%25m-%25d" yesterday)}%0a {(ftime "+1 week" %25F)}%0a {(ftime fmt=%25D "+1 month")}%0a {(ftime fmt="%25a%25e %25b" when="next week")}%0a {(ftime fmt="%25A, %25d %25B %25Y, %25Hh%25M" locale=fr_FR.utf8 tz=Europe/Paris)}%0a(:markupend:)%0a%0aThe ''fmt'' parameter is whatever is given by "fmt=", the first parameter containing a '%25', or else the site's default. The formatting codes are described at PHP's %25newwin%25 [[https://www.php.net/manual/en/function.strftime.php | strftime]] function. In addition to those, '[=%25o=]' produces the ordinal suffix ("st" for 1st), '[=%25F=]' produces ISO-8601 dates like 2022-10-30, '[=%25s=]' produces Unix timestamps, and '[=%25L=]' produces a format like %25pmhlt%25[@@2022-10-30T01:27:34Z@] which can be displayed in the timezone of the visitor per Cookbook:LocalTimes.%0a%0aSome common formatting strings:%0a%0a [= %25F =] # ISO-8601 dates "{(ftime %25F)}"%0a [= %25s =] # Unix timestamp "{(ftime %25s)}"%0a [= %25H:%25M:%25S =] # time as hh:mm:ss "{(ftime %25H:%25M:%25S)}"%0a [= %25m/%25d/%25Y =] # date as mm/dd/yyyy "{(ftime %25m/%25d/%25Y)}"%0a [= "%25A, %25B %25e%25o, %25Y"=] # in words "{(ftime "%25A, %25B %25e%25o, %25Y")}"%0a%0a(:details summary="All formats, click to toggle":)%0a|| class="simpletable filterable"%0a||! Category ||! Format ||!Description ||!Example ||%0a|| Day || [@%25a@] ||An abbreviated textual representation of the day ||@@Sun@@ through @@Sat@@ ||%0a|| Day || [@%25A@] ||A full textual representation of the day ||@@Sunday@@ through @@Saturday@@ ||%0a|| Day || [@%25d@] ||Two-digit day of the month (with leading zeros) ||@@01@@ to @@31@@ ||%0a|| Day || [@%25e@] ||Day of the month, with a space preceding single digits. ||"@@ 1@@" to "@@31@@" ||%0a|| Day || [@%25j@] ||Day of the year, 3 digits with leading zeros ||@@001@@ to @@366@@ ||%0a|| Day || [@%25u@] ||ISO-8601 numeric representation of the day of the week ||@@1@@ (for Monday) through @@7@@ (for Sunday) ||%0a|| Day || [@%25w@] ||Numeric representation of the day of the week ||@@0@@ (for Sunday) through @@6@@ (for Saturday) ||%0a|| Day || %25red%25[@%25o@]%25%25 ||Ordinal suffix of the date (PmWiki-specific)||@@st@@ in January 1st ||%0a|| Week || [@%25U@] ||Week number of the given year, starting with the first Sunday as the first week ||@@13@@ (for the 13th full week of the year) ||%0a|| Week || [@%25V@] ||ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week ||@@01@@ through @@53@@ (where @@53@@ accounts for an overlapping week) ||%0a|| Week || [@%25W@] ||A numeric representation of the week of the year, starting with the first Monday as the first week ||@@46@@ (for the 46th week of the year beginning with a Monday) ||%0a|| Month || [@%25b@] ||Abbreviated month name, based on the locale ||@@Jan@@ through @@Dec@@ ||%0a|| Month || [@%25B@] ||Full month name, based on the locale ||@@January@@ through @@December@@ ||%0a|| Month || [@%25h@] ||Abbreviated month name, based on the locale (an alias of [@%25b@]) ||@@Jan@@ through @@Dec@@ ||%0a|| Month || [@%25m@] ||Two digit representation of the month ||@@01@@ (for January) through @@12@@ (for December) ||%0a|| Year || [@%25C@] ||Two digit representation of the century (year divided by 100, truncated to an integer) ||@@19@@ for the 20th Century ||%0a|| Year || [@%25g@] ||Two digit representation of the year going by ISO-8601:1988 standards (see [@%25V@]) ||@@09@@ for the week of January 6, 2009 ||%0a|| Year || [@%25G@] ||The full four-digit version of [@%25g@] ||%25red%25@@2008@@%25%25 for the week of January 3, %25red%252009%25%25 ||%0a|| Year || [@%25y@] ||Two digit representation of the year ||@@09@@ for 2009, @@79@@ for 1979 ||%0a|| Year || [@%25Y@] ||Four digit representation for the year ||@@2038@@ ||%0a|| Time || [@%25H@] ||Two digit representation of the hour in 24-hour format ||@@00@@ through @@23@@ ||%0a|| Time || [@%25k@] ||Hour in 24-hour format, with a space preceding single digits ||"@@ 0@@" through "@@23@@" ||%0a|| Time || [@%25I@] ||(Uppercase 'i') Two digit representation of the hour in 12-hour format ||@@01@@ through @@12@@ ||%0a|| Time || [@%25l@] ||(Lowercase 'L') Hour in 12-hour format, with a space preceding single digits ||"@@ 1@@" through "@@12@@" ||%0a|| Time || [@%25M@] ||Two digit representation of the minute ||@@00@@ through @@59@@ ||%0a|| Time || [@%25p@] ||UPPER-CASE 'AM' or 'PM' based on the given time ||@@AM@@ for 00:31, PM for 22:23 ||%0a|| Time || [@%25P@] ||lower-case 'am' or 'pm' based on the given time ||@@am@@ for 00:31, pm for 22:23 ||%0a|| Time || [@%25r@] ||Same as "[@%25I:%25M:%25S %25p@]" ||@@09:34:17 PM@@ for 21:34:17 ||%0a|| Time || [@%25R@] ||Same as "[@%25H:%25M@]" ||@@00:35@@ for 12:35 AM, @@16:44@@ for 4:44 PM ||%0a|| Time || [@%25S@] ||Two digit representation of the second ||@@00@@ through @@59@@ ||%0a|| Time || [@%25T@] ||Same as "[@%25H:%25M:%25S@]" ||@@21:34:17@@ for 09:34:17 PM ||%0a|| Time || [@%25X@] ||Preferred time representation based on locale, without the date ||@@03:59:16@@ or @@15:59:16@@ ||%0a|| Time || [@%25z@] ||The time zone offset. ||@@-0500@@ for US Eastern Time ||%0a|| Time || [@%25Z@] ||The time zone abbreviation. ||@@EST@@ for Eastern Time ||%0a|| Date-Time || [@%25c@] ||Preferred date and time stamp based on locale ||@@Tue Feb 5 00:45:10 2009@@ for February 5, 2009 at 12:45:10 AM ||%0a|| Date-Time || [@%25D@] ||Same as "[@%25m/%25d/%25y@]" ||@@02/05/09@@ for February 5, 2009 ||%0a|| Date-Time || [@%25F@] ||Same as "[@%25Y-%25m-%25d@]" ||@@2009-02-05@@ for February 5, 2009 ||%0a|| Date-Time || [@%25s@] ||Unix Epoch Time timestamp ||@@305815200@@ for September 10, 1979 08:40:00 AM ||%0a|| Date-Time || [@%25x@] ||Preferred date representation based on locale, without the time ||@@02/05/09@@ for February 5, 2009 ||%0a|| Date-Time || %25red%25[@%25L@]%25%25 ||Human-readable UTC timestamp which will be displayed formatted either as $TimeFmt or in the local time zone of the visitor per $EnableLocalTimes (PmWiki-specific) ||%25pmhlt%25[@@2022-09-25T11:49:08Z@] ||%0a|| Miscellaneous || [@%25n@] ||A newline character ("@@\n@@") ||-- ||%0a|| Miscellaneous || [@%25t@] ||A Tab character ("@@\t@@") ||-- ||%0a|| Miscellaneous || [@%25%25@] ||A literal percentage character ("@@%25@@") ||-- ||%0a%0aThe "preferred" shortcut formats may show different values depending on whether the IntlDateFormatter PHP functions are enabled, or not -- for consistent results, use the full format you need. The names of months and days may be translated with the @@locale=@@ argument, if that locale is installed on the server.%0a%0a(:detailsend:)%0a%0aNote that if you use an undefined format string such as [@%25q@] or [@%25E@], it will be left unchanged by ''ftime'', but later PmWiki may process it as a [[WikiStyle(s)]] which may be unexpected.%0a%0aThe ''when'' parameter understands many different date %25newwin%25[[https://www.php.net/manual/en/datetime.formats.php|formats]]. The when parameter is whatever is given by "when=", or whatever parameter remains after determining the format parameter. Some examples:%0a%0a 2007-04-11 # ISO-8601 dates%0a 20070411 # dates without hyphens, slashes, or dots%0a 2007-03 # months%0a @1176304315 # Unix timestamps (seconds since 1-Jan-1970 00:00 UTC)%0a now # the current time%0a today # today @ 00:00:00%0a yesterday # yesterday @ 00:00:00%0a "next Monday" # relative dates%0a "last Thursday" # relative dates%0a "-3 days" # three days ago%0a "+2 weeks" # two weeks from now%0a%0a'''Note:''' If you want to convert a Unix timestamp you '''must''' prefix with the @. Thus, %25pmhlt%25[@"{(ftime "%25A, %25B %25d, %25Y" @1231116927)}"@].%0a%0aThe ''when'' parameter uses PHP's %25newwin%25[[https://www.php.net/strtotime | strtotime]] function to convert date strings according to the GNU [[https://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html|date input formats]]; as of this writing it only understands English phrases in date specifications.%0a%0aThe variable $FTimeFmt can be used to override the default date format used by the "ftime" function. The default $FTimeFmt is $TimeFmt.%0a%0a[[#strlen]]%0a!! ''strlen''%0a%0aThe "strlen" expression returns the length of a string. The first argument is the string to be measured.%0a%0a(:markup class="horiz":)%0a {(strlen "{$:Summary}")}%0a(:markupend:)%0a%0a[[#rand]]%0a!! ''rand''%0a%0aThe "rand" expression returns a random integer. The first argument is the minimum number to be returned and the second argument is the maximum number to be returned. If called without the optional min, max arguments rand() returns a pseudo-random integer between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use (rand 5 15).%0a%0a(:markup class="horiz":)%0a {(rand)}%0a {(rand 1 99)}%0a(:markupend:)%0a%0a[[#mod]]%0a!! ''mod''%0a%0aThe advanced "mod" expression returns the modulo (remainder) of the division of two numbers. It may be used in advanced [[PageList templates]] together with %25pmhlt%25[@{$$PageCount}@] to insert markup every (modulo) entries, for example to create alternate styled "zebra" table rows, or to insert a line/row break. (See also [[PageLists]], [[WikiStyles]] and [[ConditionalMarkup]].)%0a%0a(:markup class="horiz":)[@%0a>>comment%3c%3c%0a%25define=bg1 item bgcolor=#f88%25%0a%25define=bg2 item bgcolor=#ff8%25%0a%25define=bg0 item bgcolor=#8f8%25[=%0a[[#altrows]]%0a* %25bg{(mod {$$PageCount} 3)}%25 {=$Name} ({$$PageCount})%0a[[#altrowsend]]=]%0a>>%3c%3c%0a(:pagelist fmt=#altrows group=PmWiki count=10:)%0a@]%0a%0a[[#to]]%0a!! ''toupper'' / ''tolower''%0a%0aThe "toupper" and "tolower" expressions convert a string into uppercase or lowercase. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(toupper "{$:Summary}")}%0a {(tolower "{$:Summary}")}%0a(:markupend:)%0a%0a[[#ucfirst]]%0a[[#ucwords]]%0a!!''ucfirst'' / ''ucwords''%0a%0aThe "ucfirst" expression converts to uppercase the first character of the string, and "ucwords", the first character of each word. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(ucfirst "{$:Summary}")}%0a {(ucwords "{$:Summary}")}%0a(:markupend:)%0a%0a%0a[[#pagename]]%0a!! ''pagename''%0a%0aThe "pagename" expression builds a pagename from a string. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(pagename "{$:Summary}")}%0a(:markupend:)%0a%0a[[#asspaced]]%0a!! ''asspaced''%0a%0aThe "asspaced" expression formats wikiwords. The first argument is the string to be processed.%0a%0a(:markup class="horiz":)%0a {(asspaced "{$FullName}")}%0a(:markupend:)%0a%0a[[#nesting]]%0a!! Nesting expressions%0a%0aMarkup expressions can be nested. Omit the curly braces for the inner expressions:%0a%0a(:markup class="horiz":)%0a {(tolower (substr "Hello World" 2))}%0a(:markupend:)%0a%0a[[#notes]] %0a!! Notes%0a%0a* For PmWikis version 2.2.33 or older, the string-processing expressions may not work properly on multibyte UTF-8 characters. Newer versions should work fine.%0a%0a!! See also%0a(:pagelist group=PmWiki name=PageVariables,PageTextVariables,ConditionalMarkup fmt=#titlesummary:)%0a* Cookbook:MarkupExpressionSamples — '-custom markup expression samples-'%0a* Cookbook:MarkupExprPlus +time=1708761313 diff --git a/wikilib.d/PmWiki.WikiStyles b/wikilib.d/PmWiki.WikiStyles index 6b2b54f2..9079e98b 100644 --- a/wikilib.d/PmWiki.WikiStyles +++ b/wikilib.d/PmWiki.WikiStyles @@ -1,10 +1,10 @@ -version=pmwiki-2.3.30 ordered=1 urlencoded=1 +version=pmwiki-2.3.31 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=add columns (+53) +csum=See also Cookbook:CodeHighlight. (+34) name=PmWiki.WikiStyles post= Save -rev=263 -targets=PmWiki.WikiWord,PmWiki.WikiStyleColors,PmWiki.BlockMarkup,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.GroupHeaders,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.CustomWikiStyles,Cookbook.OutlineLists,PmWiki.LayoutVariables,PmWiki.WikiStyleExamples,PmWiki.TextFormattingRules,PmWiki.ListStyles,Cookbook.WikiStylesPlus -text=(:Summary: Modifying the style of page contents:)%0a(:Audience: authors (basic, advanced) :)%0a%0aWikiStyles allow authors to modify the color and other styling attributes of the contents of a page. %0aA WikiStyle is written using percent-signs, as in %25red%25[@%25red%25@]%25%25 or %25black bgcolor=lightblue%25[@%25bgcolor=lightblue%25@]%25%25.%0a%0a[[#Attributes]]%0a!! WikiStyle attributes%0a%0aThe style attributes recognized within a WikiStyle specification are:%0a(:table:)%0a(:cellnr colspan=2:)%25center%25------------ CSS -------------%25%25%0a(:cell:)%25center%25--HTML--%25%25%0a(:cellnr:)%0a bgcolor%0a background-color%0a border'^[[#al|1]]^'%0a color%0a display%0a float%0a clear%0a overflow%0a font-size%0a font-family%0a font-weight%0a font-style%0a(:cell:)%0a height[[#fn|*]]%0a list-style%0a margin'^[[#al|1]]^'%0a padding'^[[#al|1]]^'%0a text-align%0a text-decoration%0a white-space%0a width[[#fn|*]] %0a columns%0a column-gap%0a column-span%0a column-rule%0a(:cell:)%0a accesskey %0a align%0a class%0a hspace %0a id %0a target %0a rel %0a vspace %0a value%0a reversed%0a(:cellnr rowspan=3:)%0a Special: define, apply%0a(:tableend:)%0a%0aThe attributes in the first two columns correspond to the ''[[cascading style sheet -> http://blooberry.com/indexdot/css/propindex/all.htm]]'' (CSS) properties of the same name. The attributes in the last column apply only to specific items:%0a%0a* '''[@class=@]''' and '''[@id=@]''' assign a CSS class or identifier to an HTML element%0a* '''[@target=name@]''' opens links that follow in a browser window called "name"%0a* '''[@rel=name@]''' in a link identifies the relationship of a target page%0a* '''[@accesskey=x@]''' uses 'x' as a shortcut key for the link that follows%0a* '''[@value=9@]''' sets the number of the current ordered list item%0a%0a** [[#fn]] The width and height attributes have asterisks because they are handled specially for %25hlt html%25[@%3cimg .../>@] tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the WikiStyle), then they set the 'width=' and 'height=' attributes of any [@%3cimg ... />@] tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled.%0a## [[#al]] margin, padding, and border can be suffixed by -left, -right, -top, and -bottom%0a%0a!! WikiStyles versus CSS styles%0aWikiStyles, as written in the wiki page, are not exactly CSS styles or CSS classes. WikiStyles allow authors to use both pre-defined by the administrator CSS classes, and to define new combinations of styles, without any need to edit/update local CSS files on the server.%0a%0aNote that PmWiki allows advanced authors to use of @@ class= @@ and @@ style= @@ in tables and division blocks, but these are raw HTML attributes, and not WikiStyles; knowledge of CSS is required to use them.%0a%0a!! Text color and font%0aThe most basic use of WikiStyles is to change text attributes such as color, background color, and font. %0aPmWiki defines several WikiStyles for changing the text color to %25pmhlt%25@@[=%25black%25, %25white%25, %25red%25, %25yellow%25, %25blue%25, %25gray%25 (%25grey%25), %25silver%25, %25maroon%25, %25green%25, %25navy%25, %25fuchsia%25, %25olive%25, %25lime%25, %25teal%25, %25aqua%25, %25orange%25 and %25purple%25=]@@.%0a%0a(:markup class=horiz:)%0aThe basket contains %25red%25 apples, %25blue%25 blueberries, %25purple%25 eggplant, %25green%25 limes, %25%25 and more.%0a(:markupend:)%0a%0aFor colors other than the predefined colors, use the %25pmhlt%25[@%25color=...%25@] WikiStyle. (Note: RGB colors (#rrggbb) should always be specified with lowercase letters to avoid [[WikiWord]] conflicts.)%0a%0a(:markup class=horiz:)%0aI'd like to have some %25color=#ff7f00%25 tangerines%25%25, too!%0a(:markupend:)%0a%0aTo change the background color, use %25pmhlt%25[@%25bgcolor=...%25@] as a WikiStyle:%0a%0a(:markup class=horiz:)%0aThis sentence contains %25bgcolor=green yellow%25 yellow text on a green background.%0a(:markupend:)%0a%0aSee [[(PmWiki:)WikiStyle Colors]] for more color help.%0a%0a!! Text justification%0aWikiStyles are used to control the text justification%0a%0a(:markup class=horiz:)%0a%25center%25 This text is centered. %0a%0a%25right%25 Right justified.%0a(:markupend:)%0a%0aand to create floating text:%0a%0a(:markup class=horiz:)%0a%25rfloat%25 This text floats to the right%0a%0a%25rframe%25 floats to the right with a frame%0a%0aLorem ipsum dolor sit amet, consectetuer sadipscing elitr%0a(:markupend:)%0a%0a%0a[[#Scope]]%0a!! Scope%0a%0aWikiStyles can also specify a ''scope''; with no scope, the style is applied to any text that follows up to the next WikiStyle specification or the end of the paragraph, whichever comes first. The '''apply=''' attribute and its shortcuts allow to change the scope as follows:%0a%0a||class='tabtable' cellpadding=3 cellspacing=0 style="border:1px dotted blue;" rules=rows %0a||!apply attribute ||!shortcut ||!style applies to... ||%0a||%25pmhlt%25[@%25apply=img ...%25@] ||- ||all images that ''follow'' until another style applied||%0a||%25pmhlt%25[@%25apply=p ...%25@] ||%25pmhlt%25[@%25p ...%25@] ||the current paragraph||%0a||%25pmhlt%25[@%25apply=pre ...%25@] ||- ||the current preformatted text||%0a||%25pmhlt%25[@%25apply=list ...%25@] ||%25pmhlt%25[@%25list ...%25@] ||the current list||%0a||%25pmhlt%25[@%25apply=item ...%25@] ||%25pmhlt%25[@%25item ...%25@] ||the current list item||%0a||%25pmhlt%25[@%25apply=div ...%25@] ||- ||the current div||%0a||%25pmhlt%25[@%25apply=block ...%25@] ||%25pmhlt%25[@%25block ...%25@] ||to the current block, whether it's a paragraph, list, list item, heading, or division.||%0a%0aThus, %25pmhlt%25[@%25p color=blue%25@] is the same as [@%25apply=p color=blue%25@], and [@%25list ROMAN%25@] is the same as [@%25apply=list list-style=upper-roman%25@].%0a%0aSome [[#predefined|predefined style shortcuts]] also make use of apply, thus %25pmhlt%25[@%25right%25@] is a shortcut for [@%25text-align=right apply=block%25@].%0a%0aExample: Apply a style to a paragraph:%0a(:markup:)%0a%25p bgcolor=#ffeeee%25 The WikiStyle specification at the beginning of this line applies to the entire paragraph, even if there are %25blue%25 other WikiStyle specifications %25%25 in the middle of the paragraph.%0a(:markupend:)%0a%0a%0a'''Caveat''': An applied WikiStyle will only take effect if it's on the%0aline that starts the thing it's supposed to modify. In other%0awords, a WikiStyle in the third markup line of a paragraph%0acan't change the attributes of the paragraph:%0a%0a(:markup class=horiz:) %0aafter the first line of the paragraph,%0awe try to %25apply=p color=blue%25 change color.%0aThis doesn't work because the style comes after the first line of the paragraph.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aHowever, this %25apply=p color=red%25 paragraph%0a''will'' be in red because its block style does%0aoccur in the first line of its text.%0a(:markupend:)%0a%0a(:markup class=horiz:) %0a* Here's a list item%0a* %25list red%25 Oops, too late to affect the list!%0a(:markupend:)%0a%0aIf you want to break a list in two, you need to have a line not part of the list between, that is a line that has any content other than space and newlines, otherwise PmWiki considers the vertical space part of the previous list item. You can have an non-breaking space, or the escaped null character:%0a%0a(:markup class=horiz:)%0a* %25list red%25 first item%0a* second item%0a %0a* %25apply=list bgcolor=lightgreen%25 second list - first item%0a* second list - second item%0a[==]%0a* %25list class=mambo%25 third list - first item%0a* third list - second item%0a(:markupend:)%0a%0a%0a[[#blocks]]%0a!! Larger blocks%0a%0aThe %25pmhlt%25[@>>WikiStyle%3c%3c@] block can be used to apply a WikiStyle to a large block of items. %0aThe style is applied until the next %25pmhlt%25[@>>%3c%3c@] is encountered.%0a%0a(:markup class=horiz:)%0a>>blue font-style:italic bgcolor=#ffffcc%3c%3c%0aEverything after the above line is styled with blue italic text,%0a%0aThis includes%0a preformatted %25red%25text%25%25%0a* lists%0a-> indented items%0a>>%3c%3c%0a(:markupend:)%0a%0aNote, the %25pmhlt%25[@(:div style="..." class="...":)@] directive does not work the same way as [@>>WikiStyle%3c%3c@], it can only contain the regular HTML style and class attributes.%0a%0a%0a[[#styleclass]]%0a!! HTML "class" and "style" attributes for tables and divisions%0aWikiStyles are only the commands between %25pmhlt%25[@%25...%25@] percent signs.%0a%0a[[PmWiki/Tables]], [[PmWiki/table directives]] and [[PmWiki.BlockMarkup#div|%25pmhlt%25[@(:div:)@]]] division blocks allow advanced authors to incorporate the HTML/CSS attributes @@ class= @@ and @@ style=@@. %25red%25 Note that these attributes are not WikiStyles%25%25, knowledge of CSS is required to use them.%0a%0a(:markup class=horiz:)%0a(:table style="font-style:italic; color:green; border:1px solid blue; background-color:#ffffcc":)%0a(:cellnr:)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:tableend:)%0a(:markupend:)%0a%0aNote, the %25pmhlt%25[@(:div style="..." class="...":)@] directive does not work the same way as [@>>style%3c%3c@], as mentioned above, it can only contain the HTML style and class attributes.%0a%0a[[#Shortcuts]]%0a!! Custom style shortcuts%0a%0aThe '''[@define=@]''' attribute can be used to assign a shorthand name to any WikiStyle specification.%0aThis shorthand name can then be reused in later WikiStyle specifications.%0a%0a(:markup class=horiz:)%0a%25define=box block bgcolor=#ddddff border="2px dotted blue"%25%0a%0a%25box%25 [@some sort of text@]%0a%0a%25box font-weight=bold color=green%25 [@some sort of text@]%0a(:markupend:)%0a%0a-%3c '''Tip:''' It's often a good idea to put common style definitions into [[Group Header(s)]] pages so that they can be shared among multiple pages in a group. Or, the [[wiki administrator]] can predefine styles site-wide as a [[local customization(s)]] (see [[Custom WikiStyles]]).%0a%0a-%3c '''Tip:''' Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set %25pmhlt%25[@%25define=warn green%25@] and then use [@%25warn%25@] instead of [@%25green%25@] in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of [@%25green%25@] in the text.%0a%0a-%3c '''Tip:''' Any undefined WikiStyle is automatically treated as a request for a class, thus %25pmhlt%25[@%25pre%25@] is the same as saying [@%25class=pre%25@].%0a%0a!![[#predefined]] Predefined style shortcuts%0a%0aPmWiki defines a number of style shortcuts.%0a%0a* Text colors: %25black%25black%25%25, %25white bgcolor=black%25white%25%25, %25red%25red%25%25, %25yellow%25yellow%25%25, %25blue%25blue%25%25, %25gray%25gray (grey)%25%25, %25silver%25silver%25%25, %25maroon%25maroon%25%25, %25green%25green%25%25, %25navy%25navy%25%25, %25purple%25purple%25%25, %25fuchsia%25fuchsia%25%25, %25olive%25olive%25%25, %25lime%25lime%25%25, %25teal%25teal%25%25, %25aqua%25aqua%25%25, %25orange%25orange%25%25 (shortcut for %25pmhlt%25[@%25color=...%25@])%0a* Justification: %25pmhlt%25[@%25center%25@] and [@%25right%25@]%0a* Images and boxes%0a** Floating left or right: %25pmhlt%25[@%25rfloat%25@] and [@%25lfloat%25@]%0a** Framed items: %25pmhlt%25[@%25frame%25@], [@%25rframe%25@], and [@%25lframe%25@]%0a** Thumbnail sizing: %25pmhlt%25[@%25thumb%25@]%0a* Open link in new window: %25pmhlt%25[@%25newwin%25@] (shortcut for [@%25target=_blank%25@])%0a* Comments: %25pmhlt%25[@%25comment%25@] (shortcut for [@%25display=none%25@]). %25red%25 This is not meant to hide secrets,%25%25 as the hidden content is still printed into the HTML source of the page -- readable to bots (and may appear in web searches) or via "View: Source" and "View: Page Style: None" in the browser.%0a* Ordered lists: %25pmhlt%25[@%25decimal%25@], [@%25roman%25@], [@%25ROMAN%25@], [@%25alpha%25@], [@%25ALPHA%25@], [@%25reversed%25@] (see also Cookbook:OutlineLists)%0a%0a!! Enabling the "Syntax Highlight" code beautifier library %25block id=highlight%25%0a%0a''This section is about highlighting code in various programming languages using an external library. Instead, or in addition, to enable highlighting of the PmWiki's own markup language syntax in the documentation and/or the edit form, see $EnablePmSyntax.''%0a%0aSince version 2.2.119, PmWiki makes it relatively easy to enable syntax highlighting for preformatted text blocks, wrapped in %25pmhlt%25@@[=[@escaped@]=]@@ markup blocks.''%0a%0aTo enable syntax highlighting, add to @@config.php@@:%0a%0a%25hlt php%25 [@%0a $EnableHighlight = 1;%0a $HTMLHeaderFmt['Highlight'] = '%0a %3clink rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/default.min.css" data-theme="light" />%0a %3clink rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/dark.min.css" data-theme="dark" disabled />%0a %3cscript src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js">%3c/script>';%0a@]%0a''This loads the [[https://highlightjs.org/ | Highlight.js library]] from a global CDN, but you can copy these 3 files to your @@pub@@ directory and link to them instead.''%0a%0aThen, in a wiki page, you can use the %25pmhlt%25[@%25highlight%25@] or [@%25hlt%25@] wikistyles, and the language to mark your code blocks.%0a%0aEither immediately before the code block:%0a(:markup:)%0a%25hlt php%25[@%0a function SDVA(&$var,$val)%0a { foreach($val as $k=>$v) if (!isset($var[$k])) $var[$k]=$v; }%0a function IsEnabled(&$var,$f=0)%0a { return (isset($var)) ? $var : $f; }%0a@]%0a(:markupend:)%0a%0aOr in a wrapping division block:%0a(:markup:)%0a>>highlight css%3c%3c%0a[@%0a /* These adjust the size and spacing of heading elements */%0a h1, h2, h3, h4, h5, h6 { margin:1.0em 0 .6em 0; }%0a h1, h2, h3, h6 { font-weight:normal; }%0a h4, h5 { font-weight:bold; }%0a@]%0a>>%3c%3c%0a(:markupend:)%0a''If you have the feature correctly enabled you will see the syntax highlighting of the above code.''%0a%0aYou may also want to enable a [@[+]@] Copy code button which will appear near the top right of preformatted blocks. Add to config.php:%0a%0a->%25hlt php%25 @@ $EnableCopyCode = 1; @@%0a%0a[[#Styles]]%0a!! Enabling Styles%0aStyles not listed above can be enabled by a PmWiki Administrator by modifying the @@local/config.php@@ file. %0aFor instance to enable the "line-height" style attribute add the following line to the @@local/config.php@@ file:%0a%0a->%25hlt php%25[@$WikiStyleCSS[] = 'line-height';@]%0a%0a%0a[[#WikiStyleApply]]%0a!! Defining scope for other HTML elements%0aYou can add additional HTML elements to %25pmhlt%25[@$WikiStyleApply@] to apply WikiStyles to other HTML elements. For example to allow styling on anchor tags:%0a%0a->%25hlt php%25[@$WikiStyleApply['link'] = 'a';@]%0a%0a%0a[[#Examples]]%0a!! Examples%0a%0a[[WikiStyle Examples]] contains a number of examples of ways to use WikiStyles in pages.%0a%0a[[#KnownIssues]]%0a!! Known Issues%0a* Percents in style definitions (like: %25pmhlt%25[@%25block width=50%25 %25@]) require the use of "pct" instead of "%25". PmWiki will convert the "pct" into "%25" so that it becomes valid CSS.%0a* If you specify multiple values for an attribute, like @@border="2px solid blue"@@ make sure you place the values in quotes.%0a* Be sure to use lowercase letters for red-green-blue hex colors, %25pmhlt%25[@%25color=#aa3333%25@] will work, [@%25color=#AA3333%25@] may not.%0a[[#SeeAlso]]%0a!!See Also%0a* [[List styles]] {PmWiki/ListStyles$:Summary}%0a* [[PmWiki/Custom WikiStyles]] {PmWiki/CustomWikiStyles$:Summary}%0a* [[Cookbook:WikiStylesPlus | WikiStylesPlus]] {Cookbook.WikiStylesPlus$:Summary}%0a -time=1707642441 +rev=264 +targets=PmWiki.WikiWord,PmWiki.WikiStyleColors,PmWiki.BlockMarkup,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.GroupHeaders,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.CustomWikiStyles,Cookbook.OutlineLists,PmWiki.LayoutVariables,Cookbook.CodeHighlight,PmWiki.WikiStyleExamples,PmWiki.TextFormattingRules,PmWiki.ListStyles,Cookbook.WikiStylesPlus +text=(:Summary: Modifying the style of page contents:)%0a(:Audience: authors (basic, advanced) :)%0a%0aWikiStyles allow authors to modify the color and other styling attributes of the contents of a page. %0aA WikiStyle is written using percent-signs, as in %25red%25[@%25red%25@]%25%25 or %25black bgcolor=lightblue%25[@%25bgcolor=lightblue%25@]%25%25.%0a%0a[[#Attributes]]%0a!! WikiStyle attributes%0a%0aThe style attributes recognized within a WikiStyle specification are:%0a(:table:)%0a(:cellnr colspan=2:)%25center%25------------ CSS -------------%25%25%0a(:cell:)%25center%25--HTML--%25%25%0a(:cellnr:)%0a bgcolor%0a background-color%0a border'^[[#al|1]]^'%0a color%0a display%0a float%0a clear%0a overflow%0a font-size%0a font-family%0a font-weight%0a font-style%0a(:cell:)%0a height[[#fn|*]]%0a list-style%0a margin'^[[#al|1]]^'%0a padding'^[[#al|1]]^'%0a text-align%0a text-decoration%0a white-space%0a width[[#fn|*]] %0a columns%0a column-gap%0a column-span%0a column-rule%0a(:cell:)%0a accesskey %0a align%0a class%0a hspace %0a id %0a target %0a rel %0a vspace %0a value%0a reversed%0a(:cellnr rowspan=3:)%0a Special: define, apply%0a(:tableend:)%0a%0aThe attributes in the first two columns correspond to the ''[[cascading style sheet -> http://blooberry.com/indexdot/css/propindex/all.htm]]'' (CSS) properties of the same name. The attributes in the last column apply only to specific items:%0a%0a* '''[@class=@]''' and '''[@id=@]''' assign a CSS class or identifier to an HTML element%0a* '''[@target=name@]''' opens links that follow in a browser window called "name"%0a* '''[@rel=name@]''' in a link identifies the relationship of a target page%0a* '''[@accesskey=x@]''' uses 'x' as a shortcut key for the link that follows%0a* '''[@value=9@]''' sets the number of the current ordered list item%0a%0a** [[#fn]] The width and height attributes have asterisks because they are handled specially for %25hlt html%25[@%3cimg .../>@] tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the WikiStyle), then they set the 'width=' and 'height=' attributes of any [@%3cimg ... />@] tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled.%0a## [[#al]] margin, padding, and border can be suffixed by -left, -right, -top, and -bottom%0a%0a!! WikiStyles versus CSS styles%0aWikiStyles, as written in the wiki page, are not exactly CSS styles or CSS classes. WikiStyles allow authors to use both pre-defined by the administrator CSS classes, and to define new combinations of styles, without any need to edit/update local CSS files on the server.%0a%0aNote that PmWiki allows advanced authors to use of @@ class= @@ and @@ style= @@ in tables and division blocks, but these are raw HTML attributes, and not WikiStyles; knowledge of CSS is required to use them.%0a%0a!! Text color and font%0aThe most basic use of WikiStyles is to change text attributes such as color, background color, and font. %0aPmWiki defines several WikiStyles for changing the text color to %25pmhlt%25@@[=%25black%25, %25white%25, %25red%25, %25yellow%25, %25blue%25, %25gray%25 (%25grey%25), %25silver%25, %25maroon%25, %25green%25, %25navy%25, %25fuchsia%25, %25olive%25, %25lime%25, %25teal%25, %25aqua%25, %25orange%25 and %25purple%25=]@@.%0a%0a(:markup class=horiz:)%0aThe basket contains %25red%25 apples, %25blue%25 blueberries, %25purple%25 eggplant, %25green%25 limes, %25%25 and more.%0a(:markupend:)%0a%0aFor colors other than the predefined colors, use the %25pmhlt%25[@%25color=...%25@] WikiStyle. (Note: RGB colors (#rrggbb) should always be specified with lowercase letters to avoid [[WikiWord]] conflicts.)%0a%0a(:markup class=horiz:)%0aI'd like to have some %25color=#ff7f00%25 tangerines%25%25, too!%0a(:markupend:)%0a%0aTo change the background color, use %25pmhlt%25[@%25bgcolor=...%25@] as a WikiStyle:%0a%0a(:markup class=horiz:)%0aThis sentence contains %25bgcolor=green yellow%25 yellow text on a green background.%0a(:markupend:)%0a%0aSee [[(PmWiki:)WikiStyle Colors]] for more color help.%0a%0a!! Text justification%0aWikiStyles are used to control the text justification%0a%0a(:markup class=horiz:)%0a%25center%25 This text is centered. %0a%0a%25right%25 Right justified.%0a(:markupend:)%0a%0aand to create floating text:%0a%0a(:markup class=horiz:)%0a%25rfloat%25 This text floats to the right%0a%0a%25rframe%25 floats to the right with a frame%0a%0aLorem ipsum dolor sit amet, consectetuer sadipscing elitr%0a(:markupend:)%0a%0a%0a[[#Scope]]%0a!! Scope%0a%0aWikiStyles can also specify a ''scope''; with no scope, the style is applied to any text that follows up to the next WikiStyle specification or the end of the paragraph, whichever comes first. The '''apply=''' attribute and its shortcuts allow to change the scope as follows:%0a%0a||class='tabtable' cellpadding=3 cellspacing=0 style="border:1px dotted blue;" rules=rows %0a||!apply attribute ||!shortcut ||!style applies to... ||%0a||%25pmhlt%25[@%25apply=img ...%25@] ||- ||all images that ''follow'' until another style applied||%0a||%25pmhlt%25[@%25apply=p ...%25@] ||%25pmhlt%25[@%25p ...%25@] ||the current paragraph||%0a||%25pmhlt%25[@%25apply=pre ...%25@] ||- ||the current preformatted text||%0a||%25pmhlt%25[@%25apply=list ...%25@] ||%25pmhlt%25[@%25list ...%25@] ||the current list||%0a||%25pmhlt%25[@%25apply=item ...%25@] ||%25pmhlt%25[@%25item ...%25@] ||the current list item||%0a||%25pmhlt%25[@%25apply=div ...%25@] ||- ||the current div||%0a||%25pmhlt%25[@%25apply=block ...%25@] ||%25pmhlt%25[@%25block ...%25@] ||to the current block, whether it's a paragraph, list, list item, heading, or division.||%0a%0aThus, %25pmhlt%25[@%25p color=blue%25@] is the same as [@%25apply=p color=blue%25@], and [@%25list ROMAN%25@] is the same as [@%25apply=list list-style=upper-roman%25@].%0a%0aSome [[#predefined|predefined style shortcuts]] also make use of apply, thus %25pmhlt%25[@%25right%25@] is a shortcut for [@%25text-align=right apply=block%25@].%0a%0aExample: Apply a style to a paragraph:%0a(:markup:)%0a%25p bgcolor=#ffeeee%25 The WikiStyle specification at the beginning of this line applies to the entire paragraph, even if there are %25blue%25 other WikiStyle specifications %25%25 in the middle of the paragraph.%0a(:markupend:)%0a%0a%0a'''Caveat''': An applied WikiStyle will only take effect if it's on the%0aline that starts the thing it's supposed to modify. In other%0awords, a WikiStyle in the third markup line of a paragraph%0acan't change the attributes of the paragraph:%0a%0a(:markup class=horiz:) %0aafter the first line of the paragraph,%0awe try to %25apply=p color=blue%25 change color.%0aThis doesn't work because the style comes after the first line of the paragraph.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aHowever, this %25apply=p color=red%25 paragraph%0a''will'' be in red because its block style does%0aoccur in the first line of its text.%0a(:markupend:)%0a%0a(:markup class=horiz:) %0a* Here's a list item%0a* %25list red%25 Oops, too late to affect the list!%0a(:markupend:)%0a%0aIf you want to break a list in two, you need to have a line not part of the list between, that is a line that has any content other than space and newlines, otherwise PmWiki considers the vertical space part of the previous list item. You can have an non-breaking space, or the escaped null character:%0a%0a(:markup class=horiz:)%0a* %25list red%25 first item%0a* second item%0a %0a* %25apply=list bgcolor=lightgreen%25 second list - first item%0a* second list - second item%0a[==]%0a* %25list class=mambo%25 third list - first item%0a* third list - second item%0a(:markupend:)%0a%0a%0a[[#blocks]]%0a!! Larger blocks%0a%0aThe %25pmhlt%25[@>>WikiStyle%3c%3c@] block can be used to apply a WikiStyle to a large block of items. %0aThe style is applied until the next %25pmhlt%25[@>>%3c%3c@] is encountered.%0a%0a(:markup class=horiz:)%0a>>blue font-style:italic bgcolor=#ffffcc%3c%3c%0aEverything after the above line is styled with blue italic text,%0a%0aThis includes%0a preformatted %25red%25text%25%25%0a* lists%0a-> indented items%0a>>%3c%3c%0a(:markupend:)%0a%0aNote, the %25pmhlt%25[@(:div style="..." class="...":)@] directive does not work the same way as [@>>WikiStyle%3c%3c@], it can only contain the regular HTML style and class attributes.%0a%0a%0a[[#styleclass]]%0a!! HTML "class" and "style" attributes for tables and divisions%0aWikiStyles are only the commands between %25pmhlt%25[@%25...%25@] percent signs.%0a%0a[[PmWiki/Tables]], [[PmWiki/table directives]] and [[PmWiki.BlockMarkup#div|%25pmhlt%25[@(:div:)@]]] division blocks allow advanced authors to incorporate the HTML/CSS attributes @@ class= @@ and @@ style=@@. %25red%25 Note that these attributes are not WikiStyles%25%25, knowledge of CSS is required to use them.%0a%0a(:markup class=horiz:)%0a(:table style="font-style:italic; color:green; border:1px solid blue; background-color:#ffffcc":)%0a(:cellnr:)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:tableend:)%0a(:markupend:)%0a%0aNote, the %25pmhlt%25[@(:div style="..." class="...":)@] directive does not work the same way as [@>>style%3c%3c@], as mentioned above, it can only contain the HTML style and class attributes.%0a%0a[[#Shortcuts]]%0a!! Custom style shortcuts%0a%0aThe '''[@define=@]''' attribute can be used to assign a shorthand name to any WikiStyle specification.%0aThis shorthand name can then be reused in later WikiStyle specifications.%0a%0a(:markup class=horiz:)%0a%25define=box block bgcolor=#ddddff border="2px dotted blue"%25%0a%0a%25box%25 [@some sort of text@]%0a%0a%25box font-weight=bold color=green%25 [@some sort of text@]%0a(:markupend:)%0a%0a-%3c '''Tip:''' It's often a good idea to put common style definitions into [[Group Header(s)]] pages so that they can be shared among multiple pages in a group. Or, the [[wiki administrator]] can predefine styles site-wide as a [[local customization(s)]] (see [[Custom WikiStyles]]).%0a%0a-%3c '''Tip:''' Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set %25pmhlt%25[@%25define=warn green%25@] and then use [@%25warn%25@] instead of [@%25green%25@] in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of [@%25green%25@] in the text.%0a%0a-%3c '''Tip:''' Any undefined WikiStyle is automatically treated as a request for a class, thus %25pmhlt%25[@%25pre%25@] is the same as saying [@%25class=pre%25@].%0a%0a!![[#predefined]] Predefined style shortcuts%0a%0aPmWiki defines a number of style shortcuts.%0a%0a* Text colors: %25black%25black%25%25, %25white bgcolor=black%25white%25%25, %25red%25red%25%25, %25yellow%25yellow%25%25, %25blue%25blue%25%25, %25gray%25gray (grey)%25%25, %25silver%25silver%25%25, %25maroon%25maroon%25%25, %25green%25green%25%25, %25navy%25navy%25%25, %25purple%25purple%25%25, %25fuchsia%25fuchsia%25%25, %25olive%25olive%25%25, %25lime%25lime%25%25, %25teal%25teal%25%25, %25aqua%25aqua%25%25, %25orange%25orange%25%25 (shortcut for %25pmhlt%25[@%25color=...%25@])%0a* Justification: %25pmhlt%25[@%25center%25@] and [@%25right%25@]%0a* Images and boxes%0a** Floating left or right: %25pmhlt%25[@%25rfloat%25@] and [@%25lfloat%25@]%0a** Framed items: %25pmhlt%25[@%25frame%25@], [@%25rframe%25@], and [@%25lframe%25@]%0a** Thumbnail sizing: %25pmhlt%25[@%25thumb%25@]%0a* Open link in new window: %25pmhlt%25[@%25newwin%25@] (shortcut for [@%25target=_blank%25@])%0a* Comments: %25pmhlt%25[@%25comment%25@] (shortcut for [@%25display=none%25@]). %25red%25 This is not meant to hide secrets,%25%25 as the hidden content is still printed into the HTML source of the page -- readable to bots (and may appear in web searches) or via "View: Source" and "View: Page Style: None" in the browser.%0a* Ordered lists: %25pmhlt%25[@%25decimal%25@], [@%25roman%25@], [@%25ROMAN%25@], [@%25alpha%25@], [@%25ALPHA%25@], [@%25reversed%25@] (see also Cookbook:OutlineLists)%0a%0a!! Enabling the "Syntax Highlight" code beautifier library %25block id=highlight%25%0a%0a''This section is about highlighting code in various programming languages using an external library. Instead, or in addition, to enable highlighting of the PmWiki's own markup language syntax in the documentation and/or the edit form, see $EnablePmSyntax.''%0a%0aSince version 2.2.119, PmWiki makes it relatively easy to enable syntax highlighting for preformatted text blocks, wrapped in %25pmhlt%25@@[=[@escaped@]=]@@ markup blocks.''%0a%0aTo enable syntax highlighting, add to @@config.php@@:%0a%0a%25hlt php%25 [@%0a $EnableHighlight = 1;%0a $HTMLHeaderFmt['Highlight'] = '%0a %3clink rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/default.min.css" data-theme="light" />%0a %3clink rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/dark.min.css" data-theme="dark" disabled />%0a %3cscript src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js">%3c/script>';%0a@]%0a''This loads the [[https://highlightjs.org/ | Highlight.js library]] from a global CDN, but you can copy these 3 files to your @@pub@@ directory and link to them instead.''%0a%0aSee also Cookbook:CodeHighlight.%0a%0aThen, in a wiki page, you can use the %25pmhlt%25[@%25highlight%25@] or [@%25hlt%25@] wikistyles, and the language to mark your code blocks.%0a%0aEither immediately before the code block:%0a(:markup:)%0a%25hlt php%25[@%0a function SDVA(&$var,$val)%0a { foreach($val as $k=>$v) if (!isset($var[$k])) $var[$k]=$v; }%0a function IsEnabled(&$var,$f=0)%0a { return (isset($var)) ? $var : $f; }%0a@]%0a(:markupend:)%0a%0aOr in a wrapping division block:%0a(:markup:)%0a>>highlight css%3c%3c%0a[@%0a /* These adjust the size and spacing of heading elements */%0a h1, h2, h3, h4, h5, h6 { margin:1.0em 0 .6em 0; }%0a h1, h2, h3, h6 { font-weight:normal; }%0a h4, h5 { font-weight:bold; }%0a@]%0a>>%3c%3c%0a(:markupend:)%0a''If you have the feature correctly enabled you will see the syntax highlighting of the above code.''%0a%0aYou may also want to enable a [@[+]@] Copy code button which will appear near the top right of preformatted blocks. Add to config.php:%0a%0a->%25hlt php%25 @@ $EnableCopyCode = 1; @@%0a%0a[[#Styles]]%0a!! Enabling Styles%0aStyles not listed above can be enabled by a PmWiki Administrator by modifying the @@local/config.php@@ file. %0aFor instance to enable the "line-height" style attribute add the following line to the @@local/config.php@@ file:%0a%0a->%25hlt php%25[@$WikiStyleCSS[] = 'line-height';@]%0a%0a%0a[[#WikiStyleApply]]%0a!! Defining scope for other HTML elements%0aYou can add additional HTML elements to %25pmhlt%25[@$WikiStyleApply@] to apply WikiStyles to other HTML elements. For example to allow styling on anchor tags:%0a%0a->%25hlt php%25[@$WikiStyleApply['link'] = 'a';@]%0a%0a%0a[[#Examples]]%0a!! Examples%0a%0a[[WikiStyle Examples]] contains a number of examples of ways to use WikiStyles in pages.%0a%0a[[#KnownIssues]]%0a!! Known Issues%0a* Percents in style definitions (like: %25pmhlt%25[@%25block width=50%25 %25@]) require the use of "pct" instead of "%25". PmWiki will convert the "pct" into "%25" so that it becomes valid CSS.%0a* If you specify multiple values for an attribute, like @@border="2px solid blue"@@ make sure you place the values in quotes.%0a* Be sure to use lowercase letters for red-green-blue hex colors, %25pmhlt%25[@%25color=#aa3333%25@] will work, [@%25color=#AA3333%25@] may not.%0a[[#SeeAlso]]%0a!!See Also%0a* [[List styles]] {PmWiki/ListStyles$:Summary}%0a* [[PmWiki/Custom WikiStyles]] {PmWiki/CustomWikiStyles$:Summary}%0a* [[Cookbook:WikiStylesPlus | WikiStylesPlus]] {Cookbook.WikiStylesPlus$:Summary}%0a +time=1708803680 |