Date: Thu, 8 May 2003 16:20:38 +0000 (+0000)
Subject: New version of Wiki stuff from Howard Miller.
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5f94c13b6b369bc0c68a177b3a736ed7560f9585;p=moodle.git
New version of Wiki stuff from Howard Miller.
Some cool new features, including linking to Moodle activities!
---
diff --git a/lang/en/help/wiki.html b/lang/en/help/wiki.html
index 835153b649..9238bfc284 100644
--- a/lang/en/help/wiki.html
+++ b/lang/en/help/wiki.html
@@ -1,82 +1,96 @@
-Help on writing Wiki Formatted Pages
-
-
- Wiki formatted pages provide a facility for marking up plain text with intutive human readable
- conventions that will be converted to XHTML when displayed. The big advantages are that you
- do not need to learn HTML to produce quite complex results, and that the text you write
- looks right to the eye even before conversion.
-
-
-You should enter basically plain text. There are a number of special characters you
-can add to insert formatting
-
-Block level formatting
-
-
- Paragraph blocks are separated by at least one blank line. To add special formatting to a paragraph
- add one of the following special characters in the first character of the first line of the block followed
- by a space...
-
-
-
- Character | Block Type |
- No character | Ordinary paragraph |
- > | Quotation |
- Space | Preformatted Text (Monospaced) |
- % | Preformatted and Wikki formatting is ignored |
- !# | Heading - where # is 1-6, the heading level (1 is biggest) |
-
-
-List formatting
-
-simple lists can be constructed easily by placing a special character at the start of each line in the list followed by a space.
-The list is terminated by a blank line. At present lists cannot be intermixed or nested. Definition list
-definitions and text types maybe freely intermixed to obtain the desired effect however. The special characters
-are as follows...
-
-
- Character | List itme type |
- * | Unordered List (bullet points) |
- # | Ordered List (1,2,3 etc) |
- : | Definition list, definition |
- ; | Definition list, text |
-
-
-Inline formatting
-
-Inline formmating allows part of a line to be marked as having a particular style. The special
-characters used can appear anywhere on a line, but note that the formatting cannot
-cross lines. Codes are as follows...
-
-
- Example | Example | Formatting |
- *hello world* | hello world | Strong or Bold |
- /hello world/ | hello world | Emphasis or Italics |
- +hello world+ | hello world | Inserted text |
- -hello world- | hello world | Deleted or Strikethrough |
- hello ~world~ | hello world | Subscript |
- hello ^world^ | hello world | Superscript |
- "hello world" | hello world | Quoted |
- %hello world% | hello world | Code or Monospaced |
- @hello world@ | hello world | Cite |
-
-
-Acronyms
-
-Acronym tagging is acheived by placing the acronym in capital letters followed by the description
-is parenthesis. There must be no space between the acronym and the parenthesis. Example...
-
-HTML(Hypertext Markup Language)
HTML
-
-Automatic reformattion
-
-Many commonly used functions are converted into their XHTML equivalents automatically.. The main ones are as
-follows...
-
-
- - HTTP links are converted into active links
-
- ..., (R), (TM), (C), 1/4, 1/2, 3/4 are all converted to the correct character
-
- digits x digits converts to correct multiply symbol
-
- A line starting with at least four dashes is converted into a horizontal line
-
-
+Help on Writing Wiki Formatted Pages
+
+
+ Wiki formatted pages provide a facility for marking up plain text with intuitive, human readable
+ formatting that will be converted to XHTML when displayed. The big advantages are that you
+ do not need to learn HTML to produce quite complex results, and that the text you write
+ looks good to the eye even before conversion. It is a real alternative to
+ saving Word files as HTML retaining the ability to edit the resource online.
+
+
+You should enter basically plain text. There are a number of special characters you
+can add to insert formatting
+
+Block level formatting
+
+
+ Paragraph blocks are separated by at least one blank line. To add special formatting to a paragraph
+ add one of the following special characters in the first character of the first line of the block followed
+ by a space...
+
+
+
+ Character | Block Type |
+ No character | Ordinary paragraph |
+ > | Quotation |
+ Space | Preformatted Text (Monospaced) |
+ % | Preformatted and Wikki formatting is ignored |
+ !# | Heading - where # is 1-6, the heading level (1 is biggest) |
+
+
+List Formatting
+
+Simple lists can be constructed easily by placing a special character at the start of each line in the list followed by a space.
+The list is terminated by a blank line. At present lists cannot be intermixed or nested. Definition list
+definitions and text types may be freely intermixed to obtain the desired effect. The special characters
+are as follows...
+
+
+ Character | List item type |
+ * | Unordered List (bullet points) |
+ # | Ordered List (1,2,3 etc) |
+ : | Definition list, definition |
+ ; | Definition list, text |
+
+
+Inline formatting
+
+Inline formmating allows part of a line to be marked as having a particular style. The special
+characters used can appear anywhere on a line, but note that the formatting cannot
+cross lines. Codes are as follows...
+
+
+ Example | Example | Formatting |
+ *hello world* | hello world | Strong or Bold |
+ /hello world/ | hello world | Emphasis or Italics |
+ +hello world+ | hello world | Inserted text |
+ -hello world- | hello world | Deleted or Strikethrough |
+ hello ~world~ | hello world | Subscript |
+ hello ^world^ | hello world | Superscript |
+ "hello world" | hello world | Quoted |
+ %hello world% | hello world | Code or Monospaced |
+ @hello world@ | hello world | Cite |
+
+
+Acronyms
+
+Acronym tagging is acheived by placing the acronym in capital letters followed by the description
+is parenthesis. There must be no space between the acronym and the parenthesis. Example...
+
+HTML(Hypertext Markup Language)
HTML
+
+Hyper Links
+
+Links can be placed in the text and are followed (with no spaces) by the text to be displayed in brackets. Example: http://www.google.com/(Search Now) will be converted to
+Search Now.
+
+Moodle Module Links
+
+If you know the Moodle id number (look for ?id=nn at the end of a module address) and
+the module name, you can link directly to that resource using the syntax:
+
+ModuleName:nn(Description Text)
+eg, resource:36(My New Page) forum:10(Jump to forum)
+
+Automatic reformating
+
+Many commonly used functions are converted into their XHTML equivalents automatically.. The main ones are as
+follows...
+
+
+ - HTTP links are converted into active links
+
- ..., (R), (TM), (C), 1/4, 1/2, 3/4 are all converted to the correct character
+
- digits x digits converts to correct multiply symbol
+
- A line starting with at least four dashes is converted into a horizontal line
+
+
diff --git a/lib/wiki.php b/lib/wiki.php
index f4b7e85b19..adb382afb2 100644
--- a/lib/wiki.php
+++ b/lib/wiki.php
@@ -1,279 +1,323 @@
-list_state) {
- case LIST_NONE:
- break;
- case LIST_UNORDERED:
- $ltag = "\n";
- break;
- case LIST_ORDERED:
- $ltag = "\n";
- break;
- case LIST_DEFINITION:
- $ltag = "\n";
- break;
- }
- $this->list_state = LIST_NONE;
-
- switch ($state) {
- case STATE_PARAGRAPH:
- return "$ltag