Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

zeke_

Sistema de Slide de notícias

Recommended Posts

A conexão está aqui:

rs.ActiveConnection = MM_noticias_STRING

 

Ele deixou em aberto para você criar o banco de dados que quiser. É só informar a STRING de conexão nessa variável.

 

Lembrando que seu banco de dados tem que respeitar a estrutura proposta pelo autor do tópico.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Set conexao= server.CreateObject("adodb.connection")

conexao.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\site\TorcidaFuracão\banco\dados.mdb;"

Compartilhar este post


Link para o post
Compartilhar em outros sites

uma duvida aki no codigo

 

no caso se eu não quisece usar:

 

["../imagens_noticias/mail15.jpg","ANUNCIE AQUI","Aqui sua empresa APARECE","ANUNCIE.htm"]//Colocar qualquer imagem aqui!

],

 

como faria as auterações no codigo....

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá galera,

 

Outro dia precisei deste slide, já tinha contribuido com ela anos atrás, cheguei a usa-lo na época e depois esqueci desta parada.

 

Dias atrás precisei de lago parecido, embora não tenha usado este slide, resolvi adequa-lo a necesidade e mostrar ao cliente em questão. Acabei desenvolvendo outro eutilizando no meu sitesma.

 

Mas, resolvi postar aqui as alterações que fiz.

 

Por exemplo: Na parte

["../imagens_noticias/mail15.jpg","ANUNCIE AQUI","Aqui sua empresa APARECE","ANUNCIE.htm"]//Colocar qualquer imagem aqui!
],

Vi duvidas aqui e em outros foruns pra eximir este pedaço, fiz isto, neste código que vou postar não existe mais esta linha no código. A conexão passou a ser com MYSQL, Aumentei o tamanho da imagem e das fontes. Não substitui as tabelas por divs por uma questão de tempoe de que só estava adaptando para ter uma noção de como ficaria.

 

Deletei os comentários e mantive o crédito do autor. "Embora tenha substituido toda a parte asp do Junior Dias e Zeke, os créditos continuam lá em respeito ao tempo e dedicação que itveram ao colaborar com a galera aqui do forum."

 

Vamos ao código:

 

<%
dim db, Rs_slide, Rs, slide
set db = createobject("adodb.connection")
db.Open "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=servidort; DATABASE=banco_de_dados;UID=usuario; password=senha;"
Rs_slide = "Select * From Noticias WHERE Destaque = 'slide' Order by id DESC"
Set Rs = db.execute(Rs_slide)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function settings(){
var el = document.getElementById('settings');
(el.style.display == 'none') ? el.style.display = 'block' : el.style.display = 'none';
}
</script>
<script type="text/javascript">
/*
$BD:Slide - version 0.9.4$
$LastModified: 04/02/2006$
Sistema Free para uso pessoal ou comercial contanto que os créditos permaneçam intactos.
Maiores Informações:
http://my.opera.com/bimonti/
**********************************************************
**********************************************************
**  Colaboração Code SLIDE VERSÃO ASP :				 **
**  Júnior Dias: Tecnologiasvirtuais@gmail.com		  **
**  Zeke_ : Fórum Imasters							  **
**  Cido Silva: Desenvolvimento e hospedagem de sites   **
**********************************************************
**********************************************************
*/
slide = {
_imagens : [
["<%= Rs("foto")%>","<%= Ucase(Rs("classifica"))%>","<%= Mid(rs("topico"),1,100)%>","mostra.asp?id=<%= Rs("id")%>"],
<%=Rs.MoveNext%>
["<%= Rs("foto")%>","<%= Ucase(Rs("classifica"))%>","<%= Mid(rs("topico"),1,100)%>","mostra.asp?id=<%= Rs("id")%>"],
<%=Rs.MoveNext%>
["<%= Rs("foto")%>","<%= Ucase(Rs("classifica"))%>","<%= Mid(rs("topico"),1,100)%>","mostra.asp?id=<%= Rs("id")%>"],
<%=Rs.MoveNext%>
["<%= Rs("foto")%>","<%= Ucase(Rs("classifica"))%>","<%= Mid(rs("topico"),1,100)%>","mostra.asp?id=<%= Rs("id")%>"],
<%=Rs.MoveNext%>
["<%= Rs("foto")%>","<%= Ucase(Rs("classifica"))%>","<%= Mid(rs("topico"),1,100)%>","mostra.asp?id=<%= Rs("id")%>"]
<%=Rs.MoveNext%>
],
_slideImg : 'slideImg',
_linkSlide : 'linkSlide',
_titleSlide: 'titleSlide',
_textSlide : 'textSlide',
_playPause : 'playpause',
_showTimer : 'showTimer',
_count : 0,
_length : null,
_timeOutID : null,
_pause : false,
_timer : 8,
start : function(){
with(this){
_preLoader();
_length = _imagens.length;
_work(); 
}
},
_preLoader : function(){
for(x in this._imagens){
var image = new Image();
image.src = this._imagens[x][1];
}
},
_work : function(){
with(this){
(_count == _length) ? _count = 0 : (_count < 0) ? _count = _length-1 : void(0);
var current = _imagens[_count];
_exchange(current);
if(!_pause){
(typeof(_timeOutID) == "number") ? clearTimeout(_timeOutID) : void(0);
_timeOutID = setTimeout(
function(){
slide.next();
fade(0,0,$(_slideImg));
}, (Number(_timer)*1000)
);
}
}
},
_exchange : function(img){
this.$(this._slideImg).src = img[0];
this.$(this._titleSlide).innerHTML = img[1];
this.$(this._textSlide).innerHTML = img[2];
this.$(this._linkSlide).href = img[3];
this.fade(50,100,this.$(this._slideImg));
},
next : function(){
with(this){
_count++;
_work();
}
},
previous : function(){
with(this){
_count--;
_work();
}
},
pause : function(){
var img = this.$(this._playPause);
if(this._pause){
this._pause = false;
img.src = 'img/pausa.gif';
img.title = 'Parar';
}
else{
this._pause = true;
img.src = 'img/play.gif';
img.title = 'Continuar';
}
with(this){(typeof(_timeOutID) == "number") ? clearTimeout(_timeOutID) : void(0); _work();}
},
tControl : function(act){
with(this){
(act=="m")?((_timer==4)?void(0):_timer=_timer-1):((_timer==9)?void(0):_timer= _timer +1);
this.$(this._showTimer).innerHTML = _timer+"s"; 
}
},
fade : function (){
var type,signal;
var from = arguments[0];
var to  = arguments[1];
var el  = arguments[2];
(document.all) ? type = 'filter' : type = 'opacity';
(from>to) ? signal = '-' : signal= '+';
if(from >= to/2){
from = eval(from+signal+10);
}else{
from = eval(from+signal+10);
}
if(type=='opacity'){
try{el.style[type] = Number(from*0.02); }catch(e){}
}else{
try{el.style[type] = 'alpha(opacity='+from+')'; }catch(e){}
}
if(from != to){
setTimeout( function(){ slide.fade(from,to,slide.$(slide._slideImg)); } ,50);
}
},
$ : function(){
return document.getElementById(arguments[0]);   
}
}
</script>
<style type="text/css">
<!--
img{
border: 0px;
}
#nav{
width: 100%;
background: #FFFFFF;
padding: 0px;
}
#nav ul{
padding: 0px;
}
#nav ul li{
display: inline;
float: right;
list-style-type: none;
margin: 0px;
padding: 1px;
}
#nav ul li a{
background: #FFFFFF;
}
#nav ul li a:hover{
background: #FFFFFF;
}
#pic{
width: 320px;
padding: 0px;
margin: 0px;
}
#pic .img{
padding: 0px;
background: #FFFFFF;
}
#titleSlide{
padding: 0px;
margin: 0px;
background: #FFFFFF;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
font-size: 12pt;
font-weight: bold;
valign: middle
}
#titleSlide a{
text-align: center;
font-size: 0pt;
text-decoration: bold;
}
#textSlide{
width: 100%;
height:36px;
padding: 0px;
margin: 0px;
background: #FFFFFF;
text-align: justify;
font-family: Arial, Helvetica, sans-serif;
font-size: 13pt;
font-weight: bold;
valign: middle
}
#settings{
width: 100px;
}
#settings span, #settings img{
float: left;
}
#settings span{
font-size: bold 0px 'Arial';
width: 0px;
text-align: center;
font-color: red;
line-height: 0px;
border: 0px dashed #ccc;
background: #eee;
height: 0px;
margin: 0px 0px;
}
.center{
width: 300px;
float:left;
margin: 0px auto;
background:#CCCCCC;
}
-->
</style>
<script language="JavaScript">
<!--
function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
	document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
	document.preloadlist[top+i] = new Image;
	document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
	return;
  if (img && img.altsrc) {
	img.src	= img.altsrc;
	img.altsrc = null;
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
	return;
  if (img) {
	img.altsrc = img.src;
	img.src	= rpath;
  } 
}

// -->
</script>

<title>Slide Swow de Notícias ASP - JAVASCRIPT - MSQL</title></head>
<body onLoad="slide.start();na_preload_img(false, 'img/pausa.gif');" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table width="320" height="304" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
		<td width="100%" height="304" valign="top" ><table width="100%" cellspacing="0" cellpadding="0" align="center" >
<tr>
<td width="99%" height="180" valign="top"><div class="center">
<div id="pic"><a href="" id="linkSlide" target="_top"><img name="slideImg" width="320" border="0" height="224" class="img" id="slideImg" /></a></div>
</div></td>
</tr>
<tr>
<td width="99%"><table width="320" border="0" cellspacing="0" cellpadding="0"  style="line-height:100%; margin-top:0; margin-bottom:0;">
<tr>
<td width="244" valign="middle" height="10"><div id="titleSlide" class="faa f10"></div> </td>
<td width="76" align="right" height="10"> <div id="nav">
<ul>
<li style="line-height:50%; margin-top:0; margin-bottom:0;">  <a href="#" onClick="slide.previous();"><font face="Arial"><b><img src="img/prox.gif" / width="19" height="19" alt="Próxima matéria"> </b></font></a> </li>
<li style="line-height:50%; margin-top:0; margin-bottom:0;">  <a href="#" onClick="slide.pause();" OnMouseOut="na_restore_img_src('image1', 'document')" OnMouseOver="na_change_img_src('image1', 'document', 'img/pausa.gif', true);"><font face="Arial"><b><img id="playpause" src="img/pausa.gif" / width="19" height="19" alt="Para slideshow" name="image1"></b></font></a><a href="#" onClick="slide.pause();"><font face="Arial"><b> </b></font></a> </li>
<li style="line-height:50%; margin-top:0; margin-bottom:0;">  <a href="#" onClick="slide.next();"><img src="img/ante.gif" / width="19" height="19" alt="Matéria anterior"> </b></font></a> </li>
</ul>
</div></td>
</tr>
<tr>
<td colspan="2"> 
		  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
								<td width="98%" height="35">
									<div id="textSlide"></div>								</td>
							</tr>
						</table></td>
</tr>
</table></td>
</tr>
</table>
	  </td>
  </tr>
</table>
<%
rs.Close()
Set rs = Nothing
%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Fala pessoal. Estava acompanhando o tópico em busca de um SlideShow com Transição. Até peguei o Script e dei uma caprichada alterando o tamanho da foto, coloquei bordas, alterei o plano de fundo e alterei as imagens de anterio, pausa e próxima. Deêm uma olhada: http://www.startingames.com.br/slide.asp

 

Apesar, de eu ter achado que ficou legal, não era o que eu queria.

 

Agora eu queria fazer uma peguntinha a vocês. Alguem tem o programa, site ou script que cria slideshow com transição tipo aquele do BaixakiJogos. Entrem no site para ver, esta aqui a imagem do slideshow:

 

 

Imagem Postada

 

Agradeço pela atenção.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.