<?php  

/*

Copyright © 2001 Nick Gammon.

  Author: Nick Gammon <nick@gammon.com.au>
  Web:    http://www.gammon.com.au/
  Date:   February 2001

  This program is free software; you can redistribute it and/or modify 
  it under the terms of the GNU General Public License as published by 
  the Free Software Foundation; either version 2 of the License, 
  or (at your option) any later version. 

  This program is distributed in the hope that it will be useful, 
  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  See the GNU General Public License for more details. 

  You should have received a copy of the GNU General Public License 
  along with this program; if not, write to 

  The Free Software Foundation, Inc., 
  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


  The Free Software Foundation maintains a web page at: http://www.fsf.org

  See the file gpl.txt for the full GNU General Public License.

*/

require ("config.php");
require ($CONFIG_PATH . "general_config.php");
require ($INCLUDE_DIRECTORY . "common.php");

Init ("Forum code", "forum, code");   

$forum_name = $control ['forum_name'];

// ---------------- start of main section  -------------------   

?>  

<h1>Forum codes </h1>


<p> The optional use of &quot;forum codes&quot; in your posts lets you add formatting, 
    similar to what can be done with HTML. </p>
<p>Codes <b>are</b> case-sensitive, you must write them as shown. eg. [B] will not work.</p>
<hr>  

<h2>List of available codes</h2>


<h3>Bold</h3>


<p> Enclose the text in [b] and [/b]. <br>
For example: 
<pre><code><font size=2>
[b]this is in bold[/b]</font></code></pre>
gives <b>this is in bold</b> </p>

<h3>Italic</h3>


<p> Enclose the text in [i] and [/i]. <br>
For example: 
<pre><code><font size=2>
[i]this is in italic[/i]</font></code></pre>
gives <i>this is in italic</i> </p>

<h3>Underline</h3>


<p> Enclose the text in [u] and [/u]. <br>
For example: <pre><code><font size=2>
[u]this is in underline[/u]</font></code></pre>
 gives <u>this is in underline</u> </p>

<h3>Quote</h3>


<p> Enclose the text in [quote] and [/quote]. <br>
For example: <pre><code><font size=2>
[quote]this is a quote[/quote]</font></code></pre>
 gives 
<ul>
  <hr>this is a quote
  <hr>
</ul>
</p>

<h3>Lists</h3>


<p> Use [ol] at the start and [/ol] at the end of an <b>ordered</b> list (ie. a numbered list).</p> 
<p> Use [ul] at the start and [/ul] at the end of an <b>unordered</b> list (ie. a bullet point list).</p> 
<p> Use [li] for each list item inside the list.

<br>
For example: <pre><code><font size=2>
[ul]
 [li]An item
 [li]Another item
 [li]A third item
[/ul]

[ol]
 [li]An item
 [li]Another item
 [li]A third item
[/ol]
 </font></code></pre>
 gives 
<ul>
 <li>An item
 <li>Another item
 <li>A third item
</ul>
<ol>
 <li>An item
 <li>Another item
 <li>A third item
</ol>

</p>

<h3>Code</h3>


<p> Enclose the text in [code] and [/code]. <br>
For example: <pre><code><font size=2>
[code]this is code[/code]</font></code></pre>
 gives 
<pre><code><font size=2>this is code</font></code></pre>
</p>

<p>Code is monospaced and preserves line breaks and formatting (such as indentation).</p>

<h3>Mono</h3>


<p> Enclose the text in [mono] and [/mono]. <br>
For example: <pre><code><font size=2>
[mono]this is monospaced[/mono]</font></code></pre>
 gives 
<code><font size=2>this is monospaced</font></code>
</p>

<p>The text is monospaced, however it wraps at the edge of the page.</p>

<h3>Line</h3>


<p> To draw a horizontal line, use [hr]. </p>

<h3>Spaces</h3>


<p> To add non-breaking spaces, use [sp]. </p>

<h3>Using square brackets</h3>

<p>In case you actually want to put '[b]' into your posts, you can precede the brackets with a backslash.</p>

<table  border=1 cellpadding=5>
  <tr valign=top>
    <th valign=top bgcolor=#ADD8E6 align=left><font size=2>To display this</th>
    <th valign=top bgcolor=#ADD8E6 align=left><font size=2>Enter this</th>
  </tr>
  <tr valign=top>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>[</font></code></td>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>\[</font></code></td>
  </tr>
  <tr valign=top>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>]</font></code></td>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>\]</font></code></td>
  </tr>
  <tr valign=top>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>\</font></code></td>
    <td valign=top bgcolor=#ADD8E6 align=left><code><font size=2>\\</font></code></td>
  </tr>
</table>

<p>
Non-recognised codes will just be displayed &quot;as is&quot; however it would be safer for future
expansion to make sure that all square brackets are entered as described above.
</p>

<hr>

<?php  

hLink ("Back to " . htmlentities ($forum_name), "bbshowpost.php");

echo "<hr>\n";

MessageTail (); 
    
?>
