[evolvis-commits] r16703: Update from Phpwiki

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:36:11 CET 2011


Author: mirabilos
Date: 2011-03-01 01:36:11 +0100 (Tue, 01 Mar 2011)
New Revision: 16703

Added:
   trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FImages
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/lib/plugin/MediawikiTable.php
   trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FMediawikiTablePlugin
   trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/PhpWikiManual
Log:
Update from Phpwiki

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/lib/plugin/MediawikiTable.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/lib/plugin/MediawikiTable.php	2011-03-01 00:36:07 UTC (rev 16702)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/lib/plugin/MediawikiTable.php	2011-03-01 00:36:11 UTC (rev 16703)
@@ -1,5 +1,5 @@
 <?php // -*-php-*-
-// rcs_id('$Id: MediawikiTable.php 7729 2010-11-08 13:45:12Z vargenau $');
+// rcs_id('$Id: MediawikiTable.php 7735 2010-11-09 13:45:32Z vargenau $');
 /*
  * Copyright (C) 2003 Sameer D. Sahasrabuddhe
  * Copyright (C) 2005 $ThePhpWikiProgrammingTeam
@@ -76,8 +76,19 @@
         $argstr = str_replace("!!", "\n! ", $argstr);
 
         $lines = explode("\n", $argstr);
+
         $table = HTML::table();
+        $caption = HTML::caption();
+        $thead = HTML::thead();
+        $tbody = HTML::tbody();
 
+        // Do we need a <thead>?
+        // 0 = unknown
+        // 1 = inside (parsing cells)
+        // 2 = false (no thead, only tbody)
+        // 3 = true (there is a thead)
+        $theadstatus = 0;
+
         // We always generate an Id for the table.
         // This is convenient for tables of class "sortable".
         // If user provides an Id, the generated Id will be overwritten below.
@@ -104,7 +115,7 @@
             return HTML::raw('');
         }
 
-        foreach ($lines as $line){
+        foreach ($lines as $line) {
             if (substr($line,0,2) == "|}") {
                 // End of table
                 continue;
@@ -124,11 +135,9 @@
                         unset($cell);
                     }
                     if (!empty($row->_content)) {
-                        if (isset($thead)) {
+                        if ($theadstatus == 1) { // inside
+                            $theadstatus = 3; // true
                             $thead->pushContent($row);
-                            $table->pushContent($thead);
-                            unset($thead);
-                            $tbody = HTML::tbody();
                         } else {
                             $tbody->pushContent($row);
                         }
@@ -154,7 +163,6 @@
             // Table caption
             if (substr($line,0,2) == "|+") {
 
-                $caption = HTML::caption();
                 $line = substr($line,2);
                 $pospipe = strpos($line, "|");
                 $posbracket = strpos($line, "[");
@@ -169,8 +177,7 @@
                     $line=substr($line, $pospipe+1);
                 }
 
-                $caption->pushContent(trim($line));
-                $table->pushContent($caption);
+                $caption->setContent(TransformInline(trim($line)));
             }
 
             if (((substr($line,0,1) == "|") or (substr($line,0,1) == "!")) and isset($row)) {
@@ -186,11 +193,15 @@
                     $row->pushContent($cell);
                 }
                 if (substr($line,0,1) == "!") {
+                    if ($theadstatus == 0) { // unknown
+                        $theadstatus = 1; // inside
+                    }
                     $cell = HTML::th();   // Header
-                    $thead = HTML::thead();
                 } else {
+                    if ($theadstatus == 1) { // inside
+                        $theadstatus = 2; // false
+                    }
                     $cell = HTML::td();
-                    if (!isset($tbody)) $tbody = HTML::tbody();
                 }
                 $line = substr($line, 1);
 
@@ -213,7 +224,7 @@
                 if (($pospipe !== false) && (($posbracket === false) || ($posbracket > $pospipe)) && (($poscurly === false) || ($poscurly > $pospipe))) {
                     $attrs = parse_attributes(substr($line, 0, $pospipe));
                     foreach ($attrs as $key => $value) {
-                        if (in_array ($key, array("id", "class", "title", "style",
+                        if (in_array ($key, array("id", "class", "title", "style", "scope",
                                                   "colspan", "rowspan", "width", "height",
                                                   "bgcolor", "align", "valign"))) {
                             $cell->setAttr($key, $value);
@@ -252,11 +263,17 @@
             if (!empty($row->_content)) {
                 $tbody->pushContent($row);
             }
-            if (isset($tbody) && !empty($tbody->_content)) {
-                $table->pushContent($tbody);
-            }
         }
-        if (isset($table) && !empty($table->_content)) {
+        if (!empty($caption->_content)) {
+            $table->pushContent($caption);
+        }
+        if (!empty($thead->_content)) {
+            $table->pushContent($thead);
+        }
+        if (!empty($tbody->_content)) {
+            $table->pushContent($tbody);
+        }
+        if (!empty($table->_content)) {
             return $table;
         } else {
             return HTML::raw('');

Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%FImages
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FImages	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FImages	2011-03-01 00:36:11 UTC (rev 16703)
@@ -0,0 +1,106 @@
+Date: Tue,  9 Nov 2010 16:13:37 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
+X-Rcs-Id: $Id: Help%2FRichTablePlugin 7682 2010-09-10 12:03:36Z vargenau $ 
+Content-Type: application/x-phpwiki;
+  pagename=Help%2FRichTablePlugin;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  markup=2;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+You can easily **use images in the wiki**.
+
+== Uploaded images ==
+
+First, image files need to be uploaded in the wiki. For that purpose, you will use the 
+[[Help:UpLoadPlugin|UpLoad]] plugin.
+
+=== Toolbar ===
+
+Once the image is uploaded, the easiest way to insert it is to use the toolbar.
+
+Click on the {{/themes/default/images/ed_image.png}} icon and you will be shown a list
+of available images.
+
+Select an image and click //Insert//. The image will be inserted without options or alternative text.
+
+=== Syntax ===
+
+You give access to the uploaded image with the following syntax.
+
+{{{
+{{myimage.png}}
+}}}
+or
+{{{
+[[Upload:myimage.png]]
+}}}
+will inline the image.
+
+{{{
+{{myimage.png|this is the alt text for my image}}
+}}}
+inlines the image with an alternative text.
+
+{{{
+[[some link|{{myimage.png}}]] 
+}}}
+if you click on the image, will goto "some link"
+
+{{{
+[[some link|{{myimage.png|alt text}}]] 
+}}}
+same with alternative
+
+{{{
+[[http://example.com/|{{myimage.png}}]]
+}}}
+same as above: picture links to url
+
+{{{
+[[http://example.com/|{{myimage.png|alt text}}]]
+}}}
+same with alternative
+
+{{{
+Upload:myimage.png
+}}}
+shows a plain link
+
+{{{
+[[Upload:myimage.png | my image]]
+}}}
+shows the image under a link named "my image".
+
+For Mediawiki compatibility, the keyword {{{Upload:}}} can be replaced by {{{File:}}} or {{{Image:}}}.
+
+=== Options ===
+
+Using the {{{Upload:}}} syntax, options are allowed to change the appearance:
+{{{
+[[Upload:myimage.png size=40x25 align=center]]
+}}}
+
+Separate options by spaces. The allowed options are the following:
+* size: ''width "x" height'' or ''num + "%"''
+* align: ''string''
+* border: ''number''
+* hspace: ''number''
+* vspace: ''number''
+
+== URL images ==
+
+You can also use "external" images by providing a URL.
+
+In that case, you simply put the URL between double brackets:
+{{{
+[[http://phpwiki.svn.sourceforge.net/viewvc/phpwiki/trunk/themes/default/images/poweredby_phpwiki_51x31.png]]
+}}}
+will give:
+
+[[http://phpwiki.svn.sourceforge.net/viewvc/phpwiki/trunk/themes/default/images/poweredby_phpwiki_51x31.png]]
+
+<noinclude>
+----
+[[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
+</noinclude>

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%FMediawikiTablePlugin
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FMediawikiTablePlugin	2011-03-01 00:36:07 UTC (rev 16702)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/Help%2FMediawikiTablePlugin	2011-03-01 00:36:11 UTC (rev 16703)
@@ -1,6 +1,6 @@
-Date: Mon,  8 Nov 2010 10:51:04 +0000
+Date: Tue,  9 Nov 2010 14:24:02 +0000
 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
-X-Rcs-Id: $Id: Help%2FMediawikiTablePlugin 7727 2010-11-08 09:53:28Z vargenau $
+X-Rcs-Id: $Id: Help%2FMediawikiTablePlugin 7733 2010-11-09 13:25:11Z vargenau $
 Content-Type: application/x-phpwiki;
   pagename=Help%2FMediawikiTablePlugin;
   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
@@ -25,6 +25,9 @@
 You can also simply put the summary as an attribute to the table.
 The summary is necessary to be able to create accessible tables.
 
+If the first row of the table as made with header cells only, this row will be put in a //thead//.
+In that case, this row will be repeated on every page when printing the table.
+
 === HTML attributes ===
 
 {| class="bordered"

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/PhpWikiManual
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/PhpWikiManual	2011-03-01 00:36:07 UTC (rev 16702)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/pgsrc/PhpWikiManual	2011-03-01 00:36:11 UTC (rev 16703)
@@ -1,6 +1,6 @@
-Date: Fri, 10 Sep 2010 13:46:13 +0000
+Date: Tue,  9 Nov 2010 16:13:37 +0000
 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
-X-Rcs-Id: $Id: PhpWikiManual 7682 2010-09-10 12:03:36Z vargenau $
+X-Rcs-Id: $Id: PhpWikiManual 7736 2010-11-09 15:14:11Z vargenau $
 Content-Type: application/x-phpwiki;
   pagename=PhpWikiManual;
   flags=EXTERNAL_PAGE;
@@ -17,6 +17,7 @@
 <<IncludePage page="Help/GoogleLink">>
 <<IncludePage page="Help/HowToUseWiki">>
 <<IncludePage page="FindPage">>
+<<IncludePage page="Help/Images">>
 <<IncludePage page="Help/Categories">>
 <<IncludePage page="Help/InterWiki">>
 <<IncludePage page="Help/LinkIcons">>



More information about the evolvis-commits mailing list