Jump to content

Recommended Posts

Probably a stupid question, but I was wondering how to add a BBcode option on my guestbook, on my website. I followed the steps exactly as they were in this tutorial (and the next two) but I can't seem configure the textarea to be the $outut. Sorry if that didn't make sense.

 

Code for the guestbook page:

 

<?php include 'header.php';


require 'classes/nbbc.php';
$bb = new bbcode();


$bb->SetDetectURLs(true);


$bb->AddRule('php', array(


'simple_start' => '<pre class="php">',
'simple_end' => '</pre>',
'class' => 'block',
'allow_in' => null


));


$bb->AddRule('youtube', array(


'mode' => BBCODE_MODE_ENHANCED,
'template' => '<iframe width="560" height="315" src="http://www.youtube.com/embed/{$_content}" frameborder="0" allowfullscreen></iframe>',
'class' => 'block',
'allow_in' => null


));



$output = '';
$bb -> Parse($output);


?>


<br>


<form method=post action=add_entry.php>
<table border='0' cellspacing='0' cellpadding='0' align=center width=300>
<tr><td><font face='Verdana' size='2'>Your Name *</font><td><input type=text name=name></td></tr>
<tr bgcolor=#F2EABD><td><font face='Verdana' size='2'>Email *</font><td><input type=text name=email></td></tr>
<tr><td><font face='Verdana' size='2'>Country</font><td><input type=text name=country></td></tr>
<tr bgcolor=#F2EABD><td colspan=2 align=center><textarea name=dtl rows=5 cols=40 id="textyy"></textarea></td></tr>
<tr ><td colspan=2 align=center><input type=submit value='Add Entry'></td></tr>


</table></form>


<br><br>
<?php
include 'view_entry.php';
include 'footer.php';
?>

 

Thanks for reading!

Link to comment
https://forums.phpfreaks.com/topic/274862-phpbbcode-question/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.