MiniSkel - Flexible content-template parser
Based on SPIP Skeletons, see http://www.spip.net/
Developed by BohwaZ - http://bohwaz.net/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
ABOUT MINISKEL
--------------
It's a flexible content-template parser.
content-template:
templates which ask the content, in opposition to templates which just display it
(like in template lite, smarty, PHPTAL, etc.) we call these templates skeletons.
parser:
it parses the templates, and it does only that, it will not process them or interface
with your database, it's just a parser, it's a good help for your application, but not
an application itself
flexible:
it's a complete object-oriented php5 class, you'll have to extend it to suit your needs
it's extremely easy and fast to extend it with methods to find the content asked by
the templates
It's based on the syntax of SPIP skeletons. See http//www.spip.net/
Look at the examples directory to see how it's simple to use this object.
You can look at the doc directory to read a complete documentation.
KNOWN LIMITATIONS/BUGS (in comparison with SPIP)
----------------------
Things too specific for SPIP will not be compared here, because it's a waste of time.
To be done in near future :
* Counters (#TOTAL_BOUCLE, #COMPTEUR_BOUCLE)
* Un-ambigous tags (like #_loopName:TAG, new in SPIP 1.8)
* limit by divided (like {1/2} will show only the first half of results)
* include of other templates ( tag, http://www.spip.net/fr_article1828.html )
Unknown support (have to test) :
* Nested tags ([ [(#SURTITRE)
](#SOUSTITRE)], new in SPIP 1.8)
* Loops-in-loops (...)
* tags in criterias (like {id_article=#ID_ARTICLE}, maybe it will work ?)
Unsupported :
* Tags parameters (like #ENV{lang,fr} from SPIP 1.8.2, is it useful ?)
* n-limit (like {0,n-10} or {n-10,10}, what this thing actually does ??)
* tags in modifiers parameters (like [(#TOTAL_BOUCLE|=={#COMPTEUR_BOUCLE}|?{'Fin.',''})])
* tags modifiers in tags modifiers parameters (like [(#DESCRIPTIF|sinon{[(#CHAPO|sinon{#TEXTE}|couper{300})]})])
* Recursive loops (like )
* i18n support (like <:download:>, see http://www.spip.net/fr_article2128.html )
Will not be supported :
* Comments (#REM, but it seems a crappy solution to provide comments)
* #ENV tag (access to HTTP_ENV, seems useless, you can use assign and a custom modifier instead)
* {par num} criteria (used to order results by number in a string (like 1. article title, 2. etc.)
could be implemented in your own object extending miniSkel
* Order by many criterias (like {by title,date,name}), useless, you can use multiple {by} criterias:
{by title}{by date}{by name}
* Negation in order criteria (like {!by name} equals to {by name}{reversed}), as it's already done
by {reversed} criteria
* #HTTP_HEADER (modifies the page HTTP headers)
* conditional modifier [(#TEXTE|?{if-yes, if-no})] (equals !empty($texte) ? if-yes : if-no)
Could be done by yourself with a custom modifier
* comparison modifiers [(#NB_THINGS|>{10})]
could be done by yourself with custom modifiers
* {pagination} criteria and #PAGINATION tag (you can add this yourself)
* Models: http://www.spip.net/en_article3512.html
Because you have to do this yourself, while parsing the text, not the template