Gruta Release Notes
===================

2.3.3 "Firenze"
---------------

 - New features:
   - The `date' templates now include the `%C_LOCALE' command,
     that switches temporarily to C locale before parsing
     the date.
   - New object initialization argument `show_story_pub_date', to
     show the publication date besides the title of a future
     story in a special URI.
   - New social network links as buttons.
   - `cfg_main_menu_topics' now also accepts topic/story pairs.

 - New bin/gruta commands:
   - `copy_story', to copy a story from one topic to another
     (like the web interface option).
   - `delete_story', to do the obvious.

2.3.2 "Arezzo"
--------------

 - New features:
   - A new image search engine (by file name) for admins.
   - Added support for Gravatars in user comments.
   - Unless forced, language is selected from the HTTP header.
   - A new checkbox to show the full story in indexes (so that
     the abstract and the body are the same, no need to add the
     magic separator mark at the end).
   - A new pseudo-url `thumb://', to be used like the `img://'
     one, that inserts a thumbnail of the image with a link to
     the real image.
   - The `RSS_COMMENTS' template now accepts optional `topic'
     and `id' arguments to return comments only from a story.
   - New Gruta::CGI argument `cache_control_max_age' (default 300).
   - If a story is set to year 9999, it's assumed to be disabled
     forever and fails with a `410 Gone' HTTP error.
   - All internal redirections are done with an HTTP status of
     `301 Moved Permanently' instead of `302 Found'.
 - New configurable options:
   - The maximum number of days a non-approved comment is hold
     before being purged.
   - A default value for the 'show full story in indexes' story
     configuration item.
 - New bin/gruta commands:
   - `rename_tag', to rename or remove a tag.
 - Bug fixes:
   - Fixed a crash in RSS and TOPIC when a subscriber-only
     story was defined.
   - Fixed comment expiration (comments didn't really expire).
 - Dropped features:
   - Artemus4 support.

Please take also note that, if you use static links, the following
`mod_rewrite' redirections has to be changed from

 RewriteRule ^/(.+)/([0-9]+)\.html$ /?t=TOPIC&topic=$1&offset=$2 [PT,L]

to

 RewriteRule ^/(.+)/~([0-9]+)\.html$ /?t=TOPIC&topic=$1&offset=$2 [PT,L]

2.3.1 "Sienna"
--------------

 * New interface to edit the configuration, instead of editing
   the `cfg_' templates one by one.
 * Reworked template structure and CSS.
 * If a story named `index' in the `info' topic exists, it's used
   to substitute the main body of the `INDEX' page.
 * Fixed a crash in `LIST' when connected.
 * Fixed story format in `EDIT_STORY'.
 * Added support for blogspam.net and Akismet comment SPAM detectors.
 * If `cfg_top_ten_num' is 0, each story's `hits' counter is not
   updated (similar to the initialisation variable `dummy_touch' in
   previous versions, that it's still available).

2.3.0 "Lucca"
-------------

 * Stories can now include comments from visitors. Comments
   are disabled by default (it can be enabled by setting
   `cfg_disable_comments' in the `config' template to 0) and can also
   be enabled or disabled on a per story basis. Comments are never
   automatically published: they require approval one by one, unless
   it's posted by an identified user that also has section editor
   capabilities.
 * Support for the new 5.x version of Artemus has been added.
   This version is now the recommended one and upgrading of
   existing installations to it is encouraged, as new features
   are only implemented on 5.x (as, for example, the new
   "comments from visitors" feature).
 * If a story pseudo-url points to a non-existent story, it shows
   a link to create it (ala Wikis).
 * Date formatting is done using strftime(), so its full
   set of percent-prefixed commands is available.
 * A new field in stories allow a Table of Contents to be
   created for each story.
 * A new template `status' has been added to set the HTTP
   status.
 * A security bug that allowed to bypass a story's publication
   date by using the STORY_PRINTABLE template has been fixed.
 * Improved cookie parsing.
 * The `gruta_mksite' helper scripts has been renamed to
   `gruta-mksite' and it's also installed in /usr/local/bin.
 * Many new commands to the `gruta' command line tool.
 * All image pseudo-urls include the image's width and height
   in the `img' tag if the `Image::Size' Perl module is detected
   and installed.
 * A timeout watchdog now exists to avoid the CGI hanging for too
   much with a default of 20 seconds. It can be changed in the
   creation of the Gruta::CGI object by setting the `query_timeout'
   argument.

2.2.1 "Montecatini"
-------------------

 * Templates are now stored inside source backends instead of
   having a special directory of plain files. So, it's no
   longer necessary to prepend the writable directory to
   the template path in Gruta::Template::Artemus creation.
 * The TT template toolkit has been officially deprecated.
 * New global CGI variable `set_date', to force a date to
   be assumed as today, to be used to take a look at how would
   a page be shown in the given date. Only usable by a logged-in
   admin user.
 * A new script `gruta_mksite', to help in the creation of a
   new site.
 * A new command, `set_story_date', has been added to bin/gruta.
 * The full set of `mod_rewrite' keywords to be used if `static_urls' 
   is set has been expanded.

 RewriteRule ^/([0-9]+)\.html$		/?t=INDEX&offset=$1		[PT,L]
 RewriteRule ^/([0-9]+)-([0-9]+)\.html$	/?t=SEARCH_BY_DATE&from=$1&to=$2 [PT,L]
 RewriteRule ^/tag/(.+)\.html$		/?t=SEARCH_BY_TAG&tag=$1	[PT,L]
 RewriteRule ^/tag/$			/?t=TAGS			[PT,L]
 RewriteRule ^/top/$			/?t=TOP_TEN			[PT,L]
 RewriteRule ^/(.+)/$			/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/index\.html$		/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/([0-9]+)\.html$	/?t=TOPIC&topic=$1&offset=$2	[PT,L]
 RewriteRule ^/(.+)/(.+)\.html$		/?t=STORY&topic=$1&id=$2	[PT,L]
 RewriteRule ^/rss\.xml$			/?t=RSS				[PT,L]
 RewriteRule ^/sitemap\.xml$		/?t=SITEMAP			[PT,L]
 RewriteRule ^/style\.css$		/?t=CSS				[PT,L]


2.2.0 "Osmannoro"
-----------------

Please note that version 4.1.2 of the Artemus template toolkit
is required for this release to work properly.

 * Story rendering is cached, resulting in faster page loading.
 * An existing story can be copied to another topic from the story
   edition form.
 * The template `stories_by_date' has changed the order of their
   output values; now they are topic_id, id and date.
 * The RSS template now accepts an optional CGI argument `tag', to
   get feeds on stories by tag.
 * Multiple sources are no longer supported; it never really worked
   well, made the code cumbersome and had no real advantage after
   all. The cgi caller needs not to be changed, as the `sources'
   argument is still supported (only the first one is used, though),
   but the scalar `source' is preferred now.
 * The file format in the FS source has changed; the `.META' extension
   has been changed to `.M', and `.TAGS' to `.T'. Also, new files
   appear in the `stories' directory with the `.A' and `.B' extensions,
   holding the rendered abstract and story body, respectively. The
   transition is made automatically on the first run, no manual
   operation is needed.
 * New argument `hard_top_ten_limit' to Gruta::Source::FS, to set
   the maximum number of stories to be tested when generating the top
   read stories index (previously hardcoded to 100).
 * New argument `min_size_for_gzip' to Gruta::CGI, to set the minimum
   size for the output body to be Gzip compressed (previously hardcoded
   to 10000).
 * If a story pointed by a story:// pseudo-url has a publication date
   in the future, only the title is shown (i.e., it's not clickable).
 * The Mbox source is officially deprecated.
 * Static URLs are also generated for the `CSS', `RSS' and `SITEMAP'
   pages. The following `mod_rewrite' rule must be added to the ones
   suggested in the previous version:

 RewriteRule ^/style\.css$     /?t=CSS              [PT]

2.1.1 "Calenzano"
-----------------

 * Fixed a last time bug in the DBI schema generation.

2.1.0
-----

 * On-the-fly Gzip compression (if browser accepts it).
 * New special uris; `abstract', to paste a story's abstract, and `body',
   to paste the full body of another one.
 * A new renderer, Text, for plain text content.
 * New Artemus variables to set HTML metadata; `html_title',
   `html_description' and `html_keywords'.
 * A new supertemplate called CSS, that returns the Cascading Style
   Sheet instead of having it embedded in all output.
 * A new supertemplate called SITEMAP (to be aliased to /sitemap.xml).
 * If a story called `index' is present in a topic, the 'TOPIC' template
   shows its body instead of the list of stories in it.
 * Several new commands in the `gruta' command line tool; _new_story_ (to
   create a new story from STDIN), _import_rss_ (to import an RSS file
   into a topic), _update_story_ (to update a story from STDIN).
 * Topics and stories now have a new field, `description', that is used
   in the HTML description meta tag in `TOPIC' or `STORY'.
 * Internal server errors set the HTTP status to 500.
 * Some old function templates have been deleted and moved to Artemus.
 * Many templates have been simplified with new Artemus keywords.
 * The DBI driver is less verbose on errors.
 * Those templates more prone to be changed when configuring a new
   site have been renamed to have a prefix of 'cfg_'.
 * Added POD documentation to some templates.
 * Date formatting functions now accept `%w' to print the week day
   as a number.
 * New global argument `dummy_touch' to avoid updating the `hits' count
   of each story.
 * Several fixes to the Mbox driver.
 * Don't generate empty 'about' and 'legal' links in 'meta_menu' if
   they don't exist.
 * Confirmation is requested when deleting a story.
 * New global argument `static_urls', that forces some urls (mainly
   links to topics and stories) to use a simplified, static-like look.
   You *need* to have the following Apache's mod_rewrite keywords
   for these urls to be re-converted to usable ones:

 RewriteEngine On
 RewriteRule /(img|download)/.* - [L]
 RewriteRule ^/(.+)/index\.html$ /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/(.+)/(.+)\.html$  /?t=STORY&topic=$1&id=$2 [PT]
 RewriteRule ^/(.+)/$            /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/rss\.xml$         /?t=RSS                  [PT]
 RewriteRule ^/sitemap\.xml$     /?t=SITEMAP              [PT]
