Jump to content


Naruto's Content

There have been 57 items by Naruto (Search limited from 28/04/2023)



Ordernar por                Order  

#741387 [bbcode] Esquema De Inserir Url Igual Do Invision!

Posted by Naruto on 19/05/2006, 09:52 in Javascript / DOM / AJAX / ECMAScript

opa vlw.. e como eu faço prea centralizar a janela no IE.. pq no IE a janela ta lah no canto superior esquerdo =/



#740908 [bbcode] Esquema De Inserir Url Igual Do Invision!

Posted by Naruto on 17/05/2006, 22:48 in Javascript / DOM / AJAX / ECMAScript

Pessoal, to criando um BBcode aqui e queria uma ajuda. Eu tava querendo fazer o botão de inserir um link igual ao que tem no formulário de post do invision.

Eu queria esse esquema de que quando a pessoa clique no botão Link, abra uma janela pra inserir a URL do site e depois uma outra para inserir o NOME DO SITE e por fim adicione o código pronto na textarea. Meu Website

quem puder ajuda ai eu agradeço xD



#726126 Tem Como Eu Pegar O Tamanho E A Resolução De Uma...

Posted by Naruto on 31/03/2006, 19:53 in PHP

Pra ser mais especifico quero que quando usuários postarem um link de avatar o script pegue o tamanho, resolução e tipo de arquivo(jpg,gif,etc..)

tem como fazer isso? oO



#744681 Como Descobrir A Largura De Uma Imagem No Meio De Um Texto?!

Posted by Naruto on 29/05/2006, 19:27 in PHP

Vai.. eu tenho o texto:

$tetxo = "texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto <img src=\"http://www.site.com.br/imagem.jpg\" /> o texto texto texto texto texto texto texto texto texto texto texto texto to texto texto texto texto texto texto texto texto texto texto texto texto to texto texto texto texto texto texto texto texto texto texto texto texto";


como eu faria pra descobrir a resolução da imagem que está nesse texto?!



#772294 Alguém Poderia Me Indicar Uma Apostila Completa Sobre Asp?!

Posted by Naruto on 14/08/2006, 21:45 in ASP

Puxa eu entrei nesses sites ai que tem no tópico de sites recomendados e só tem coisas fraquinhas... eu queria uma apostila bem completa. Alguem pode indicar alguma?! Onde eu possa baixar e tals. De preferência em PDF

quem puder ajudar, obrigado \o



#772674 Orientação à Objeto, Aonde Posso Aprender? ;__;

Posted by Naruto on 15/08/2006, 21:54 in PHP

hehe eu ja reli esse topico umas 4x e ateh hj num intendi como funciona o negócio.. >< se alguém puder explicar com um exemplo bem simples ajudaria mto xD~~



#772642 Orientação à Objeto, Aonde Posso Aprender? ;__;

Posted by Naruto on 15/08/2006, 20:19 in PHP

To querendo aprender sobre Orientação à Objeto.. ja tentei umas 3x entender akeles termos mas nunca entendo nada :unsure: principalmente akele tal de $this que até hj num sei pra q q serve XD

alguém poderia me da uma ajuda ae.. sei lah fazer um exemplo bem besta pra eu tentar aprender sobre orientação a objeto?!



#772366 Alguém Poderia Me Indicar Uma Apostila Completa Sobre Asp?!

Posted by Naruto on 15/08/2006, 03:03 in ASP

entaum.. eu ja fui nesses tópicos.. mas nos sites sobre apostilas eu num enontrei nenhuma q seja completa o suficiente ^^' por isso tava querendoalguma recomendação de alguem q saiba quais são as melhores pra baixa



#715698 Ajuda Com If!

Posted by Naruto on 07/03/2006, 22:55 in PHP

Pessoal to com uma duvida aqui... queria que um determinado script html aparecese APENAS se o select obtivesse algum resultado, caso contrario não aparece nada.

To fazendo da seguinte maneira mas não ta dando muito certo, vejam:

$rs = mysql_query("SELECT * FROM `usuarios` WHERE `id`= '1'",$db);

if($rs) {

resultados aqui

}

só que mesmo se não obtem nenhum resultado, o código continua à aparecer.. alguem poderia me ajudar nissu?!



#726159 Tem Como Eu Pegar O Tamanho E A Resolução De Uma...

Posted by Naruto on 31/03/2006, 21:45 in PHP

opa.. vlw kra ja ajudo pakas!!
eu usei o: list($width, $height, $type, $attr) = getimagesize("url");

dai ele ja retorna tudo separadinho, pena q num mostra o tamanho =/ será q tem como pega o tamanho com uma outra função?



#655918 Iniciando Com Gd

Posted by Naruto on 29/10/2005, 21:49 in Artigos, Dicas e Tutoriais de PHP

como eu instalo essa biblioteca num host q eu hospedo meu site?



#690885 Tem Como Muda A Borda De Um <select>?

Posted by Naruto on 18/01/2006, 19:47 in CSS & Semântica (Tableless)

Tem? o.o

pq tipo eu mudo aki no CSS e continua akela mesma cor.... xDD



#666873 Como Rodas Asp E Php Ao Mesmo Tempo No Pc?!

Posted by Naruto on 01/12/2005, 17:53 in IIS & PWS

É pessoal, cabei de instala o IIS mas quando entro em http://loacalhost aparece apenas a págiona principal do apache, pois eu ja usava ele pra rodar PHP no PC... tem como fazer rodar os 2 juntos?



#656876 Problemas Com Html Area + Php

Posted by Naruto on 01/11/2005, 16:21 in Javascript / DOM / AJAX / ECMAScript

Ae pessoal to com um probleminha aqui com o HTML Area, já consegui configurá--lo pra aparecer na text area, porém na hora de imprimir o conteúdo da mesma ele aparece sem nenhuma formatação. Vou postar 2 screens aqui pra vocÊs entenderem melhor:

Posted Image

Como ele retorna:
Posted Image

Aqui vai o código da index.php teste que eu fiz pra vocês darem uma olhada:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<!-- Configure the path to the editor.  We make it relative now, so that the
    example ZIP file will work anywhere, but please NOTE THAT it's better to
    have it an absolute path, such as '/htmlarea/'. -->
<script type="text/javascript">
  _editor_url = "htmlarea/";
  _editor_lang = "en";
</script>

<!-- load the main HTMLArea file, this will take care of loading the CSS and
    other required core scripts. -->
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>

<!-- load the plugins -->
<script type="text/javascript">
      // WARNING: using this interface to load plugin
      // will _NOT_ work if plugins do not have the language
      // loaded by HTMLArea.

      // In other words, this function generates SCRIPT tags
      // that load the plugin and the language file, based on the
      // global variable HTMLArea.I18N.lang (defined in the lang file,
      // in our case "lang/en.js" loaded above).

      // If this lang file is not found the plugin will fail to
      // load correctly and nothing will work.

      HTMLArea.loadPlugin("TableOperations");
      HTMLArea.loadPlugin("SpellChecker");
      HTMLArea.loadPlugin("FullPage");
      HTMLArea.loadPlugin("CSS");
      HTMLArea.loadPlugin("ContextMenu");
   
   var editor = null;
function initEditor() {

  // create an editor for the "ta" textbox
  editor = new HTMLArea("teste");

  // register the FullPage plugin
  editor.registerPlugin(FullPage);

  // register the SpellChecker plugin
  editor.registerPlugin(TableOperations);

  // register the SpellChecker plugin
  editor.registerPlugin(SpellChecker);

  // register the CSS plugin
  editor.registerPlugin(CSS, {
    combos : [
      { label: "Syntax:",
                   // menu text       // CSS class
        options: { "None"           : "",
                   "Code" : "code",
                   "String" : "string",
                   "Comment" : "comment",
                   "Variable name" : "variable-name",
                   "Type" : "type",
                   "Reference" : "reference",
                   "Preprocessor" : "preprocessor",
                   "Keyword" : "keyword",
                   "Function name" : "function-name",
                   "Html tag" : "html-tag",
                   "Html italic" : "html-helper-italic",
                   "Warning" : "warning",
                   "Html bold" : "html-helper-bold"
                 },
        context: "pre"
      },
      { label: "Info:",
        options: { "None"           : "",
                   "Quote"          : "quote",
                   "Highlight"      : "highlight",
                   "Deprecated"     : "deprecated"
                 }
      }
    ]
  });

  // add a contextual menu
  editor.registerPlugin("ContextMenu");

  // load the stylesheet used by our CSS plugin configuration
  editor.config.pageStyle = "@import url(custom.css);";

  setTimeout(function() {
    editor.generate();
  }, 500);
  return false;
}

function insertHTML() {
  var html = prompt("Enter some HTML code here");
  if (html) {
    editor.insertHTML(html);
  }
}
function highlight() {
  editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
</head>

<body onLoad="initEditor()">
<form action="index.php?a=postar" id="edit" name="edit" method="post">
  <p>
    <textarea name="teste" cols="50" rows="10" id="teste"></textarea>
</p>
  <p>
    <label>
    <input type="submit" name="Submit" value="Enviar" />
    </label>
</p>
</form>

<? if ($a == "postar"){

echo $_POST["teste"];

}
?>
</body>
</html>



#656251 Sistema De Lyrics

Posted by Naruto on 31/10/2005, 08:07 in Avaliação de Sistemas

Tem sim vo tira umas screens pra mostra pro pessoal



#774163 Não é Possível Atualizar. O Banco De Dados Ou O Objeto é Somente Leitu

Posted by Naruto on 20/08/2006, 23:21 in ASP

pessoal to começando ASP agora e na minha primeira tentativa de adicionar registros em um arquivo access deu esse erro:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][Driver ODBC para Microsoft Access] Não é possível atualizar. O banco de dados ou o objeto é somente leitura.


alguém saberia como resolver?

DETALHE:
1. To usando Access 2003
2. Já desmarquei a opção "Somente Leitura" das propriedades do arquivo de banco de dados



#782614 Visual Studio 2005 + Sql Server 2005

Posted by Naruto on 22/09/2006, 00:27 in .NET

Estou com os ois programas instalados mas não consigo faer com que o Visual Studio funcione junto com o SQL Server, sempre que tento criar uma database no Visual Studio ele diz que o SQL Server precisa ser instalado.

Alguém pode me ajudar? Como integro os 2?



#656896 Problemas Com Html Area + Php

Posted by Naruto on 01/11/2005, 17:14 in Javascript / DOM / AJAX / ECMAScript

Talvez pq o JavaScript esteja funcionando e o PHP retornando o valor errado não? Sem contar que tem uns 10 tópicos relacionados à HTML Área na seção PHP que não foram movidos pra cá.

http://forum.wmonlin...hlite=html area ;)



#659613 Problemas Com Lista No Ie =/

Posted by Naruto on 09/11/2005, 21:37 in CSS & Semântica (Tableless)

BOAAAAAAAAAA!!! (y)

xa eu enfia minha cabeça de baixo da terra depois dessa x_X (n)



#652190 Sistema De Lyrics

Posted by Naruto on 18/10/2005, 20:23 in Avaliação de Sistemas

Ae pessoal, aqui está meu primeiro script completo. É um sistema de letras de músicas de um determinado tipo. O script foi feito totalmente por mim, o que vocês acham? Deêm suas opniões ai plz :lol:

http://letras.animesgeneration.com/



#741284 Tranformar Html Pra Bbcode

Posted by Naruto on 18/05/2006, 20:53 in PHP

Pessoal.. to com um problema.. usei a função de bbcode lah de um dos tópicos na seção de funções... o código é essse aqui:

//========================================
//====== Sistema de BBCode->HTML =========
//========================================

function bbcode($sText)
{

$sText = str_replace("http://www.youtube.com/watch?v=","http://www.youtube.com/v/",$sText);
$atagArray['youtube'] = array('open'=>'<embed src="',
'close'=>'" type="application/x-shockwave-flash" width="425" height="350"></embed>');

$sTagArray['lol'] = array('tag'=>'<img src="imagens/smiles/001.gif" />');
$sTagArray['=)'] = array('tag'=>'<img src="imagens/smiles/002.gif" />');
$sTagArray['ops'] = array('tag'=>'<img src="imagens/smiles/003.gif" />');
$sTagArray['raiva'] = array('tag'=>'<img src="imagens/smiles/004.gif" />');
$sTagArray['=p'] = array('tag'=>'<img src="imagens/smiles/005.gif" />');
$sTagArray['uU'] = array('tag'=>'<img src="imagens/smiles/015.gif" />');
$sTagArray['snif'] = array('tag'=>'<img src="imagens/smiles/007.gif" />');
$sTagArray['hein'] = array('tag'=>'<img src="imagens/smiles/009.gif" />');
$sTagArray['Oo'] = array('tag'=>'<img src="imagens/smiles/010.gif" />');
$sTagArray['sorriso'] = array('tag'=>'<img src="imagens/smiles/011.gif" />');
$sTagArray['s2'] = array('tag'=>'<img src="imagens/smiles/012.gif" />');
$sTagArray['!'] = array('tag'=>'<img src="imagens/smiles/013.gif" />');

$atagArray['esquerda'] = array('open'=>'<p style="width: 100%; text-align: left">','close'=>'</p>');
$atagArray['direita'] = array('open'=>'<p style="width: 100%; text-align: right">','close'=>'</p>');
$atagArray['centro'] = array('open'=>'<p style="width: 100%; text-align: center">','close'=>'</p>');
$atagArray['justo'] = array('open'=>'<p style="width: 100%; text-align: justify">','close'=>'</p>');
$atagArray['img'] = array('open'=>'<img src="','close'=>'" />');
$atagArray['b'] = array('open'=>'<b>', 'close'=>'</b>');
$atagArray['i'] = array('open'=>'<i>', 'close'=>'</i>');
$atagArray['u'] = array('open'=>'<u>', 'close'=>'</u>');
$atagArray['url'] = array('open'=>'<a href="', 'close'=>'" target="_blank">\\1</a>');
$atagArray['email'] = array('open'=>'<a href="mailto:', 'close'=>'">\\1</a>');
$atagArray['site=(.*)'] = array('open'=>'<a href="', 'close'=>'" target="_blank">\\2</a>');
$atagArray['email=(.*)'] = array('open'=>'<a href="mailto:', 'close'=>'">\\2</a>');
$atagArray['color=(.*)'] = array('open'=>'<font color="', 'close'=>'">\\2</font>');
$atagArray['size=(.*)'] = array('open'=>'<font size="', 'close'=>'">\\2</font>');
$atagArray['font=(.*)'] = array('open'=>'<font face="', 'close'=>'">\\2</font>');

foreach ($atagArray as $stagName => $replace)
{
$tagEnd = preg_replace("/\W/sUi", "", $stagName);

$sText = preg_replace(
"|\[$stagName\](.*)\[/$tagEnd\]|sUi",
"$replace[open]\\1$replace[close]",
$sText
);
}

foreach ($sTagArray as $stagName => $replace)
{
if (eregi("[)(#$]", $stagName))
{
$stagNameNew = preg_replace("#([\)\(\$\#])#", "\\ \\1", $stagName);
$stagNameNew = preg_replace("#( +)#", "", $stagNameNew);
$sTagArray[ $stagNameNew ] = array('tag' => $replace['tag']);
unset($sTagArray[ $stagName ]);
}
}

foreach ($sTagArray as $stagName => $replace)
{
$sText= preg_replace("|\[$stagName\]|sUi", "$replace[tag]", $sText);
}

return $sText;
}


dei uma modificada e tals.. até ai blz.. mas agora eu to com um problema, os usuários que irão postar tb poderão editar seus posts certo? Então, mas na hora de editar o código ta todo em HTML... será que alguem ai tem uma função que tranforme HTML pra BBCODE?!

Pq agora eu só tenho 2 opções.. ou eu arranjo essa função que eu num tenho nem ideia de como fazer.. ou eu salvo no Banco de Dados os textos com TAGS BBCODE mesmo e uso a função na hora de imprimir, oq acho q vai afetar o desempenho neh? ;)



#741320 Tranformar Html Pra Bbcode

Posted by Naruto on 19/05/2006, 00:14 in PHP

hehehehe eh oq eu tava em mente =/
bom enfim acho q o jeito vai ser esse mesmo :(

vlw pelo dica ai do html.. ia ser minha prox duvida hehhehehe
\O



#659027 Problemas Com Lista No Ie =/

Posted by Naruto on 08/11/2005, 11:41 in CSS & Semântica (Tableless)

Baum pessoal... pra ser direto e reto vou colocar umas imagens aqui pra vocês verem o que aocontece quando uso um código de lista no Firefox e no IE

NO FIREFOX: tudo funcionando perfeitamente conforme o código foi interpretado
Posted Image

NO IE (-_-): podem ver que existe um espaço na parte de cima, antes da linha, de cada link sem contar que nos lados e embaixo a cor escura ultrapasse as bordas ficando por cima delas.
Posted Image

O código CSS
.lista {
	margin: 8px;
	background: #FFF;
	border-top: 1px solid #45230A;
}

.lista li {
	border-left: 3px solid #C7AE7E;
	border-right: 3px solid #C7AE7E;
	border-bottom: 1px solid #000;
}

.lista a {
	display: block;
	color: #000;
	padding: 5px;
}

.lista a:hover {
	background: #45230A;
	color: #FFF;
}

/* Correção para IE. e IE Mac */
* html .lista {
	width: 98%;
	margin: 10px 3px 10px 3px;
}

O código HTML
<ul class="lista">
<li><a href="$link">$titulo</li>
<li><a href="$link">$titulo</li>
<li><a href="$link">$titulo</li>
<li><a href="$link">$titulo</li>
</ul>

Ela tava até pior que isso mas eu consegui da uma corrigida usando akele ultimo código ali no CSS, mesmo assim num fico 100% fico desse jeito que eu descrevi =/ alguem ai sabe algum jeito de arruma isso ai ou corrigir isso direito?



#717973 Como Fazer Um Script Igual à Resposta Rápida

Posted by Naruto on 13/03/2006, 14:15 in HTML, CSS e Metodologias

queria um script que funcione q nem o Resposta Rápida do fórum.. alguém poderia me dizer como fazer.. prvavelmente deve ter um tutorial aki no fórum, mas num sei nem oq procurar ><



#737708 Pegando Usuários Online, Como?!

Posted by Naruto on 06/05/2006, 20:49 in PHP

Pessoal preciso de uma ajuda urgente...

a cituação é essa:
em uma tabela de usuários, tenho um campo chamado `horaEntrada` INT onde é inserido a hora com o com comanto unis_timestamp(). E isso não pode ser mudado, pois é programaram assim e se eu colokar o campo INT como timestamp alguams coisas naum funcionam.

E preciso pegar os usuários online =/ e o tempo de "expiração dos usuários" é de 15minutos
usei a seguinte query mas non deu muito certo:

"SELECT * FROM `usuarios` WHERE (time() - (`horaEntrada`+60*15)) >= 0)"

alguem pode me dizer qual a maneira correta de se escrever essa query? xD




IPB Skin By Virteq