diff --git a/data/pages/wiki/syntax.txt b/data/pages/wiki/syntax.txt index 7b453efa2ba80530cea9bfb6bd268dbdd6b28ac7..613c04aceb673937767565b1e2253170a994f524 100644 --- a/data/pages/wiki/syntax.txt +++ b/data/pages/wiki/syntax.txt @@ -170,6 +170,12 @@ DokuWiki can embed the following media formats directly. If you specify a filename that is not a supported media format, then it will be displayed as a link instead. +By adding ''?linkonly'' you provide a link to the media without displaying it inline + + {{wiki:dokuwiki-128.png?linkonly}} + +{{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image. + ==== Fallback Formats ==== Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. @@ -261,17 +267,19 @@ There are three exceptions which do not come from that pattern file: multiplicat Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: - I think we should do it - - > No we shouldn't - - >> Well, I say we should - - > Really? - - >> Yes! - - >>> Then lets do it! +<code> +I think we should do it + +> No we shouldn't + +>> Well, I say we should + +> Really? + +>> Yes! + +>>> Then lets do it! +</code> I think we should do it @@ -317,7 +325,7 @@ As you can see, it's the cell separator before a cell which decides about the fo ^ Heading 4 | no colspan this time | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | -You can have rowspans (vertically connected cells) by adding '':::'' into the cells below the one to which they should connect. +You can have rowspans (vertically connected cells) by adding ''%%:::%%'' into the cells below the one to which they should connect. ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | diff --git a/inc/changelog.php b/inc/changelog.php index d1ef7973e33ce4889356146306589034d4a1c94c..f4731021ca48c63e14eae6d414eb02132cf72866 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -849,18 +849,17 @@ abstract class ChangeLog { public function isCurrentRevision($rev) { return $rev == @filemtime($this->getFilename()); } - + /** - * Return an existing revision for a specific date which is + * Return an existing revision for a specific date which is * the current one or younger or equal then the date * - * @param string $id * @param number $date_at timestamp * @return string revision ('' for current) */ function getLastRevisionAt($date_at){ //requested date_at(timestamp) younger or equal then modified_time($this->id) => load current - if($date_at >= @filemtime($this->getFilename())) { + if($date_at >= @filemtime($this->getFilename())) { return ''; } else if ($rev = $this->getRelativeRevision($date_at+1, -1)) { //+1 to get also the requested date revision return $rev; @@ -1049,6 +1048,12 @@ class MediaChangelog extends ChangeLog { * * @author Ben Coburn <btcoburn@silicodon.net> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $id + * @param int $rev + * @param int $chunk_size + * @param bool $media + * @return array|bool */ function getRevisionInfo($id, $rev, $chunk_size = 8192, $media = false) { dbg_deprecated('class PageChangeLog or class MediaChangelog'); diff --git a/inc/pageutils.php b/inc/pageutils.php index 3757126610c259f8b26de4e867b60a120d2fe1bd..a5bf039d50215548416701516afb25906a3f6006 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -243,7 +243,6 @@ function sectionID($title,&$check) { return $title; } - /** * Wiki page existence check * @@ -251,9 +250,10 @@ function sectionID($title,&$check) { * * @author Chris Smith <chris@jalakai.co.uk> * - * @param string $id page id - * @param string|int $rev empty or revision timestamp - * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well) + * @param string $id page id + * @param string|int $rev empty or revision timestamp + * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well) + * @param bool $date_at * @return bool exists? */ function page_exists($id,$rev='',$clean=true, $date_at=false) { @@ -489,9 +489,11 @@ function resolve_id($ns,$id,$clean=true){ * * @author Andreas Gohr <andi@splitbrain.org> * - * @param string $ns namespace which is context of id - * @param string &$page (reference) relative media id, updated to resolved id - * @param bool &$exists (reference) updated with existance of media + * @param string $ns namespace which is context of id + * @param string &$page (reference) relative media id, updated to resolved id + * @param bool &$exists (reference) updated with existance of media + * @param int|string $rev + * @param bool $date_at */ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ $page = resolve_id($ns,$page); @@ -502,7 +504,7 @@ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ $rev = $medialog_rev; } } - + $file = mediaFN($page,$rev); $exists = file_exists($file); } @@ -512,9 +514,11 @@ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ * * @author Andreas Gohr <andi@splitbrain.org> * - * @param string $ns namespace which is context of id - * @param string &$page (reference) relative page id, updated to resolved id - * @param bool &$exists (reference) updated with existance of media + * @param string $ns namespace which is context of id + * @param string &$page (reference) relative page id, updated to resolved id + * @param bool &$exists (reference) updated with existance of media + * @param string $rev + * @param bool $date_at */ function resolve_pageid($ns,&$page,&$exists,$rev='',$date_at=false ){ global $conf; diff --git a/inc/parserutils.php b/inc/parserutils.php index 8650f974f80a1442d914a4ee8b9422a77acf5519..5b96d39feba76a558d2189d6323319516aa4d92a 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -121,15 +121,21 @@ function p_cached_output($file, $format='xhtml', $id='') { $cache = new cache_renderer($id, $file, $format); if ($cache->useCache()) { $parsed = $cache->retrieveCache(false); - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- cachefile {$cache->cache} used -->\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n<!-- cachefile {$cache->cache} used -->\n"; + } } else { $parsed = p_render($format, p_cached_instructions($file,false,$id), $info); if ($info['cache'] && $cache->storeCache($parsed)) { // storeCache() attempts to save cachefile - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- no cachefile used, but created {$cache->cache} -->\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n<!-- no cachefile used, but created {$cache->cache} -->\n"; + } }else{ $cache->removeCache(); //try to delete cachefile - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n"; + } } } @@ -616,8 +622,9 @@ function p_sort_modes($a, $b){ * @author Andreas Gohr <andi@splitbrain.org> * * @param string $mode - * @param array|null|false $instructions - * @param array $info returns render info like enabled toc and cache + * @param array|null|false $instructions + * @param array $info returns render info like enabled toc and cache + * @param string $date_at * @return null|string rendered output */ function p_render($mode,$instructions,&$info,$date_at=''){ @@ -632,7 +639,7 @@ function p_render($mode,$instructions,&$info,$date_at=''){ if($date_at) { $Renderer->date_at = $date_at; } - + $Renderer->smileys = getSmileys(); $Renderer->entities = getEntities(); $Renderer->acronyms = getAcronyms();