- Fórum WMO
- → Naruto's Content
Naruto's Content
There have been 57 items by Naruto (Search limited from 14/05/2023)
#782614 Visual Studio 2005 + Sql Server 2005
Posted by Naruto on 22/09/2006, 00:27 in .NET
Alguém pode me ajudar? Como integro os 2?
#778419 Urgente: Erro Com "move_uploaded_file"
Posted by Naruto on 05/09/2006, 20:11 in PHP
quando tento usar o comando move_uploaded_file da esse erro:
Warning: move_uploaded_file(./imagens/fotos/1_01.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\PHP\painel\scripts\funcoes.php on line 208
sei que precisa da permissão na pasta para aonde o arquivo irá mas não sei como fazer isso.
Detalhe, esrou rodando o script Localmente.. como dou um CHMOD local? =\
Algumas especificações:
- Meu server eh IIS
- Instalei o php (através do instaler) ultima versão
- ja tentei dar chmod com a função chmod() do php
- o script funciona perfeitamente em servidor remoto
#778465 Urgente: Erro Com "move_uploaded_file"
Posted by Naruto on 06/09/2006, 00:43 in PHP
se não encontrasse a pasta certa o erro seria diferente, até pq o mesmo script roda perfeitamente em servidor remoto!Localmente não precisa de permissão, o que pode acontecer é de o upload não estar encontrando a pasta certa.
Procure dar um echo na variavel do arquivo e veja qual o caminho.
#773438 Tutorial Oop
Posted by Naruto on 18/08/2006, 00:22 in Artigos, Dicas e Tutoriais de PHP
AEEEEEEE FUNCIONO!!! =D uhuuuuuuuuuu
deu 336.15 o.O
pode cre o calcio ta certo.. era só colocar o "echo" errrr ¬¬
era bom coloca esse echo ai no script pra desatentos como eu cometerem a mesma coisa x_x'
#773075 Tutorial Oop
Posted by Naruto on 17/08/2006, 03:20 in Artigos, Dicas e Tutoriais de PHP
será q é pq estou usando php5?
#673696 Tutorial Oop
Posted by Naruto on 15/12/2005, 19:36 in Artigos, Dicas e Tutoriais de PHP
#741284 Tranformar Html Pra Bbcode
Posted by Naruto on 18/05/2006, 20:53 in PHP
//========================================
//====== 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?
#690885 Tem Como Muda A Borda De Um <select>?
Posted by Naruto on 18/01/2006, 19:47 in CSS & Semântica (Tableless)
pq tipo eu mudo aki no CSS e continua akela mesma cor.... xDD
#656251 Sistema De Lyrics
Posted by Naruto on 31/10/2005, 08:07 in Avaliação de Sistemas
#652190 Sistema De Lyrics
Posted by Naruto on 18/10/2005, 20:23 in Avaliação de Sistemas
http://letras.animesgeneration.com/
#659613 Problemas Com Lista No Ie =/
Posted by Naruto on 09/11/2005, 21:37 in CSS & Semântica (Tableless)
xa eu enfia minha cabeça de baixo da terra depois dessa x_X
#659027 Problemas Com Lista No Ie =/
Posted by Naruto on 08/11/2005, 11:41 in CSS & Semântica (Tableless)
NO FIREFOX: tudo funcionando perfeitamente conforme o código foi interpretado
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.
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?
#656947 Problemas Com Html Area + Php
Posted by Naruto on 01/11/2005, 20:43 in PHP
Como ele retorna:
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>
PS: ao moderador que moveu meu tópico:
Existem uns 10 tópicos relacionados à HTML Área na seção PHP que não foram movidos. Então acho que também tenho direito de tirar uma duvida de um script que eu to tentando interagr com o PHP aqui também
http://forum.wmonlin...hlite=html area
pra você ver como não estou mentindo!
#656876 Problemas Com Html Area + Php
Posted by Naruto on 01/11/2005, 16:21 in Javascript / DOM / AJAX / ECMAScript
Como ele retorna:
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>
#656896 Problemas Com Html Area + Php
Posted by Naruto on 01/11/2005, 17:14 in Javascript / DOM / AJAX / ECMAScript
http://forum.wmonlin...hlite=html area
#744399 Problemas Com Código Xml... Rss, Não Aceita & No Titulo =(
Posted by Naruto on 29/05/2006, 09:45 in XML e Tecnologias Derivadas
<?php
$data = date("d/m/Y");
$sql = "select titulo, descricao, date_format(data_saida,'%d/%m/%Y') as data from noticias where data_inc >= NOW()";
$query = mysql_query($sql);
// print o cabeçalho do xml
header("Content-type: application/xml");
// cabeçalho do RSS
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
?>
<rss version="2.0">
<channel>
<title>Titulo site - Notícias</title>
<link>Link do site</link>
<description>Breve descrição sobre o conteudo do site</description>
<language>pt-br</language>
<copyright>Site - Todos os direitos reservados.</copyright>
<image>
<title>Titulo do imagem</title>
<url>URL da imagem - Logo</url>
<link>Link da imagem para o site</link>
</image>
<lastBuildDate><?=$data;?></lastBuildDate>
<ttl>20</ttl>
<?php
while($result = mysql_fetch_array($query)) {
?>
<item>
<title><?=$result[titulo];?></title>
<link><?=$result[link];?></link>
<description><?=$result[descricao];?></description>
<datePosted><?=$result[data_inc];?></datePosted>
</item>
<?php
}
?>
</channel>
</rss>
Só que quando rodo o RSS ele da esse seguinte erro -> http://www.kdan.com....p?n=postMembros
alguém sabe como posso arrumar isso? =/
#745897 Problemas Com Código Xml... Rss, Não Aceita & No Titulo =(
Posted by Naruto on 01/06/2006, 22:38 in XML e Tecnologias Derivadas
colokei um str_replace("&",""",$texto);
mah mesmo assim ele continua non aceitando o caracter &
#717605 Problema Na Formatação De Data
Posted by Naruto on 12/03/2006, 17:01 in PHP
e se vc quisesse ordernar os resultados pela data mais recente?Bom... Eu gosto de trabalhar com timestamps pois acho que fica mais fácil para executar cálculos...
Se quero somar mais um dia: + 86400
Se quero subtrair um dia: - 86400
Se quero mais dois: + 86400 * 2
Se quero menos dois: - 86400 * 2
Antes que alguém jogue um tijolo na minha cabeça... Não estou falando que não dá pra se fazer cálculos com aaaa-mm-dd, existe funções simples para isso: http://www.mysqlfrea...atements/53.php
Para formatar a data, se for timestamps, eu uso assim:date ("d/m/Y", $timestamp);
Se fosse pelo SQL, seria com DATE_FORMAT: http://www.mysqlfrea...atements/59.php
Analisando, as maneiras são equivalentes. A única ressalva seria caso você use um SGBD que não tenha as funções de adicionar ou subtrair datas, se é que existe algum...
#707476 Pra Quem Manja De Fckeditor
Posted by Naruto on 18/02/2006, 20:47 in Javascript / DOM / AJAX / ECMAScript
obs.: ja alterei o arquivo fckconfig.js e mesmo assim num deu em nada ó.ò .. e to usando a versão pra PHP
#741387 [bbcode] Esquema De Inserir Url Igual Do Invision!
Posted by Naruto on 19/05/2006, 09:52 in Javascript / DOM / AJAX / ECMAScript
#740908 [bbcode] Esquema De Inserir Url Igual Do Invision!
Posted by Naruto on 17/05/2006, 22:48 in Javascript / DOM / AJAX / ECMAScript
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
- Fórum WMO
- → Naruto's Content
- Privacy Policy
- Regras ·