aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-26 13:11:54 -0800
committerzotlabs <mike@macgirvin.com>2016-12-26 13:11:54 -0800
commit3bb6c667db9b8d833fa9eca1dd744ad4ad05eebd (patch)
treef1b596919c6928d7cdb6a4df49054a7fc9ccdd95
parentb530d1d44981df955842f4f572676db83d18084e (diff)
parentfdbb5b67a87cb2077ec5a4e00b3e882892187235 (diff)
downloadvolse-hubzilla-3bb6c667db9b8d833fa9eca1dd744ad4ad05eebd.tar.gz
volse-hubzilla-3bb6c667db9b8d833fa9eca1dd744ad4ad05eebd.tar.bz2
volse-hubzilla-3bb6c667db9b8d833fa9eca1dd744ad4ad05eebd.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
-rw-r--r--doc/about/about_hubzilla.bb11
-rw-r--r--doc/bbcode.html109
-rw-r--r--doc/member/bbcode.html238
-rw-r--r--doc/member/member_guide.bb9
-rw-r--r--doc/toc.html1
-rw-r--r--include/bbcode.php32
6 files changed, 276 insertions, 124 deletions
diff --git a/doc/about/about_hubzilla.bb b/doc/about/about_hubzilla.bb
index f249df66f..3327e0b50 100644
--- a/doc/about/about_hubzilla.bb
+++ b/doc/about/about_hubzilla.bb
@@ -32,7 +32,7 @@ The $Projectname software stack is a relatively standard webserver application w
[*= nomadic identity] The ability to authenticate and easily migrate an identity across independent hubs and web domains. Nomadic identity provides true ownership of an online identity, because the identities of the channels controlled by an account on a hub are not tied to the hub itself. A hub is more like a "host" for channels. With Hubzilla, you don't have an "account" on a server like you do on typical websites; you own an identity that you can take with you across the grid by using clones.
-[*= [url=[baseurl]/help/developer/what_is_zot]Zot[/url]] The novel JSON-based protocol for implementing secure decentralised communications and services. It differs from many other communication protocols by building communications on top of a decentralised identity and authentication framework. The authentication component is similar to OpenID conceptually but is insulated from DNS-based identities. Where possible remote authentication is silent and invisible. This provides a mechanism for internet-scale distributed access control which is unobtrusive.
+[*= [url=[baseurl]/help/developer/api_zot]Zot[/url]] The novel JSON-based protocol for implementing secure decentralised communications and services. It differs from many other communication protocols by building communications on top of a decentralised identity and authentication framework. The authentication component is similar to OpenID conceptually but is insulated from DNS-based identities. Where possible remote authentication is silent and invisible. This provides a mechanism for internet-scale distributed access control which is unobtrusive.
[/dl]
[h3]Features[/h3]
@@ -186,17 +186,8 @@ Any number of profiles may be created containing different information and these
$Projectname offers a simple, one-click account backup, where you can download a complete backup of your profile(s). Backups can then be used to clone or restore a profile.
[h4]Account Deletion[/h4]
-
Accounts can be immediately deleted by clicking on a link. That's it. All associated content is then deleted from the grid (this includes posts and any other content produced by the deleted profile). Depending on the number of connections you have, the process of deleting remote content could take some time but it is scheduled to happen as quickly as is practical.
-[h4]Content Creation[/h4]
-
-[h4]Writing Posts[/h4]
-
-$Projectname supports a number of different ways of adding rich-text content. The default is a custom variant of BBcode, tailored for use in $Projectname. You may also enable the use of Markdown if you find that easier to work with. A visual editor may also be used. The traditional visual editor for $Projectname had some serious issues and has since been removed. We are currently looking for a replacement.
-
-When creating &quot;Websites&quot;, content may be entered in HTML, Markdown, BBcode, and/or plain text.
-
[h4]Deletion of content[/h4]
Any content created in $Projectname remains under the control of the member (or channel) that originally created it. At any time, a member can delete a message, or a range of messages. The deletion process ensures that the content is deleted, regardless of whether it was posted on a channel's primary (home) hub, or on another hub, where the channel was remotely authenticated via Zot ($Projectname communication and authentication protocol).
diff --git a/doc/bbcode.html b/doc/bbcode.html
deleted file mode 100644
index 36f40d3f4..000000000
--- a/doc/bbcode.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<h3>BBcode reference</h3>
-<div style="font-size: 14px;">
-<br /><br />
-<ul class="listdecimal" style="list-style-type: decimal;">
-<li>[b]bold[/b] - <strong>bold</strong><br />
-<li>[i]italic[/i] - <em>italic</em><br />
-<li>[u]underlined[/u] - <u>underlined</u><br />
-<li>[s]strike[/s] - <strike>strike</strike><br />
-<li>[color=red]red[/color] - <span style="color: red;">red</span><br />
-<li>[url=https://zothub.com]$Projectname[/url] <a href="https://zothub.com">$Projectname</a><br />
-<li>[img]https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg[/img] <img src="https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg" alt="Image/photo" /><br />
-<li>[img float=left]https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg[/img] <img src="https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg" style="float:left;" alt="Image/photo" /><br />
-<div style="clear:both;"></div>
-<li>[img float=right]https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg[/img] <img src="https://zothub.com/images/default_profile_photos/rainbow_man/48.jpg" style="float:right;" alt="Image/photo" /><br />
-<div style="clear:both;"></div>
-<li>[code]code[/code] <code>code</code><br />
-<li>[code=xxx]syntax highlighted code[/code] <code>supported languages php, css, mysql, sql, abap, diff, html, perl, ruby, vbscript, avrc, dtd, java, xml, cpp, python, javascript, js, json, sh</code><br />
-<li>[quote]quote[/quote] <blockquote>quote</blockquote><br />
-<li>[quote=Author]Author? Me? No, no, no...[/quote] <br /><strong class="author">Author wrote:</strong><blockquote>Author? Me? No, no, no...</blockquote><br />
-<li> [nobb] may be used to escape bbcode.</ul><br />
-
-<br />You can make lists with:<br />
-<ul class="listbullet" style="list-style-type: circle;">
-<li>[list]<br />
-<li>[list=1]<br />
-<li>[list=i]<br />
-<li>[list=I] <br />
-<li>[list=a]<br />
-<li>[list=A] <br />
-<li>[ul]<br />
-<li>[ol]<br />
-<li>[dl]<br />
-<li>[dl terms="biumlh"] &mdash; where style of the terms can be any combination of:
- <dl class="bb-dl dl-horizontal">
- <dt>b</dt><dd>bold</dd>
- <dt>i</dt><dd>italic</dd>
- <dt>u</dt><dd>underline</dd>
- <dt>m</dt><dd>monospace</dd>
- <dt>l</dt><dd>large</dd>
- <dt>h</dt><dd>horizontal &mdash; like <em>this</em> defintion list</dd>
- </dl>
-</li>
-
-</ul>For example:<br />[ul]<br />[*] First list element<br />[*] Second list element<br />[/ul]<br /><br />Will render something like: <br />
-<ul class="listbullet" style="list-style-type: circle;">
-<li> First list element<br />
-<li> Second list element</ul>
-
-or<br /><br />[dl terms="b"]<br />[*= First element term] First element description<br />[*= Second element term] Second element description<br />[/dl]<br /><br />Will render something like: <br /><br />
-<dl class="bb-dl dl-terms-bold">
-<dt> First element term </dt><dd>First element description</dd>
-<dt> Second element term </dt><dd>Second element description</dd>
-</dl><br />
-
-
-<br />There's also:<br />
-<ul class="listloweralpha" style="list-style-type: lower-alpha;">
-<li>[hr]<br />
-<li>[video]video URL[/video]<br />
-<li>[audio]audio URL[/audio]<br />
-<li>[table]<br />
-<li>[th] <br />
-<li>[td]<br />
-<li>[tr]<br />
-<li>[center]<br />
-<li>[font=courier]some text[/font] <span style="font-family: courier;">some text</span><br />
-</ul><br />
-<br />Tables? Yes!<br /><br />[table border=1]<br /> [tr]<br /> [th]Tables now[/th]<br /> [/tr]<br /> [tr]<br /> [td]Have headers[/td]<br /> [/tr]<br />[/table]<br /><br /><table border="1" ><tr><th>Tables now</th></tr><tr><td>Have headers</td></tr></table><br />All sizes, <br />From the [size=xx-small] - <span style="font-size: xx-small;">xx-small</span>.<br />To the [size=xx-large] - <span style="font-size: xx-large;">xx-large</span>.<br />To fit exactly <span style="font-size: 20px;">20px</span> use [size=20].<br /><br />
-
-<p>$Projectname specific codes</p>
-<ul class="listbullet" style="list-style-type: circle;">
-<li>[&amp;copy;] &copy; This works for many HTML entities</li>
-<li>[zrl]https://zothub.com[/zrl] Magic-auth version of [url] tag</li>
-<li>[zmg]https://zothub.com/some/photo.jpg[/zmg] Magic-auth version of [img] tag<br /></li>
-
-<li>[observer=1]Text to display if observer is authenticated in the matrix[/observer]</li>
-<li>[observer=0]Text to display if observer is <strong>not</strong> authenticated in the matrix[/observer]</li>
-<li>[observer.baseurl] website of observer</li>
-<li>[observer.url] channel URL of observer</li>
-<li>[observer.name] name of observer</li>
-<li>[observer.webname] short name in the url of the observer</li>
-<li>[observer.address] address (zot-id) of observer</li>
-<li>[observer.photo] profile photo of observer<br /></li>
-
-<li>[spoiler] for hiding spoilers<br /><br /></li>
-
-<li>[rpost=title]Text to post[/rpost] The observer will be returned to their home hub to enter a post with the specified title and body. Both are optional</li>
-<li>[qr]text to post[/qr] - create a QR code (if the qrator plugin is installed).</li>
-<li>[toc] - create a table of content in a webpage. Please refer to the <a href="http://ndabas.github.io/toc/" target="_blank">original jquery toc</a> to get more explanations.
- <ul>
- <li>Optional param: 'data-toc'. If ommited the default is 'body'</li>
- <li>Optional param: 'data-toc-headings'. If ommited the default is 'h1,h2,h3'</li>
- <li>Full example: [toc data-toc='div.page-body' data-toc-headings='h1,h2']</li>
- </ul>
-</li>
-</ul>
-<br />
-<p>These require a suitable map plugin/addon such as openstreetmap or else the result will be blank</p>
-<ul>
-<li>[map] Generate an inline map using the current browser coordinates of the poster, if browser location is enabled<br />
-<li>[map=latitude,longitude] Generate a map using global coordinates.<br />
-<li>[map]Place Name[/map] Generate a map for a given named location. The first matching location is returned. For instance "Sydney" will usually return Sydney, Australia and not Sydney, Nova Scotia, Canada unless the more precise location is specified. It is highly recommended to use the post preview utility to ensure you have the correct location before submitting the post.<br />
-</ul>
-
-#include doc/macros/main_footer.bb;
-</div>
-
-
-
diff --git a/doc/member/bbcode.html b/doc/member/bbcode.html
new file mode 100644
index 000000000..dcb5e2ce8
--- /dev/null
+++ b/doc/member/bbcode.html
@@ -0,0 +1,238 @@
+<h3>Text Decoration</h3>
+<table class="table table-responsive table-bordered">
+ <tbody>
+ <tr>
+ <th>BBcode syntax</th><th>Rendered text</th>
+ </tr>
+ <tr>
+ <td><pre>[b]bold[/b]</pre></td><td><strong>bold</strong></td>
+ </tr>
+ <tr>
+ <td><pre>[i]italic[/i]</pre></td><td><em>italic</em></td>
+ </tr>
+ <tr>
+ <td><pre>[u]underlined[/u]</pre></td><td><u>underlined</u></td>
+ </tr>
+ <tr>
+ <td><pre>[s]strike[/s]</pre></td><td><strike>strike</strike></td>
+ </tr>
+ <tr>
+ <td><pre>[color=red]red[/color]</pre></td><td><span style="color: red;">red</span></td>
+ </tr>
+ <tr>
+ <td><pre>[font=courier]some text[/font] </pre></td><td><span style="font-family: courier;">some text</span></td>
+ </tr>
+ <tr>
+ <td><pre>[quote]quote[/quote]</pre></td><td><blockquote>quote</blockquote></td>
+ </tr>
+ <tr>
+ <td><pre>[quote=Author]Author? Me? No, no, no...[/quote]</pre></td><td><strong class="author">Author wrote:</strong><blockquote>Author? Me? No, no, no...</blockquote></td>
+ </tr>
+ <tr>
+ <td><pre>[size=small]small text[/size]
+[size=xx-large]xx-large text[/size]
+[size=20]20px exactly[/size]
+ </pre>
+ Size options include: <strong>xx-small, small, medium, large, xx-large</strong></td><td><span style="font-size: small;">small text</span><br><span style="font-size: xx-large;">xx-large text</span><br><span style="font-size: 20px;">20px exactly</span></td>
+ </tr>
+ <tr>
+ <td><pre>Add a horizontal bar
+[hr]
+Like this
+ </pre></td><td>
+ Add a horizontal bar<br><hr><br>Like this
+ </td>
+ </tr>
+ <tr>
+ <td><pre>This is
+[center]centered[/center]
+text</pre></td><td>
+ This is<br><div style="text-align:center;">centered</div><br>text
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>Code blocks</h3>
+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 <strong>php, css, mysql, sql, abap, diff, html, perl, ruby, vbscript, avrc, dtd, java, xml, cpp, python, javascript, js, json, sh </strong>.
+<br><br>
+<table class="table table-responsive table-bordered">
+ <tbody>
+ <tr>
+ <th>BBcode syntax</th><th>Output</th>
+ </tr>
+ <tr>
+ <td><pre>[code]function bbcode() { }[/code]</pre></td><td><code>function bbcode() { }</code></td>
+ </tr>
+ <tr>
+ <td><pre>[code=php]function bbcode() {
+ $variable = true;
+ if( $variable ) {
+ echo "true";
+ }
+}[/code]</pre></td><td><code><div class="hl-main"><ol class="hl-main"><li><span class="hl-code">&nbsp;</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">bbcode</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"></span></li><li><span class="hl-code">&nbsp;&nbsp;&nbsp;</span><span class="hl-var">$variable</span><span class="hl-code"> = </span><span class="hl-reserved">true</span><span class="hl-code">;</span></li><li><span class="hl-code">&nbsp;&nbsp;&nbsp;</span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-var">$variable</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"></span></li><li><span class="hl-code">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="hl-reserved">echo</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">true</span><span class="hl-quotes">"</span><span class="hl-code">;</span></li><li><span class="hl-code">&nbsp;&nbsp;&nbsp;</span><span class="hl-brackets">}</span><span class="hl-code"></span></li><li><span class="hl-code">&nbsp;</span><span class="hl-brackets">}</span></li></ol></div></code></td>
+ </tr>
+ <tr>
+ <td><pre>[nobb][nobb]This is how [i]you[/i] can
+[u]show[/u] how to use
+[hl]BBcode[/hl] syntax[/nobb][/nobb]</pre></td><td>[nobb]This is how [i]you[/i] can [u]show[/u] how to use [hl]BBcode[/hl] syntax[/nobb]</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>Lists</h3>
+<table class="table table-responsive table-bordered">
+ <tbody>
+ <tr>
+ <th>BBcode syntax</th><th>Rendered list</th>
+ </tr>
+ <tr>
+ <td><pre>[ul]
+[*] First list element
+[*] Second list element
+[/ul]</pre></td><td><ul class="listbullet" style="list-style-type: circle;"><li> First list element</li><li> Second list element<br></li></ul></td>
+ </tr>
+ <tr>
+ <td><pre>[ol]
+[*] First list element
+[*] Second list element
+[/ol]</pre></td><td><ul class="listdecimal" style="list-style-type: decimal;"><li> First list element</li><li> Second list element<br></li></ul></td>
+ </tr>
+ <tr>
+ <td><pre>[list=A]
+[*] First list element
+[*] Second list element
+[/list]</pre>
+ The list type options are <pre>1, i, I, a, A</pre>.</td><td><ul class="listupperalpha" style="list-style-type: upper-alpha;"><li> First list element</li><li> Second list element</li></ul></td>
+ </tr>
+ <tr>
+ <td><pre>[dl terms="b"]
+[*= First element term] First element description
+[*= Second element term] Second element description
+[/dl]</pre>
+ The <strong>terms</strong> style options can be any combination of:
+ <dl class="bb-dl dl-horizontal">
+ <dt>b</dt><dd>bold</dd>
+ <dt>i</dt><dd>italic</dd>
+ <dt>u</dt><dd>underline</dd>
+ <dt>m</dt><dd>monospace</dd>
+ <dt>l</dt><dd>large</dd>
+ <dt>h</dt><dd>horizontal &mdash; like <em>this</em> defintion list</dd>
+ </dl>
+ </td><td><dl class="bb-dl dl-terms-bold">
+<dt> First element term</dt><dd> First element description<br></dd>
+<dt> Second element term</dt><dd> Second element description<br></dd></dl></td>
+ </tr>
+ <tr>
+ <td><pre></pre></td><td></td>
+ </tr>
+ <tr>
+ <td><pre></pre></td><td></td>
+ </tr>
+
+ </tbody>
+</table>
+
+<h3>Tables</h3>
+
+<table class="table table-responsive table-bordered">
+ <tbody>
+ <tr>
+ <th>BBcode syntax</th><th>Rendered table</th>
+ </tr>
+ <tr>
+ <td><pre>[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]</pre></td><td><table class="table table-responsive"><tbody><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></tbody></table></td>
+ </tr>
+ <tr>
+ <td><pre>[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]</pre></td><td><table class="table table-responsive table-bordered"><tbody><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></tbody></table></td>
+ </tr>
+ <tr>
+ <td><pre>[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]</pre></td><td><table><tbody><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></tbody></table>
+</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>Links and Embedded Content</h3>
+
+<table class="table table-responsive table-bordered">
+ <tbody>
+ <tr>
+ <th>BBcode syntax</th><th>Rendered output</th>
+ </tr>
+ <tr>
+ <td><pre>[video]video URL[/video]
+[audio]audio URL[/audio]</pre></td><td></td>
+ </tr>
+ <tr>
+ <td><pre>[url=https://hubzilla.org]Hubzilla[/url]</pre></td><td><a href="https://hubzilla.org" target="_blank">Hubzilla</a></td>
+ </tr>
+ <tr>
+ <td><pre>An image [img]url/of/image.jpg[/img]
+in some text </pre></td><td>
+ An image <img src="/images/default_profile_photos/rainbow_man/48.jpg" alt="Image/photo"> in some text
+ </td>
+ </tr>
+ <tr>
+ <td><pre></pre></td><td></td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h3>$Projectname specific codes</h3>
+<ul class="listbullet" style="list-style-type: circle;">
+<li>[&amp;copy;] &copy; This works for many HTML entities</li>
+<li>[zrl]https://zothub.com[/zrl] Magic-auth version of [url] tag</li>
+<li>[zmg]https://zothub.com/some/photo.jpg[/zmg] Magic-auth version of [img] tag<br /></li>
+
+<li>[nobb][observer=1]Text to display if observer is authenticated in the matrix[/observer][/nobb]</li>
+<li>[nobb][observer=0]Text to display if observer is <strong>not</strong> authenticated in the matrix[/observer][/nobb]</li>
+<li>[nobb][observer.url][/nobb] channel URL of observer</li>
+<li>[nobb][observer.baseurl][/nobb] website of observer</li>
+<li>[nobb][observer.name][/nobb] name of observer</li>
+<li>[nobb][observer.webname][/nobb] short name in the url of the observer</li>
+<li>[nobb][observer.address][/nobb] address (zot-id) of observer</li>
+<li>[nobb][observer.photo][/nobb] profile photo of observer<br /></li>
+
+<li>[spoiler] for hiding spoilers<br /><br /></li>
+
+<li>[rpost=title]Text to post[/rpost] The observer will be returned to their home hub to enter a post with the specified title and body. Both are optional</li>
+<li>[qr]text to post[/qr] - create a QR code (if the qrator plugin is installed).</li>
+<li>[toc] - create a table of content in a webpage. Please refer to the <a href="http://ndabas.github.io/toc/" target="_blank">original jquery toc</a> to get more explanations.
+ <ul>
+ <li>Optional param: 'data-toc'. If ommited the default is 'body'</li>
+ <li>Optional param: 'data-toc-headings'. If ommited the default is 'h1,h2,h3'</li>
+ <li>Full example: [toc data-toc='div.page-body' data-toc-headings='h1,h2']</li>
+ </ul>
+</li>
+</ul>
+<br />
+<p>These require a suitable map plugin/addon such as openstreetmap or else the result will be blank</p>
+<ul>
+<li>[map] Generate an inline map using the current browser coordinates of the poster, if browser location is enabled<br />
+<li>[map=latitude,longitude] Generate a map using global coordinates.<br />
+<li>[map]Place Name[/map] Generate a map for a given named location. The first matching location is returned. For instance "Sydney" will usually return Sydney, Australia and not Sydney, Nova Scotia, Canada unless the more precise location is specified. It is highly recommended to use the post preview utility to ensure you have the correct location before submitting the post.<br />
+</ul>
+
+</div>
diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb
index 53cc6b8c7..3c1376282 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. [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][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]
$Projectname provides an ability to store privately and/or share arbitrary files with friends.
diff --git a/doc/toc.html b/doc/toc.html
index 272f43c7e..ba26d17e3 100644
--- a/doc/toc.html
+++ b/doc/toc.html
@@ -22,6 +22,7 @@
<div id="members" class="panel-collapse collapse in">
<ul class="list-group">
<li class="doco-list-group-item"><a href="/help/member/member_guide">Guide</a></li>
+ <li class="doco-list-group-item"><a href="/help/member/bbcode">BBcode Reference</a></li>
<li class="doco-list-group-item"><a href="/help/member/member_faq">FAQ</a></li>
</ul>
</div>
diff --git a/include/bbcode.php b/include/bbcode.php
index c7bee6f97..f0cf861f3 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -530,7 +530,17 @@ function bb_fixtable_lf($match) {
}
function parseIdentityAwareHTML($Text) {
-
+
+ // Hide all [noparse] contained bbtags by spacefying them
+ if (strpos($Text,'[noparse]') !== false) {
+ $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text);
+ }
+ if (strpos($Text,'[nobb]') !== false) {
+ $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_spacefy',$Text);
+ }
+ if (strpos($Text,'[pre]') !== false) {
+ $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text);
+ }
// process [observer] tags before we do anything else because we might
// be stripping away stuff that then doesn't need to be worked on anymore
@@ -568,9 +578,21 @@ function parseIdentityAwareHTML($Text) {
$Text = str_replace('[observer.photo]','', $Text);
}
- $Text = str_replace(array('[baseurl]','[sitename]'),array(z_root(),get_config('system','sitename')),$Text);
+ $Text = str_replace(array('[baseurl]','[sitename]'),array(z_root(),get_config('system','sitename')),$Text);
- return $Text;
+
+ // Unhide all [noparse] contained bbtags unspacefying them
+ // and triming the [noparse] tag.
+ if (strpos($Text,'[noparse]') !== false) {
+ $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_unspacefy_and_trim', $Text);
+ }
+ if (strpos($Text,'[nobb]') !== false) {
+ $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim', $Text);
+ }
+ if (strpos($Text,'[pre]') !== false) {
+ $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim', $Text);
+ }
+ return $Text;
}
// BBcode 2 HTML was written by WAY2WEB.net
@@ -891,8 +913,8 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
}
if (strpos($Text,'[/table]') !== false) {
$Text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '<table>$1</table>', $Text);
- $Text = preg_replace("/\[table border=1\](.*?)\[\/table\]/sm", '<table border="1" >$1</table>', $Text);
- $Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table border="0" >$1</table>', $Text);
+ $Text = preg_replace("/\[table border=1\](.*?)\[\/table\]/sm", '<table class="table table-responsive table-bordered" >$1</table>', $Text);
+ $Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table class="table table-responsive" >$1</table>', $Text);
}
$Text = str_replace('</tr><br /><tr>', "</tr>\n<tr>", $Text);
$Text = str_replace('[hr]', '<hr />', $Text);