• 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!

>> Comments in Characters.php <<

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Reaction score
5
Location
Halland - Getinge
Hello everyone!

I really need help with this and I know there are more then me out here who needs help with this.

HOW do I fix the character comments at Gesior AAC?


My code:
PHP:
// Char Comment
                    $id = $player->getCustomField("id");
           $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']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Comment:</TD><TD>'.$comment.'<br/></i></span></TD></TR>';

            } 
            // END Char Comment 
            }


I can write in comments and it saves but dont shows up when I search on my character.



Thanks in advice!
 
Last edited:
What is broken with it? You are implying everyone here has gesior and a broken character comments in characters.php

Post something legit like errors or the unexpected results.
 
This is not even hard to fix. But as SlurpDerp said you should show us errors or unexpected results.
 
i belive the comments do not exit, and arent really neded anyways

you will just have to add them as a textfieldbox with multilines, easy if you got dream weaver, but the code its such a rubish that it might be an issue
 
Does your comments code look like this in characters.php?

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 = $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>';
            }
            }
 
PHP:
// Char Comment
                    $id = $player->getCustomField("id");
           $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']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Comment:</TD><TD>'.$comment.'<br/></i></span></TD></TR>';

            } 
            // END Char Comment 
            }
 
Back
Top