You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(107) |
Feb
(48) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
(29) |
Jul
(14) |
Aug
(9) |
Sep
(34) |
Oct
(14) |
Nov
(6) |
Dec
(18) |
2004 |
Jan
|
Feb
(4) |
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(43) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2007 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Even H. <ho...@us...> - 2003-09-20 21:11:28
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1:/tmp/cvs-serv19118 Modified Files: ChangeLog.txt Log Message: Documenting todays changes... Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ChangeLog.txt 8 Sep 2003 12:38:16 -0000 1.13 +++ ChangeLog.txt 20 Sep 2003 21:11:25 -0000 1.14 @@ -2,6 +2,16 @@ WikkiTikkiTavi - ChangeLog -------------------------- +2003-09-20 Even Holen <eve...@pv...> + * Fixed bugs regarding use of add category field + * Relaxed rule for characters appearaing in free links, and added no-link + * Fixed bugs not allowing 0 as a free links page name + * Changed /SomeThing to refer to a page on same level, not below + * Added $ExtRef to change text around external refs, see lib/defaults.php + * Added possibility to use images as descriptions of hyperlinks. + * Added the use of InterWiki's as image references + * Added macro RefList, to list external references from current page + 2003-09-08 Even Holen <eve...@pv...> * ** Version 0.24 released ** |
From: Even H. <ho...@us...> - 2003-09-20 21:10:56
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv19002 Modified Files: html.php macros.php transforms.php Log Message: Added the macro RefList, which gives a listing of the external references used on current page. Currently implemented in hard-coded html, but thinking of changing it already. Just wanted to save my work of today. Also fixed a bug introduced by last change, which expanded InterWiki-references. Not good... Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- html.php 20 Sep 2003 19:40:33 -0000 1.29 +++ html.php 20 Sep 2003 21:10:52 -0000 1.30 @@ -387,4 +387,20 @@ '\\1 \\2', $page, -1); return $page; } +function html_reflist() +{ + global $RefList; + if (!empty($RefList)) { + $str = '<hr style="width:30%; margin-bottom: 0px; float:left" />'; + $str .= '<ol style="font-size: 80%; clear:left; line-height:1" class="reflist" style="font-size:80%">'; + foreach ($RefList as $ref) { + $str .= '<li><a href="'. $ref. '">'. $ref .'</a></li>'; + } + $str .= '</ol>'; + return $str; + } + else + { return ""; } + +} ?> Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- macros.php 20 Sep 2003 12:09:32 -0000 1.17 +++ macros.php 20 Sep 2003 21:10:52 -0000 1.18 @@ -442,5 +442,8 @@ $visited_count--; return $result; } - +function view_macro_reflist($args) +{ + return parse_elements(new_entity(array("reflist", $args))); +} ?> Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- transforms.php 20 Sep 2003 19:40:33 -0000 1.38 +++ transforms.php 20 Sep 2003 21:10:52 -0000 1.39 @@ -182,9 +182,8 @@ function url_token($value, $display) { - global $pagestore, $InterwikiPtn, $UrlPtn; + global $pagestore, $InterwikiPtn, $UrlPtn, $RefList, $ImgPtn; static $count = 1; - // Expand interwiki-entry, if necessary if ((!preg_match("/$UrlPtn/", $value)) and preg_match("/$InterwikiPtn/", $value, $match)) @@ -192,7 +191,7 @@ $couldBeImage=($display==$value); if (($url=$pagestore->interwiki($match[1])) != '') { $value = $url . $match[2]; - if ($couldBeImage) + if ($couldBeImage and preg_match("/$ImgPtn$/", $value)) { $display = $value; } } else @@ -200,7 +199,8 @@ } if($display == '') - { $display = '[' . $count++ . ']'; } + { $display = '[' . $count++ . ']'; + $RefList[] = $value; } return new_entity(array('url', $value, $display), false); } |
From: Even H. <ho...@us...> - 2003-09-20 21:09:05
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv18729 Modified Files: defaults.php init.php Log Message: Preparation for adding the macro RefList Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- defaults.php 20 Sep 2003 19:37:46 -0000 1.11 +++ defaults.php 20 Sep 2003 21:09:00 -0000 1.12 @@ -246,7 +246,8 @@ 'diff_new_end' => 'html_diff_end', 'diff_change' => 'html_diff_change', 'diff_add' => 'html_diff_add', - 'diff_delete' => 'html_diff_delete' + 'diff_delete' => 'html_diff_delete', + 'reflist' => 'html_reflist' ); // $ViewMacroEngine determines what macro names will be processed when @@ -262,7 +263,8 @@ 'WantedPages' => 'view_macro_wanted', 'TitleSearch' => 'view_macro_titlesearch', 'PageLinks' => 'view_macro_outlinks', - 'PageRefs' => 'view_macro_refs' + 'PageRefs' => 'view_macro_refs', + 'RefList' => 'view_macro_reflist' ); // $SaveMacroEngine determines what save macros will be called after a Index: init.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/init.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- init.php 22 Feb 2002 14:46:08 -0000 1.9 +++ init.php 20 Sep 2003 21:09:01 -0000 1.10 @@ -24,6 +24,7 @@ $Entity = array(); // Global parser entity list. +$RefList = array(); // Array of referenced links, see view_macro_reflist // Strip slashes from incoming variables. if(get_magic_quotes_gpc()) |
From: Even H. <ho...@us...> - 2003-09-20 19:40:37
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv3177 Modified Files: html.php transforms.php Log Message: Extend the syntax to allow for use of images in hyperlink descriptions. Along the way this opens up for using InterWiki-references for images as well, both in descriptions and elsewhere. Also included are the introduction of $ExtRef to guide the text around descriptions. Default is [ ] if it's not an image. Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- html.php 10 Sep 2003 13:19:32 -0000 1.28 +++ html.php 20 Sep 2003 19:40:33 -0000 1.29 @@ -203,8 +203,9 @@ } function html_url($url, $text) { + global $ImgPtn; if($url == $text - && preg_match('/(.jpe?g|.png|.gif|.bmp)$/i', $text)) + && preg_match("/($ImgPtn)$/i", $text)) { return "<img src=\"$url\" alt=\"" . basename($url) . "\" />"; } Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- transforms.php 20 Sep 2003 16:34:28 -0000 1.37 +++ transforms.php 20 Sep 2003 19:40:33 -0000 1.38 @@ -151,32 +151,54 @@ function parse_hyperlink_ref($text) { - global $UrlPtn; + global $UrlPtn,$InterwikiPtn; - return preg_replace("/\\[($UrlPtn)]/Ue", + return preg_replace("/\\[($UrlPtn|$InterwikiPtn)]/Ue", "url_token(q1('\\1'), '')", $text, -1); } - +function image_search($text) +{ + global $ImgPtn, $ExtRef; + if (preg_match("/$ImgPtn$/", $text)) + { return parse_elements(parse_hyperlink($text)); } + else + { return $ExtRef[0] . $text . $ExtRef[1]; } +} function parse_hyperlink_description($text) { - global $UrlPtn; - - return preg_replace("/\\[($UrlPtn) ([^]]+)]/e", - "url_token(q1('\\1'), q1('[\\2]'))", $text, -1); + global $UrlPtn, $InterwikiPtn; + return preg_replace("/\\[($UrlPtn|$InterwikiPtn) ([^]]+)]/e", + "url_token(q1('\\1'),image_search('\\4'))", + $text, -1); } function parse_hyperlink($text) { - global $UrlPtn; + global $UrlPtn, $InterwikiPtn; - return preg_replace("/(^|[^A-Za-z])($UrlPtn)(\$|[^\\/?=&~A-Za-z0-9])/e", - "q1('\\1').url_token(q1('\\2'), q1('\\2')).q1('\\3')", $text, -1); + return preg_replace("/(^|[^A-Za-z])($UrlPtn|$InterwikiPtn)(\$|[^\\/?=&~A-Za-z0-9])/e", + "q1('\\1').url_token(q1('\\2'), q1('\\2')).q1('\\5')", $text, -1); } function url_token($value, $display) { + global $pagestore, $InterwikiPtn, $UrlPtn; static $count = 1; + // Expand interwiki-entry, if necessary + if ((!preg_match("/$UrlPtn/", $value)) and + preg_match("/$InterwikiPtn/", $value, $match)) + { + $couldBeImage=($display==$value); + if (($url=$pagestore->interwiki($match[1])) != '') + { $value = $url . $match[2]; + if ($couldBeImage) + { $display = $value; } + } + else + { $value = "[$match[1]:$match[2] $display]"; } + } + if($display == '') { $display = '[' . $count++ . ']'; } @@ -286,7 +308,6 @@ static $last = array('', ''); // More than two consecutive newlines fold into two newlines. - if($last[0] == "\n" && $last[1] == "\n" && $text == "\n") { return ''; } $last[0] = $last[1]; |
From: Even H. <ho...@us...> - 2003-09-20 19:37:50
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv2677 Modified Files: defaults.php Log Message: Finally it's possible to change the characters surrounding external references... And also a little change to ease the use of images as description Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- defaults.php 10 Sep 2003 13:14:42 -0000 1.10 +++ defaults.php 20 Sep 2003 19:37:46 -0000 1.11 @@ -33,6 +33,14 @@ // from respectively parse_wikinames, parse_hyperlinkXXX and parse_interwiki // in parse/transforms.php +// $ImgPtn is used in html_url() and check_images() to detect +// image-links. Usually tied against the end of the text +$ImgPtn = ".jpe?g|.png|.gif|.bmp"; + +// $ExtRef contains the strings to be used around external references. +$ExtRef = array ('[', ']'); +// $ExtRef = array ('', ''); // Use this if you don't want anything + // !!!WARNING!!! // If $AdminEnabled is set to 1, the script admin/index.php will be accessible. // This allows administrators to lock pages and block IP addresses. If you |
From: Even H. <ho...@us...> - 2003-09-20 16:34:32
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv3799 Modified Files: transforms.php Log Message: Changed syntax /SomePage to refer to a page at same level, not below Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- transforms.php 20 Sep 2003 16:03:02 -0000 1.36 +++ transforms.php 20 Sep 2003 16:34:28 -0000 1.37 @@ -74,7 +74,13 @@ $link = $name; // translate sub-page markup into a qualified wikiword if ($name[0] == '/') - { $link = $ParseObject . $name; } + { + if (preg_match("|(.*)\\/[^\\/]*|", $ParseObject, $path)) + { $link = $path[1] . $name; } + else + { $link = substr($name,1); } + } + return new_entity(array('ref', $link, $name, '', $anchor, $anchor),false); } @@ -111,7 +117,12 @@ // translate sub-page markup into a qualified wikiword if ($link[0] == '/') - { $link = $ParseObject . $link; } + { + if (preg_match("|(.*)\\/[^\\/]*|", $ParseObject, $path)) + { $link = $path[1] . $link; } + else + { $link = substr($link,1); } + } return new_entity(array('ref', $link, $appearance, '', $anchor, $anchor_appearance), false); |
From: Even H. <ho...@us...> - 2003-09-20 16:03:06
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv31626 Modified Files: transforms.php Log Message: Changed freelink matching according to ((UTF-8 Text)) to allow almost anything Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- transforms.php 20 Sep 2003 15:25:29 -0000 1.35 +++ transforms.php 20 Sep 2003 16:03:02 -0000 1.36 @@ -86,23 +86,23 @@ if($validate) { - $ptn = "/\\(\\((\\/?[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)()()\\)\\)/e"; + $ptn = "/\\(\\(([^\\|\\)]+)()()\\)\\)/e"; } else { - $ptn = "/!?\\(\\((\\/?[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)(\|[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)?(\#[A-Za-z][-A-Za-z0-9_:.]*)?()\\)\\)/e"; + $ptn = "/(!?\\(\\(([^\\|\\)]+)(\\|[^\\)#]+)?(\\#[A-Za-z][-A-Za-z0-9_:.]*)?()\\)\\))/e"; } return preg_replace($ptn, - "freelink_token(q1('\\1'), q1('\\2'), '\\3', '')", + "freelink_token(q1('\\2'), q1('\\3'), '\\4', '', '\\1')", $text, -1); } -function freelink_token($link, $appearance, $anchor, $anchor_appearance) +function freelink_token($link, $appearance, $anchor, $anchor_appearance, $nolink) { global $ParseObject; - if($link[0] == '!') // No-link escape sequence. - { return substr($link, 1); } // Trim leading '!'. + if($nolink[0] == '!') // No-link escape sequence. + { return new_entity(array('raw', substr($nolink, 1))); } // Trim leading '!' if($appearance == '') { $appearance = $link; } |
From: Even H. <ho...@us...> - 2003-09-20 15:25:42
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23598 Modified Files: category.php Log Message: Fixed bug 802780 regarding / in categories field. Has rebuilt search for page already in category. Original was to sloppy in matching. I.e. if ((SubPages/and WikiNames)) already was in the category, and you tried adding WikiNames you might have problems. This version now does parsing of both the field and the category on each page. Hopefully this should reduce the risk of false positives when searching or adding pages to a category Index: category.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/category.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- category.php 20 Sep 2003 12:09:18 -0000 1.9 +++ category.php 20 Sep 2003 15:13:09 -0000 1.10 @@ -14,9 +14,6 @@ preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); - if(validate_page($page) == 2) - { $page = '((' . $page . '))'; } - // Add it to each category. foreach($pagenames as $category) { @@ -25,20 +22,31 @@ $pg->read(); if($pg->exists) { - if(preg_match('/\\[\\[!.*\\]\\]/', $pg->text)) + if(preg_match('/\\[\\[!(.*)\\]\\]/', $pg->text, $match)) { - $ptn = "/\\[\\[!.* ". preg_replace("/\\//", "\/", $page) . - "( .*|)\\]\\]/"; - if(!preg_match($ptn, $pg->text)) + $parsed = parseText($match[1], array('parse_freelink', + 'parse_wikiname'), ''); + $categorypages = array(); + preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', + '$categorypages[$Entity[\\1][1]]=1', $parsed); + + if (!$categorypages[$page] ) { + if(validate_page($page) == 2) + { $page = '((' . $page . '))'; } + $pg->text = preg_replace('/(\\[\\[!.*)\\]\\]/', "\\1 $page]]", $pg->text); } else { continue; } } - else - { $pg->text = $pg->text . "\n[[! $page]]\n"; } + else + { + if(validate_page($page) == 2) + { $page = '((' . $page . '))'; } + $pg->text = $pg->text . "\n[[! $page]]\n"; + } $pg->text = str_replace("\\", "\\\\", $pg->text); $pg->text = str_replace("'", "\\'", $pg->text); |
From: Even H. <ho...@us...> - 2003-09-20 15:25:35
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv25533 Modified Files: transforms.php Log Message: Added optional no-link sequence, using ! in front of ((...)) Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- transforms.php 10 Sep 2003 13:49:12 -0000 1.34 +++ transforms.php 20 Sep 2003 15:25:29 -0000 1.35 @@ -90,7 +90,7 @@ } else { - $ptn = "/\\(\\((\\/?[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)(\|[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)?(\#[A-Za-z][-A-Za-z0-9_:.]*)?()\\)\\)/e"; + $ptn = "/!?\\(\\((\\/?[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)(\|[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)?(\#[A-Za-z][-A-Za-z0-9_:.]*)?()\\)\\)/e"; } return preg_replace($ptn, @@ -101,7 +101,9 @@ function freelink_token($link, $appearance, $anchor, $anchor_appearance) { global $ParseObject; - + if($link[0] == '!') // No-link escape sequence. + { return substr($link, 1); } // Trim leading '!'. + if($appearance == '') { $appearance = $link; } else |
From: Even H. <ho...@us...> - 2003-09-20 12:35:19
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv442 Modified Files: main.php Log Message: Fixed bug 802786: Regarding using 0 as page name Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- main.php 10 Sep 2003 15:22:51 -0000 1.7 +++ main.php 20 Sep 2003 12:35:13 -0000 1.8 @@ -91,7 +91,7 @@ ); // Default action and page names. -if(empty($page) && empty($action)) +if(!isset($page) && !isset($action)) { $page = $QUERY_STRING; } if(empty($action)) { $action = 'view'; } |
From: Even H. <ho...@us...> - 2003-09-20 12:10:05
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv29482 Modified Files: macros.php Log Message: Fixed bug 809733: Free links and WikiNames in TaviCategories Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- macros.php 10 Sep 2003 17:26:27 -0000 1.16 +++ macros.php 20 Sep 2003 12:09:32 -0000 1.17 @@ -22,7 +22,7 @@ } else // Ordinary list of pages. { - $parsed = parseText($args, array('parse_wikiname', 'parse_freelink'), ''); + $parsed = parseText($args, array('parse_freelink', 'parse_wikiname'), ''); $pagenames = array(); preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); $list = $pagestore->givenpages($pagenames); |
From: Even H. <ho...@us...> - 2003-09-20 12:09:52
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29447 Modified Files: category.php Log Message: Fixed bug 809733: Free links and WikiNames in TaviCategories Index: category.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/category.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- category.php 10 Sep 2003 18:00:32 -0000 1.8 +++ category.php 20 Sep 2003 12:09:18 -0000 1.9 @@ -9,7 +9,7 @@ global $pagestore, $Entity, $UserName, $REMOTE_ADDR, $FlgChr; // Parse the category list for category names. - $parsed = parseText($catlist, array('parse_wikiname', 'parse_freelink'), ''); + $parsed = parseText($catlist, array('parse_freelink', 'parse_wikiname'), ''); $pagenames = array(); preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); |
From: Even H. <eve...@pv...> - 2003-09-16 20:57:53
|
This a reply to my own reply only posted to Scott Moonen. It's included in full to give proper argument for the change of syntax, as explained on TaviSubPages and at bottom of this mail. Now posted to list, for archival purposes and for those of you interested in cvs-changes... On Tue, Sep 09, 2003 at 02:36:08PM +0200, Even Holen wrote: > On Tue, Sep 09, 2003 at 05:04:11AM -0700, Scott Moonen wrote: > > UseMod does it a different way: If you're in RootPage/SubPage, and you link > > to /SubPageTwo, it links to RootPage/SubPageTwo, instead of > > RootPage/SubPage/SubPageTwo (as your code does). > > > > I recommend the UseMod approach. But I don't care strongly. :-) > > Does UseMod allow several levels of subpages? Say you have the following > pages available: > Level1 > Level1/Level2 > Level1/SecondLevel2 > Level2/SomeWhere > Level1/Level2/Level3 > Level1/Level2/AnotherLevel3 > Level1/Level2/SomeWhere > > If you are standing at Level1/Level2, then my thought was that /SomeWhere > would link to Level1/Level2/SomeWhere. Whilst the UseMod approach would > make it link to Level1/SomeWhere. > > The problem arises on how to access neighbour pages. Using my approach > one doesn't access neighbours, but must use full links. Using UseMod > approach must use full links to dig deeper. I'm not sure what's the > wiser approach in multiple level situations, but I lean towards going > into the structure. > > I think that if allowing multiple levels, as Tavi now does, it's wiser > to point into the structure. This because if have a structure like > TaviDoc/Development alongside TaviDoc/HowToUse and TaviDoc/Installation, > then it's more likely to add pages beneath then beside if you follow my > drift. (I.e. TaviDoc/Development/SourceForge and > TaviDoc/Development/UsingCVS ) > > But I guess it could easily be produced examples justyfying the other > approach as well... I just looked on UseMod, and they do indeed only > allow one level of SubPages. > > Have you seen any discussion as to why only level is allowed? Okey... Now I've implemented the sub page version of this, and started using it. And it suddenly it strikes me how much wiser it is to make /SomeThing refer to a page on the same level, that is a neighbor. The thinking is simply that a page usually describes something within a given context, and thusly also often need to refer to something with the same context. SubPages on the other hand are deeper knowledge into some area and not on the same level. And when writing a given page I see that it often refers to itself, and with my original proposal this meant you had to use the full path. With the new syntax it's just to use /MyPageName, and that does make sense. I'm sorry for the inconvenience it creates to make this syntax change, but I hope and think that in the long run the UseMod approach is much more useful for sub pages to be useful. So as of version 0.25, the UseMod approach will be implemented in 'Tavi (still with the possibility of multiple levels, and *no* way to go just one level up... ) Regards, Even Holen -- <>< Even Holen, eve...@pv..., http://www.pvv.ntnu.no/~evenh/ :-) |
From: Even H. <ho...@us...> - 2003-09-10 18:00:40
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22999 Modified Files: category.php Log Message: Started fixing bug 802780 regarding / in category pagenames. Needs more work, but this temporarily should fix stuff... Index: category.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/category.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- category.php 22 Feb 2002 14:46:08 -0000 1.7 +++ category.php 10 Sep 2003 18:00:32 -0000 1.8 @@ -11,7 +11,7 @@ // Parse the category list for category names. $parsed = parseText($catlist, array('parse_wikiname', 'parse_freelink'), ''); $pagenames = array(); - preg_replace('/' . $FlgChr . '(\\d+)' . $FlgChr . '/e', + preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); if(validate_page($page) == 2) @@ -27,7 +27,9 @@ { if(preg_match('/\\[\\[!.*\\]\\]/', $pg->text)) { - if(!preg_match("/\\[\\[!.*$page.*\\]\\]/", $pg->text)) + $ptn = "/\\[\\[!.* ". preg_replace("/\\//", "\/", $page) . + "( .*|)\\]\\]/"; + if(!preg_match($ptn, $pg->text)) { $pg->text = preg_replace('/(\\[\\[!.*)\\]\\]/', "\\1 $page]]", $pg->text); |
From: Even H. <ho...@us...> - 2003-09-10 17:26:30
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv14467 Modified Files: macros.php Log Message: Fixed bug introduced by the bug fixes... :-/ Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- macros.php 10 Sep 2003 13:06:04 -0000 1.15 +++ macros.php 10 Sep 2003 17:26:27 -0000 1.16 @@ -24,7 +24,7 @@ { $parsed = parseText($args, array('parse_wikiname', 'parse_freelink'), ''); $pagenames = array(); - preg_replace('/' . $FlgChr . '(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); + preg_replace('/' . $FlgChr . '!?(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); $list = $pagestore->givenpages($pagenames); } |
From: Even H. <ho...@us...> - 2003-09-10 15:22:54
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv19199 Modified Files: main.php Log Message: Fixed the bug introduced by the bug fixes... :-/ Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- main.php 10 Sep 2003 13:51:30 -0000 1.6 +++ main.php 10 Sep 2003 15:22:51 -0000 1.7 @@ -91,11 +91,11 @@ ); // Default action and page names. -if(!isset($page) && empty($action)) +if(empty($page) && empty($action)) { $page = $QUERY_STRING; } if(empty($action)) { $action = 'view'; } -if(!isset($page)) +if(!isset($page) or $page=="") { $page = $HomePage; } // Confirm we have a valid page name. |
From: Even H. <ho...@us...> - 2003-09-10 13:51:34
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv31319 Modified Files: main.php Log Message: Fixed bug 802786: ((0)) goes to Home Page Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- main.php 26 Jun 2003 21:15:51 -0000 1.5 +++ main.php 10 Sep 2003 13:51:30 -0000 1.6 @@ -91,11 +91,11 @@ ); // Default action and page names. -if(empty($page) && empty($action)) +if(!isset($page) && empty($action)) { $page = $QUERY_STRING; } if(empty($action)) { $action = 'view'; } -if(empty($page)) +if(!isset($page)) { $page = $HomePage; } // Confirm we have a valid page name. |
From: Even H. <ho...@us...> - 2003-09-10 13:49:16
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv30911 Modified Files: transforms.php Log Message: Fix in accordance with block/line elements and legal free links pages... Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- transforms.php 10 Sep 2003 13:19:32 -0000 1.33 +++ transforms.php 10 Sep 2003 13:49:12 -0000 1.34 @@ -29,7 +29,7 @@ if(preg_match('/^' . $FlgChr .'!?'. '\\d+' . $FlgChr . '$/', $p)) { return 1; } $p = parse_freelink('((' . $page . '))', 1); - if(preg_match('/^' . $FlgChr . '\\d+' . $FlgChr . '$/', $p)) + if(preg_match('/^' . $FlgChr . '!?'. '\\d+' . $FlgChr . '$/', $p)) { return 2; } return 0; } |
From: Even H. <ho...@us...> - 2003-09-10 13:19:37
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv25023 Modified Files: html.php transforms.php Log Message: Fix for using <p> around paragraphs, instead of <br /> at end, whilst still maintaining strict XML-document coding. Involves transition of element marking from ¤#¤ (wher ¤ denotes $FlgChr, and # any number), to using ¤#¤ for block elements, like <ul>, <dl>, <h?>; and using ¤!#¤ for line elements, like <a>, <em>,<bold>. Thus at the end it's an easy match to make every line starting with either a character or line element into an paragraph. Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- html.php 8 Sep 2003 12:11:38 -0000 1.27 +++ html.php 10 Sep 2003 13:19:32 -0000 1.28 @@ -46,6 +46,10 @@ { return "<hr />\n"; } function html_newline() { return "<br />\n"; } +function html_paragraph_start() + { return "<p>"; } +function html_paragraph_end() + { return "</p>\n"; } function html_head_start($level) { return "<h$level>"; } function html_head_end($level) Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- transforms.php 8 Sep 2003 12:11:38 -0000 1.32 +++ transforms.php 10 Sep 2003 13:19:32 -0000 1.33 @@ -26,7 +26,7 @@ global $FlgChr; $p = parse_wikiname($page, 1); - if(preg_match('/^' . $FlgChr . '\\d+' . $FlgChr . '$/', $p)) + if(preg_match('/^' . $FlgChr .'!?'. '\\d+' . $FlgChr . '$/', $p)) { return 1; } $p = parse_freelink('((' . $page . '))', 1); if(preg_match('/^' . $FlgChr . '\\d+' . $FlgChr . '$/', $p)) @@ -42,12 +42,12 @@ return preg_replace('/' . $FlgChr . '/e', "new_entity(array('raw', '$FlgChr'))", $text, -1); } -function new_entity($array) +function new_entity($array,$blockElem=true) { global $Entity, $FlgChr; $Entity[count($Entity)] = $array; - return $FlgChr . (count($Entity) - 1) . $FlgChr; + return $FlgChr . ($blockElem ? '' : '!') . (count($Entity) - 1) . $FlgChr; } function parse_wikiname($text, $validate = 0) @@ -75,7 +75,7 @@ // translate sub-page markup into a qualified wikiword if ($name[0] == '/') { $link = $ParseObject . $name; } - return new_entity(array('ref', $link, $name, '', $anchor, $anchor)); + return new_entity(array('ref', $link, $name, '', $anchor, $anchor),false); } function parse_freelink($text, $validate = 0) @@ -112,7 +112,7 @@ { $link = $ParseObject . $link; } return new_entity(array('ref', $link, $appearance, '', - $anchor, $anchor_appearance)); + $anchor, $anchor_appearance), false); } function parse_interwiki($text) @@ -130,7 +130,7 @@ if(($url = $pagestore->interwiki($prefix)) != '') { - return new_entity(array('interwiki', $url . $ref, $prefix . ':' . $ref)); + return new_entity(array('interwiki', $url . $ref, $prefix . ':' . $ref), false); } return $prefix . ':' . $ref; @@ -167,7 +167,7 @@ if($display == '') { $display = '[' . $count++ . ']'; } - return new_entity(array('url', $value, $display)); + return new_entity(array('url', $value, $display), false); } function parse_macros($text) @@ -256,19 +256,20 @@ "pair_tokens('tt', q1('\\1'))", $text, -1); } -function pair_tokens($type, $text) +function pair_tokens($type, $text, $blockElem=false) { global $Entity, $FlgChr; $Entity[count($Entity)] = array($type . '_start'); $Entity[count($Entity)] = array($type . '_end'); - return $FlgChr . (count($Entity) - 2) . $FlgChr . $text . - $FlgChr . (count($Entity) - 1) . $FlgChr; + return $FlgChr . ($blockElem ? '' : '!') . (count($Entity) - 2) . $FlgChr . $text . + $FlgChr . ($blockElem ? '' : '!') . (count($Entity) - 1) . $FlgChr; } function parse_newline($text) { + global $FlgChr; static $last = array('', ''); // More than two consecutive newlines fold into two newlines. @@ -278,8 +279,9 @@ $last[0] = $last[1]; $last[1] = $text; - return preg_replace("/\\n(\\r)?/e", "new_entity(array('newline'))", - $text, -1); + // Lines not beginning with $FlgChr or beginning with $FlgChr! are paragraps + return preg_replace("/^(([^$FlgChr]|$FlgChr!).+)$/e", + "pair_tokens('paragraph', q1('\\1'), true)", $text, -1); } function parse_horiz($text) @@ -308,7 +310,7 @@ $Entity[count($Entity)] = array('code', $buffer); $buffer = ''; $in_code = 0; - return $FlgChr . (count($Entity) - 1) . $FlgChr; + return $FlgChr . (count($Entity) - 1) . $FlgChr; //$blockElem=true } $buffer = $buffer . parse_elements($text); @@ -339,7 +341,7 @@ $Entity[count($Entity)] = array('raw', $buffer); $buffer = ''; $in_html = 0; - return $FlgChr . (count($Entity) - 1) . $FlgChr; + return $FlgChr . (count($Entity) - 1) . $FlgChr; //$blockElem=true } $buffer = $buffer . parse_elements($text); @@ -529,7 +531,7 @@ function parse_elements($text) { global $FlgChr; - return preg_replace("/$FlgChr(\\d+)$FlgChr/e", "generate_element(q1('\\1'))", $text, -1); + return preg_replace("/$FlgChr!?(\\d+)$FlgChr/e", "generate_element(q1('\\1'))", $text, -1); } function generate_element($text) |
From: Even H. <ho...@us...> - 2003-09-10 13:14:46
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24275 Modified Files: defaults.php Log Message: Added html-functions for paragraph start and end Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- defaults.php 9 Sep 2003 10:32:54 -0000 1.9 +++ defaults.php 10 Sep 2003 13:14:42 -0000 1.10 @@ -208,6 +208,8 @@ 'head_start' => 'html_head_start', 'head_end' => 'html_head_end', 'newline' => 'html_newline', + 'paragraph_start' => 'html_paragraph_start', + 'paragraph_end' => 'html_paragraph_end', 'ref' => 'html_ref', 'url' => 'html_url', 'interwiki' => 'html_interwiki', |
From: Even H. <ho...@us...> - 2003-09-10 13:06:36
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv22774 Modified Files: macros.php Log Message: Changed TitleSearch to use either line markup or list markup, to facilitate the change from using <br /> to <p> </p>. See next commit. The change was needed to avoid having <ul> within <p>, which isn't allowed. And which didn't make a good display either... ;-) Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- macros.php 8 Sep 2003 11:10:12 -0000 1.14 +++ macros.php 10 Sep 2003 13:06:04 -0000 1.15 @@ -233,6 +233,7 @@ // Delimiter : Choose delimiter between text entries // Index : Divides the list according to first character, // or first character after value of option + // Oneline/List : Indicates to use line/list-markup // // Examples: [[TitleSearch Pages$]] // [[TitleSearch *]] @@ -261,6 +262,10 @@ if ($value == "prelist") { $useDelim = ''; } } else if ($name[0]=='d') { // Delimiter - Changes the delimiter used $useDelim = $value; + } else if ($name[0]=='o') { // Oneline - use line-markup + $useList = false; + } else if ($name[0]=='l') { // List - use list-markup + $useList = true; } else if ($name[0]=='i') { // Index - Use heading to divide index $showIndex = true; $level=2; if (is_numeric($value)) { @@ -283,15 +288,15 @@ $pattern=$search; } - if ($listAttr == "") { // If no listAttr set a proper default - $listAttr = 'class=oneline '; + if (!isset($useList) or !$useList) { + $useList = false; $useDelim = ($useDelim) ? $useDelim : ', '; } if ($showIndex) { $lastIndexChar =''; } else { - $text = entity_list("*", 'start', $listAttr); + if ($useList) { $text = entity_list("*", 'start', $listAttr); }; } // Loop through all pagetitles @@ -305,7 +310,7 @@ $text = preg_replace("/" . preg_quote($useDelim) . "$/", "\n", $text); } - $text .= entity_list("*", "end"); + if ($useList) { $text .= entity_list("*", "end"); }; } // Add index-header @@ -313,12 +318,14 @@ substr($page[1], 0, $indexCharNo+1) . new_entity(array('head_end', $level)); - // Start list again - $text .= entity_list("*", 'start', $listAttr); + if ($useList) { + // Start list again + $text .= entity_list("*", 'start', $listAttr); + } $lastIndexChar = $page[1][$indexCharNo]; } - $text .= entity_listitem("*", "start"); + if ($useList) { $text .= entity_listitem("*", "start"); }; $text .= sprintf("%s".$useDelim, html_ref($page[1], $page[1])); } } @@ -326,7 +333,7 @@ if ($useDelim) { $text = preg_replace("/" . preg_quote($useDelim) . "$/", "\n", $text); } - $text .= entity_list("*", "end"); + if ($useList) { $text .= entity_list("*", "end"); }; return parse_elements($text); } @@ -436,4 +443,4 @@ return $result; } -?> \ No newline at end of file +?> |
From: Scott M. <sm...@an...> - 2003-09-09 12:05:36
|
Forgot to copy the list. ----- Forwarded message from Scott Moonen <sm...@an...> ----- Date: Tue, 9 Sep 2003 05:04:11 -0700 From: Scott Moonen <sm...@an...> To: Even Holen <ho...@us...> Subject: Re: [Tavi-cvs-commit] CVS: tavi/parse transforms.php,1.30,1.31 Even, I observe that the following code simply appends the /Subpage link to the current page name. UseMod does it a different way: If you're in RootPage/SubPage, and you link to /SubPageTwo, it links to RootPage/SubPageTwo, instead of RootPage/SubPage/SubPageTwo (as your code does). I recommend the UseMod approach. But I don't care strongly. :-) -- Scott On Mon, Sep 08, 2003 at 03:31:48AM -0700, Even Holen wrote: > + $link = $name; > + // translate sub-page markup into a qualified wikiword > + if ($name[0] == '/') > + { $link = $ParseObject . $name; } > + return new_entity(array('ref', $link, $name, '', $anchor, $anchor)); . . . > + > + // translate sub-page markup into a qualified wikiword > + if ($link[0] == '/') > + { $link = $ParseObject . $link; } > + > return new_entity(array('ref', $link, $appearance, '', > $anchor, $anchor_appearance)); -- http://scott.andstuff.org/ |
From: Even H. <ho...@us...> - 2003-09-09 11:32:38
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv20101 Modified Files: diff.php Log Message: Safer detection of posix_getpid availability, and an attempt to fix the bug regarding running PHP in safe mode. And whilst at it I've added detection of availability of $DiffCmd Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/diff.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- diff.php 9 Sep 2003 11:25:26 -0000 1.8 +++ diff.php 9 Sep 2003 11:32:34 -0000 1.9 @@ -27,6 +27,9 @@ "but is located at $DiffCmd. Please relocate diffcmd or ". "make sysAdmins create symbolic links into this directory. Also remember to ". "change configuration of \$!DiffCmd accordingly.''."; + } else if (!file_exists($DiffCmd) or !is_readable($DiffCmd)) { + $diff = "''No diff available. \$!DiffCmd points to $DiffCmd which ". + "doesn't exist or isn't readable''"; } else { $diff = passthru("$DiffCmd $temp1 $temp2"); } |
From: Even H. <ho...@us...> - 2003-09-09 11:25:29
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv18668 Modified Files: diff.php Log Message: Safer detection of posix_getpid availability, and an attempt to fix the bug regarding running PHP in safe mode. Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/diff.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- diff.php 9 Sep 2003 10:48:18 -0000 1.7 +++ diff.php 9 Sep 2003 11:25:26 -0000 1.8 @@ -6,15 +6,7 @@ { global $TempDir, $DiffCmd, $ErrorCreatingTemp, $ErrorWritingTemp; - // $num = strncmp(PHP_OS, "WIN", 3) ? posix_getpid() : rand(); - if (function_exists('posix_getpid')) { - echo "Ooppss..."; - posix_getpid(); - } else { - echo "Not opps"; - posix_getpid(); - } - $num = posix_getpid(); + $num = function_exists('posix_getpid') ? posix_getpid() : rand(); $temp1 = $TempDir . '/wiki_' . $num . '_1.txt'; $temp2 = $TempDir . '/wiki_' . $num . '_2.txt'; @@ -28,7 +20,16 @@ fclose($h1); fclose($h2); - $diff = `$DiffCmd $temp1 $temp2`; + if (ini_get('safe_mode') and + (ini_get('safe_mode_exec_dir') != dirname($DiffCmd))) { + $diff = "''No diff available, due to wrong location of diffcmd. ". + "It should have been inside ". ini_get("safe_mode_exec_dir") . + "but is located at $DiffCmd. Please relocate diffcmd or ". + "make sysAdmins create symbolic links into this directory. Also remember to ". + "change configuration of \$!DiffCmd accordingly.''."; + } else { + $diff = passthru("$DiffCmd $temp1 $temp2"); + } unlink($temp1); unlink($temp2); |
From: Even H. <ho...@us...> - 2003-09-09 10:48:21
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11974 Modified Files: diff.php Log Message: Safer detection on whether posix_getpid() is available. Last one would fail from time to time Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/diff.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- diff.php 28 Apr 2003 00:34:04 -0000 1.6 +++ diff.php 9 Sep 2003 10:48:18 -0000 1.7 @@ -6,7 +6,15 @@ { global $TempDir, $DiffCmd, $ErrorCreatingTemp, $ErrorWritingTemp; - $num = strncmp(PHP_OS, "WIN", 3) ? posix_getpid() : rand(); + // $num = strncmp(PHP_OS, "WIN", 3) ? posix_getpid() : rand(); + if (function_exists('posix_getpid')) { + echo "Ooppss..."; + posix_getpid(); + } else { + echo "Not opps"; + posix_getpid(); + } + $num = posix_getpid(); $temp1 = $TempDir . '/wiki_' . $num . '_1.txt'; $temp2 = $TempDir . '/wiki_' . $num . '_2.txt'; @@ -36,4 +44,4 @@ return parseText($text, $DiffEngine, ''); } -?> +?> \ No newline at end of file |