Perfect World Perfect World Perfect World
Perfect World Perfect World Perfect World
Perfect World Perfect World Perfect World
Perfect World Perfect World
Perfect World Perfect World

  • Malaysian Version Only!

    Please to do not mix the two information up for International and Maylasian! Thank you for your help. Thousands of visitors to this site appreciate all your kindness.
  • PmWiki /

    This page attempts to answer the more common questions you might have. Many of the answers refer you to other pages for details.

    • To ask a question use the questions page
    • For frequently requested features, see the PITS pages.

    Questions

    How do I get my question answered?

    The quickest and best way is to join the pmwiki-users mailing list and post your question there. If it really is a frequently-asked question, it will eventually be added to this page.

    An alternative way is to leave your question on the Questions page.

    Getting help

    Where can I get help with PmWiki? (This is a pretty vague question!)

    See this FAQ, Troubleshooting, or try a Search.

    Error messages

    What does warning message or error message "xxxxx" mean?

    Error/warning questions and answers are on the Troubleshooting page.

    Basic Editing

    I'm new to PmWiki, where can I find some basic help for getting started?

    This Basic Editing page is a good start. From there, you can just follow the navigational links at the bottom of the page (they are called WikiTrails) to the next pages, or to the Documentation Index page, which provides an outline style index of essential documentation pages, organized from basic to advanced.

    How do I include special characters on my wiki pages?

    Use character codes to insert special characters, such as Copyright (©) and Trademark (® or ™) symbols, that don't appear on your keyboard.

    Tables

    How do I create nice tables similar to Product X?

    See tables and table directives.

    Table Directives

    Can I define table headers using the table directive markup?

    No, but you can with Cookbook:AdvancedTableDirectives. See Pm's reply to pending PITS:00535

    PageDirectives

    Can I get (:redirect:) to return a "moved permanently" (HTTP 301) status code?

    Use (:redirect PageName status=301:).

    Is there any way to prevent the "redirected from" message from showing at the top of the target page when I use (:redirect:)?

    If you want to suppress the message...

    • in all cases, add add $PageRedirectFmt = ''; in your local/config.php
    • based on the destination/target of the redirect, add $PageRedirectFmt = ''; to a local/group.page.php or local/group.php file (see PmWiki.PerGroupCustomizations).
    • based on the origin/source of the redirect, add the following to your local/config.php
       if (@$_GET['from']) {
         $group = PageVar($_GET['from'], '$Group');
         if ($group == 'SomeGroup') $PageRedirectFmt = '';
       }
    
    Example application: Replace 'SomeGroup' with 'Profiles'

    IncludeOtherPages

    What's the maximum number of includes that can exist in a page? My site seems to stop including after 48 includes.

    By default, PmWiki places a limit of 50 include directives for any given page, to prevent runaway infinite loops and other situations that might eat up server resources. The limit can be modified by the wiki administrator via the $MaxIncludes variable.

    GroupHeaders

    How do I set one header for all pages/groups?

    The header for each page is controlled by the $GroupHeaderFmt variable. Thus a site-wide groupheader can be added with

    $GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader:)(:nl:)' . $GroupHeaderFmt;
    

    (note that single quotes must be used so that $Group (which is part of the default contents of $GroupHeaderFmt) will be substituted properly by PmWiki, and that this applies to all variables ending in $...Fmt)

    See also the Cookbook:AllGroupHeader page.

    Any form of markup is valid in $GroupHeaderFmt, thus one can do

    $GroupHeaderFmt .= "Global markup text here.";

    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 to people with edit permission?

    In the local/config.php file, set

    $HandleAuth['diff'] = 'edit';

    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'] = crypt('edit_password');
    

    For more information about the password options that are available only to administrators, see PasswordsAdmin.

    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?

    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.

    PageLists

    How can I configure my site to always exclude wiki-related pages from searches?

    Try the following in your local/config.php file. See also Cookbook:SearchPatterns.

    ## Exclude Certain pages / groups from search results.
    $SearchPatterns['default'][] = '!\\.(All)?Recent(Changes|Uploads|Comments)$!';
    $SearchPatterns['default'][] = '!\\.Group(Print)?(Header|Footer|Attributes)$!';
    $SearchPatterns['default'][] = '!\\.(Left|Right|Side)(Bar|Menu|Note)$!';
    $SearchPatterns['default'][] = '!^Site\\.!';
    $SearchPatterns['default'][] = '!^PmWiki\\.!';
    

    If you add $SearchPatterns['default']... to exclude groups and pages from pagelist and search output, you can include the omitted pages by using "list=all" in the pagelist or search parameters.

    PmWiki Installation

    How do I make pmwiki.php the default page for a website? Should I rename pmwiki.php to index.php?

    Renaming pmwiki.php is not recommended. Instead, create an index.php file that contains the single line:

    <?php include_once('pmwiki.php');

    You may also want to check Cookbook:CleanUrls.

    Why does pmwiki.org appear to have a directory structure rather than "?n=pagename" in urls?

    Pmwiki.org uses a variant of Cookbook:CleanUrls.

    Is it possible to move wiki.d to /tmp/persistent/wiki.d (a new sourceforge rule)?

    Sourceforge suggests moving everything to /tmp/persistent/new-folder-of-your-choice and creating a symbolic link to the new folder on /tmp . It works -- see Cookbook:SourceForgeServers.

    How can I run PmWiki on a standalone (offline, portable) machine ?

    See Cookbook:Standalone.

    AuthUser

    Can I specify authorization group memberships from with local/config.php?

    You can as of version 2.1.14 -- simply put the group definition into the $AuthUser array:

            $AuthUser['@editors'] = array('alice', 'carol', 'bob');
    

    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.

    WebFeeds

    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 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://www.example.com/</link>
     <url>http://www.example.com/images/logo.gif</url>
     <width>120</width>
     <height>60</height>";
    

    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));
    

    DesignNotes

    Why doesn't PmWiki use hierarchical / nested groups?

    It essentially comes down to figuring out how to handle page links between nested groups; if someone can figure out an obvious, intuitive way for authors to do that, then nested groups become plausible. See DesignNotes and PmWiki:HierarchicalGroups.

    Why don't PmWiki's scripts have a closing ?> tag?

    All of PmWiki's scripts now omit the closing ?> tag. The tag is not required, and it avoids problems with unnoticed spaces or blank lines at the end of the file. Also, some file transfer protocols may change the newline character(s) in the file, which can also cause problems. See also the [Link requires approval](approve) page in the [Link requires approval](approve).

    Does PmWiki support WYSIWYG editing (or something like the FCKEditor)?

    Short answer: PmWiki provides GUI buttons in a toolbar for common markups, but otherwise does not have WYSIWYG editing. For the reasons why, see PmWiki:WYSIWYG.

    Security

    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.

    SkinTemplates

    How do I customize the CSS styling of my PmWiki layout?

    See Skins for how to change the default PmWiki skin. See also Cookbook: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.

    Images

    How do I insert pictures on wiki pages?

    See Images.

    Spam

    I'm getting a lot of spam on my wiki site. How can I password protect the pages?

    See Security, UrlApprovals, and the Cookbook:Blocklist2 recipe.

    Summary pages

    Why are 'RecentChanges' pages editable?

    You might want to edit these pages if a spammer creates a page with an unsavory name. To prevent others from editing these pages, insert the following lines into your local/config.php file. Editing then requires the admin password.

    ## Require admin password to edit RecentChanges (etc.) pages.
    if ($action=='edit'
        && preg_match('/\\.(All)?RecentChanges$/', $pagename))
      { $DefaultPasswords['edit'] = '*'; }
    

    How do I generate RSS feeds from PmWiki?

    See Web Feeds.

    Disable formatting

    How do I put plain text into a wiki page and disable wiki formatting?

    You can use the [@TEXT GOES HERE@] markup as explained in the section Escape Sequence TextFormattingRules. Note that this preserves any text file formatting such as newlines and spaces.

    Read-access to pages in the Site wikigroup

    What pages in the Site wikigroup need to be unrestricted for reading by any user of the wiki?

    The following pages probably need to be accessible (see Site.Site):

    Site.EditForm
    Site.EditQuickReference
    Site.PageActions
    Site.PageListTemplates
    Site.Search
    Site.SideBar
    Site.UploadQuickReference
    The names of other pages will vary from skin to skin, but you will also want to enable reading of the pages that make up the banner and footer areas of the site.

    Category: Questions

    Edit - History - Print - Recent Changes - Upload - Search - All Recent Changes
    Page last modified on November 30, 2007, at 08:27 PM
  • Made An Update?

    Thanks for the help. If you updated, and want us to know about it please post your update here at the forums. You do not have to register. Guests may post in that particular forum. Again thanks for your help.
  • Join The Forum
  • Join The Forum!!! We got some awesome contests going on right now. Win some big prizes. 100% free! All you need to do is just register!