web-archive-net.com » NET » U » ULI-ALTO.NET

Total: 397

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Uli-Alto PmWiki/Internationalizations
    not necessary in this case since English is the default language An alternative to the above would be to add to config php the following which tests if there is an XLPage in a group and if it finds one it gets loaded any language xlpage FmtPageName Group XLPage pagename if PageExists xlpage XLPage xlpage xlpage With this method you would need to copy any relevant XLPage into any group which needs the different language support See also Cookbook MultiLanguage Creating New Translations If language pages don t exist for your desired language it s easy to create one An XLPage translation file simply contains lines of the form phrase translated phrase where phrase is an internationalized phrase denoted by phrase in PmWiki s Fmt variables and translated phrase is what should be printed in your particular language For example the line in PmWikiFr XLPage Search Rechercher converts Search to Rechercher on output The file Localization XLPageTemplate is a good starting point for creating a new XLPage and has most of PmWiki s key phrases already listed in it If you create new versions of PmWiki pages in other languages please consider adding them to the main PmWiki site so that they can be made available to others in the i18n archives Be sure to check out The Localization Portal for further information on effectively internationalizing PmWiki The term i18n is commonly used as an abbreviation for the English word internationalization The abbreviation is derived from the fact that there are 18 letters between the i and the final n and few people want to type them all out Enabling Special Characters in WikiLinks To enable special characters like for example German umlauts in WikiLinks it is necessary to configure the server locale to ensure that PmWiki uses the proper character set definition If this is not possible due to limited access to the server configuration PmWiki can be configured to use a specific locale by using the XLPage options see XLPageTemplate For German umlauts you d need for example Locale deu for Windows servers see MSDN List of locale identifiers Locale de DE for Linux servers for the UTF 8 encoding on some installations you may need to set de DE utf8 or de DE UTF 8 Note that the locale identifier depends on the operation system and perhaps on the specific installation Notes If my wiki is internationalized by config php how do I revert a specific group to English Use XLLangs array en in the group s group customization file If my wiki is in English and I want just one page or group in Spanish do I say XLPage es PmWikiEs XLPage in the group or page configuration file Yes that is usually the best method If you were doing this with many scattered pages or with several languages you might find it easier to maintain if you load the translations all in config php like this XLPage es PmWikiEs XLPage XLPage fr PmWikiFr XLPage XLPage

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.Internationalizations (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Local Customizations
    php Order of the commands in config php link The following order is recommended define ScriptUrl and PubDirUrl if needed define any custom PageStore class like SQLite CompressedPageStore or PerGroupSubDirectories next include once scripts xlpage utf 8 php next call XLPage which needs the definitive rw WikiDir already set in order to find the wiki page containing the translations next include authuser php if needed because PmWiki caches some group and page authorization levels when a page is accessed next include any other scripts and recipes any direct function call in config php like ResolvePageName CondAuth PageTextVar PageVar RetrieveAuthPage or others if possible should be done near the end of config php Note each part is not required but if your wiki needs it this is the recommended order in config php Character encoding of config php The encoding used when you save config php has an effect Your text editor should allow you to save config php in the encoding of your wiki The default encoding of PmWiki is ISO 8859 1 for new wikis it is recommended to enable UTF 8 Newer operating systems like GNU Linux FreeBSD and Apple generally default to saving text files in Unicode UTF 8 in Windows the default encoding is ANSI Windows 1252 which is almost the same as PmWiki s ISO 8859 1 The following free libre software text editors can edit and save a file in different encodings Cross platform Kate for KDE Geany Arachnophilia SciTE Bluefish vim and others Windows Notepad ConTEXT Notepad 2 OS X Aquamacs Note that if you use the UTF 8 encoding you should save your files without Byte Order Mask BOM Over time PmWiki will be updated to default to Unicode UTF 8 encoding which allows all possible alphabets and languages See UTF 8 for more information pub css local css You can create this file and set there some custom CSS styles which will override any styles set by skins For example h1 h2 h3 h4 h5 color 880000 dark red titles a text decoration none don t underline links Don t modify pmwiki php or other core files You should strongly resist the temptation to directly modify the pmwiki php script or the files in the scripts subdirectory Any modifications you make to these files will probably be overwritten whenever you upgrade Instead look at some of the sample scripts for examples of customizations that can be performed from config php You can even create your own script to do a customization and use include once to include it from config php If you do make your own customization script you can safely put it in the cookbook subdirectory it won t get overwritten by an upgrade there You might also want to submit your customization to the pmwiki users mailing list or the Cookbook so that others can benefit from your effort and so that it can perhaps be included in future releases of PmWiki FAQ There s no config php

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.LocalCustomizations (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Group Customizations
    per page customization An important exception to this is setting per group or per page customizations for recipe scripts included in config php Most recipe scripts would need any customization variables defined before the script is included Instead of using a per group or per page customization php file use a per group or per page conditional statement in config php before including the recipe script Example page PageVar pagename FullName group PageVar pagename Group per group customizations if group GroupName RecipeVariable valueA etc per page customizations if page GroupName PageName RecipeVariable valueB etc include recipe after variables are set include once cookbook recipescript php Note that this method cannot be used to set DefaultPasswords you should use Group or Page attributes See Passwords and PasswordsAdmin for more information Processing order For all local customizations PmWiki first processes the local config php file and then looks for a per page customization file in the local subdirectory to process followed by any per group customization file If no per page or per group customizations are loaded then PmWiki loads local default php If a per page customization wants to have the per group customizations loaded first it can do so directly by using PHP s include once function For more information see wiki cascades Custom CSS styles per group or per page To apply CSS styles to pages of a specific group named Group Name create a file named GroupName css in the pub css directory and add the CSS style rules there To apply styles to a specific page create a file GroupName PageName css in this directory with your style rules Any CSS rules to be applied for all wiki pages can be put into pub css local css pub css GroupName css body background F4C4B4 Preventing group Level configurations Any customization file can set EnablePGCust 0 to prevent later page group default customizations from being automatically loaded If a per page customization needs to have the per group customizations loaded first it can do so directly by using PHP s include once function Authentication Any passwords required for a group should be set in the group s Group Attributes page see Passwords Administration and not in a group customization file Consider Wiki Farms Wiki Groups are an easy way to host multiple sites in a single PmWiki installation by giving each site its own group Another approach is to use Wiki Farms which allows each site to have its own set of Wiki Group and local customization files Read about If you are looking for nested group levels you may want to consider Pm s design considerations on hierarchical groups How can I apply CSS styles to a particular group or page Simply create a pub css Group css or pub css Group Page css file containing the custom CSS styles for that group or page See also Cookbook LocalCSS Why shouldn t passwords be set in group or page customization files Why shouldn t group or page

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.GroupCustomizations (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Skin Templates
    the default tmpl file instead If no appropriate php file is found or if that file doesn t load a template then PmWiki falls back to looking for a template with the same name as the skin or failing that any tmpl file at all so long as its the only one in the directory If it finds one it will load and process it If not it will issue an error Template file format A template file is basically an HTML file that also contains variable substitutions indicated by and special directives embedded in HTML comments The following special directives are required in the template file The directive PageText belongs to the body section of the HTML document and tells PmWiki where the main content of each wiki page should be placed The directive HTMLHeader which goes somewhere in the head section of the HTML document The directive HTMLFooter directive which typically goes before the final body tag and is used by some recipes to insert things at the end of the HTML document Prior to PmWiki 2 2 0 the HTMLFooter directive was optional When PmWiki displays a page it replaces the directives and variable substitutions with the values appropriate to the current page For example the PageText directive is replaced with the page s contents while any instances of PageUrl are replaced with the url address of the current page Note your skin template shouldn t have a meta tag specifying the charset encoding as PmWiki adds this tag when needed There is a long list of variables available for substitution in pages some of the most useful include PageUrl the url of the current page ScriptUrl the base url to the pmwiki php script Title the page s title e g SkinTemplates Titlespaced the page s title with spaces e g Skin Templates Group the name of the current group e g PmWiki FullName the page s full name e g PmWiki SkinTemplates LastModified the page s last modification time PageLogoUrl the url of a site logo WikiTitle the site s title SkinDirUrl the url of the skin s folder This last variable SkinDirUrl is particularly useful in templates as it allows the skin designer to refer to other files such as images or style sheets in the skin folder without having to know the exact url The template is not limited to using the variables listed here nearly any PHP global variable that begins with a capital letter can be used in a skin template Page variables can also be used in templates Skin directives Besides the required PageText and HTMLHeader directives PmWiki provides other built in directives for generating page output It s not necessary to use any of these directives but they can often add capabilities to a skin wiki Main SomePage page Main SomePage The wiki Main SomePage directive outputs the contents of Main SomePage substitutions are allowed in directives thus a directive like wiki Group SomePage will include SomePage of the

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.SkinTemplates (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Site Preferences
    copy of that page under a new name customising it and setting a cookie which will point to this page for the browser being used through setprefs SomeGroup CustomPreferences SomeGroup CustomPreferences being the name of the new customised preference page Notes and Comments Note that in order to enable parsing of Site Preferences by default a line like the following needs to be added to local config php XLPage prefs

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.SitePreferences (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Web Feeds
    to the action action atom the second index indicates a per feed or per item element and the third index is the name of the element being generated The above setting would therefore generate a rights All Rights Reserved rights in the feed for action atom If the value of an entry begins with a then feeds php doesn t automatically add the tag around it Elements can also be callable functions which are called to generate the appropriate output See RSS specification or other feed specifications for what feed content you can use You can also change an existing element rather than add a new one You can use the following lines to ensure that changes made to the wiki will be picked up by some RSS readers that wouldn t otherwise notice a page has been changed Change the link URL when an item is edited FeedFmt rss item link PageUrl when ItemISOTime FeedFmt atom item link link rel alternate href PageUrl when ItemISOTime n See Also Cookbook FeedLinks Add HTML head links for auto discovery of your feeds WikiTrails Wikipedia Web feed Wikipedia Web syndication Wikipedia RSS 28file format 29 Wikipedia Atom 28standard 29 How do I include text from the page whole page or first X characters in the feed body note markup NOT digested function MarkupExcerpt pagename page RetrieveAuthPage pagename read false return substr page text 0 200 FmtPV MarkupExcerpt MarkupExcerpt pn FeedFmt rss item description MarkupExcerpt Q Does this mean if I want to include the time in the rss title and summary to rss body I call FeedFmt twice like so FeedFmt rss item description LastSummary FeedFmt rss item title Group Title ItemISOTime From mailing list Feb 13 2007 a response by Pm Yes How can I use the RSS enclosure tag for podcasting For podcasting of mp3 files simply attach an mp3 file to the page with the same name as the page i e for a page named Podcast Episode4 one would attach to that page a file named Episode4 mp3 The file is automatically picked up by action rss and used as an enclosure The set of potential enclosures is given by the RSSEnclosureFmt array thus RSSEnclosureFmt array Name mp3 Name wma Name ogg allows podcasting in mp3 wma and ogg formats How to add summary to the title in a rss feed ie with action rss Add this line in you local config php FeedFmt rss item title Group Title LastModifiedSummary How to add description to the title in an rss feed and summary to the body Add these lines to your local config php FeedFmt rss item title Group Title Description FeedFmt rss item description LastModifiedSummary NOTES you need to replicate these lines for each type atom rdf dc of feed you provide the RSS description tag is not equivalent to the pmWiki Description variable despite the confusing similarity Some of my password protected pages aren t appearing in the feed how do I work around this From

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.WebFeeds (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/Wiki Farms
    use a WikiFarm you can upgrade all wikis in your farm by simply upgrading your home wiki recipes can be shared across all wikis portions of your configuration can be shared across wikis most code is stored in one location and shared by all wikis in the farm I still can t decide if I need a farm The good news is that you don t have to decide in advance In fact the recommended procedure is to first do a normal or single installation of PmWiki Use it for a while Create pages and edit them Get to know how to add recipes Be sure to try out WikiGroups they may be all you need If you choose to create a wiki farm then read on Creating Configuring a WikiFarm Prerequisites Before you create a farm make sure that you have a working installation of PmWiki ready to become the home wiki for your farm all of the wikis in your farm will be on the same web server each wiki will have a unique URL such as http www example com wiki1 http www example com wiki2 http another example com wiki1 and so on Creating the home wiki You do have a working installation of PmWiki at this point don t you That s good because your existing wiki is about to become the home wiki of your farm In the directory that contains your existing wiki create the file local farmconfig php This file is used to hold any local customizations that apply across the whole farm For example you could assign an admin password in farmconfig php that will be used by all of the wikis in your farm If the URL used to access your existing wiki is http www example com pmwiki then a minimal farmconfig php file would look like this php if defined PmWiki exit FarmPubDirUrl http www example com pmwiki pub This loads the variable FarmPubDirUrl with the URL location of your home wiki s pub directory All of the wikis in your farm share this pub directory The pub directory holds skin definitions and GUI edit buttons to be shared by all the wikis in the farm Amazing as it may sound this completes all of the changes you need to make in order to turn your existing wiki into the home wiki of your farm Creating an additional wiki in your farm 1 Create a directory to hold the new wiki This directory must be web accessible just like the directory that holds your home wiki 2 Create a file called index php in the directory with the following contents php include once path to pmwiki php This allows your new wiki to share the PmWiki code stored in your home wiki The path to pmwiki php is the file path to pmwiki php in your home wiki Use an absolute file path home username pmwiki pmwiki php or a relative file path pmwiki pmwiki php Do not

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.WikiFarms (2016-05-01)
    Open archived version from archive

  • Uli-Alto PmWiki/FAQ
    Yes if you delete all files named YourGroup the pages from that group will be removed from the wiki Note that the documentation group PmWiki and the site configuration groups Site and SiteAdmin that exist in the default installation are located in wikilib d and not in wiki d and some recipes provide files located in a wikilib d subdirectory in the cookbook directory You shouldn t delete the groups Site and SiteAdmin required for normal function How can I list all pages in a WikiGroup In a wiki page use pagelist group GroupName list all or in a search box type GroupName list all GroupHeaders and GroupFooters How do I set the same header or footer for all pages groups The header and footer for each page are controlled by the variables GroupHeaderFmt and GroupFooterFmt If your site wide header and footer pages are Site SiteHeader and Site SiteFooter you can add this in config php If you use Site SiteHeader and Group GroupHeader GroupHeaderFmt include SiteGroup SiteHeader basepage FullName nl GroupHeaderFmt If you use Site SiteHeader instead of Group GroupHeader GroupHeaderFmt include SiteGroup SiteHeader basepage FullName nl If you use Site SiteFooter and Group GroupFooter GroupFooterFmt nl include SiteGroup SiteFooter basepage FullName If you use Site SiteFooter instead of Group GroupFooter GroupFooterFmt nl include SiteGroup SiteFooter basepage FullName Note that single quotes must be used in the lines above See also the Cookbook AllGroupHeader recipe Instead of using an additional page you could set any wiki text in GroupHeaderFmt for example GroupHeaderFmt Global message here WikiTrails What s the difference between a PageList and a WikiTrail The pagelist directive dynamically generates a list of pages There are many ways to generate the list including using a WikiTrail as the source The pagelist directive then displays the pages that match the criteria using an optional template for example displaying each page name on a separate line as a link or including the entire content The pagelist directive currently does not have built in navigation markup that you can put on the pages in the list By contrast WikiTrails are simply specified via links on an index page and you can put previous next navigation markup on each page The two serve very different purposes WikiTrails are useful for specifying the pages in web feeds for creating a tour through a predefined set of pages and many other things PageHistory Is there a way to remove page history from page files 1 Administrators can clean page histories using the Cookbook ExpireDiff recipe 2 Administrators with FTP file access can download individual pages from the wiki d directory open them in a text editor manually remove history and re upload the files to wiki d directory Care must be exercised when manually editing a page file to preserve the minimum required elements of the page and avoid corrupting its contents See PageFileFormat creating 3 Edit the page Select all the contents of the edit text area and cut them to the clipboard Enter delete into the text area and click on the save and edit button Select all the contents of the edit text area and paste the contents of the clipboard over them Click on the save button This will remove all of the page s history up to the final save in which the pasted material is re added How can I restrict viewing the page history action diff to people with edit permission In the local config php file set HandleAuth diff edit In case of this restriction is set up on a farm and you want to allow it on a particular wiki set in your local config php HandleAuth diff read Passwords How can I password protect all the pages and groups on my site Do I really have to set passwords page by page or group by group Administrators can set passwords for the entire site by editing the config php file they don t have to set passwords for each page or group For example to set the entire site to be editable only by those who know an edit password an administrator can add a line like the following to local config php DefaultPasswords edit pmcrypt edit password For more information about the password options that are available only to administrators see PasswordsAdmin I get http error 500 Internal Server Error when I try to log in What s wrong This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki The PHP crypt function changed during the PHP development e g a password encrypted with PHP 5 2 can not be decrypted in PHP 5 1 but PHP 5 2 can decrypt passwords created by PHP 5 1 This situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version The same error occurs when you add encrypted passwords to local config php Solution Create the passwords on the system with the oldest PHP version and use them on all other systems How can I create private groups for users so that each user can edit pages in their group but no one else other than the admin can Modify the edit attribute for each group to id username e g set the edit attribute in JaneDoe GroupAttributes to id JaneDoe There is a more automatic solution but it s probably not a good idea for most wikis Administrators can use the AuthUser recipe and add the following few lines to their local config php file to set this up group FmtPageName Group pagename DefaultPasswords edit id group include once FarmD scripts authuser php This automatically gives edit rights to a group to every user who has the same user name as the group name Unfortunately it also gives edit rights to such a user who is visiting a same named group not just for pages in that group but for any page on the wiki that relies on the site s default edit password This can create security holes How come when I switch to another wiki within a farm I keep my same authorization PmWiki uses PHP sessions to keep track of authentication authorization information and by default PHP sets things up such that all interactions with the same server are considered part of the same session An easy way to fix this is to make sure each wiki is using a different cookie name for its session identifier Near the top of one of the wiki s local config php files before calling authuser or any other recipes add a line like session name XYZSESSID You can pick any alphanumeric name for XYZSESSID for example for the cs559 1 wiki you might choose session name CS559SESSID This will keep the two wikis sessions independent of each other Is it possible to test the password level for display and or if condition Example if WriterPassword display Edit link ifend You can use if auth edit See ConditionalMarkup DeletingPages How is a Wiki Group deleted An admin can remove the group pages from wiki d Note that a wiki page may also have related uploads Fully deleting a group via the wiki isn t possible since a delete counts as an update which causes the Recent Changes page to be re created It is possible to modify the site s configuration to allow deletion of the group s RecentChanges page see Cookbook RecentChangesDeletion How is a Category deleted To delete a category delete all the Category references from all pages where they occur then delete the category page as explained above maintenance PmWiki Installation Should I rename pmwiki php to index php Renaming pmwiki php is not recommended Instead create an index php file that contains this single line php include once pmwiki php How do I make pmwiki php the default page for a website Create an index php file that runs PmWiki from a subdirectory pmwiki for example and place it in the site s web document root the main directory for the website php chdir pmwiki include once pmwiki php Note You will also need to explicitly set the PubDirUrl variable e g to http example com pmwiki pub in local config php How do I enable Clean URLs that are shorter and look like paths to my wiki pages Why does pmwiki org appear to have a directory structure rather than n pagename in URLs See Cookbook CleanUrls How can I run PmWiki on a standalone offline portable machine See Cookbook Standalone or Cookbook WikiOnAStick Upgrades FAQ How can I determine what version of PmWiki I m running now See version Determining and displaying the current version of PmWiki pmwiki 2 2 86 How can I test a new version of PmWiki on my wiki without changing the prior version used by visitors The easy way to do this is to install the new version in a separate directory and for the new version set in local config php WikiLibDirs array WikiDir new PageStore path to existing wiki d FullName new PageStore wikilib d FullName This lets you test the new version using existing page content without impacting the existing site or risking modification of the pages Of course any recipes or local customizations have to be installed in the new version as well Then once you re comfortable that the new version seems to work as well as the old it s safe to upgrade the old version and one knows of any configuration or page changes that need to be made Uploads Administration How do I disable uploading of a certain type of file Here s an example of what to add to your local config php file to disable uploading of zip files or of files with no extension UploadExtSize zip 0 Disallow uploading zip files UploadExtSize 0 Disallow files with no extension How do I attach uploads to individual pages or the entire site instead of organizing them by wiki group Use the UploadPrefixFmt variable see also the Cookbook UploadGroups recipe UploadPrefixFmt FullName per page in Group Name directories UploadPrefixFmt Group Name per page in Group directories with Name subdirectories UploadPrefixFmt site wide For UploadDirQuota can you provide some units and numbers Is the specification in bytes or bits What is the number for 100K 1 Meg 1 Gig 1 Terabyte Units are in bytes UploadDirQuota 100 1024 limit uploads to 100KiB UploadDirQuota 1000 1024 limit uploads to 1000KiB UploadDirQuota 1024 1024 limit uploads to 1MiB UploadDirQuota 25 1024 1024 limit uploads to 25MiB UploadDirQuota 2 1024 1024 1024 limit uploads to 2GiB Is there a way to allow file names with Unicode or additional characters Yes see UploadNameChars Where is the list of attachments stored It is generated on the fly by the markup Security How do I report a possible security vulnerability of PmWiki Pm wrote about this in a post to pmwiki users from September 2006 In a nutshell he differentiates two cases The possible vulnerability isn t already known publicly In this case please contact us by private mail The possible vulnerability is already known publicly In this case feel free to discuss the vulnerability in public e g on pmwiki users or in the PITS See his post mentioned above for details and rationals What about the botnet security advisory at http isc sans org diary php storyid 1672 Sites that are running with PHP s register globals setting set to On and versions of PmWiki prior to 2 1 21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP The vulnerability can be closed by turning register globals off upgrading to PmWiki 2 1 21 or later or upgrading to PHP versions 4 4 3 or 5 1 4 In addition there is a test at PmWiki SiteAnalyzer that can be used to determine if your site is vulnerable Wiki Vandalism and Spam Assumptions you are using a Blocklist and Url approvals You don t want to resort to password protecting the entire wiki that s not the point after all Ideally these protections will be invoked in config php How do I stop pages being deleted eg password protect a page from deletion Use Cookbook DeleteAction and password protect the page deletion action by adding DefaultPasswords delete to config php or password protect the action with HandleAuth delete edit or HandleAuth delete admin to require the edit or admin password respectively How do I stop pages being replaced with an empty all spaces page Add block s to your blocklist how do I stop pages being completely replaced by an inane comment such as excellent site great information where the content cannot be blocked Try using the newer automatic blocklists that pull information and IP addresses about known wiki defacers OR Try using Cookbook Captchas or Cookbook Captcha note these are different OR Set an edit password but make it publicly available on the Site AuthForm template How do I password protect the creation of new groups See Cookbook Limit Wiki Groups How do I password protect the creation of new pages See Cookbook Limit new pages in Wiki Groups How do I take a whitelist approach where users from known or trusted IP addresses can edit and others require a password Put these lines to local config php Allow passwordless editing from own turf pass for others if action edit preg match 90 68 SERVER REMOTE ADDR DefaultPasswords edit pmcrypt foobar Replace 90 68 with the preferred network prefix and foobar with the default password for others For a single IP you may use if SERVER REMOTE ADDR 127 0 0 1 your IP address here POST authpw xxx the admin password Please note the security issues this means that you have your admin passwords in clear in config php and someone with access to the filesystem can read them for example a technician of your hosting provider your IP address may change from time to time unless you have a fixed IP contract with your ISP When that happens someone with your old IP address will be logged in automatically as admin on your wiki It is extremely unlikely to become a problem but you should know it is possible if you are behind a router all other devices which pass through that router will have the same IP address for PmWiki your wifi phone your wife s netbook a neighbour using your wifi connection etc All these people become admins of your wiki Again you should evaluate if this is a security risk In some cases your ISP will route your traffic through the same proxy as other people In such a case thousands of people may have the same IP address See also Cookbook AuthDNS Cookbook PersistentLogin How do I password protect page actions See Passwords for setting in config php HandleAuth pageactionname pageactionname along with DefaultPasswords pageactionname pmcrypt secret phrase or HandleAuth pageactionname anotherpageactionname How do I moderate all postings Enable PmWiki Drafts Set EnableDrafts this relabels the Save button to Publish and a Save draft button appears Set EnablePublishAttr this adds a new publish authorization level to distinguish editing from publishing How do I make a read only wiki In config php set an edit password How do I restrict access to uploaded attachments See instructions for denying public access to the uploads directory see Cookbook Secure attachments How do I hide the IP addresses in the diff pages If the user fills an author name the IP address is not displayed To require an author name set in config php such a line EnablePostAuthorRequired 1 The IP address can also be seen in a tooltip title when the mouse cursor is over the author name To disable the tooltip set in config php DiffStartFmt div class diffbox div class difftime a name diff DiffGMT href diff DiffGMT DiffTime a by span class diffauthor DiffAuthor span DiffChangeSum div How do I stop some Apache installations executing a file which has php pl or cgi anywhere in the filename Use UploadBlacklist How do I stop random people from viewing the action source wiki markup of my pages I have if auth edit text that I don t want the world to see HandleAuth source edit or HandleAuth source admin CustomMarkup How can I embed JavaScript into a page s output There are several ways to do this The Cookbook JavaScript recipe describes a simple means for embedding static JavaScript into web pages using custom markup For editing JavaScript directly in wiki pages which can pose various security risks see the JavaScript Editable recipe For JavaScript that is to appear in headers or footers of pages the skin template can be modified directly or script statements can be inserted using the HTMLHeaderFmt array How would I create a markup nodiscussion that will set a page variable HideDiscussion which can be used by if enabled HideDiscussion in PageActions Add the following section of code to your config php SDV HideDiscussion 0 define var name Markup hideDiscussion var nodiscussion e setHideDiscussion true function setHideDiscussion val global HideDiscussion HideDiscussion val This will enable the if enabled HideDiscussion markup to be used If you want to print the current value of HideDiscussion for testing purposes on the page you ll also need to add the line FmtPV HideDiscussion GLOBALS HideDiscussion It appears that does not match newlines in these functions making the above example inoperable if the text to be wrappen in em contains new lines If you include the s modifier on the regular expression then the dot will match newlines Thus your regular expression will be STUFF s That s at the very end is what you are looking for If you start getting into multi line regexes you may be forced to look at the m option as well let s anchors and match not begin end of strings but also begin end of lines i e right before after a newline Also make sure your markup is executed during the fulltext phase How can the text returned by my markup function be re processed by the markup engine If the result of your markup contains more markup that should be processed you have two options First is to select a when argument that is processed earlier than the markup in your result For example if your markup may return links your when argument could be links and your markup will be processed before the links markup The second option is to call the PRR function in your markup definition or inside your markup function In this case after your markup is processed PmWiki will restart all markups from the beginning How do I get started writing recipes and creating my own custom markup alternate Introduction to custom markup for Beginners How do I make a rule that runs once at the end of all other rule processing Use this statement instead of the usual Markup call MarkupFrameBase posteval myfooter out onetimerule out CustomWikiStyles FAQ How can I remove underlining from a link but make it underlined blue when the mouse hovers Put in pub css local css noul a text decoration none noul a hover text decoration underline color blue Then use this markup noul Link Internationalizations If my wiki is internationalized by config php how do I revert a specific group to English Use XLLangs array en in the group s group customization file If my wiki is in English and I want just one page or group in Spanish do I say XLPage es PmWikiEs XLPage in the group or page configuration file Yes that is usually the best method If you were doing this with many scattered pages or with several languages you might find it easier to maintain if you load the translations all in config php like this XLPage es PmWikiEs XLPage XLPage fr PmWikiFr XLPage XLPage ru PmWikiRu XLPage XLLangs array en Then in each group or page configuration file you d just use XLLangs array es to set the language to use in this case Spanish Note that though this method is easier to maintain its somewhat slower because it loads all the dictionaries for each page view even if they won t be used What does the first parameter of this function stand for How can it be used The XLPage mechanism allows multiple sets of translations to be loaded and the first parameter is used to distinguish them For example suppose I want to have translations for both normal French and Canadian French Rather than maintain two entirely separate sets of pages I could do XLPage fr ca PmWikiFrCa XLPage XLPage fr PmWikiFr XLPage PmWikiFr XLPage would contain all of the standard French translations while PmWikiFrCA XLPage would only need to contain Canada specific translations i e those that are different from the ones in the French page The first parameter distinguishes the two sets of translations In addition a config php script can use the XLLangs variable to adjust the order of translation so if there was a group or page where I only wanted the standard French translation I can set XLLangs array fr en and PmWiki will use only the fr and en translations in that order no matter how many translations have been loaded with XLPage How can I add a translation for an individual string in a PHP file Use the XLSDV function to provide a translation for a specific English string For instance with this in config php XLSDV nl array my English expression mijn Nederlandse uitdrukking any instance of the variable expression my English expression in wiki mark up will be displayed as my English expression in default English context but as mijn Nederlandse uitdrukking in Dutch nl context i e when XLPage nl has been called for that page in config php or a cookbook recipe If you need to get a translation in a PHP file use the XL function local string XL my English expression But beware XLPage uses XLSDV internally for its translation pairs too and only the first definition is accepted Thus if the Dutch XLPage already contains a translation and you want to override that you need to use your XLSDV nl before calling the correspondent XLPage nl Otherwise by using XLSDV after XLPage e g within a recipe that is included later in config php your translation will only work as long nobody defines my English expression in that XLPage LocalCustomizations There s no config php it s not even clear what a local customisation file is The sample config php file in the docs folder is given as an example Copy it to the local folder and rename it to config php You can then remove the symbols or add other commands shown in the documentation See also Group Customizations Can I change the default page something other than Main HomePage DefaultPage Yes just set the DefaultPage variable to the name of the page you want to be the default You might also look at the DefaultGroup and DefaultName configuration variables DefaultPage ABC StartPage Note the recommendations in DefaultName and the need to set PagePathFmt as well if you are changing the default startup page for groups How do I get the group page name in a local configuration file e g local config php Use the following markup in pmwiki 2 1 beta21 or newer Get the group and page name pagename ResolvePageName pagename page PageVar pagename FullName group PageVar pagename Group name PageVar pagename Name Note the importance of the order of customizations in config php above to avoid caching problems If you need the verbatim group and page name from the request early in config php pagename is guaranteed to be set to Any value of n if it s set or Any value of pagename if it s set or The path info information from REQUEST URI whatever follows SCRIPT NAME or Blank otherwise according to this posting Can I remove items from the wikilib d folder on my site The files named Site and SiteAdmin contain parts of the interface and the configuration and they should not be removed The other files named PmWiki contain the documentation and could be removed How do I customize my own 404 error page for non existent pages To change the text of the message try editing the Site PageNotFound page Is the order of customizations in config php important Are there certain things that should come before or after others in that file Yes see Order of the commands in config php GroupCustomizations How can I apply CSS styles to a particular group or page Simply create a pub css Group css or pub css Group Page css file containing the custom CSS styles for that group or page See also Cookbook LocalCSS Why shouldn t passwords be set in group or page customization files Why shouldn t group or page passwords be set in config php The reason for this advice is that per group customization files are only loaded for the current page So if DefaultPasswords read is set in local GroupA php then someone could use a page in another group to view the contents of pages in GroupA For example Main WikiSandbox could contain include GroupA SomePage and because the GroupA php file wasn t loaded we re looking at Main WikiSandbox local Main php there s no read password set The same is true for page customization files Isn t that processing order strange Why not load per page configuration last that is after global configuration an per group configuration Many times what we want to do is to enable a certain capability for a group of pages but disable it on a specific page as if it was never enabled If the per group config file is processed first then it becomes very difficult tedious for the per page one to undo the effects of the per group page So we load the per page file before the per group If a per page customization wants the per group customizations to be performed first it can use the techniques given above using include once or setting EnablePGCust 0 Skins How do I change the Wiki s default name in the upper left corner of the Main Page Put the following config php WikiTitle My Wiki Site The docs sample config php file has an example of changing the title How can I embed PmWiki pages inside a web page Source them through a PHP page or place them in a frame How do I change the font or background color of the hints block on the Edit Page Add a CSS style to pub css local css quickref background color The hints are provided by the Site EditQuickReference page which is in the PmWiki or Site wikigroup Edit that page and change the bgcolor or specify the font color to get the contrast you need SkinTemplates How do I customize the CSS styling of my PmWiki layout See Skins for how to change the default PmWiki skin See also Skins where you will find pre made templates you can use to customize the appearance of your site You can also create a file called local css in the pub css directory and add CSS selectors there this file gets automatically loaded if it exists Or styles can be added directly into a local customization file by using something like HTMLStylesFmt foo color blue Where can the mentioned translation table be found for adding translated phrases See Internationalizations Is it possible to have the edit form in full page width with no sidebar If the sidebar is marked with PageLeftFmt adding noleft to Site EditForm will hide it when a page is edited Can I easily hide the Home Page title from the homepage Yes you can use in the wiki page either title Some other title to change it or notitle to hide it Is it possible to hide the Search Bar in the default PmWiki Skin Yes please see Cookbook HideSearchBar WebFeeds How do I include text from the page whole page or first X characters in the feed body note markup NOT digested function MarkupExcerpt pagename page RetrieveAuthPage pagename read false return substr page text 0 200 FmtPV MarkupExcerpt MarkupExcerpt pn FeedFmt rss item description MarkupExcerpt Q Does this mean if I want to include the time in the rss title and summary to rss body I call FeedFmt twice like so FeedFmt rss item description LastSummary FeedFmt rss item title Group Title ItemISOTime From mailing list Feb 13 2007 a response by Pm Yes How can I use the RSS enclosure tag for podcasting For podcasting of mp3 files simply attach an mp3 file to the page with the same name as the page i e for a page named Podcast Episode4 one would attach to that page a file named Episode4 mp3 The file is automatically picked up by action rss and used as an enclosure The set of potential enclosures is given by the RSSEnclosureFmt array thus RSSEnclosureFmt array Name mp3 Name wma Name ogg allows podcasting in mp3 wma and ogg formats How to add summary to the title in a rss feed ie with action rss Add this line in you local config php FeedFmt rss item title Group Title LastModifiedSummary How to add description to the title in an rss feed and summary to the body Add these lines to your local config php FeedFmt rss item title Group Title Description FeedFmt rss item description LastModifiedSummary NOTES you need to replicate these lines for each type atom rdf dc of feed you provide the RSS description tag is not equivalent to the pmWiki Description variable despite the confusing similarity Some of my password protected pages aren t appearing in the feed how do I work around this From a similar question on the newsgroup Pm s reply The last time I checked RSS and other syndication protocols didn t really have a well established interface or mechanism for performing access control i e authentication As far as I know this is still the case PmWiki s WebFeeds capability is built on top of pagelists so it could simply be that the EnablePageListProtect option is preventing the updated pages from appearing in the feed You might try setting EnablePageListProtect 0 and see if the password protected pages start appearing in the RSS feed The downside to setting EnablePageListProtect to zero is that anyone doing a search on your site will see the existence of the pages in the locked section They won t be able to read any of them but they ll know they are there You could also set EnablePageListProtect to zero only if action rss if action rss EnablePageListProtect 0 This limits the ability to see the protected pages to RSS feeds normal pagelists and searches wouldn t see them Lastly it s also possible to configure the webfeeds to obtain the authentication information from the url directly as in Site AllRecentChanges action rss authpw secret The big downside to this is that the cleartext password will end up traveling across the net with every RSS request and may end up being recorded in Apache s access logs How to add feed image Add the following to local config php this example is for action rss FeedFmt rss feed image title Logo title title link http example com link url http example com images logo gif url width 120 width height 60 height Do not forget NOT to start with a as there would be no image tag around this See here How do I insert RSS news feeds into PmWiki pages See Cookbook RssFeedDisplay How can I specify default feed options in a configuration file instead of always placing them in the url For example if you want action rss to default to action rss group News order time count 10 try the following in a local customization file if action rss SDVA REQUEST array group News order time count 10 Are there ways to let people easily subscribe to a feed On some browsers Mozilla Firefox the visitor can see an orange RSS icon in the address bar and subscribe to the feed by clicking on it To enable the RSS icon add this to config php HTMLHeaderFmt feedlinks link rel alternate type application rss xml title WikiTitle href ScriptUrl n Site AllRecentChanges amp action rss link rel alternate type application atom xml title WikiTitle href ScriptUrl n Site AllRecentChanges amp action atom You can also add such a link for example in your SideBar Site AllRecentChanges action atom Subscribe to feed Can I create an RSS feed for individual page histories See Cookbook PageFeed How do I create a custom FeedPage similar to RecentChanges or AllRecentChanges but with only certain groups or pages recorded See Cookbook CustomRecentChanges In a nutshell you ll declare a RecentChangesFmt variable with your dedicated FeedPage and then wrap it in a condition of your choice For example if PageVar pagename Group ForbiddenGroup RecentChangesFmt Site MyFeedPage FullName CurrentTime by AuthorLink ChangeSummary How can I update my RSS feed to show every edit for pages on that feed not just new pages added to the feed Add unique guid links for each edit to your to congif php file see PITS entry FeedFmt rss item guid PageUrl guid ItemISOTime Alternatively you can create the option for edit monitoring by adding a qualifier for RSS links This allows the user to choose between default new pages RSS feeds and new edits RSS feeds pmwiki org has this option enabled For new pages updates http example com wiki HomePage action rss For edits updates http example com wiki HomePage action rss edits 1 if REQUEST edits action rss FeedFmt rss item guid PageUrl guid ItemISOTime Troubleshooting My wiki displays warnings Deprecated preg replace The e modifier is deprecated use preg replace callback instead This is caused by a change in PHP version 5 5 for the preg replace function PmWiki no longer relies on the deprecated feature since version 2 2 56 it is recommended to upgrade to the latest version but many recipes do Note that even if the warning points to a line in pmwiki php the problem comes from a local configuration or recipe Recipes and Skins are currently being updated for PHP 5 5 Check if there are more recent versions published by their maintainers on the Cookbook If you update your PmWiki and recipes and still see the warnings here is how to find out which recipes cause them For PmWiki version 2 2 71 or newer in config php enable diagnostic tools EnableDiag 1 Then visit your wiki with the action ruleset for example http www pmwiki org wiki PmWiki PmWiki action ruleset or follow a link like HomePage action ruleset This page will list all markup rules those potentially incompatible with PHP 5 5 will be flagged with filenames line numbers and search patterns triggering the warning If the action ruleset page shows no flagged rules it is possible that either your recipes call the preg replace function directly or they define various search replace patterns in incompatible ways In these cases your warning should display the file name and line number causing problems if not here is how to track it In config php disable all recipes included files from the cookbook directory or a custom skin or any line containing Patterns You can insert at the beginning of a line to disable it Then test the wiki if you have disabled everything the warning message should disappear Next re enable your customizations one after another every time testing the wiki If at some point

    Original URL path: http://uli-alto.net/Wiki/pmwiki.php?n=PmWiki.FAQ (2016-05-01)
    Open archived version from archive