This BBCode generator PHP HTML decoder script has the following features.
Any web server which has PHP installed can handle this script. Even if your system doesn't have PHP installed you can use the JavaScript BBCode generator to generate BBCode.
The BBCode generator PHP HTML decoder script code of version - 3.0 has been entirely re-written to provide easier integration and to ensure error free operation. In new version,
BBCode generator PHP HTML decoder script is of plug and play type and hence doesn't require any installation. To use this script,
Now the editor is ready for use.
As I said this BBCode editor script is of plug and play type. You can add this WYSIWYG BBCode editor to WebPages of any extension. Here is the guideline to add this script.
Put the following line of code over the web form where you want to add the editor. A sample form code is also given demonstrating the mater. Please remember the ID property of the checkbox "Automatically parsing URL" must be "fw_parseurls". Other wise this input will not work.
<script type="text/javascript">var bbCodeEditorID="editor";</script> <script type="text/javascript" src="bb/script/bbcode.js"></script> //Here "editor" is the ID of the textarea input which will receive the BBCode input. //A sample form code <form name="frmComment" method="post" action="receiver.php"> <table> <tr><td> <!-- Plug-in editor here--> <script type="text/javascript">var bbCodeEditorID="myeditor";var maxCodeLength=500;</script> <script type="text/javascript" src="bb/script/bbcode.js"></script> </td></tr> <tr><td> <!-- Textarea of ID myeditor--> <textarea id="myeditor" name="editor" style="width:600px;height:150px;"><?php echo $initialValue;?></textarea> </td></tr> <tr><td> <input type="reset" value="Reset" name="btnreset" /> <input type="submit" value="Submit" > <!-- Checkbox ID must be fw_parseurls--> <input id="fw_parseurls" type="checkbox" name="parseurls" value="ON" checked> automatically parse URLs</td></tr> </table></form>
Set initial value: Look carefully over the example code; an initial value of the editor has been set with the help of PHP code. It may be required when you use this editor for editing purpose. Data stored in database will be loaded over the editor as initial value.
Maximum code length: By default this script can handle BBCode of length of 10000 characters maximum. But if desire the webmaster can over-ride this value by assigning JavaScript variable maxCodeLength = value. In the above example I assign this value to 500 characters.
The purpose of the BBCode text generated by this editor is to send to the server for further processing and then storing into the database. The version -3 of this editor allow webmaster to send data by any of the conventional form submit method. Or AJAX data transfer method may also be used. In the above example code I use conventional "post" submit method where "receiver.php" is the file which will handle the data submitted and take further action.
After generating BBCode and storing them into database now the responsibility of the webmaster is to build a mechanism which can convert the BBCode text into equivalent HTML code before displaying them over browser window. This BBCode generator PHP HTML decoder script has a series of PHP functions which can successfully make this conversion. These functions are written inside the file "bb/include/functions.php". So to convert BBCode text into equivalent HTML webmaster must include that file into the project. Here is a sample PHP code to do this conversion.
<?php include 'bb/include/functions.php'; $html=fw_format_text($bbcode,$autolink); //Here the variable $bbcode is the BBCode text and $autolink is a boolean variable to autometically parse URLs. //The return value of this function is the HTML equivalant. ?>
This product is protected by copyright and distributed under licenses restricting copying, distribution. Permission is granted to the public to download and use this script provided that this Notice and any statement of authorship are reproduced in every page on all copies of the script.
THIS SCRIPT PRODUCT IS PROVIDED "AS-IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU (RECIPIENT) USE THIS SCRIPT AT YOUR (RECIPIENTS) OWN RISK. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAWS, AUTHOR EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. AUTHOR DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SCRIPT WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SCRIPT WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE SCRIPT WILL BE CORRECTED. FURTHERMORE, AUTHOR DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SCRIPT IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY AUTHOR OR RAMUI.COM SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF ANY WARRANTY.
| Download: |
| php-bbcode-html-generator-editor-v3.0.tar.gz |
i've place this script in my page.
but i write the bb always show like this.
not like this
Test
plesase give me source code to do that.
sorry for my english speak.