• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[PHP] Co jest z tym commentem?

Status
Not open for further replies.

lenidas

New Member
Joined
Mar 18, 2010
Messages
149
Reaction score
0
Code:
$comment = $player->getComment();
$newlines   = array("\r\n", "\n", "\r");
$comment_with_lines = str_replace($newlines, '<br />', 
$comment, $count);
	if($count < 50)
	$comment = $comment_with_lines;
	if(!empty($comment))
    {
    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
    $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';
    }

Czemu to nie chce działać?
 
Sądząc po tym co wkleiłeś to brakuje <?php i ?>..

Co wypluwa?
 
Tak, kawałek kodu.. przecież nie będę kopiował całego characters.php :p
 
PHP:
$comment = parseubb($player->getComment());
                        $newlines   = array("\r\n", "\n", "\r");
                        $comment_with_lines = str_replace($newlines, '<br />', $comment, $count);
                        if($count < 50)
                                $comment = $comment_with_lines;
                        if(!empty($comment))
                        {
                                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';
                        }
spróbuj tak
 
PHP:
$comment = $player->getComment();
			$newlines   = array("\r\n", "\n", "\r");
			$comment_with_lines = str_replace($newlines, '<br />', $comment, $count);
			if($count < 50)
				$comment = $comment_with_lines;
			if(!empty($comment))
			{
if(is_int($number_of_rows / 2)) { $bgcolor = darkBorder; } else { $bgcolor = lightBorder; } $number_of_rows++;
				$main_content .= '<TR CLASS="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';
			}

tez powinno dzialac

bo gdzie tam masz bb code;S? "parseubb"
 
poradziłem sobie, błąd leżał gdzie indziej :p
rep za chęci.
 
może byś powiedział gdzie błąd leżał, żeby znowu takiego topicu nie było?
 
Status
Not open for further replies.
Back
Top