SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: <var...@us...> - 2008年10月30日 11:08:25
Revision: 6339
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6339&view=rev
Author: vargenau
Date: 2008年10月30日 11:08:19 +0000 (2008年10月30日)
Log Message:
-----------
Update comments for isImageLink
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2008年10月28日 15:58:27 UTC (rev 6338)
+++ trunk/lib/InlineParser.php	2008年10月30日 11:08:19 UTC (rev 6339)
@@ -315,6 +315,7 @@
 * Support for the following attributes: see stdlib.php:LinkImage()
 * size=<precent>%, size=<width>x<height>
 * border=n, align=\w+, hspace=n, vspace=n
+ * width=n, height=n
 */
 function isImageLink($link) {
 if (!$link) return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 12:09:04
Revision: 6365
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6365&view=rev
Author: vargenau
Date: 2009年01月02日 12:09:02 +0000 (2009年1月02日)
Log Message:
-----------
Implemented Wikicreole monospace
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 11:30:43 UTC (rev 6364)
+++ trunk/lib/InlineParser.php	2009年01月02日 12:09:02 UTC (rev 6365)
@@ -609,6 +609,20 @@
 }
 }
 
+class Markup_wikicreole_monospace extends BalancedMarkup
+{
+ var $_start_regexp = "\\#\\#";
+ 
+ function getEndRegexp ($match) {
+ return "\\#\\#"; 
+ }
+ 
+ function markup ($match, $body) {
+ $tag = 'tt';
+ return new HtmlElement($tag, $body);
+ }
+}
+ 
 class Markup_wikicreole_subscript extends BalancedMarkup
 {
 var $_start_regexp = ",,";
@@ -995,6 +1009,7 @@
 $markup_types = array
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
+ 'wikicreole_monospace',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin',
 'isonumchars', 'isohexchars', /*'html_entities'*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 12:14:32
Revision: 6366
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6366&view=rev
Author: vargenau
Date: 2009年01月02日 12:14:27 +0000 (2009年1月02日)
Log Message:
-----------
Implemented Wikicreole superscript
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 12:09:02 UTC (rev 6365)
+++ trunk/lib/InlineParser.php	2009年01月02日 12:14:27 UTC (rev 6366)
@@ -622,7 +622,21 @@
 return new HtmlElement($tag, $body);
 }
 }
+
+class Markup_wikicreole_superscript extends BalancedMarkup
+{
+ var $_start_regexp = "\\^\\^";
 
+ function getEndRegexp ($match) {
+ return "\\^\\^"; 
+ }
+ 
+ function markup ($match, $body) {
+ $tag = 'sup';
+ return new HtmlElement($tag, $body);
+ }
+}
+ 
 class Markup_wikicreole_subscript extends BalancedMarkup
 {
 var $_start_regexp = ",,";
@@ -1009,7 +1023,7 @@
 $markup_types = array
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
- 'wikicreole_monospace',
+ 'wikicreole_monospace', 'wikicreole_superscript',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin',
 'isonumchars', 'isohexchars', /*'html_entities'*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 12:22:10
Revision: 6364
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6364&view=rev
Author: vargenau
Date: 2009年01月02日 11:30:43 +0000 (2009年1月02日)
Log Message:
-----------
Finish implementing Wikicreole syntax for links
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 11:04:05 UTC (rev 6363)
+++ trunk/lib/InlineParser.php	2009年01月02日 11:30:43 UTC (rev 6364)
@@ -470,10 +470,20 @@
 }
 }
 
+class Markup_wikicreolebracketlink extends SimpleMarkup
+{
+ var $_match_regexp = "\\#? \\[\\[ .*? [^]\\s] .*? \\]\\]";
+
+ function markup ($match) {
+ $link = LinkBracketLink($match);
+ assert($link->isInlineElement());
+ return $link;
+ }
+}
+
 class Markup_bracketlink extends SimpleMarkup
 {
 var $_match_regexp = "\\#? \\[ .*? [^]\\s] .*? \\]";
- // TODO: include second ] in regexp
 
 function markup ($match) {
 $link = LinkBracketLink($match);
@@ -983,7 +993,7 @@
 if (!$markup_types) {
 $non_default = false;
 $markup_types = array
- ('escape', 'bracketlink', 'url',
+ ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin',
@@ -1118,7 +1128,7 @@
 class LinkTransformer extends InlineTransformer
 {
 function LinkTransformer () {
- $this->InlineTransformer(array('escape', 'bracketlink', 'url',
+ $this->InlineTransformer(array('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'semanticlink', 'interwiki', 'wikiword', 
 ));
 }
@@ -1184,145 +1194,6 @@
 return $trfm->parse($text);
 }
 
-
-// $Log: not supported by cvs2svn $
-// Revision 1.106 2008年08月19日 18:08:14 vargenau
-// Implement Wikicreole syntax for tables
-//
-// Revision 1.105 2008年08月19日 18:05:40 vargenau
-// Implemented Wikicreole syntax for preformatted text
-//
-// Revision 1.104 2008年08月06日 09:28:41 vargenau
-// Allow header syntax in Mediawiki tables
-//
-// Revision 1.103 2008年08月03日 16:18:35 vargenau
-// Implement "{{foo?version=5}}" syntax for templates
-//
-// Revision 1.102 2008年08月03日 16:03:47 vargenau
-// Implement Wikicreole syntax for links
-//
-// Revision 1.101 2008年08月03日 15:56:20 vargenau
-// Implement Wikicreole syntax for line break
-//
-// Revision 1.100 2008年08月03日 15:52:31 vargenau
-// Implement Wikicreole syntax for subscript
-//
-// Revision 1.99 2008年05月06日 19:23:17 rurban
-// update (c)
-//
-// Revision 1.98 2008年03月21日 20:35:52 rurban
-// Improve upon embedded ImgObject, such as [ *.mp3 ], objects.
-// Object tags now render as label correctly and param tags are also added.
-//
-// Revision 1.97 2008年03月18日 20:25:49 rurban
-// Fixed "\n" => " " in [ link parsing ] by suggestion of Marc-Etienne
-//
-// Revision 1.96 2008年03月17日 19:06:39 rurban
-// fix bug#1904088 Some brackets links with \n cause the parser to crash
-//
-// Revision 1.95 2008年02月15日 20:02:49 vargenau
-// Allow <s> to strike; update Help for <s> and <strike>
-//
-// Revision 1.94 2008年01月31日 20:40:10 vargenau
-// Implemented Mediawiki-like syntax for tables
-//
-// Revision 1.93 2007年09月26日 16:54:34 rurban
-// Fix Bug#1802827 Template does not get expanded with {{ }} syntax.
-// by vargenau
-//
-// Revision 1.92 2007年08月10日 21:58:01 rurban
-// Improve SemanticLink parsings:
-// No units seperated by space allowed without []
-// For :: (relations) only words, no comma,
-// but for := (attributes) comma and dots are allowed. Units with groupsep.
-// Ending dots or comma are not part of the link.
-//
-// Revision 1.91 2007年06月07日 18:56:57 rurban
-// patch #1732793: allow \n, mult. {{ }} in one line, and single
-// letters (slightly improved) by AlJeux and ReiniUrban
-//
-// Revision 1.90 2007年03月18日 17:35:14 rurban
-// Fix :DontStoreLink
-//
-// Revision 1.89 2007年02月17日 14:16:28 rurban
-// fix color GREY to GRAY
-//
-// Revision 1.88 2007年01月21日 13:15:50 rurban
-// Support spaces in attributes and relation links
-//
-// Revision 1.87 2007年01月20日 15:53:51 rurban
-// Rewrite of SearchHighlight: through ActionPage and InlineParser
-//
-// Revision 1.86 2007年01月20日 11:25:07 rurban
-// add SpellCheck support
-//
-// Revision 1.85 2007年01月07日 18:42:49 rurban
-// Add support for non-bracket semantic relation parsing. Assert empty regex (interwikimap?) earlier. Change {{Template||}} vars handling to new style. Stricter interwikimap matching not to find semantic links
-//
-// Revision 1.84 2007年01月02日 13:18:07 rurban
-// fix semantic attributes syntax :=, not :-, disable DIVSPAN and PLUGIN_MARKUP_MAP
-//
-// Revision 1.83 2006年12月22日 00:23:24 rurban
-// Fix Bug #1540007 "hardened-php issue, crawlers related"
-// Broken str_replace with strings > 200 chars
-//
-// Revision 1.82 2006年12月02日 19:53:05 rurban
-// Simplify DISABLE_MARKUP_WIKIWORD handling by adding the new function
-// stdlib: array_remove(). Hopefully PHP will not add this natively sooner
-// or later.
-//
-// Revision 1.81 2006年11月19日 13:52:52 rurban
-// improve debug output: regex only once
-//
-// Revision 1.80 2006年10月12日 06:32:30 rurban
-// Optionally support new tags <div>, <span> with ENABLE_MARKUP_DIVSPAN (in work)
-//
-// Revision 1.79 2006年10月08日 12:38:11 rurban
-// New special interwiki link markup [:LinkTo] without storing the backlink
-//
-// Revision 1.78 2006年09月03日 09:53:52 rurban
-// more colors, case-insensitive color names
-//
-// Revision 1.77 2006年08月25日 19:02:02 rurban
-// patch #1348996 by Robert Litwiniec: fix show image semantics if label is given
-//
-// Revision 1.76 2006年08月19日 11:02:35 rurban
-// add strike and del to html emphasis: Patch #1542894 by Kai Krakow
-//
-// Revision 1.75 2006年08月15日 13:43:10 rurban
-// add Markup_xml_plugin (untested) and fix Markup_template_plugin
-//
-// Revision 1.74 2006年07月23日 14:03:18 rurban
-// add new feature: DISABLE_MARKUP_WIKIWORD
-//
-// Revision 1.73 2006年04月15日 12:20:36 rurban
-// fix relatives links patch by Joel Schaubert for [/
-//
-// Revision 1.72 2006年03月07日 20:43:29 rurban
-// relative external link, if no internal subpage. by joel Schaubert
-//
-// Revision 1.71 2005年11月14日 22:31:12 rurban
-// add SemanticWeb support
-//
-// Revision 1.70 2005年10月31日 16:45:23 rurban
-// added cfg-able markups only for default TextTransformation, not for links and others
-//
-// Revision 1.69 2005年09月14日 05:57:19 rurban
-// make ENABLE_MARKUP_TEMPLATE optional
-//
-// Revision 1.68 2005年09月10日 21:24:32 rurban
-// optionally support {{Template|vars}} syntax
-//
-// Revision 1.67 2005年06月06日 17:41:20 rurban
-// support new ENABLE_MARKUP_COLOR
-//
-// Revision 1.66 2005年04月23日 11:15:49 rurban
-// handle allowed inlined objects within INLINE_IMAGES
-//
-// Revision 1.65 2005年03月27日 18:24:17 rurban
-// add Log
-//
-
 // (c-file-style: "gnu")
 // Local Variables:
 // mode: php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 12:22:51
Revision: 6367
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6367&view=rev
Author: vargenau
Date: 2009年01月02日 12:22:48 +0000 (2009年1月02日)
Log Message:
-----------
Implemented Wikicreole italics
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 12:14:27 UTC (rev 6366)
+++ trunk/lib/InlineParser.php	2009年01月02日 12:22:48 UTC (rev 6367)
@@ -609,6 +609,20 @@
 }
 }
 
+class Markup_wikicreole_italics extends BalancedMarkup
+{
+ var $_start_regexp = "\\/\\/";
+ 
+ function getEndRegexp ($match) {
+ return "\\/\\/"; 
+ }
+ 
+ function markup ($match, $body) {
+ $tag = 'em';
+ return new HtmlElement($tag, $body);
+ }
+}
+
 class Markup_wikicreole_monospace extends BalancedMarkup
 {
 var $_start_regexp = "\\#\\#";
@@ -1023,6 +1037,7 @@
 $markup_types = array
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
+ 'wikicreole_italics',
 'wikicreole_monospace', 'wikicreole_superscript',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 12:31:27
Revision: 6368
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6368&view=rev
Author: vargenau
Date: 2009年01月02日 12:31:22 +0000 (2009年1月02日)
Log Message:
-----------
Implemented Wikicreole bold
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 12:22:48 UTC (rev 6367)
+++ trunk/lib/InlineParser.php	2009年01月02日 12:31:22 UTC (rev 6368)
@@ -623,6 +623,20 @@
 }
 }
 
+class Markup_wikicreole_bold extends BalancedMarkup
+{
+ var $_start_regexp = "\\*\\*";
+ 
+ function getEndRegexp ($match) {
+ return "\\*\\*"; 
+ }
+ 
+ function markup ($match, $body) {
+ $tag = 'strong';
+ return new HtmlElement($tag, $body);
+ }
+}
+
 class Markup_wikicreole_monospace extends BalancedMarkup
 {
 var $_start_regexp = "\\#\\#";
@@ -1037,7 +1051,7 @@
 $markup_types = array
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
- 'wikicreole_italics',
+ 'wikicreole_italics', 'wikicreole_bold',
 'wikicreole_monospace', 'wikicreole_superscript',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月02日 20:38:05
Revision: 6369
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6369&view=rev
Author: vargenau
Date: 2009年01月02日 20:38:01 +0000 (2009年1月02日)
Log Message:
-----------
Allow lang attribute for <abbr> and <acronym>
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月02日 12:31:22 UTC (rev 6368)
+++ trunk/lib/InlineParser.php	2009年01月02日 20:38:01 UTC (rev 6369)
@@ -794,7 +794,8 @@
 {
 //rurban: abbr|acronym need an optional title tag.
 //sf.net bug #728595
- var $_start_regexp = "<(?: abbr|acronym )(?: \stitle=[^>]*)?>";
+ // allowed attributes: title and lang
+ var $_start_regexp = "<(?: abbr|acronym )(?: [^>]*)?>"; 
 
 function getEndRegexp ($match) {
 	if (substr($match,1,4) == 'abbr')
@@ -809,12 +810,16 @@
 	 $tag = 'abbr';
 	else
 	 $tag = 'acronym';
- 	$rest = substr($match,1+strlen($tag),-1);
- 	if (!empty($rest)) {
- 	 list($key,$val) = explode("=",$rest);
- 	 $args = array($key => $val);
- 	} else $args = array();
- return new HtmlElement($tag, $args, $body);
+ $rest = substr($match,1+strlen($tag),-1);
+ $attrs = parse_attributes($rest);
+ // Remove attributes other than title and lang
+ $allowedargs = array();
+ foreach ($attrs as $key => $value) {
+ if (in_array ($key, array("title", "lang"))) {
+ $allowedargs[$key] = $value;
+ }
+ }
+ return new HtmlElement($tag, $allowedargs, $body);
 }
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月08日 09:56:59
Revision: 6381
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6381&view=rev
Author: vargenau
Date: 2009年01月08日 09:56:52 +0000 (2009年1月08日)
Log Message:
-----------
Use is_image
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月08日 09:47:02 UTC (rev 6380)
+++ trunk/lib/InlineParser.php	2009年01月08日 09:56:52 UTC (rev 6381)
@@ -937,10 +937,7 @@
 }
 
 // It's not a Mediawiki template, it's a Wikicreole image
- if ((string_ends_with($imagename, ".jpg"))
- or (string_ends_with($imagename, ".jpeg"))
- or (string_ends_with($imagename, ".gif"))
- or (string_ends_with($imagename, ".png"))) {
+ if (is_image($imagename)) {
 return LinkImage(UPLOAD_DATA_PATH . $imagename, $alt);
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月19日 21:16:32
Revision: 6417
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6417&view=rev
Author: vargenau
Date: 2009年01月19日 21:16:25 +0000 (2009年1月19日)
Log Message:
-----------
Allow single-line Wikicreole plugins
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月19日 10:49:42 UTC (rev 6416)
+++ trunk/lib/InlineParser.php	2009年01月19日 21:16:25 UTC (rev 6417)
@@ -855,12 +855,22 @@
 var $_match_regexp = '<\?plugin(?:-form)?\s[^\n]+?\?>';
 
 function markup ($match) {
-	//$xml = new Cached_PluginInvocation($match);
-	//$xml->setTightness(true,true);
 	return new Cached_PluginInvocation($match);
 }
 }
 
+// Special version for single-line Wikicreole plugins formatting.
+class Markup_plugin_wikicreole extends SimpleMarkup
+{
+ var $_match_regexp = '<<[^\n]+?>>';
+
+ function markup ($match) {
+ $pi = str_replace("<<", "<?plugin ", $match);
+ $pi = str_replace(">>", " ?>", $pi);
+	return new Cached_PluginInvocation($pi);
+ }
+}
+
 // Special version for plugins in xml syntax 
 // <name arg=value>body</name> or <name /> => < ? plugin pluginname arg=value body ? >
 // PLUGIN_MARKUP_MAP = "html:RawHtml dot:GraphViz toc:CreateToc amath:AsciiMath richtable:RichTable include:IncludePage tex:TexToPng"
@@ -1056,7 +1066,7 @@
 'wikicreole_italics', 'wikicreole_bold',
 'wikicreole_monospace', 'wikicreole_superscript',
 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
- 'html_emphasis', 'html_abbr', 'plugin',
+ 'html_emphasis', 'html_abbr', 'plugin', 'plugin_wikicreole',
 'isonumchars', 'isohexchars', /*'html_entities'*/
 );
 	 if (DISABLE_MARKUP_WIKIWORD)
@@ -1199,7 +1209,7 @@
 function NowikiTransformer () {
 $this->InlineTransformer
 (array('linebreak',
- 'html_emphasis', 'html_abbr', 'plugin',
+ 'html_emphasis', 'html_abbr', 'plugin', 'plugin_wikicreole',
 'isonumchars', 'isohexchars', /*'html_entities',*/
 ));
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月23日 13:47:13
Revision: 6433
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6433&view=rev
Author: vargenau
Date: 2009年01月23日 13:47:05 +0000 (2009年1月23日)
Log Message:
-----------
Use tt instead of pre for inline nowiki
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月23日 13:22:51 UTC (rev 6432)
+++ trunk/lib/InlineParser.php	2009年01月23日 13:47:05 UTC (rev 6433)
@@ -919,7 +919,7 @@
 
 function markup ($match) {
 // Remove {{{ and }}}
- return new HtmlElement('pre', substr($match, 3, -3));
+ return new HtmlElement('tt', substr($match, 3, -3));
 }
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月25日 22:26:16
Revision: 6454
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6454&view=rev
Author: vargenau
Date: 2009年01月25日 22:26:10 +0000 (2009年1月25日)
Log Message:
-----------
Use parse_attributes in divspan
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月25日 15:19:16 UTC (rev 6453)
+++ trunk/lib/InlineParser.php	2009年01月25日 22:26:10 UTC (rev 6454)
@@ -782,9 +782,10 @@
 	 $tag = 'div';
 	$rest = substr($match,1+strlen($tag),-1);
 	if (!empty($rest)) {
- 	 list($key,$val) = explode("=",$rest);
- 	 $args = array($key => $val);
- 	} else $args = array();
+ $args = parse_attributes($rest);
+ 	} else {
+ $args = array();
+ }
 return new HtmlElement($tag, $args, $body);
 }
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月26日 19:01:08
Revision: 6455
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6455&view=rev
Author: vargenau
Date: 2009年01月26日 19:00:59 +0000 (2009年1月26日)
Log Message:
-----------
HTML comment
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月25日 22:26:10 UTC (rev 6454)
+++ trunk/lib/InlineParser.php	2009年01月26日 19:00:59 UTC (rev 6455)
@@ -849,6 +849,17 @@
 }
 }
 
+// Single-line HTML comment
+// <!-- This is a comment -->
+class Markup_html_comment extends SimpleMarkup
+{
+ var $_match_regexp = '<!--.*?-->';
+
+ function markup ($match) {
+ return HTML::raw('');
+ }
+}
+
 // Special version for single-line plugins formatting, 
 // like: '<small>< ?plugin PopularNearby ? ></small>'
 class Markup_plugin extends SimpleMarkup
@@ -1036,6 +1047,7 @@
 $non_default = false;
 $markup_types = array
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
+ 'html_comment',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
 'wikicreole_italics', 'wikicreole_bold',
 'wikicreole_monospace', 'wikicreole_superscript',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月27日 14:45:17
Revision: 6457
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6457&view=rev
Author: vargenau
Date: 2009年01月27日 14:45:01 +0000 (2009年1月27日)
Log Message:
-----------
Mediawiki compatibility: allow "Image:" and "File:" as synonyms of "Upload:"
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月27日 14:25:00 UTC (rev 6456)
+++ trunk/lib/InlineParser.php	2009年01月27日 14:45:01 UTC (rev 6457)
@@ -354,6 +354,15 @@
 $rawlink = $temp;
 }
 
+ // Mediawiki compatibility: allow "Image:" and "File:"
+ // as synonyms of "Upload:"
+ if (string_starts_with($rawlink, "Image:")) {
+ $rawlink = str_replace("Image:", "Upload:", $rawlink);
+ }
+ if (string_starts_with($rawlink, "File:")) {
+ $rawlink = str_replace("File:", "Upload:", $rawlink);
+ }
+
 $label = UnWikiEscape($label);
 /*
 * Check if the user has typed a explicit URL. This solves the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月31日 19:39:00
Revision: 6476
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6476&view=rev
Author: vargenau
Date: 2009年01月31日 19:38:55 +0000 (2009年1月31日)
Log Message:
-----------
Put superscript and subscript first
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年01月31日 19:35:23 UTC (rev 6475)
+++ trunk/lib/InlineParser.php	2009年01月31日 19:38:55 UTC (rev 6476)
@@ -1058,9 +1058,11 @@
 ('escape', 'wikicreolebracketlink', 'bracketlink', 'url',
 'html_comment',
 'interwiki', 'semanticlink', 'wikiword', 'linebreak',
+ 'wikicreole_superscript',
+ 'wikicreole_subscript',
 'wikicreole_italics', 'wikicreole_bold',
- 'wikicreole_monospace', 'wikicreole_superscript',
- 'wikicreole_subscript', 'old_emphasis', 'nestled_emphasis',
+ 'wikicreole_monospace', 
+ 'old_emphasis', 'nestled_emphasis',
 'html_emphasis', 'html_abbr', 'plugin', 'plugin_wikicreole',
 'isonumchars', 'isohexchars', /*'html_entities'*/
 );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年04月19日 18:32:28
Revision: 6797
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6797&view=rev
Author: vargenau
Date: 2009年04月19日 18:32:17 +0000 (2009年4月19日)
Log Message:
-----------
Allow absolute path for image
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年04月19日 18:26:36 UTC (rev 6796)
+++ trunk/lib/InlineParser.php	2009年04月19日 18:32:17 UTC (rev 6797)
@@ -27,8 +27,6 @@
 * @package Markup
 * @author Geoffrey T. Dairiki, Reini Urban
 */
-/**
- */
 
 /**
 * This is the character used in wiki markup to escape characters with
@@ -980,7 +978,12 @@
 
 // It's not a Mediawiki template, it's a Wikicreole image
 if (is_image($imagename)) {
- return LinkImage(UPLOAD_DATA_PATH . $imagename, $alt);
+ if ($imagename[0] == '/') {
+ // We should not hardcode "/phpwiki"
+ return LinkImage(SERVER_URL . "/phpwiki" . $imagename, $alt);
+ } else {
+ return LinkImage(UPLOAD_DATA_PATH . $imagename, $alt);
+ }
 }
 
 $page = str_replace("\n", "", $page); 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年05月27日 16:10:17
Revision: 6814
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6814&view=rev
Author: vargenau
Date: 2009年05月27日 16:10:12 +0000 (2009年5月27日)
Log Message:
-----------
Handle "[[SandBox|{{image.jpg}}]]" and "[[SandBox|{{image.jpg|alt text}}]]"
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年05月25日 13:18:10 UTC (rev 6813)
+++ trunk/lib/InlineParser.php	2009年05月27日 16:10:12 UTC (rev 6814)
@@ -393,6 +393,19 @@
 } else if (preg_match('/^(\.\.\/|\/)/', $link)) {
 return new Cached_ExternalLink($link, $label);
 }
+
+ // Handle "[[SandBox|{{image.jpg}}]]" and "[[SandBox|{{image.jpg|alt text}}]]"
+ if (string_starts_with($label, "{{")) {
+ $imgurl = substr($label, 2, -2); // Remove "{{" and "}}"
+ $pipe = strpos($imgurl, '|');
+ if ($pipe === false) {
+ $label = LinkImage(UPLOAD_DATA_PATH . $imgurl, $link);
+ } else {
+ list($img, $alt) = explode("|", $imgurl);
+ $label = LinkImage(UPLOAD_DATA_PATH . $img, $alt);
+ }
+ } else
+ 
 // [label|link]
 // If label looks like a url to an image or object, we want an image link.
 if (isImageLink($label)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ru...@us...> - 2009年06月04日 11:26:16
Revision: 6865
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6865&view=rev
Author: rurban
Date: 2009年06月04日 11:26:00 +0000 (2009年6月04日)
Log Message:
-----------
abbr|acronym need an optional title tag. sf.net bug #728595
do not hardcode /phpwiki path, use DATA_PATH
Support ENABLE_MARKUP_MEDIAWIKI_TABLE
Add Markup_wikicreoletable_plugin 
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月04日 11:22:23 UTC (rev 6864)
+++ trunk/lib/InlineParser.php	2009年06月04日 11:26:00 UTC (rev 6865)
@@ -504,6 +504,7 @@
 class Markup_bracketlink extends SimpleMarkup
 {
 var $_match_regexp = "\\#? \\[ .*? [^]\\s] .*? \\]";
+ // TODO: include second ] in regexp
 
 function markup ($match) {
 $link = LinkBracketLink($match);
@@ -816,7 +817,7 @@
 //rurban: abbr|acronym need an optional title tag.
 //sf.net bug #728595
 // allowed attributes: title and lang
- var $_start_regexp = "<(?: abbr|acronym )(?: [^>]*)?>"; 
+ var $_start_regexp = "<(?: abbr|acronym )(?: \s(?: title|lang)=[^>]*)?>"; 
 
 function getEndRegexp ($match) {
 	if (substr($match,1,4) == 'abbr')
@@ -992,8 +993,7 @@
 // It's not a Mediawiki template, it's a Wikicreole image
 if (is_image($imagename)) {
 if ($imagename[0] == '/') {
- // We should not hardcode "/phpwiki"
- return LinkImage(SERVER_URL . "/phpwiki" . $imagename, $alt);
+ return LinkImage(DATA_PATH . '/' . $imagename, $alt);
 } else {
 return LinkImage(getUploadDataPath() . $imagename, $alt);
 }
@@ -1023,6 +1023,33 @@
 }
 }
 
+/** ENABLE_MARKUP_MEDIAWIKI_TABLE
+ * Table syntax similar to Mediawiki
+ * {|
+ * => <?plugin MediawikiTable
+ * |}
+ * => ?>
+ */
+class Markup_mediawikitable_plugin extends SimpleMarkup
+{
+ var $_match_regexp = '\{\|.*?\|\}';
+
+ function markup ($match) {
+ $s = '<'.'?plugin MediawikiTable ' . $match . '?'.'>';
+ return new Cached_PluginInvocation($s);
+ }
+}
+
+class Markup_wikicreoletable_plugin extends SimpleMarkup
+{
+ var $_match_regexp = '^\|=.*?\?>';
+
+ function markup ($match) {
+ $s = '<'.'?plugin WikicreoleTable ' . $match . '?'.'>';
+ return new Cached_PluginInvocation($s);
+ }
+}
+
 // "..." => "&#133;" browser specific display (not cached?)
 // Support some HTML::Entities: (C) for copy, --- for mdash, -- for ndash
 // TODO: "--" => "&emdash;" browser specific display (not cached?)
@@ -1117,10 +1144,13 @@
 $this->_addMarkup(new Markup_html_divspan);
 if (ENABLE_MARKUP_COLOR and !$non_default)
 $this->_addMarkup(new Markup_color);
+ $this->_addMarkup(new Markup_wikicreoletable_plugin);
 // Markup_wikicreole_preformatted must be before Markup_template_plugin
 $this->_addMarkup(new Markup_wikicreole_preformatted);
 if (ENABLE_MARKUP_TEMPLATE and !$non_default)
 $this->_addMarkup(new Markup_template_plugin);
+ if (ENABLE_MARKUP_MEDIAWIKI_TABLE)
+ $this->_addMarkup(new Markup_mediawikitable_plugin);
 // This does not work yet
 if (0 and PLUGIN_MARKUP_MAP and !$non_default)
 $this->_addMarkup(new Markup_xml_plugin);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年06月07日 06:56:39
Revision: 6905
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6905&view=rev
Author: vargenau
Date: 2009年06月07日 06:55:53 +0000 (2009年6月07日)
Log Message:
-----------
Revert 6865
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月06日 16:07:23 UTC (rev 6904)
+++ trunk/lib/InlineParser.php	2009年06月07日 06:55:53 UTC (rev 6905)
@@ -504,7 +504,6 @@
 class Markup_bracketlink extends SimpleMarkup
 {
 var $_match_regexp = "\\#? \\[ .*? [^]\\s] .*? \\]";
- // TODO: include second ] in regexp
 
 function markup ($match) {
 $link = LinkBracketLink($match);
@@ -817,7 +816,7 @@
 //rurban: abbr|acronym need an optional title tag.
 //sf.net bug #728595
 // allowed attributes: title and lang
- var $_start_regexp = "<(?: abbr|acronym )(?: \s(?: title|lang)=[^>]*)?>"; 
+ var $_start_regexp = "<(?: abbr|acronym )(?: [^>]*)?>"; 
 
 function getEndRegexp ($match) {
 	if (substr($match,1,4) == 'abbr')
@@ -993,7 +992,8 @@
 // It's not a Mediawiki template, it's a Wikicreole image
 if (is_image($imagename)) {
 if ($imagename[0] == '/') {
- return LinkImage(DATA_PATH . '/' . $imagename, $alt);
+ // We should not hardcode "/phpwiki"
+ return LinkImage(SERVER_URL . "/phpwiki" . $imagename, $alt);
 } else {
 return LinkImage(getUploadDataPath() . $imagename, $alt);
 }
@@ -1023,33 +1023,6 @@
 }
 }
 
-/** ENABLE_MARKUP_MEDIAWIKI_TABLE
- * Table syntax similar to Mediawiki
- * {|
- * => <?plugin MediawikiTable
- * |}
- * => ?>
- */
-class Markup_mediawikitable_plugin extends SimpleMarkup
-{
- var $_match_regexp = '\{\|.*?\|\}';
-
- function markup ($match) {
- $s = '<'.'?plugin MediawikiTable ' . $match . '?'.'>';
- return new Cached_PluginInvocation($s);
- }
-}
-
-class Markup_wikicreoletable_plugin extends SimpleMarkup
-{
- var $_match_regexp = '^\|=.*?\?>';
-
- function markup ($match) {
- $s = '<'.'?plugin WikicreoleTable ' . $match . '?'.'>';
- return new Cached_PluginInvocation($s);
- }
-}
-
 // "..." => "&#133;" browser specific display (not cached?)
 // Support some HTML::Entities: (C) for copy, --- for mdash, -- for ndash
 // TODO: "--" => "&emdash;" browser specific display (not cached?)
@@ -1144,13 +1117,10 @@
 $this->_addMarkup(new Markup_html_divspan);
 if (ENABLE_MARKUP_COLOR and !$non_default)
 $this->_addMarkup(new Markup_color);
- $this->_addMarkup(new Markup_wikicreoletable_plugin);
 // Markup_wikicreole_preformatted must be before Markup_template_plugin
 $this->_addMarkup(new Markup_wikicreole_preformatted);
 if (ENABLE_MARKUP_TEMPLATE and !$non_default)
 $this->_addMarkup(new Markup_template_plugin);
- if (ENABLE_MARKUP_MEDIAWIKI_TABLE)
- $this->_addMarkup(new Markup_mediawikitable_plugin);
 // This does not work yet
 if (0 and PLUGIN_MARKUP_MAP and !$non_default)
 $this->_addMarkup(new Markup_xml_plugin);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年06月23日 17:56:05
Revision: 6953
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6953&view=rev
Author: vargenau
Date: 2009年06月23日 17:55:57 +0000 (2009年6月23日)
Log Message:
-----------
Add "title, lang, id, alt" to isImageLink
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月23日 17:54:20 UTC (rev 6952)
+++ trunk/lib/InlineParser.php	2009年06月23日 17:55:57 UTC (rev 6953)
@@ -314,12 +314,13 @@
 * size=<precent>%, size=<width>x<height>
 * border=n, align=\w+, hspace=n, vspace=n
 * width=n, height=n
+ * title, lang, id, alt
 */
 function isImageLink($link) {
 if (!$link) return false;
 assert(defined('INLINE_IMAGES'));
 return preg_match("/\\.(" . INLINE_IMAGES . ")$/i", $link)
- or preg_match("/\\.(" . INLINE_IMAGES . ")\s+(size|border|align|hspace|vspace|type|data|width|height)=/i", $link);
+ or preg_match("/\\.(" . INLINE_IMAGES . ")\s+(size|border|align|hspace|vspace|type|data|width|height|title|lang|id|alt)=/i", $link);
 }
 
 function LinkBracketLink($bracketlink) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年06月25日 08:47:07
Revision: 6956
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6956&view=rev
Author: vargenau
Date: 2009年06月25日 08:46:58 +0000 (2009年6月25日)
Log Message:
-----------
Display error at point of error instead of logging it.
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月24日 08:04:35 UTC (rev 6955)
+++ trunk/lib/InlineParser.php	2009年06月25日 08:46:58 UTC (rev 6956)
@@ -864,9 +864,9 @@
 and (strspn(substr($color,1),'0123456789ABCDEF') == strlen($color)-1)) {
 return new HtmlElement('font', array('color' => $color), $body);
 } else {
- trigger_error(sprintf(_("unknown color %s ignored"), substr($match, 7, -1)), E_USER_WARNING);
+ return new HtmlElement('span', array('class' => 'error'), 
+ sprintf(_("unknown color %s ignored"), substr($match, 7, -1)));
 }
- 	
 }
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年06月25日 09:15:12
Revision: 6957
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6957&view=rev
Author: vargenau
Date: 2009年06月25日 09:15:10 +0000 (2009年6月25日)
Log Message:
-----------
Use CCS instead of font tag
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月25日 08:46:58 UTC (rev 6956)
+++ trunk/lib/InlineParser.php	2009年06月25日 09:15:10 UTC (rev 6957)
@@ -855,14 +855,14 @@
 var $_end_regexp = "%%";
 
 function markup ($match, $body) {
- 	$color = strtoupper(substr($match, 7, -1));
+ 	$color = strtolower(substr($match, 7, -1));
 if (strlen($color) != 7 
- and in_array($color, array('RED', 'BLUE', 'GRAY', 'YELLOW', 'GREEN', 'CYAN', 'BLACK'))) 
+ and in_array($color, array('red', 'blue', 'gray', 'yellow', 'green', 'cyan', 'black')))
 	{ // must be a valid color name
- return new HtmlElement('font', array('color' => $color), $body);
+ return new HtmlElement('span', array('style' => "color: $color"), $body);
 } elseif ((substr($color,0,1) == '#') 
- and (strspn(substr($color,1),'0123456789ABCDEF') == strlen($color)-1)) {
- return new HtmlElement('font', array('color' => $color), $body);
+ and (strspn(substr($color,1),'0123456789abcdef') == strlen($color)-1)) {
+ return new HtmlElement('span', array('style' => "color: $color"), $body);
 } else {
 return new HtmlElement('span', array('class' => 'error'), 
 sprintf(_("unknown color %s ignored"), substr($match, 7, -1)));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年06月25日 12:58:09
Revision: 6960
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6960&view=rev
Author: vargenau
Date: 2009年06月25日 12:47:08 +0000 (2009年6月25日)
Log Message:
-----------
Check length of hex color
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年06月25日 11:56:16 UTC (rev 6959)
+++ trunk/lib/InlineParser.php	2009年06月25日 12:47:08 UTC (rev 6960)
@@ -856,13 +856,12 @@
 
 function markup ($match, $body) {
 	$color = strtolower(substr($match, 7, -1));
- if (strlen($color) != 7 
- and in_array($color, array('red', 'blue', 'gray', 'yellow', 'green', 'cyan', 'black')))
-	{ // must be a valid color name
+
+ if (in_array($color, array('red', 'blue', 'gray', 'yellow', 'green', 'cyan', 'black'))
+ or ((substr($color,0,1) == '#') 
+ and ((strlen($color) == 4) or (strlen($color) == 7))
+ and (strspn(substr($color,1),'0123456789abcdef') == strlen($color)-1))) {
 return new HtmlElement('span', array('style' => "color: $color"), $body);
- } elseif ((substr($color,0,1) == '#') 
- and (strspn(substr($color,1),'0123456789abcdef') == strlen($color)-1)) {
- return new HtmlElement('span', array('style' => "color: $color"), $body);
 } else {
 return new HtmlElement('span', array('class' => 'error'), 
 sprintf(_("unknown color %s ignored"), substr($match, 7, -1)));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年07月07日 20:05:03
Revision: 7006
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7006&view=rev
Author: vargenau
Date: 2009年07月07日 20:04:52 +0000 (2009年7月07日)
Log Message:
-----------
Implement Mediawiki <nowiki>
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年07月07日 12:20:11 UTC (rev 7005)
+++ trunk/lib/InlineParser.php	2009年07月07日 20:04:52 UTC (rev 7006)
@@ -976,6 +976,20 @@
 }
 
 /**
+ * Mediawiki <nowiki>
+ * <nowiki>...</nowiki>
+ */
+class Markup_nowiki extends SimpleMarkup
+{
+ var $_match_regexp = '<nowiki>.*?<\/nowiki>';
+
+ function markup ($match) {
+ // Remove <nowiki> and </nowiki>
+ return HTML::raw(substr($match, 8, -9));
+ }
+}
+
+/**
 * Wikicreole preformatted
 * {{{
 * }}}
@@ -1137,6 +1151,7 @@
 $class = "Markup_$mtype";
 $this->_addMarkup(new $class);
 }
+ $this->_addMarkup(new Markup_nowiki);
 if (ENABLE_MARKUP_DIVSPAN and !$non_default)
 $this->_addMarkup(new Markup_html_divspan);
 if (ENABLE_MARKUP_COLOR and !$non_default)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年08月06日 08:48:39
Revision: 7061
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7061&view=rev
Author: vargenau
Date: 2009年08月06日 08:48:31 +0000 (2009年8月06日)
Log Message:
-----------
Allow "#[[" syntax for anchors
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年08月05日 20:05:32 UTC (rev 7060)
+++ trunk/lib/InlineParser.php	2009年08月06日 08:48:31 UTC (rev 7061)
@@ -330,7 +330,7 @@
 
 $wikicreolesyntax = false;
 
- if (string_starts_with($bracketlink, "[[")) {
+ if (string_starts_with($bracketlink, "[[") or string_starts_with($bracketlink, "#[[")) {
 $wikicreolesyntax = true;
 $bracketlink = str_replace("[[", "[", $bracketlink);
 $bracketlink = str_replace("]]", "]", $bracketlink);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年08月07日 05:02:38
Revision: 7064
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7064&view=rev
Author: vargenau
Date: 2009年08月07日 05:02:25 +0000 (2009年8月07日)
Log Message:
-----------
Make predefined icons work in both Gforge and plain Phpwiki
Modified Paths:
--------------
 trunk/lib/InlineParser.php
Modified: trunk/lib/InlineParser.php
===================================================================
--- trunk/lib/InlineParser.php	2009年08月06日 15:18:47 UTC (rev 7063)
+++ trunk/lib/InlineParser.php	2009年08月07日 05:02:25 UTC (rev 7064)
@@ -1045,7 +1045,11 @@
 );
 foreach ($predefinedicons as $ascii => $icon) {
 if (trim($page) == $ascii) {
- return LinkImage("/wiki/themes/default/images/$icon", $page);
+ if (defined('GFORGE') and GFORGE) {
+ return LinkImage("/wiki/themes/default/images/$icon", $page);
+ } else {
+ return LinkImage(SERVER_URL . "/phpwiki/themes/default/images/$icon", $page);
+ }
 }
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
1 2 3 > >> (Page 1 of 3)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /