Darnassus Posted December 30, 2005 Share Posted December 30, 2005 james, sabes de alguma forma de se puder usar/implementar o codigo num blog? Link to comment Share on other sites More sharing options...
Prym3r Posted December 30, 2005 Share Posted December 30, 2005 pois.. e por isso k keria o codigo :P Link to comment Share on other sites More sharing options...
chaos9k Posted December 30, 2005 Share Posted December 30, 2005 Ca' esta' o código para os interessados ;) ←Boa ideia e excelente trabalho ;) Link to comment Share on other sites More sharing options...
bstaine Posted December 30, 2005 Share Posted December 30, 2005 Muito bom mesmo Link to comment Share on other sites More sharing options...
Darnassus Posted December 30, 2005 Share Posted December 30, 2005 pois.. e por isso k keria o codigo :P ←pois mas eu n percebo de php nem html, ptt dps avisa como é k implementaste o codigo no teu :P Link to comment Share on other sites More sharing options...
jr_cardoso Posted December 30, 2005 Share Posted December 30, 2005 jamesp0tter, :y: Link to comment Share on other sites More sharing options...
txunk Posted December 31, 2005 Share Posted December 31, 2005 editei um pouco o codigo para deixar de ser só para o IPB e ser mais geral só para tentar ajudar ai o ppl que o quer meter num blog, espero que o jamesp0tter não se importe. all credits go to jamesp0tter (nice code ) index.php: <HEAD> <style type="text/css"> body { color: #222; font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif; font-size: 11px; line-height: 135%; } .imdbtop{ background: #E4EAF2 url(http://www.fastnewsforum.org/style_images/nouwel-us/css_img_imdb.gif) no-repeat right; border: 1px dotted #000; border-bottom: 0; border-left: 4px solid #8394B2; color: #000; font-weight: bold; font-size: 10px; margin: 8px auto 0 auto; padding: 3px; } .quotemain { background: #FAFCFE; border: 1px dotted #000; border-left: 4px solid #8394B2; color: #465584; padding: 4px; margin: 0 auto 8px auto; } </style> <HEAD> <BODY> <? //exemplo echo regex_parse_imdb("http://www.imdb.com/title/tt0369441/"); /*-------------------------------------------------------------------------*/ // regex_parse_imdb: cria a caixinha do imdb // // function coded by jamesp0tter /*-------------------------------------------------------------------------*/ $imdb_count = 0; function regex_parse_imdb($texto="") { global $imdb_count; // supostamente nao deve acontecer, maaaaas... if ($texto == "") return; //numero de tags [imdb] processadas para este post $imdb_count++; //se superior ao nº permitido, terminar if ($imdb_count > 1) return; /* eleminar tudo o qe nao seja numeros do argumento (http://www.imdb.com/title/tt0326905/, mdb.com/title/tt0326905/, http://www.imdb.com/title/tt0326905/www.imdb.com/, etc --> 0326905) */ $idfilme = preg_replace('/[^0-9]/i',"\\1",$texto); if (strlen($idfilme) != 7) { $this->error = 'imdb_nao7'; return; } // get css styles //$imdb_style = $this->wrap_style('imdb'); // url imdb $imdb_url = "http://imdb.com/title/tt".$idfilme."/"; // grab html $imdb = @fopen($imdb_url, "r"); if ($imdb == FALSE) { $this->error = 'imdb_invalido'; return; } while (!feof($imdb)) $imdb_raw .= fgets($imdb, 4096); fclose($imdb); // e agora separar a informaçao // capa // preg_match ( "'<img border=\"0\" alt=\"cover\" src=\"(.*?)\"'" , $imdb_raw , $capa ); //$capa = $capa[1]; // titulo do filme preg_match ( "'<h1><strong class=\"title\">(.*?)</strong></h1>'" , $imdb_raw , $titulo ); $titulo = strip_tags($titulo[1]); // genero preg_match ( "'Genre:</b>\\n(.*?)(\(more\)|\\n)'" , $imdb_raw , $genero ); $genero = @strip_tags($genero[1]); // slogan preg_match ( "'Tagline:</b> (.*?)( <a href|\\n)'" , $imdb_raw , $slogan ); $slogan = @$slogan[1]; // resumo preg_match ( "'Plot (Outline|Summary):</b> (.*?)( <a href=|\\n)'" , $imdb_raw , $resumo ); $resumo = @$resumo[2]; // duraçao preg_match ( "'Runtime:</b>\\n(.*?)\\n<br>'" , $imdb_raw , $duracao ); $duracao = @$duracao[1]; // votaçao, nº d votos, e estrelas preg_match ( "'User Rating:(.*?)\\n\\n(.*?)\\n(.*?)\\n<b>(.*?)/10</b> \((.*?) votes\)\\n'" , $imdb_raw , $votacao ); $votos = @$votacao[5]; $votacao = @$votacao[4]; $estrelas = 4 + $votacao * 9 + log10($votacao); $estrelas = '<span style="font-size: 16px; background: url(\'http://www.fastnewsforum.org/style_images/1/imdb_rate_full.gif\')"><img src="http://www.fastnewsforum.org/style_images/1/tp.gif" width="'.($estrelas - 1).'" height="16"></span><span style="font-size: 16px; background: url(\'http://www.fastnewsforum.org/style_images/1/imdb_rate_none.gif\') right"><img src="http://www.fastnewsforum.org/style_images/1/tp.gif" width="'.(101 - $estrelas).'" height="16"></span>'; // top250 preg_match ( "'top 250: (.*?)</a>'" , $imdb_raw , $top ); $top = @strip_tags($top[0]); // premios preg_match ( "'Awards:</b> \\n(.*?)\\n<a href's" , $imdb_raw , $premios ); $premios = @str_replace("\n"," ",$premios[1]); // $imdb_final vai ser o codigo html final da caixa IMDB $imdb_final = "<div class='imdbTop'><tr><td>IMDB</tr></td></div>\n"; $imdb_final .= "<div class='quotemain'><table border='0'><tr><td><table border='0'><tr><td style='font-size: 10pt; color: #465584; line-height:125%;'>\n"; $imdb_final .= "<b><span style='font-size:11pt;line-height:100%'>» <u>".$titulo."</u></span></b><br><br>"; if ($genero <> "") $imdb_final .= "<b>Género</b>: $genero<br>\n"; if ($slogan <> "") $imdb_final .= "<b>Slogan</b>: $slogan<br>\n"; if ($resumo <> "") $imdb_final .= "<b>Resumo</b>: $resumo<br>\n"; if ($votos <> "") $imdb_final .= "<b>Votação</b>: $votacao/10 $estrelas ($votos votos) <b>$top</b><br>\n"; if ($duracao <> "") $imdb_final .= "<b>Duração</b>: $duracao<br>\n"; if ($premios <> "") $imdb_final .= "<b>Prémios</b>: $premios<br>\n"; $imdb_final .= "<br><b>IMDB</b>: <a href='".$imdb_url."'target = '_blank' >".$imdb_url."</a></span></td></tr></table></td></tr></table></div>\n"; //e finalmente mandar todo o html processado para o post return "<!--ImdbBegin".$idfilme."-->\n".$imdb_style['START'].$imdb_final.$imdb_style['END']."\n<!--ImdbEnd".$idfilme."-->\n"; } ?> </BODY> Link to comment Share on other sites More sharing options...
JaY_CeE Posted December 31, 2005 Share Posted December 31, 2005 quando coloquei a tag neste topico:http://www.fastnewsforum.org/index.php?showtopic=14282fikou com alte bug... Link to comment Share on other sites More sharing options...
ctnoname Posted December 31, 2005 Share Posted December 31, 2005 (edited) quando coloquei a tag neste topico:http://www.fastnewsforum.org/index.php?showtopic=14282fikou com alte bug...←A thread ta td mamada, o texto ficou td centrado, e cenas fora do sitio...Parece q existem bugs para corrigir :- " Edited December 31, 2005 by ctnoname Link to comment Share on other sites More sharing options...
txunk Posted December 31, 2005 Share Posted December 31, 2005 (edited) edit #999: depois de algums testes parece que não gosta do numero do smallville lol, com o 0279600 dá esse erro marado mas com 0279601 funciona :Sedit #1000: tive a ver o source da página e o problema é que com a página do smallville ele não inicializa a tabela nem mete o título do filme nem nada. ara alem disso no filme 0279601 o a duração aparece 2 vezes e a primeira aparece no fim do resumo weird :X<!--ImdbBegin0279601--><div class='imdbtop'>IMDB</div><div class='quotemain'> <table border='0'> <tr> <td> <table border='0'> <tr> <td style='font-size: 10pt; color: #465584; line-height:125%;'> <b> <span style='font-size:11pt;line-height:100%'>» <u> "Smehotvorci" (1989) (mini) </u></span></b><br><br><b>Género</b>: Comedy / Documentary<br> <b>Votação</b>: Credited <span style="font-size: 16px; background: url('style_images/1/imdb_rate_full.gif')"><img src="style_images/1/tp.gif" width="-INF" height="16"></span><span style="font-size: 16px; background: url('style_images/1/imdb_rate_none.gif') right"><img src="style_images/1/tp.gif" width="INF" height="16"> </span> cast: Mija Aleksic .... Himself (interviewed)Branka Veselinovic .... Herself (interviewed)Zika Milenkovic .... Himself (interviewed)Radmila Savicevic .... Herself (interviewed)Slavko Simic .... Himself (interviewed)Radivoje 'Lola' Djukic .... Himself (interviewed)Olivera Markovic .... Herself (interviewed) rest of cast listed alphabetically: Dragutin Dobricanin .... (archive footage)Dragan Lukic-Omoljac .... (archive footage)Milan Panic .... (archive footage)Mihajlo-Bata Paskaljevic .... (archive footage)Miodrag 'Ckalja' Petrovic .... (archive footage)Miodrag 'Mladja' Veselinovic .... (archive footage) <b>57 min (6 episodes)</b><br> <b>Duração</b>: 57 min (6 episodes)<br><br> <b>IMDB</b>: <a href='http://imdb.com/title/tt0279601/' target='_blank'>http://imdb.com/title/tt0279601/</a></span> </td> </tr> </table> </td> </tr> </table> </div> <!--ImdbEnd0279601--> <!--ImdbBegin0279600--> <div class='imdbtop'>IMDB</div> <div class='quotemain'> <table border='0'> <tr> ********FALTA AQUI A INICIAÇÃO DA TABELA****** <b>Género</b>: Drama / Sci-Fi / Action / Adventure / Fantasy / Thriller <br> <b>Slogan</b>: Every superhero has a beginning... <br> <b>Resumo</b>: A young Clark Kent struggles to find his place in the world as he learns to harness his alien powers for good and deals with the typical troubles of teenage life in Smallvile. <br> <b>Duração</b>: 60 min (including commercials)<br><b>Prémios</b>: Won Emmy. Another 9 wins & 55 nominations<br><br> <b>IMDB</b>: <a href='http://imdb.com/title/tt0279600/' target='_blank'>http://imdb.com/title/tt0279600/</a></span></td></tr> </table> </td> </tr> </table> </div> <!--ImdbEnd0279600--> Edited December 31, 2005 by txunk Link to comment Share on other sites More sharing options...
jamesp0tter Posted December 31, 2005 Share Posted December 31, 2005 O que se passa e' que eu ainda nao actualizei o codigo no servidor, porque o actual (que vos disponibilizei) ja' nao tem esses erros. Tenho de esperar pelo revenge para poder actualizar ;) Link to comment Share on other sites More sharing options...
seako Posted December 31, 2005 Share Posted December 31, 2005 Tb há outro bug para resolver, mas esse deve ser mais facil. Tanto a tag "i" como a "imdb" estão associadas ao atalho alt+i, o q provoca conflito. Link to comment Share on other sites More sharing options...
Darnassus Posted December 31, 2005 Share Posted December 31, 2005 thkx pela alteração ao codigo txunk. :y: btw, já alguém implementou o codigo (o editado) num blog? (primer? :P ) Link to comment Share on other sites More sharing options...
Fly Posted January 2, 2006 Share Posted January 2, 2006 Mt boa ideia..... :plain: Link to comment Share on other sites More sharing options...
juveleoes Posted January 2, 2006 Share Posted January 2, 2006 gostaria de saber se esta "ideia" e original do user em questao ou e apenas uma "ideia" adaptada de outro sitio ou outra pessoa . resta acrescentar que e de grande utilidade esta nova feature ao forum . Link to comment Share on other sites More sharing options...
DeathShadow Posted January 2, 2006 Share Posted January 2, 2006 gostaria de saber se o user juveleoes sabe usar acentos ou nao conhece esta "técnica"? :P Link to comment Share on other sites More sharing options...
jamesp0tter Posted January 2, 2006 Share Posted January 2, 2006 LOLpodes dormir descansado qe a ideia nao foi roubada de ninguem ... original ou nao, nao sei se + alguem nao se tera' lembrado, ms "roubada" n foi de ctz ;) Tava eu mto contente a acabar de recuperar o cd2 do great raid e a descompacta.lo qd m lembrei de ir ver o resumo do movie no imdb.nfo, e ent fez.se luz: qe tal uma tag imdb, qd um poster anunciava um post ou qeria fzr referencia a um filme qq, bastava por , e era criado automaticament uma coisinha do tipo:(etc) Link to comment Share on other sites More sharing options...
juveleoes Posted January 2, 2006 Share Posted January 2, 2006 gostaria de saber se o user juveleoes sabe usar acentos ou nao conhece esta "técnica"? :P ←o juveleoes escreve no forum com um computador que nao foi comprado em Portugal e por isso o teclado nao possoteclar com acentos. Posso por teclado portugues mas eu sou um pouco preguicoso para tentar decorar aonde estao certos caracteres e bla bla bla ... :- " Link to comment Share on other sites More sharing options...
jamesp0tter Posted January 6, 2006 Share Posted January 6, 2006 » Bugs Resolvidos (todos os conhecidos ate' ag plo menos :P )» Adicionados os 5 primeiros actores 'a informaçao» Cor na votaçao para distinguir melhor a qualidade do filme (0 -> 4, 4 -> 8, 8 ->10) :fnf: Link to comment Share on other sites More sharing options...
Darnassus Posted January 6, 2006 Share Posted January 6, 2006 (edited) nice :clap: Edited January 6, 2006 by Darnassus Link to comment Share on other sites More sharing options...
jamesp0tter Posted February 15, 2006 Share Posted February 15, 2006 Working again ! Link to comment Share on other sites More sharing options...
JaY_CeE Posted February 15, 2006 Share Posted February 15, 2006 :clap: Link to comment Share on other sites More sharing options...
{zzz} Posted February 15, 2006 Share Posted February 15, 2006 (edited) teste assim dáfixe :P :fnf: [imdb ] IMDB » Firewall (2006) Género(s): Action / Crime / Drama / Thriller Slogan: Everything He loves Is About To Be Used Against Him. Resumo: A security specialist is forced into robbing the bank that he's protecting, as a bid to pay off his family's ransom. Votação: 6.1/10 (564 votos) Duração: 105 min Actores (primeiros 5): Alan Arkin, Jimmy Bennett, Paul Bettany, Beverley Breuer, Nikolaj Coster-Waldau IMDB: http://imdb.com/title/tt0408345/ Edited February 15, 2006 by {zzz} Link to comment Share on other sites More sharing options...
Craft Posted February 16, 2006 Share Posted February 16, 2006 A ordenação alfabética do IMDB... :dumb: ... Tadinho do Harrison Ford... :lol: Link to comment Share on other sites More sharing options...
Ilusi0n Posted February 16, 2006 Share Posted February 16, 2006 Regista mas é a ideia... xD Já sabes quem regista 1º é quem ganha... :\ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now