From 1a5dd5c87c60f28fd799397e2aa0081f9b6c58ed Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Mon, 26 Dec 2016 08:58:40 -0500 Subject: Updated markup language support doco. Modified parseIdentityAwareHTML BBcode parsing to support the BBcode reference which is now in /help/member/bbcode.html. Add Bootstrap classes to tables for BBcode tables that have the border=0 or border=1 options set. --- doc/member/bbcode.html | 105 +++++++++++++++++++++++++++++++++++++++++++++ doc/member/member_guide.bb | 9 ++++ 2 files changed, 114 insertions(+) create mode 100644 doc/member/bbcode.html (limited to 'doc/member') diff --git a/doc/member/bbcode.html b/doc/member/bbcode.html new file mode 100644 index 000000000..e186085d3 --- /dev/null +++ b/doc/member/bbcode.html @@ -0,0 +1,105 @@ +

BBcode reference

+
+

+
+ +
You can make lists with:
+For example:
[ul]
[*] First list element
[*] Second list element
[/ul]

Will render something like:
+ + +or

[dl terms="b"]
[*= First element term] First element description
[*= Second element term] Second element description
[/dl]

Will render something like:

+
+
First element term
First element description
+
Second element term
Second element description
+

+ + +
There's also:
+
+
Tables? Yes!

[table border=1]
[tr]
[th]Tables now[/th]
[/tr]
[tr]
[td]Have headers[/td]
[/tr]
[/table]

Tables now
Have headers

All sizes,
From the [size=xx-small] - xx-small.
To the [size=xx-large] - xx-large.
To fit exactly 20px use [size=20].

+ +

$Projectname specific codes

+ +
+

These require a suitable map plugin/addon such as openstreetmap or else the result will be blank

+ + +
diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb index 53cc6b8c7..b68eef12a 100644 --- a/doc/member/member_guide.bb +++ b/doc/member/member_guide.bb @@ -287,6 +287,15 @@ The connection edit screen offers a slider to select a degree of friendship with The slider on the matrix page has both a minimum and maximum value. Posts will only be shown from people who fall between this range. Affinity has no relation to permissions, and is only useful in conjunction with the affinity tool feature. +[h3]Markup Languages[/h3] +$Projectname supports several markup languages for advanced formatting of content. The default markup language is a [url=[baseurl]/help/member/bbcode]custom variant of BBcode[/url], tailored for use in $Projectname. BBcode is supported for posts, wiki pages, and web page elements. Wiki pages and webpage elements may also be written using standard Markdown. +[table border=0] +[tr][th]Content Type[/th][th]Supported Markup[/th][/tr] +[tr][td]Post[/td][td]BBcode[/td][/tr] +[tr][td]Wiki[/td][td]BBcode, Markdown[/td][/tr] +[tr][td]Webpage element[/td][td]BBcode, Markdown, HTML[/td][/tr] +[/table] + [h3]Personal Cloud Storage[/h3] $Projectname provides an ability to store privately and/or share arbitrary files with friends. -- cgit v1.2.3 From 67f09fb1d6caf7c527aa7d66f29f6ec4a4b5dab3 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Mon, 26 Dec 2016 14:59:18 -0500 Subject: Almost completed reconstruction of bbcode reference page --- doc/member/bbcode.html | 245 ++++++++++++++++++++++++++++++++++----------- doc/member/member_guide.bb | 8 +- 2 files changed, 193 insertions(+), 60 deletions(-) (limited to 'doc/member') diff --git a/doc/member/bbcode.html b/doc/member/bbcode.html index e186085d3..dcb5e2ce8 100644 --- a/doc/member/bbcode.html +++ b/doc/member/bbcode.html @@ -1,36 +1,116 @@ -

BBcode reference

-
-

-
    -
  • [b]bold[/b] - bold
    -
  • [i]italic[/i] - italic
    -
  • [u]underlined[/u] - underlined
    -
  • [s]strike[/s] - strike
    -
  • [color=red]red[/color] - red
    -
  • [url=https://zothub.com]$Projectname[/url] $Projectname
    -
  • [img]/images/default_profile_photos/rainbow_man/48.jpg[/img] Image/photo
    -
  • [img float=left]/images/default_profile_photos/rainbow_man/48.jpg[/img] Image/photo
    -
    -
  • [img float=right]/images/default_profile_photos/rainbow_man/48.jpg[/img] Image/photo
    -
    -
  • [code]code[/code] code
    -
  • [code=xxx]syntax highlighted code[/code] supported languages php, css, mysql, sql, abap, diff, html, perl, ruby, vbscript, avrc, dtd, java, xml, cpp, python, javascript, js, json, sh
    -
  • [quote]quote[/quote]
    quote

    -
  • [quote=Author]Author? Me? No, no, no...[/quote]
    Author wrote:
    Author? Me? No, no, no...

    -
  • [nobb][nobb]This is how you can show how to use BBcode syntax[/nobb][/nobb]

+

Text Decoration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BBcode syntaxRendered text
[b]bold[/b]
bold
[i]italic[/i]
italic
[u]underlined[/u]
underlined
[s]strike[/s]
strike
[color=red]red[/color]
red
[font=courier]some text[/font] 
some text
[quote]quote[/quote]
quote
[quote=Author]Author? Me? No, no, no...[/quote]
Author wrote:
Author? Me? No, no, no...
[size=small]small text[/size]
+[size=xx-large]xx-large text[/size]
+[size=20]20px exactly[/size]
+				
+ Size options include: xx-small, small, medium, large, xx-large
small text
xx-large text
20px exactly
Add a horizontal bar
+[hr]
+Like this
+				
+ Add a horizontal bar


Like this +
This is
+[center]centered[/center]
+text
+ This is
centered

text +
-
You can make lists with:
-
    -
  • [list]
    -
  • [list=1]
    -
  • [list=i]
    -
  • [list=I]
    -
  • [list=a]
    -
  • [list=A]
    -
  • [ul]
    -
  • [ol]
    -
  • [dl]
    -
  • [dl terms="biumlh"] — where style of the terms can be any combination of: +

    Code blocks

    +Code can be rendered generically in a block or inline format (depending on if there are new line characters in the text), or you can specify a supported language for enhanced syntax highlighting. Supported languages include php, css, mysql, sql, abap, diff, html, perl, ruby, vbscript, avrc, dtd, java, xml, cpp, python, javascript, js, json, sh . +

    + + + + + + + + + + + + + + + +
    BBcode syntaxOutput
    [code]function bbcode() { }[/code]
    function bbcode() { }
    [code=php]function bbcode() {
    +  $variable = true;
    +  if( $variable ) {
    +    echo "true";
    +  }
    +}[/code]
    1.  function bbcode() {
    2.    $variable = true;
    3.    if( $variable ) {
    4.      echo "true";
    5.    }
    6.  }
    [nobb][nobb]This is how [i]you[/i] can 
    +[u]show[/u] how to use 
    +[hl]BBcode[/hl] syntax[/nobb][/nobb]
    [nobb]This is how [i]you[/i] can [u]show[/u] how to use [hl]BBcode[/hl] syntax[/nobb]
    + +

    Lists

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    BBcode syntaxRendered list
    [ul]
    +[*] First list element
    +[*] Second list element
    +[/ul]
    • First list element
    • Second list element
    [ol]
    +[*] First list element
    +[*] Second list element
    +[/ol]
    • First list element
    • Second list element
    [list=A]
    +[*] First list element
    +[*] Second list element
    +[/list]
    + The list type options are
    1, i, I, a, A
    .
    • First list element
    • Second list element
    [dl terms="b"]
    +[*= First element term] First element description
    +[*= Second element term] Second element description
    +[/dl]
    + The terms style options can be any combination of:
    b
    bold
    i
    italic
    @@ -39,35 +119,88 @@
    l
    large
    h
    horizontal — like this defintion list
    - +
    +
    First element term
    First element description
    +
    Second element term
    Second element description
    -
For example:
[ul]
[*] First list element
[*] Second list element
[/ul]

Will render something like:
-
    -
  • First list element
    -
  • Second list element
+

Tables

-or

[dl terms="b"]
[*= First element term] First element description
[*= Second element term] Second element description
[/dl]

Will render something like:

-
-
First element term
First element description
-
Second element term
Second element description
-

+ + + + + + + + + + + + + + + +
BBcode syntaxRendered table
[table border=0]
+[tr]
+[th]Header 1[/th][th]Header 2[/th]
+[/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[/table]
+
Header 1Header 2
ContentContent
ContentContent
[table border=1]
+[tr]
+[th]Header 1[/th][th]Header 2[/th]
+[/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[/table]
+
Header 1Header 2
ContentContent
ContentContent
[table]
+[tr]
+[th]Header 1[/th][th]Header 2[/th]
+[/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[tr][td]Content[/td][td]Content[/td][/tr]
+[/table]
Header 1Header 2
ContentContent
ContentContent
+
+

Links and Embedded Content

-
There's also:
-
    -
  • [hr]
    -
  • [video]video URL[/video]
    -
  • [audio]audio URL[/audio]
    -
  • [table]
    -
  • [th]
    -
  • [td]
    -
  • [tr]
    -
  • [center]
    -
  • [font=courier]some text[/font] some text
    -

-
Tables? Yes!

[table border=1]
[tr]
[th]Tables now[/th]
[/tr]
[tr]
[td]Have headers[/td]
[/tr]
[/table]

Tables now
Have headers

All sizes,
From the [size=xx-small] - xx-small.
To the [size=xx-large] - xx-large.
To fit exactly 20px use [size=20].

+ + + + + + + + + + + + + + + + + + +
BBcode syntaxRendered output
[video]video URL[/video]
+[audio]audio URL[/audio]
[url=https://hubzilla.org]Hubzilla[/url]
Hubzilla
An image [img]url/of/image.jpg[/img] 
+in some text 
+ An image Image/photo in some text +
+ -

$Projectname specific codes

+

$Projectname specific codes

  • [©] © This works for many HTML entities
  • [zrl]https://zothub.com[/zrl] Magic-auth version of [url] tag
  • diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb index b68eef12a..3c1376282 100644 --- a/doc/member/member_guide.bb +++ b/doc/member/member_guide.bb @@ -288,12 +288,12 @@ The connection edit screen offers a slider to select a degree of friendship with The slider on the matrix page has both a minimum and maximum value. Posts will only be shown from people who fall between this range. Affinity has no relation to permissions, and is only useful in conjunction with the affinity tool feature. [h3]Markup Languages[/h3] -$Projectname supports several markup languages for advanced formatting of content. The default markup language is a [url=[baseurl]/help/member/bbcode]custom variant of BBcode[/url], tailored for use in $Projectname. BBcode is supported for posts, wiki pages, and web page elements. Wiki pages and webpage elements may also be written using standard Markdown. +$Projectname supports several markup languages for advanced formatting of content. The default markup language is a [url=[baseurl]/help/member/bbcode]custom variant of BBcode[/url], tailored for use in $Projectname. [url=[baseurl]/help/member/bbcode]BBcode[/url] is supported for posts, wiki pages, and web page elements. Wiki pages and webpage elements may also be written using standard Markdown. [table border=0] [tr][th]Content Type[/th][th]Supported Markup[/th][/tr] -[tr][td]Post[/td][td]BBcode[/td][/tr] -[tr][td]Wiki[/td][td]BBcode, Markdown[/td][/tr] -[tr][td]Webpage element[/td][td]BBcode, Markdown, HTML[/td][/tr] +[tr][td]Post[/td][td][url=[baseurl]/help/member/bbcode]BBcode[/url][/td][/tr] +[tr][td]Wiki[/td][td][url=[baseurl]/help/member/bbcode]BBcode[/url], Markdown[/td][/tr] +[tr][td]Webpage element[/td][td][url=[baseurl]/help/member/bbcode]BBcode[/url], Markdown, HTML[/td][/tr] [/table] [h3]Personal Cloud Storage[/h3] -- cgit v1.2.3