summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
Commit message (Collapse)AuthorAge
* further updates to config_cascade patchChris Smith2009-01-22
| | | | | | | | | | - add mediameta and license config files into the cascade - update the cache validity code in cache.php, css.php & js.php to use config_cascade - redo inclusion of main config files to avoid suppression of errors in config files - add getConfigFiles($type) function - minor updates elsewhere to use config_cascade rather than hardcoded config file names darcs-hash:20090122114457-f07c6-98ad5627fd5df93edf8dd03289b9cf6d81962afe.gz
* removed some illogical path setupsAndreas Gohr2008-12-13
| | | | darcs-hash:20081213090400-7ad00-4e21cd75978bb07513f32f5d750658e8d777c59e.gz
* FS#630: allow $conf['useheading'] to individually apply to content links ↵Chris Smith2008-11-19
| | | | | | | | | | | | | | | | and/or navigation links $conf['useheading'] values are now: - 0 : off, use page name in link text - 'content' : use first heading text for links in wiki page content - 'navigation' : use first heading text for links in non-page content, e.g. breadcrumps, backlinks, search results, etc. - 1 : use first heading text in all links (for backwards compatibility, any other values are mapped to 0 or 1 by empty() function.) $conf['useheading'] value should now be checked using the useHeading($linktype) function, where linktype can be "content" or "navigation" darcs-hash:20081119140758-f07c6-6e26456d50dcecc949fada31b0d4e72877fde1cc.gz
* Explicite TypeCast for searchIndexgweissbach2008-08-04
| | | | | | | | | | | Running the /bin/indexer.php or the searchindex plugin fails in php5 with several type cast errors. This can be fixed using explicite type casts. Secondly the include plugin requires the auth.php to be present. As some other plugins might use quick-acl or the $auth too, indexer.php should require the auth.php just as the lib/exe/indexer.php does. darcs-hash:20080804112444-f4337-e12f25329236689b05e31f0db2119e47660a9404.gz
* add third parameter to plugin_load(), $new, to allow return of a new plugin ↵Chris Smith2008-08-13
| | | | | | object instance darcs-hash:20080813125929-f07c6-4f20e147334ebc5be006ec9f260331950ac2e4cb.gz
* fixed typo :-/Andreas Gohr2008-05-02
| | | | darcs-hash:20080502132023-7ad00-5c2e017926ac7966c940f214e3c31fbf7c54dcea.gz
* correctly expire the cache for geshi highlighted stringsAndreas Gohr2008-05-02
| | | | darcs-hash:20080502130234-7ad00-ddd191945f838db2cbdd6f6a0fda2a6e034a2205.gz
* call io_readWikiPage() instead of io_readfile() on page loadGalaxyMaster2008-04-17
| | | | | | | | | A patch to call IO_READ_WIKIPAGE properly. Without this patch any plugin which wants to intercept IO_READ_WIKIPAGE will catch almost nothing. darcs-hash:20080417205233-ae67a-6a82f5c7e84e3b669bab5ecf062abbaad4406d4d.gz
* Fix for FS#1350Chris Smith2008-03-29
| | | | | | | | | | | | | Inline modes, <php> and <html>, when their associated config setting is off, will generate highlighted text wrapped in a <code> element. There is a slight change in behaviour for p_xhtml_cached_geshi(), it will now strip leading and trailing blank lines from the input code string. Also fixes an issue where global $conf wasn't declared, preventing the ['target']['extern'] setting being passed to GeSHi darcs-hash:20080329194443-f07c6-00db3d502b07a6ff0c7f6e5c74a3691438504bcb.gz
* purge non-persistent meta data on page deletionMichael Klier2008-03-26
| | | | | | | | With this patch applied the persistent meta data of pages is kept when a page is deleted. This way the original page creator as well as the creation time of the page is preserved. darcs-hash:20080326200231-23886-ddb70151fadf25d0254d56408b71484047198096.gz
* Add support for plugin renderers to replace standard renderersChris Smith2008-03-12
| | | | | | | | | | | | | | | | | | | This patch is the fourth in a series aimed at making it easier for DW to allow plugins to modify the standard handling of line-breaks. It adds: - new config setting 'renderer_xhtml', default value 'xhtml' - new renderer method 'reset()' which is used by reusable renderers when used to render second and subsequent data. (*) An extra step has been added to the renderer selection process. - check $conf["renderer_$mode] for renderer name. If it doesn't exist use $mode as the renderer name. (*) It maybe that the 'document_start()' method can be used for this. However the current xhtml does not correctly reset itself for reuse. darcs-hash:20080312005647-f07c6-ff2cb960c05927f5c6f3e916a364fcad470c2ce3.gz
* Fix for FS#1334, see also FS#1090Chris Smith2008-02-23
| | | | | | | | | FS#1090 ensured DW would never rebuild instructions in the same run by forcing subsequent instruction requests to use the version cached on the first request. That introduced problems when the caching of the instructions failed (FS#1334). This patch allows subsequent rebuilds when cache storage failed. darcs-hash:20080223025539-d26fc-26202a049a6969816553d950a2bb8f71a02ae76e.gz
* make sure $ID is set correct when rendering metadataAndreas Gohr2008-02-08
| | | | darcs-hash:20080208212733-7ad00-b111663f6397e220beac70b9f54bdffd0d8c2760.gz
* header support for renderer pluginsAndreas Gohr2007-10-16
| | | | | | | Renderer plugins now can store HTTP header information in 'format <mode>' which will be used to send their output. Also fixes a problem with loading cache files. darcs-hash:20071016185626-7ad00-c0e18a90b310daf0d3a3c01d7a73f3524ced803d.gz
* fixes for p_get_metadata() & p_set_metadata (incl. resolution of FS#1254)Chris Smith2007-09-30
| | | | | | | - add page existence check to prevent attempts to render metadata for non-existent pages (FS#1254) - add key & subkey existence checks to avoid PHP warnings darcs-hash:20070930022739-d26fc-e3688478e7c4d7be9080220c7f470d41c34d2cd7.gz
* don't use realpath() anymore (FS#1261 and others)Andreas Gohr2007-09-30
| | | | | | | | | | | The use of realpath() to clean up relative file names caused some trouble in certain setups relying on symlinks or having restricitve file structure setups. This patch replaces all realpath() calls with a PHP only replacement which should solve those problems. darcs-hash:20070930184250-7ad00-512ff04c95f57fc9eaf104f80372237a3c94286f.gz
* Don't create bogus blank entries in metadataTom N Harris2007-09-19
| | | | darcs-hash:20070919194756-6942e-0986b3711e370a91d8b42665a94c6866ba56811c.gz
* alter p_get_first_heading() default $render value to trueChris Smith2007-08-21
| | | | | | | | | | | | Calls to p_get_first_heading() are most likely to expect to get the first heading even if it needs to be generated, that is a $render value of true. Only the metadata renderer itself needs a value of false in order to prevent mutual dependency probelms. This fix should finally complete FS#1010 & problems breadcrumbs have with use_first_headings when metadata doesn't exist. Also see, http://www.freelists.org/archives/dokuwiki/08-2007/msg00018.html & http://www.freelists.org/archives/dokuwiki/08-2007/msg00132.html darcs-hash:20070821021008-d26fc-e08a23b4eb40f075de043687b57eb1223b0201b9.gz
* separated TOC from pageAndreas Gohr2007-08-05
| | | | | | | | | | | | | | | | | | This patch introduces a tpl_toc() function which can be used to freely place the Table of Contents in a template. When used, tpl_content should be called with a parameter of false to supress the automatic TOC placement. Note: if tpl_toc() us run *before* tpl_content(), TOCs will not work in the preview. A work around is to run tpl_content() in a output buffer first. This patch also adds a getTOC() function for admin plugins which allows plugin authors to put create their own TOC which will be placed correctly in the template. A convenience function html_mktocitem() is available. The config manager was adjusted to make ue of this new feature, but some bugs might remain. darcs-hash:20070805132405-7ad00-77d2c3cdf66cc62b2d408cc6580f938636a109af.gz
* added getFormat() function to rendererAndreas Gohr2007-03-03
| | | | | | | | | | | Each renderer has to supply a getFormat() function returning the format it produces. Usually this is the same as the classname of the renderer (or Plugin) says but it does not need to be necessarily. Fixes a problem with the wrong format being reported to plugins when a render plugin was used. darcs-hash:20070303214102-7ad00-3f87d8a10e94f4c6c30bacc8f43486b94ecdb146.gz
* never build instructions twice in the same run FS#1090Andreas Gohr2007-03-03
| | | | | | When a page was called with purge darcs-hash:20070303202232-7ad00-03e05dc32646563688307ae51b6594d223bad938.gz
* only debug when in xhtml mode in parserutils.phpAndreas Gohr2007-03-03
| | | | darcs-hash:20070303195008-7ad00-880996042e703973c56d38f803f79555256dbe84.gz
* fix rendered metadata detection problemchris2007-02-22
| | | | | | see http://www.freelists.org/archives/dokuwiki/02-2007/msg00207.html from Todd Augsburger darcs-hash:20070222162434-9b6ab-d894563322227cfe4a018f649d8eebc9aec4a161.gz
* Show file name in debug comment when creating new cache.Tom N Harris2007-02-02
| | | | darcs-hash:20070202063800-6942e-529cee02f506a5c221e2da33fd0720380752c37f.gz
* small fix for metadata rendering if instructions aren't availableAndreas Gohr2007-01-28
| | | | darcs-hash:20070128113952-7ad00-e7293a11680aed2cd88aac49d2a8b612bd0e61ee.gz
* fix FS#1010chris2007-01-26
| | | | darcs-hash:20070126204145-9b6ab-db7eba9c6045584a381eb83ae48787627973532b.gz
* Some renderer plugin updatesAndreas Gohr2007-01-20
| | | | | | | The namingscheme for renderer plugins now matches the other types, the plugin manager now returns info on renderer plugins, too darcs-hash:20070120002731-7ad00-fcea93a6a6da807103b6aa82d6472196125cb3ec.gz
* rerender and save metadata fixBen Coburn2006-12-07
| | | | darcs-hash:20061207003216-05dcb-4d15587ec2d6f5ad132edcf60f0cba448d0c5263.gz
* pluggable renderersAndreas Gohr2006-12-03
| | | | | | | | | | Plugins can now provide their own renderer in lib/plugins/<name>/renderer.php The class inside this file needs to inherit from Doku_Renderer and has to be called Doku_Renderer_<name> To access the renderer the export action can be used eg: ?do darcs-hash:20061203190138-7ad00-f56b470b5dd043e1168ff2101c677eb8a9851627.gz
* metadata update to support both persistent and non-persistent metadatachris2006-11-26
| | | | | | | | | | | | | | | | Key changes: - metadata stored on disk in two arrays, 'current' & 'persistent' - p_set_metadata has an additional parameter, $persistent, which defaults to true - metadata set within the renderer defaults to non-persistent - new event hook, PARSER_METADATA_RENDER, which wraps around metadata rendering process. For full details of this event refer to the event list documentation at splitbrain. The patch includes automatic conversion of metadata in current form to the new format For more details also see http://www.freelists.org/archives/dokuwiki/11-2006/msg00221.html and any follow-up messages. darcs-hash:20061126152144-9b6ab-a4e40c221e0274b13da07dc2fc1d2100f5f3a50e.gz
* code highlighting fragment cache updatechris2006-10-27
| | | | | | expire the cache if GeSHi (inc/geshi.php) has been updated since cache creation darcs-hash:20061027015051-9b6ab-f633dc5130ff23f0eb8871e4f8afb563fff3dc5b.gz
* update p_get/set_metadata to use $INFO['meta']chris2006-10-04
| | | | | | | | | | | | | This patch updates p_get_metadata() to utilise the in memory copy copy of the current page's metadata ($INFO['meta']) when appropriate. The patch also updates p_set_metadata() to synchronise any changes to the current page's metadata with $INFO['meta']. $INFO hash is updated with two new elements: 'id' darcs-hash:20061004210030-9b6ab-7eab6f933a775fe350a1fb14d1118ea77d2db919.gz
* p_get_first_heading simplificationchris2006-09-23
| | | | darcs-hash:20060923204905-9b6ab-da3e9751c07c1bd07cf6583ecc5d92c2ce95097c.gz
* parser caching updatechris2006-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch primarily updates p_cached_xhtml() and p_cached_instructions() to allow their caching logic to be surrounded by an event trigger. p_cached_xhtml() has been rewritten as the more general p_cached_output() to support other render output formats besides 'xhtml'. All calls to p_cached_xhtml() have been changed to refer to the new function. New event: name: PARSER_CACHE_USE data: cache object (see below) action: determine if cache file can be used preventable: yes result: bool, true to use cache file, false otherwise Cache operations have been generalised in a new class, cache, extended to cache_parser, cache_renderer & cache_instructions. Details can be found in inc/cache.php For handling of above event, key properties are: - page, if present the wiki page id, may not always be present, e.g. when called for locale xhtml files - file, source file - mode, renderer mode (e.g. 'xhtml') or 'i' for instructions Other changes: - cache class counts cache hits against attempts, results are stored in {cache_dir}/cache_stats.txt - adds metadata dependency to renderer page cache - replaces purgefile dependency for renderer cache with metadata 'relation references' (internal link) dependency for wiki pages only darcs-hash:20060911021418-9b6ab-19601ed194b8c8e45236ab72c3e23d78bf777e6c.gz
* GeSHi fixesAndreas Gohr2006-08-06
| | | | | | | | This fixes a bug in GeSHi which adds an addtional newline (patch sent to upstream) and makes sure the code highlighting cache honors the purge request variable. darcs-hash:20060806204258-7ad00-56ad794b90b8ad38f62e8e4d9e430a8622636bc5.gz
* strip trailing line in higlighted codeAndreas Gohr2006-07-30
| | | | | | | | | | The current code add 2 unwanted trailing lines in highlighted code. One is produced by DokuWiki's syntax and is fixed by this patch. The second one is created somewhere inside GeShi. A bug report was submitted upatream [1] [1] http://sourceforge.net/tracker/index.php?funcÞtail&aid31373&group_id4997&atidg0231 darcs-hash:20060730201442-7ad00-222a23a3bfccd7c53105e7175cdc9992be2d8076.gz
* Provide a fragment cache for GeSHi outputchris2006-07-29
| | | | darcs-hash:20060728225649-9b6ab-124a5511574bd9955f56d0426586f877b9ec66c8.gz
* additional eventschris2006-07-24
| | | | | | | | | | PARSER_WIKITEXT_PREPROCESS RENDERER_CONTENT_POSTPROCESS Both have been implemented as signals, that is without any action and therefore there will be no results during the _AFTER event darcs-hash:20060724193434-9b6ab-e48d13d06da55122e501a686f9b841f7b3c97dfe.gz
* updated hierarchical breadcrumbsAndreas Gohr2006-06-18
| | | | | | Third part of the global start series darcs-hash:20060618113532-7ad00-46a62cc819c41ead8a16bc3f6c6d1bf67d9c6bf4.gz
* Use meta data in RSS feedAndreas Gohr2006-05-28
| | | | darcs-hash:20060528133552-7ad00-8281720582dbc448534f35cc978e9c8175b54f0d.gz
* metadata enhancementsAndreas Gohr2006-04-30
| | | | | | | | | | | This adds meta data rendering to the indexer process to build missing meta data in the background. p_get_first_heading was adjusted to make use of the new meta data mechanisms A problem with unitialized arrays in p_set_metadata and PHP5 was fixed (I think) darcs-hash:20060430181740-7ad00-8952fa6beb4fadf6b4321627998442d34febfc8d.gz
* new metadata renderer; functions p_get_metadata() and p_set_metadata()Esther Brunner2006-04-15
| | | | darcs-hash:20060415104627-283c4-c7d35620fc9dbc21b8a47089692b76d35a9f9ca8.gz
* Parser Update:chris2006-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - revisions to header class and section handling header pattern simplified header class now writes section open and close instructions section call writer removed check for and update meta['first_header'] if required (see below) - meta instruction added written by _finalize to front of instruction stack holds first header information plugins can now write first header information, or other page meta information to this data structure. - get_first_heading updated to make use of meta['first_header'] - plugin instruction structure changed to include lexer state in the data portion of the instruction. OLD INSTRUCTION: array('plugin', array(<plugin name>,<plugin_data>,$pos), $pos) NEW INSTRUCTION: array('plugin', array(<plugin name>,<plugin_data>,$state), $pos) - block handler/call writer update to better handle plugin PTypes 'block' & 'stack'. Lexer states are mapped as follows: DOKU_LEXER_ENTER, DOKU_LEXER_SPECIAL : block_open, stack_open DOKU_LEXER_EXIT, DOKU_LEXER_SPECIAL : block_close, stack_close DOKU_LEXER_MATCHED, DOKU_LEXER_UNMATCHED : plugin must handle <p> Plugin writers can now use these PTypes as intended ! darcs-hash:20060409214958-9b6ab-cd2cef97a6a2521e3a02175075b8ff4648035f69.gz
* cleanup export mode errorsBen Coburn2006-04-09
| | | | | | | | - Using the export modes 'handler', 'lexer', 'parser', or 'renderer' now produces a nicer non-fatal error. - The export mode 'wiki' is now ignored to avoid fatal errors. darcs-hash:20060409045546-05dcb-89f4c56c23d9798f4cb2dd000804cb8c03524b6d.gz
* file cleanupsAndreas Gohr2006-02-17
| | | | | | | | | | This patch cleans up the source code to satisfy the coding guidelines (see http://wiki.splitbrain.org/wiki:development#coding_style) It converts files to UNIX lineendings and removes tabs and trailing whitespace. Not all files were cleaned yet. darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
* fix for broken $conf['typography']Andreas Gohr2006-01-25
| | | | darcs-hash:20060125211620-7ad00-aecd98eba9a237f3314281c0924c1eab99dbe589.gz
* fixed a very rare problem with io_readfile and unserializeAndreas Gohr2005-11-18
| | | | darcs-hash:20051118194856-7ad00-5b7f8dea8371acd85ccfe31ac6f748cb2b619486.gz
* xhtmlsummary_patchhfuecks2005-11-07
| | | | darcs-hash:20051107000554-e96b6-1a7ae7a9d5e820d3c52629570ff33f8e75bc4a46.gz
* option for disabling debug outputAndreas Gohr2005-10-27
| | | | darcs-hash:20051027183410-7ad00-5ca48cf2d4058016f5cf07887d9eaa7b07a4043f.gz
* make sure p_wiki_xhtml does not destroy the global $IDAndreas Gohr2005-10-16
| | | | darcs-hash:20051016185709-7ad00-cf9de03231c90e1c6725fe7553909d682bca1a59.gz