Jump to content

[SOLVED] BBcode only been outputted on 1 output buit not the other


runnerjp

Recommended Posts

ok so here is quick snippit of my code where the code in question is

 

<?php  <span class="style1"><?php

							$message = nl2br($gettopic3['post']);

							$b = new BBCode();
$b->selection = nl2br($message);
$b->parseCode();

echo nl2br($b->parsed);?></span></td>
    </tr>
    <tr>
      <td  align="right" valign="bottom">


<form action="index.php?page=reply&forum=<?php echo $forum; ?>&id=<? echo
$forumpostid ?>" method="post">
        <input name="quote" type="hidden" value="<? echo $gettopic3['postid']; ?>" />
       <input name="submit" type="submit" value="quote" />
</form></td>
    </tr>
  </table></td>
</tr>


<?php
}

$getreplies = "Select * from forumtutorial_posts where parentid='$forumpostid' ORDER BY showtime $max"; //getting replies

$getreplies2 = mysql_query($getreplies) or die(mysql_error() .
			"Could not get replies");

while ($getreplies3 = mysql_fetch_array($getreplies2))
{

?>
<tr class='mainrow'><td height="119" valign='top'><div align="center"> <strong><a href='/members/<? echo
$getreplies3['author']; ?>'><? echo
			$getreplies3['author'] ?></a></strong> <?php $result = mysql_query("SELECT * FROM useronline WHERE(user='" .
$getreplies3['author'] . "')");
			while ($row = mysql_fetch_array($result))
			{

							$last_active = time() - $row['timestamp'];
			}

			echo ($last_active < 300) ? '<img src="http://www.runningprofiles.com/images/useron.gif" width="12" height="11" />' : '<img src="http://www.runningprofiles.com/images/useroff.gif" width="12" height="11" />'; 

?></div>
  <p align="center">
  <?
			$query = "SELECT * FROM users WHERE Username = '" . $getreplies3['author'] .
							"' LIMIT 1";
			if ($result = mysql_query($query))
			{
							if (mysql_num_rows($result))
							{
											$array = mysql_fetch_assoc($result);
											$image = $array['image'];
											$postnum = $array['post_count'];

											echo "<img src=\"http://www.runningprofiles.com/members/images/mini/$image\" border=\"1\"  />"; ?><br />
<span class="style7"> Posts: <?php echo $postnum; ?> </span>
<p> <?
							}
			} ?> 
</p></td>
<td valign='top'>
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <td width="3%" rowspan="2"><div align="center"><img src="http://www.runningprofiles.com/images/posted.jpg" alt="foot" width="17" height="33" /></div></td>
      <td width="97%"><a href='index.php?page=message&forum=<? echo $forum; ?>&id=<? echo
$gettopic3[postid] ?>'><strong>RE: <? echo
$gettopic3[title] ?></strong></a></td>
    </tr>
    <tr>
      <td><span class="style7">Replied
          <? $dbtime = $getreplies3['showtime'];
			$time = date("F j Y, g:i a", $dbtime);

			$time = date("F j, Y, g:i a", $dbtime);
			gettheTime($dbtime, $time);
?>
      </span></td>
    </tr>
    <tr>
      <td rowspan="4"> </td>
      <td><hr color="#043050" /></td>
    </tr>
    <tr>
      <td align="left" valign="top"></td>    </tr>
    <tr>
      <td height="27"   align="right" valign="bottom">
        <div align="left">
        <span class="style1"><?php

							$message = nl2br($getreplies3['post']);
$b = new BBCode();
$b->selection = nl2br($message);
$b->parseCode();

echo nl2br($b->parsed);?></span>

	      </div></td>
    </tr>
    <tr>
      <td height="28"   align="right" valign="bottom">?>

 

 

As you can see i have 2 codes with

<?php

							$message = nl2br($getreplies3['post']);
$b = new BBCode();
$b->selection = nl2br($message);
$b->parseCode();

echo nl2br($b->parsed);?>

 

the topone outputs the bbcode fine.. in this case bold im trying out.  but for some reason the second time i run this code for the replies to the topic the bbcode is not outputted even though the code is mirrored ... why is this??

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.