ok im having trouble localing the problem ok well first here the problem on some of the post it has to lines together and then skips a line to lines together and then skips lines whats going on heres a screen shot

http://i14.photobucket.com/albums/a332/siko65/error01.png

and heres the code i was having a lot of trouble going through the code:

<?php
session_start();
include "../admin/connect.php";
include "../header.php";
print "<link rel='stylesheet' href='../style.css' type='text/css'>";
$blogadmin=$_SESSION['blogadmin'];
$getadmin="SELECT * from bl_admin where username='$blogadmin'";
$getadmin2=mysql_query($getadmin) or die("Cannot get admin");
$getadmin3=mysql_fetch_array($getadmin2);
print "<center>";
print "<table width=90%><tr><td>";
$forumID=$_GET['forumID'];
$ID=$_GET['ID'];
$getforum="SELECT forumid,forumname from bl_forums where forumid='$forumID'";
$getforum2=mysql_query($getforum) or die("Could not get forums");
$getforum3=mysql_fetch_array($getforum2);
print "<A href='index.php'>Forum Main</a>-<A href='forum.php?ID=$getforum3[forumid]'>$getforum3[forumname]</a>-";
if(isset($_SESSION['blogadmin']))
{
  print "Welcome $blogadmin";
}
else 
{
  print "<A href='../index.php'>Login</a>";
}
$gettopics="SELECT * FROM bl_forumposts a, bl_admin b where b.adminid=a.posterid and a.forumid='$forumID' and a.postid='$ID'";
$gettopics2=mysql_query($gettopics) or die("Could not get topics");
$gettopics3=mysql_fetch_array($gettopics2);
print "</td></tr></table><br><br></center>";
print "<center><table border='0' width=95%><tr><td>";
print "<A href='newpost.php?forumID=$forumID'>New Post</a>-<A href='reply.php?forumID=$forumID&threadid=$ID'>Reply</a></td></tr></table><br>";
print "<table width=95% border='0'>";
print "<tr class='headline'><td width=25% valign='top'><center>Author</center></td><td valign='top' width=75%><center>Post</center></td></tr>";
print "<tr class='mainrow'><td width=25% valign='top'><A href='../members.php?membername=$gettopics3[username]'>$gettopics3[username]</a><br><br><A href='banuser.php?userid=$gettopics3[adminid]'>Ban User from Posting</a></td>";
print "<td valign='top' width=75%>Last replied to on $gettopics3[posttime]<br>";
//start logic for forum permissions
if($getadmin3['status']>=2 || $getadmin3[adminid]==$gettopics3[adminid])
{
  print "<A href='editpost.php?forumID=$forumID&threadid=$ID'>Edit Post</a>|";
}
print "<A href='quote.php?forumID=$forumID&threadid=$ID'>Quote</a>";
if($getadmin3['status']>=2)
{
  if($gettopics3['islocked']==1)
  {
      print "|<A href='unlockthread.php?ID=$ID'>Unlock Thread</a>|";
  }
  else
  {
    print "|<A href='lockthread.php?ID=$ID'>Lock Thread</a>|";
  }

  print "<A href='movethread.php?ID=$ID'>Move Thread</a>|<A href='deletethread.php?ID=$ID'>Delete Thread</a>";
}
print "<br><hr>";
$gettopics3[thepost] = wordwrap($gettopics3[thepost], 100, "\n", 1);
$gettopics3[thepost]= BBCode($gettopics3[thepost]);
$gettopics3[thepost]= BBCode($gettopics3[thepost]);
print "$gettopics3[thepost]<br><hr>";
print "</td></tr>";
if(!isset($_GET['start']))
{
 $start=0;
}
else
{
  $start=$_GET['start'];
}
$update="update bl_forumposts set numviews=numviews+1 where forumid='$forumID'";
mysql_query($update) or die("Could not update");
$getreplies="SELECT * from bl_forumposts a, bl_admin b where b.adminid=a.posterid and a.threadid='$ID' limit $start,15";
$getreplies2=mysql_query($getreplies) or die(mysql_error());
//put reply stuff here
while($getreplies3=mysql_fetch_array($getreplies2))
{
  print "<tr class='mainrow'><td width=25% valign='top'><A href='../members.php?membername=$getreplies3[username]'>$getreplies3[username]</a><br><br><A href='banuser.php?userid=$getreplies3[adminid]'>Ban User from Posting</a></td>";
  print "<td width=75% valign='top'><A href='quote.php?forumID=$forumID&threadid=$getreplies3[postid]'>Quote</a>|";
  if($getadmin3['status']>=2 || $getadmin3[adminid]==$gettopics3[adminid])
  {
   print "<A href='editpost.php?forumID=$forumID&threadid=$getreplies3[postid]'>Edit Post</a>|";
  }
  if($getadmin3['status']>=2)
  {
   print "<A href='deletepost.php?ID=$getreplies3[postid]'>Delete Post</a>";
  }
  print "<br><hr>";
  $getreplies3[thepost]= wordwrap($getreplies3[thepost],100,"\n",1);
  $getreplies3[thepost]=BBCode($getreplies3[thepost]);
  print "$getreplies3[thepost]<br><hr></td></tr>";
}


print "</table><br><br>";
print "<center>";
$order="SELECT COUNT(*) FROM bl_forumposts where threadid='$ID'";
   $order2=mysql_query($order) or die("2");
   $d=0;
   $f=0;
   $g=1;
   $order3=mysql_result($order2,0);
   $prev=$start-15;
   $next=$start+15;
   if($start>=15)
   {
     print "<A href='message.php?forumID=$forumID&ID=$ID'>First</a>&nbsp&nbsp;&nbsp;";
     print "<A href='message.php?forumID=$forumID&ID=$ID&start=$prev'><<</a>&nbsp;";
   }
   while($f<$order3)
   {
     if($f%15==0)
       {
         if($f>=$start-3*15&&$f<=$start+7*15)
         {
           print "<A href='message.php?forumID=$forumID&ID=$ID&start=$d'><b>$g</b></a> ";
           $g++;
         }
       }
     $d=$d+1;
     $f++;
   }
   if($start<$order3-15)
   {
     print "&nbsp;<A href='message.php?forumID=$forumID&ID=$ID&start=$next'>>></a>&nbsp;&nbsp;&nbsp;";
     $last=$order3-$numrepliesperpage;
     print "<A href='message.php?forumID=$forumID&ID=$ID&start=$last'>Last</a>";
   }

?>


 <? //BBCODE function
	//Local copy

function BBCode($Text)
    {
    	// Replace any html brackets with HTML Entities to prevent executing HTML or script
        // Don't use strip_tags here because it breaks [url] search by replacing & with amp


        // Convert new line chars to html <br /> tags
        $Text = nl2br($Text);

        // Set up the parameters for a URL search string
        $URLSearchString = " a-zA-Z0-9\:&amp;\/\-\?\.\=\_\~\#\'";
        // Set up the parameters for a MAIL search string
        $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@";

        // Perform URL Search
        $Text = preg_replace("(\[url\]([$URLSearchString]*)\[/url\])", '<a href="$1">$1</a>', $Text);
        $Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text);
        $Text = preg_replace("(\[URL\=([$URLSearchString]*)\]([$URLSearchString]*)\[/URL\])", '<a href="$1" target="_blank">$2</a>', $Text);
        // Perform MAIL Search
        $Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '<a href="mailto:$1">$1</a>', $Text);
        $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.+?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text);

        // Check for bold text
        $Text = preg_replace("(\[b\](.+?)\[\/b])is",'<b>$1</b>',$Text);

        // Check for Italics text
        $Text = preg_replace("(\[i\](.+?)\[\/i\])is",'<I>$1</I>',$Text);
        $Text= str_replace("JavaScript", "Java Script",$Text);
        // Check for Underline text
        $Text = preg_replace("(\[u\](.+?)\[\/u\])is",'<u>$1</u>',$Text);

        // Check for strike-through text
        $Text = preg_replace("(\[s\](.+?)\[\/s\])is",'<span class="strikethrough">$1</span>',$Text);

        // Check for over-line text
        $Text = preg_replace("(\[o\](.+?)\[\/o\])is",'<span class="overline">$1</span>',$Text);

        // Check for colored text
        $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text);

        // Check for sized text
        $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1px\">$2</span>",$Text);

        // Check for list text
        $Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=1\](.+?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=i\](.+?)\[\/list\]/s", '<ul class="listlowerroman">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=I\](.+?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=a\](.+?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=A\](.+?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text);
        $Text = str_replace("[*]", "<li>", $Text);
         $Text = preg_replace("(\[quote\](.+?)\[\/quote])is",'<center><table class="quotecode"><tr row="forumrow"><td>Quote:<br>$1</td></tr></table></center>',$Text);
        $Text = preg_replace("(\[code\](.+?)\[\/code])is",'<center><table class="quotecode"><tr row="forumrow"><td>Code:<br>$1</td></tr></table></center>',$Text);

        // Check for font change text
        $Text = preg_replace("(\[font=(.+?)\](.+?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);



        // Images
        // [img]pathtoimage[/img]
        $Text = preg_replace("/\[IMG\](.+?)\[\/IMG\]/", '<img src="$1">', $Text);
        $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1">', $Text);
        // [img=widthxheight]image source[/img]
        $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text);

        return $Text;
	}
?>
 

    Try commenting out the below line. and see if this is what you are looking for

    $gettopics3[thepost] = wordwrap($gettopics3[thepost], 100, "\n", 1); 
      avatar.alex wrote:

      i cant find it in that big huge code

      I found it straight away.

      Normally look at the code you use before asking someone else to do it for you.

        i feel stupid it was right there lol thank you so much!!!🙂

          Write a Reply...