ChangeSummary

Version: obsolete

Question

How can I add a field to the edit form to allow authors to enter a "summary" of the changes made, and have this summary appear in RecentChanges and page history?

Answer

The Attach:changesum.php script modifies the edit form to provide a text box for entering a one-line summary of edit changes, and to have this summary line appear in the RecentChanges and page history displays.

To use this script, simply copy it into your cookbook/ subdirectory and then add the following line to your configuration file:

    include_once('cookbook/changesum.php');

Version

Changesum.php is actually Version 2.2

Bugs

How do you get the summary to show up when using PmWiki/MailPosts -- and right now it doesn't seem to work on RecentChanges or Main.AllRecentChanges pages -- only in the page history. I would also like to require the summary as yet another layer between wiki and spambots. -- Crisses

Hmm, it's working on my RecentChanges (see the summary line on this post). To require the summary for a post, you can do something like:
        if (!$ChangeSummary) {
          unset($_POST['post']);
          $EditMessageFmt .= "<h3>Change summary is required</h3>";
        }

Changed the "@$_POST" to "$_POST, works for me opitzs

  • And where would I have to put this? Into my local config.php? Or do I have to change the changesum script? Why I ask is, that it doesn't look like made for the config.php, as it is more like an script, to be used in the event of a post, but not elsewhere. Thank you for this script anyway, I like it!
    Yes, the above would go into the local/config.php file. --Pm
    • It worked for me, once I got rid of the "@" sign. Thanks!
  • What do I have to do, to put the summary into the RSS stream, too?
    opitzs
    Hmm, I'll have to look that one up. --Pm
  • I'm having trouble with this, pmwiki shows the error when loading the edit page. Even before I've pressed the post button. What should I do?

We've done this at http://apfelwiki.de. We made some change to the local rss.php. We have documentated them in our own "coolbook" http://apfelwiki.de/wiki/CookBook/RSSFeedAnpassungen. --kt007 February 02, 2005, at 02:10 AM

Contributors

  • Pm, original script (10-May-2004)
  • kt007, modifications for pmwiki2 (6-Nov-2004)
  • JavaJunky
  • Pm, updated to work with 2.0.beta16 graphical edit buttons

Sandbox for changes and experiments

Testing the changesummary script, adding the 'csum:$Now' attribute. test

Categories: GUI

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_REFERER] => http://www.pmwiki.org/wiki/Archive/ChangeSummary
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Archive%2fChangeSummary
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Archive%2fChangeSummary
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Archive/ChangeSummary
            [REDIRECT_SCRIPT_URL] => /wiki/Archive/ChangeSummary
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afKL65ALw2rT9WobaMcrqwAAAQw
            [REDIRECT_URL] => /wiki/Archive/ChangeSummary
            [REMOTE_ADDR] => 216.73.216.31
            [REMOTE_PORT] => 1236
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Archive/ChangeSummary
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Archive/ChangeSummary
            [SCRIPT_URL] => /wiki/Archive/ChangeSummary
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afKL65ALw2rT9WobaMcrqwAAAQw
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777503211.9968
            [REQUEST_TIME] => 1777503211
            [argv] => Array
                (
                    [0] => n=Archive%2fChangeSummary
                )

            [argc] => 1
        )

)