Sparse - What's New
- A new sqltoolbox
tag which allows you to have a pseudo-template with controls
(navigation, searching, sorting etc.) affecting another template - even
in different frames or windows! The toolbox will update
itself dynamically via Ajax at the same time as it updates the data.
- You can now click on the Ajax throbber to stop the request. This
is pretty much exactly the same as clicking the Stop button on a
regular browser. Still haven't figured out a way to get it to work
normally in Internet Explorer 6.0 though.
- Sparse should now correctly work with auto-increment values and calendar types when adding rows.
- Many important bugfixes - update immediately!
- A major upgrade to Sparse has been completed: the generated HTML
forms now come complete with degradable
Ajax functionality! That means that a properly equipped user
will get all the benefits of Ajax,
but if it isn't available, the form will still work normally. You can
create impressive Ajax applications without writing a single line of
better, if you do integrate your page with PHP, the results will be
returned via Ajax as well. More
information is available on the new Ajax
- Moved around a bit of the documentation; there's now a Configuring Sparse page (which incorporates
the previous Caching and Warnings page), a Linking
to Templates page, and the PHP
Reference page has been renamed Advanced
- Several bugfixes, as usual.
- Added a warning log. This should give you a warning if an
attribute isn't correct (e.g. a required value isn't given, the value
isn't one of the predefined values, or a name attribute references an
invalid field). The Caching documentation page has been expanded to Caching and Warnings.
- Added the csv and csv-all
sqlaction tags. This allows the user to
save either the current page or the entire dataset as a CSV file.
- A new sqlgoto
tag. This prints out a form allowing the user to directly view specific
result rows (with limits; the rows must divide into the "limit" the
user is setting).
- Several bugfixes.
- There are some changes in this version which are not compatible with previous
versions, so please read carefully. Upgrading isn't hard. 8-)
- The sqlsort
tag has been added, and there's a new Sorting
page in the documentation.
- Added the sqlresults
tag, which allows you to print e.g. "Showing X to Y of Z total
- Quick templates no longer use sqltemplate. Instead, sqlquick
is the new tag. This eliminates some confusion that might have arisen
by all the new attributes I added in (such as telling Sparse where to
put sorting, searching, or navigation forms, and whether or not to
print row errors).
- Introduced the new "tag referencing" system, which allows you to
assign attributes to tags by referencing previous tags, or assign
default values to any tag type. You can use this to e.g. include files
which set the database for any template in your application, or to
instantly create an add template that looks
identical to an edit template you already
have. See Tag Referencing for more info.
- Because of this, the enumset
src attribute no longer exists. Instead, use the
- Sparse now uses sessions, which should cut down slightly on
execution time and size of the generated page, streamlines the code,
and also fixes a minor
error. No sensitive data is sent through the sessions (just
navigational info) so you don't have to worry about security.
- Added the sqlaction reset type.
- You can now use "default" enumsets: if there is an enumset
defined with the name of your sqlfield, that
enumset will automatically be used. This allows you to use enumsets
with "quick templates".
- Sparse can now deal with tables that have no primary keys defined.
- Added anchors to the tag reference for ease of navigation to the
- Changed internal workings to remove XML parsing functions. This
has several implications:
- Sparse now has no external dependencies at all!
- Sparse will no longer care if your HTML fragment is "proper
HTML". This allows you to e.g. print out a single regular HTML tag
using a Sparse
tag, and to not have to enclose your template in another
tag like span. Also, Sparse no longer cares
if most of the tags are self-closing,
i.e. you can use
<sqlnavigation> rather than
The only one that still matters is sqltemplate.
- The error tags can now include < and > inside them and we
don't have to replace [ and ].
- You can now embed Sparse tags inside other tags or attributes,
e.g. to print part of a link. See this
- A few minor, rare circumstances may now confuse Sparse, so see
the new Sparse is acting weird
question in the FAQ.
- This probably needs some more testing, so let me know if
anything goes wrong!
- Added full search capability! sqlfield
now has an isSearch attribute, sqlaction has a new search
type, and there's a new sqlsearch tag for quick usage. Take a look at the
new Searching section in our
- Added the sqlnavigation tag. You can
now print a complete set of page links to navigate amongst your data,
and fine-tune which links appear.
- Added the query attribute to enumsets; you can now populate them on the fly from
- PHP code can now be executed whenever and wherever you like, and
includes the ability to conditionally execute code (see PHP Reference).
- Changed one rather silly aspect of the code which should add a
lot of speed and reduce memory usage.
- Added a new sqlfield calendar type and the calType
- Added image attribute for sqlaction tag.
- Quick templates will now display all fields if no fields attribute is given.
- Cleaned up code, removed some duplicate code.
- Several bugfixes, including ensuring that filled-in data remains
filled in even if an error occurs.