Location: PHPKode > scripts > UBBCode > ubbcode/UBBCode.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Generated with PHPDoc, http://www.phpdoc.de -->
<html>
<head>
	<title>PHPDoc -  - Class: UBBCode</title>
	<link href="phpdoc.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0">
	<tr>
		<td align="left" valign="top" bgcolor="#B0BAFF">			
			<table width="100%">
				<tr>
					<td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td>
					<td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td>
					<td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td>
					<td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td>
					<td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td>
					<td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td>
				</tr>
			</table>	
		</td>
	</tr>
	<tr>	
		<td height="20" align="left" valign="top"><hr></td>
	</tr>
	<tr>
		<td align="left" valign="top">			
			File: <a href="file://../../projects/bookmarks/ubbcode/UBBCode.php" target="_new">../../projects/bookmarks/ubbcode/UBBCode.php</a>
			<h5>PHPDoc - </h5>
			<h1>UBBCode</h1>
			UBBCode<br>
			<p>
			Replaces the ubb tags with HTML tags, and vice versa.
			<p>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td align="left" valign="top">
			<h4>public    class UBBCode </h4>
			Replaces the ubb tags with HTML tags, and vice versa.
			<br>
			Also keeps the line feeds in the text and removes slashes (good for sql queries).
			<p>
			<table>
				
				
				<tr><td align="left" valign="top">Authors</td><td align="left" valign="top">Lennart Groetzbach &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</td></tr>
				
				<tr><td align="left" valign="top">Version</td><td align="left" valign="top">1.1 - 2002/10/27
<p>
History / Changes<br>
<table border="1" width="100%" cellpadding="3"><tr>
<th>Version</th>    <th>Reported By</th>        <th>File / Function Changed</th>    <th>Date of Change</th> <th>Commment</th>
</tr><tr>
<td>1.1</td>        <td>P.Gareau</td>        <td>encoding and decoding</td>            <td>2002/10/27</td>     <td>checks now for closing tags</td>
</tr><tr>
<td>1.1</td>        <td>-</td>        <td>strip()</td>            <td>2002/10/27</td>     <td>added function to strip the ubb tags</td>
</tr></table></td></tr>
				
				<tr><td align="left" valign="top">Copyright</td><td align="left" valign="top">Lennart Groetzbach <hide@address.com> - distributed under the LGPL</td></tr>
				
			</table>
		</td>
	</tr>
	<tr>
		<td height="10" align="left" valign="top">&nbsp;</td>
	</tr>
	
	<tr>
		<td height="20" align="left" valign="top"><hr></td>
	</tr>
	
	
	<tr>
		<td align="left" valign="top">		
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Public Method Summary</h2></td>
				</tr>
				
				<tr>
					<td align="right" valign="top">String</td>
					<td align="left" valign="top" width="100%"><a href="#function_encode()"><h4>encode(String $str)</h4></a>Encodes the string</td>
				</tr>
				
				<tr>
					<td align="right" valign="top">String</td>
					<td align="left" valign="top" width="100%"><a href="#function_strip()"><h4>strip(String $str)</h4></a>Strips all UBB tags</td>
				</tr>
				
				<tr>
					<td align="right" valign="top">String</td>
					<td align="left" valign="top" width="100%"><a href="#function_decode()"><h4>decode(String $str)</h4></a>Decodes the string</td>
				</tr>
				
				<tr>
					<td align="right" valign="top">void</td>
					<td align="left" valign="top" width="100%"><a href="#function_listCodes()"><h4>listCodes()</h4></a>Dumps the code tags</td>
				</tr>
				
			</table>
		</td>
	</tr>
	
	
	
	
	
	
	
	
	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Public Method Details</h2></td>
				</tr>
				
				<tr><td colspan="2" align="left" valign="top"><a name="function_encode()"><h4>encode</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    String encode( String $str )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Encodes the string
						<br>
						Removes all html tags and exchanges only the ubb tags and with html tags.
						<p>
						
					</td>
				</tr>
				
				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>
				
				<tr>
					<td></td>
					<td align="left" valign="top">						
						<table>
							<tr>
								<td align="left" valign="top">String</td>
								<td align="left" valign="top">$str</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top"></td>
							</tr>
						</table>
					</td>
				</tr>
				
				
				
				<tr>
					<td align="left" valign="top">Returns</td>
					<td>String <p></td>
				</tr>
				
				
				
				
				
				
				
				
				
				
				
				
				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>
				
				<tr><td colspan="2" align="left" valign="top"><a name="function_strip()"><h4>strip</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    String strip( String $str )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Strips all UBB tags
						<br>
						Removes all ubb tags and leaves only plain text
						<p>
						
					</td>
				</tr>
				
				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>
				
				<tr>
					<td></td>
					<td align="left" valign="top">						
						<table>
							<tr>
								<td align="left" valign="top">String</td>
								<td align="left" valign="top">$str</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top"></td>
							</tr>
						</table>
					</td>
				</tr>
				
				
				
				<tr>
					<td align="left" valign="top">Returns</td>
					<td>String <p></td>
				</tr>
				
				
				
				
				
				
				
				
				
				
				
				
				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>
				
				<tr><td colspan="2" align="left" valign="top"><a name="function_decode()"><h4>decode</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    String decode( String $str )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Decodes the string
						<br>
						Removes the html tags and replaces them with ubb code tags
						<p>
						
					</td>
				</tr>
				
				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>
				
				<tr>
					<td></td>
					<td align="left" valign="top">						
						<table>
							<tr>
								<td align="left" valign="top">String</td>
								<td align="left" valign="top">$str</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top"></td>
							</tr>
						</table>
					</td>
				</tr>
				
				
				
				<tr>
					<td align="left" valign="top">Returns</td>
					<td>String <p></td>
				</tr>
				
				
				
				
				
				
				
				
				
				
				
				
				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>
				
				<tr><td colspan="2" align="left" valign="top"><a name="function_listCodes()"><h4>listCodes</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    void listCodes(  )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Dumps the code tags
						<br>
						Displays a &lt;pre&gt; block with the &quot;ubb_def&quot; css style class
						<p>
						
					</td>
				</tr>
				
				
				<tr>
					<td align="left" valign="top">Returns</td>
					<td>void <p></td>
				</tr>
				
				
				
				
				
				
				
				
				
				
				
				
				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>
				
			</table>
	</tr>
		
		
	
	
	<tr>
		<td height="10" align="left" valign="top"><hr></td>
	</tr>
	<tr>
		<td align="left" valign="top" bgcolor="#C0C0C0">			
			<table>
				<tr>
					<td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td>
					<td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td>
					<td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td>
					<td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td>
					<td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td>
					<td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td>
				</tr>
			</table>	
		</td>
	</tr>
	<tr>
		<td align="left" valign="top">PHPDoc 1.0beta</td>
	</tr>
</table>

</body>
</html>
Return current item: UBBCode