Home of
mail@internetcommons.ca
- comments
- suggestions

join the forum

Download SimpleWiki

initially posted November 24, 2009; updated December 26, 2013

See also the gitub repo.

Download

Download version 1.2 December 26, 2013 (see change log).

Download Simplewiki simplewiki1_2.zip

See the Module page for components, integration, and extension information.

Requirements

  • PHP 5.3x (namespaces)
  • JQuery core (for quicktoc)

Usage

	$wiki = new Muster\SimpleWiki();
	$html = $wiki->get_html($markup);

Licence

BSD

Changelog

Change Notes
Version 1.2, August 26, 2015 (unincremented version)
bugs: changed var assignment logic where object property not available, in parser.php compatible with php 5.9
Version 1.2, December 26, 2013
feature: in addition to block declarations, new tag declarations are now available: inline tags, inline void tags, block void tags this allows accommodation of new html5 tags, and also form tags. See tag declarations on the language page
feature: more block declarations are now available by default this includes html5 and form tags
feature: custom tag names can now include more special characters - [.-:] this is experimental
correction: inline decorators now allow embedded % with use of esc character (~) this allows percents to be used for font-sizes and such
correction: images now call the raw link handler if the http and symlink parsing fail to find a match. Thanks to Michael Clerx this allows customization of image raw link strings, like anchor raw link strings
Version 1.1, January 29, 2013 (un-incremented version)
technical: regex for link and image url selectors no longer truncated at last word character
(now \S+ - was \S+\w)
this now allows url's like http://en.wikipedia.org/wiki/Fire_(classical_element) - was dropping the closing parenthesis
Version 1.1, November 19, 2012 (un-incremented version)
technical: empty decoration attributes are no longer rendered
feature: added col and colgroup as recognized blockdef's
feature: quicktoc menu closes upon selection the quicktoc macro <<quicktoc>> now closes the table of contents upon selection
bugfix: SimpleWiki::prepare() SimpleWiki::prepare() now correctly resets metadata to NULL with each call
Version 1.1, October 22, 2012
feature: php namespaces the class files now use namespaces, resulting in cleaner code and more flexible integration
removed shell classes better for users to manage namespace schemes
removed class name prefixes now dealt with through namespaces
feature: comments (```comment...) can now appear at the end of a line comments used to have to appear at the beginning of a line
correction: the argument for
$simplewiki->parser()->argchars('...')
now requires inclusion of the square brackets for character sets (like '[^()]' to exclude parenthesis - which is the default)
to allow any character for decoration argument values use
$simplewiki->parser()->argchars('(?s:.)')
- meaning allow any character including newline;
the '?s:' (=including newline) is required
cleaned up DocNode::get_display_list() (used for debug) now returns a clone, minus parent and children properties
Version 1.0, February 10, 2012
feature added in-line comment markup: %s comment%text%%
feature default text for mail link is now the address without the mailto: protocol, so [[mailto:person@address.com]] shows up as person@address.com
bugfix now escaping accidental backreference markup when returning preformatted set-aside. Avoids "$20" becoming "0" when backreference not found
RC1.05 (Release Candidate 1.05), July 9, 2011
bugfix emitter code returning unregistered macro source markup was out of date
css fix css for quicktoc was fixed to be right float to provide space for position absolute head
unknown format link decoration when link is unknown, decoration is added to provide visual clue: dash-underlining;appended superscript "?"; also rel="nofollow added. Unknown means not known url format, anchor or symlink, and no registered symlink or rawlink handlers. symlink and rawlink handlers can set $node->unknown = TRUE to get the same effect. example: unknownformat?
corrected mailto processing mailto links had been processed into raw links, now properly processed into external links
$node->linkparts->externalselector corrected the externalselector property had included the connector to the protocol (://), and no longer does
RC1.04 (Release Candidate 1.04), June 22, 2011
bugfix emitter was checking for invalid indexes for class and property callbacks
RC1.03 (Release Candidate 1.03), June 18, 2011
parsing of links defaults to a rawlink anything not recognized as a protocol-based link, an anchor (#) or a Symlink can be dispatched to a callback routine. The callback can interpret the rawlink and set a $node->linkparts->rawlinkaddress property to set a valid html address
addition of a character filter callback capability to allow replacement of default htmlspecialchars(...) filtering This allows introduction of alternate encoding schemes by clients. The call is
$object->customCharFilter($text,$node)
to allow passing of a node for context.
bug fix: parser (preg_replace_callback) initialization parser (preg_replace_callback) callbacks need to initialize returned arrays for missing subgroup name indexes, since the preg engine short-circuits the creation of these named associations
backtick added to symlink names allows symlink selectors to have a trailing version indicator, that can be read and interpreted by registered symlink handler. Useful for image size versions for example: Images:myimage.jpg`thumbnail.
added clone response Simplewiki, when cloned, will now internally clone the parser and emitter. Cloning maintains settings.
RC1.02 (Release Candidate 1.02), March 28, 2011
class and file renaming core classes (and files) now have Muster_ prefix (changed from Native_). This promotes branding, and allows easier integration with other Muster open source software (see mustersoft.net)
RC1.01 (Release Candidate 1.01), March 26, 2011
minor bugfix two text lines separated by newline have space inserted to avoid run-on text
blockdef indentation supports tab-char and space char now either tab char or space char in any combination can be used to match open and close blocktag tags
RC1 (Release Candidate 1), March 24, 2011
allow line-continuation markup (\n``) for metadata line
80% faster
automatically wrap link markup [[ ... ]] around free-standing http, https, mailto url's allows removal of contraints from // (no leading ":" else a trailing space)
removed markup constraints for // but uncommon url protocols must escape forward slashes (to differentiate from emphasis markup)
improved escape (~) handling
added technical documentation
extensive internal renaming and code maintenance
allow $wiki->get_html($markup)
{{##marker ...##}} markup, for non-visible section marking, stripped at runtime Client can retrieve list of markers with names and offsets
markup support for dlml (dynamic layout markup language) (:dlwidget:), (:dlsettings:), (:dlmodule:)
added register_blockdef_handler($handler) client-supplied handler is passed all currently emitting blockdef nodes (known and unknown, in turn) for manipulation. This allows arbitrary blockdef additions and manipulation.
added register_property_callouts analagous to register_class_callouts, but since properties contain values, this is analagous to calling a method with arguments. The called property method can have a JSON string structure as an argument.
definition list
:term::definition, then
::term:definition etc.
(embedded term terminator "::" is optional - leaves only definition when left out)
consistent with other list definitions. Can be accompanied by definition list decorators
|:dl ... :||:dt ... :||:dd ... :|: ...
JSON support by preserving single quote vs double quote delimiter for attributes The delimiter used in markup will be the one used in emitting. This allows valid JSON strings like '{"first":"firstvalue","second":"secondvalue"}'
version 1 beta 3, January 6, 2011
divided source into separate file for each class
added shell classes Allows easy custom insertion of class extension. See Module - Extension
version 1 beta 2, January 2010
|:h toc=no:| - suppress inclusion of heading in quicktoc
added %s mono% for monospace as class span.mono in SimpleWiki.css
changed to overflow:auto from overflow-y:scroll in SimpleWiki.css div#quicktoc-body
version 1 beta 1, November 24, 2009
Initial release
digital ocean version