Diego Admin
Número de Mensagens : 321 Idade : 32 Localização : Aqui no PROJECT-HTML Pontos : 7837 Reputação : 24 Data de inscrição : 04/07/2008
| Assunto: Sistema de noticia para seu site 1/12/2008, 1:23 am | |
| Bem esse sistema é bem facil de usar.. é só exibir o código de fonte que ja vai da pra ver.. Obs: Onde estiver /*1*/[ "Primeira Noticia blá blá blá blá blá blá blá blá blá blá " , "http://link1" ] , /*2*/[ "Segunda Noticia blá blá blá blá blá blá blá blá blá blá " , "http://www.link2" ] , /*3*/[ "Terceira Noticia blá blá blá blá blá blá blá blá blá blá ", "http://www.link3" ] , /*4*/[ "Quarta Noticia blá blá blá blá blá blá blá blá blá blá " , "http://link4" ] , /*5*/[ "Espero que gostem " , "http://www.projecthtml.tk/" ] , /*6*/[ "By: Project-HTML " , "http://www.projecthtml.tk/" ] , Para adicionar uma nova mensagem é simplesmente adicionar /*7*/[ "Primeira Noticia blá blá blá blá blá blá blá blá blá blá " , "http://link1" ] , com o numero da ordem... e pronto escreva oque você kiser que vai sair la.. presizar de alguma ajuda para configurar alguma parte deste sistema de noticia é só avisar. Pegue o código abaixo: - Código:
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <body bgcolor="#F0F0F0" onload="funcao_noticias()" topmargin="3" leftmargin="3"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="Mon, 23 Oct 2006 16:41:43 GMT"> <meta http-equiv="Cache-Control" content="no-store"> <meta http-equiv="Refresh" content="300"> <title>Sistema de Noticias - By PROJECT-HTML</title>
<!--inicio do letreiro de notícias--> <SCRIPT language=JavaScript type=text/javascript><!-- var news = new Array(
/*1*/[ "Primeira Noticia blá blá blá blá blá blá blá blá blá blá " , "http://link1" ] , /*2*/[ "Segunda Noticia blá blá blá blá blá blá blá blá blá blá " , "http://www.link2" ] , /*3*/[ "Terceira Noticia blá blá blá blá blá blá blá blá blá blá ", "http://www.link3" ] , /*4*/[ "Quarta Noticia blá blá blá blá blá blá blá blá blá blá " , "http://link4" ] , /*5*/[ "Espero que gostem " , "http://www.projecthtml.tk/" ] , /*6*/[ "By: Project-HTML " , "http://www.projecthtml.tk/" ] ,
[] ) ;
var ticker_layer = false ; var step_time = 25 ; var freeze_time = 2000 ; var news_index = 0 ; var title_index = 0 ; var end_title = "_" ; //caracter responsavel em 'formar' outros caracteres var title_max_size = 75 ;
for (var i=0;i<news.length-1;i++){ t=news[i][0].replace(/\"/gi,'"'); if (t.length>title_max_size){ t = t.substring( 0 , title_max_size ) ; t=t.substring(0,t.lastIndexOf(' ')); t+='...'; } news[i][0]=t; }
function funcao_noticias(){ window.setTimeout( "roll_ticker()" , step_time ) ; }
function roll_ticker(){ var title ; if ( title_index == 0 ){ while ( document.getElementById('noticias').lastChild != null ){ child = document.getElementById('noticias').lastChild ; document.getElementById('noticias').removeChild( child ) ; } }
if ( news.length > news_index + 1 && news[news_index][0].length >= title_index ){ title = news[ news_index ] ; document.getElementById('sistema_noticias').setAttribute( "href" , title[1] ) ;
s_text = title[0].substring( title_index , title_index + 1 ) ; title_index++ ;
if ( document.getElementById('noticias').lastChild != null ){ if ( document.getElementById('noticias').lastChild.nodeValue == "_" ){ child = document.getElementById('noticias').lastChild ; document.getElementById('noticias').removeChild( child ) ; } }
txt = document.createTextNode( s_text ) ; document.getElementById('noticias').appendChild( txt ) ;
if ( title[0].length > title_index ) { if ( title_index % 10 != 0 ){ txt = document.createTextNode( "_" ) ; document.getElementById('noticias').appendChild( txt ) ; } } window.setTimeout( "roll_ticker()" , step_time ) ; } else{ news.length == news_index + 2 ? news_index = 0 : news_index++ ; title_index = 0 ; window.setTimeout( "roll_ticker()" , freeze_time ) ; } }
//--> </SCRIPT> <!--fim do letreiro de notícias-->
<style type="text/css"> <!-- A { FONT-SIZE: 20px; COLOR: #000080; LINE-HEIGHT: 20px; FONT-FAMILY: arial, verdana; TEXT-DECORATION: none }
--> </style>
</head>
<!--Configura o Target---> <A id=sistema_noticias href="#" target=new name=sistema_noticias> _________________________________________________ <DIV id=noticias></DIV></A>
</body> </html> | |
|