Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Error com <pre>


Marlon Douglas

Pergunta

Gente, é o seguinte. Tenho um sistema de tópico, e quando posta algo eu uso <pre> para pular de linha. Certo pula. Porém, olha oque acontece com o texto:

2ikw08h.jpg

O texto "vaza", tipo ele não pula automaticamente, conforme a largura da div.

Então, eu não sei como concertar isso. Então, vocês sabem uma forma de eu fazer um "pula linha"(o usuario digita no campo de texto, e quando ele pular, tem que simplkesmente pular).

Ou, podem me ajudar a resolver.

Aqui o site: http://habbobos.xp3.biz/forum/tópico/47/pagina/1

O arquivo "single":

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<link href="http://habbobos.xp3.biz/v1/css/padrão.css" rel="Stylesheet" type="text/css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.habbobos.com.br/tooltipe.js"></script>

<base href="http://habbobos.xp3.biz/v1/" />

<style>

div#qTip{font:normal bold 12px Arial;color:#FFF;text-align:left;letter-spacing:1px;background:#94CD04;border-left:2px solid #7DB104;display:none;position:absolute;z-index:1000;padding:3px;}

pre{
color: #FFF;
text-align: right;
letter-spacing:0px;

}
</style>

</head>
<body>
<div id="wrap">
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20949778-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<script type="text/javascript">

function EditarTopic(id) {
$("#res-"+id).html('Carregando');
$("#res-"+id).fadeIn(2000).load("http://habbobos.xp3.biz/v1/modulos/forum/editar.php?id="+id);
}

function ExcluirTopic(id) {
$("#res-"+id).html('Carregando');
$("#res-"+id).fadeIn(2000).load("http://habbobos.xp3.biz/v1/modulos/forum/excluir.php?id="+id);
}

    function citarQuote(msg){
        $('#texto').show('slow');
        if($('#texto')){
            $('#texto').val('[quot]'+msg+'[/quot]');
            $('#texto').val('[quot]'+msg+'[/quot]');
            $('#texto').focus();
        }
    }

function valida_Topico(f){

        if(f.texto.value == ""){
            alert("Preencha o campo do texto");
            f.texto.focus();
            return false;
        }
    if($.trim(f.texto.value).length<=10){
        alert("Texto muito curto.");
        f.texto.focus();
        return false;
    }

    if($.trim(f.texto.value).length>1000){
        alert("Texto muito longo.");
        f.texto.focus();
        return false;
    }


}

function InserTopico(){
    $('#resultado').html('<img src="http://www.habbid.com.br/images/carregando.gif"/>');
            var resultado = $.ajax({
            type: "POST",
            url: 'http://habbobos.xp3.biz/v1/modulos/forum/enviar.php',
            data: "texto="+escape($('#texto').val())+"&id="+escape($('#id').val()),
            async: true,
            success: function(resultado){
                $("#resultado").css('padding','10px');
                $("#resultado").html('Tópico respondido Com sucesso');
            }
        }).responseText;
}
</script>

</script>
<div id='header'>
<div style='padding-top: 30px;'>
<center><a href='http://www.habbobos.com.br/'><img src='img/logo.png' width='427' height='78' border='0'></a></center>
<div style='padding-top: 20px;'>
</div>

<div id='menu'>
<div style='margin-left:209px; margin-right:auto;'>
<ul id='menu'>

<li><a href='index.php' target='_self'>Home</a></li>
<li><a href='#'>Item 1</a>
    <ul><center>
         <li><a href='pg.php?pagina=equipe'>Sub Item 1</a></li>
    </ul>
</li>
<li><a href='#'>Item 2</a>
    <ul><center>

         <li><a href='pg.php?pagina=equipe'>Sub Item 2</a></li>
         <li><a href='pg.php?pagina=equipe'>Sub Item 2</a></li>
         <li><a href='pg.php?pagina=equipe'>Sub Item 2</a></li>
         <li><a href='pg.php?pagina=equipe'>Sub Item 2</a></li>
         <li><a href='pg.php?pagina=equipe'>Sub Item 2</a></li>

    </ul>

</li>
<li><a href='#'>Item 3</a>
    <ul><center>
         <li><a href='pg.php?pagina=equipe'>Sub Item 3</a></li>
    </ul>
</li>
</ul>
</div>
</div>
<div id='content'>
<div id='sidebar'>
<?php
include "http://habbobos.xp3.biz/v1/modulos/usuario/login.php";
?>

<!--<h2>Teste</h2>
Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste 
<br /><br />
<h2>Teste</h2>
Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste Teste teste 
<br /><br />-->
</div>

<div id='main'>
<br />


<?php

$id = $_GET['id'];
$t = $_GET['t'];

$sql = "SELECT * FROM ma_forum WHERE not_id = '$id'";
$res = mysql_query($sql) or die(mysql_error());

if(mysql_num_rows($res)>0){

$row = mysql_fetch_array($res);

$sql2 = "SELECT * FROM usr_users WHERE usr_id = '$row[usr_id]'";
$res2 = mysql_query($sql2) or die(mysql_error());
$row2 = mysql_fetch_array($res2);

$cont1 = mysql_query("SELECT * FROM ma_forum_comentarios WHERE usr_id = '$row[usr_id]'") or die(mysql_error());
$cont2 = mysql_query("SELECT * FROM ma_forum WHERE usr_id = '$row[usr_id]'") or die(mysql_error());

$cont3 = mysql_num_rows($cont1) + mysql_num_rows($cont2);

$contf1 = mysql_query("SELECT * FROM ma_forum_emb WHERE usr_id = '$row[usr_id]'") or die(mysql_error());
?>

<table cellspacing="0" cellpadding="0" border="0" style="border:1px solid #D0D0D0;width:586px;height:198px;margin:8px;">
<tr>
<td valign="top" width="200" style="width:200px;border-right:1px solid #F0F0F0;background:#F0F0F0;">
<center>
<div style="font-family:Verdana;font-size:18px;color:#725A01;font-weight:bold;"><?=$row2[usr_login]?></div>
<br />

<img border="0" style="margin-left:5px;" src="http://www.habbo.com.br/habbo-imaging/avatarimage?user=<?=$row2[usr_login]?>&action=std&direction=2&head_direction=2&gesture=std&size=b&img_format=gif" />

<br />
<div style="margin-left:4px;font-family:Verdana;font-size:14px;color:#725A01;font-weight:bold;">
<?php

if($cont3 > 0 && $cont3 < 4){

echo "Novato";

}elseif($cont3 > 4 && $cont3 < 49){

echo "Iniciante";

}elseif($cont3 > 49 && $cont3 < 99){

echo "Usuário";

}elseif($cont3 > 99 && $cont3 < 199){

echo "Conhecido";

}elseif($cont3 > 199 && $cont3 < 499){

echo "Comunicativo";

}elseif($cont3 > 499 && $cont3 < 999){

echo "Participante";

}elseif($cont3 > 999 && $cont3 < 1499){

echo "Popular";

}elseif($cont3 > 1499 && $cont3 < 1999){

echo "Profissinal";

}elseif($cont3 > 1999 && $cont3 < 3999){

echo "Habbobos Raro";

}elseif($cont3 > 4000){

echo "Habbobos Super Raro";

}
if($row2[usr_login] == "silas"){

echo "<br />Habbo Shamam";

}
?>

    </div>
    </div>
</center>
<br />
<div style="margin-left:8px;width:150px;text-align:center">
<center>
<div>
<center>
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<?php
$sql_emb = mysql_query("SELECT * FROM ma_forum_emb WHERE usr_id = '$row[usr_id]' ORDER BY id_femb DESC") or die(mysql_error());
while($row_emb = mysql_fetch_array($sql_emb)){

?>

<td><center><img title='<?=$row_emb[desc_femb]?>' src='<?=$row_emb[img_femb]?>' border='0' /></center></td>
<?php
}

function bobba($value){

$bobbaCode = array(

'@p****@' => '<b>[*****]</b>',
'@merda@' => '<b>[*****]</b>',
'@cu@' => '<b>[*****]</b>',
'@filho da p***@' => '<b>[*****]</b>',


'@\[quot\](.*?)\[\/quot\]@i' => '<div id="quote"><h4>Citação</h4>$1</div>',


                                         '@\[i\](.*?)\[\/i\]@i' => '<em>$1</em>',
                     '@\[b\](.*?)\[\/b\]@i' => '<strong>$1</strong>',
                     '@\[u\](.*?)\[\/u\]@i' => '<u>$1</u>',
                     '@\[img\](.*?)\[\/img\]@i' => '<img src="$1" alt="" />',
                     '@\[link\](.*?)\[\/link\]@i' => '<a href="$1">$1</a>',
                     '@\[youtube\](.*?)\[\/youtube\]@i' => '<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'


);
return preg_replace(array_keys($bobbaCode), array_values($bobbaCode), $value);

}

$texto2 = bobba($row[not_texto]);

?>

</tr>
</table>
</center>
</div></center>
</div>    
<br>
</td>
<td valign="top" width="581" style="width:581px;background:#fff;">

<?php

$views = $row[not_views];

$viewsn = $views + 1;

$viewsn2 = mysql_query("UPDATE ma_forum SET not_views = '$viewsn' WHERE not_id = '$row[not_id]'");

?>

<div style="color:#64880E;font-size:14px;font-family:verdana;padding:5px;border-bottom:1px solid #F7F7F7;font-weight:bold;background-color:#F7F7F7;"><?=$row[not_titulo]?></div>

Tópico criado em <?=date("d/m/Y H:i:s", $row[not_data])?>. Visualizações: <?=$viewsn?>


<div style="color:#000;font-size:12px;font-family:verdana;padding:5px; width: 100px;"><?=$texto2?></div>

<div style='border-bottom: 1px solid #64880E;'></div>

<?php 
include "http://habbobos.xp3.biz/v1/modulos/forum/assinatura.php?id=$row[usr_id]";
?>

</td>
</tr>
</table>

<?php
    $pagina = $_GET["pagina"];
include "respostas.php";

include "responder.php";


?>

<div id='resultado'></div>

<?php
}else{
echo "<b>Error! Tópico inexistente ou desativado</b>";
}
?>

</div>
</div>


<br />
</div>
</div>

<br />
    <div id="main2"></div>
</div>
<div id="footer2"></div>

<div id='footer'>
<br />
<div class='textfooter'>
<strong>Copyrights © Habbobos 2011. Todos os direitos reservados. Este site não tem nenhum vínculo com a Sulake groups.
 e não é parte do Habbo Hotel®. Site desenvolvido pelos habbos Marlon211 e PauloRique.</strong>
</div>
<br />

</body>
</html>

O css:

Está no arquivo acima..

Editado por Marlon Douglas
Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...