Tutorial de Slider para Blogger - Paso a Paso

  • Autor Autor kakashi1564
  • Fecha de inicio Fecha de inicio
K

kakashi1564

Gamma
Social Media
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
hola amigos betas hoy les traigo un tutorail de slider (rotador) de imagenes para blogger ya que yo no encontre ningun tutorial y tube que aprender extrayendo los codigos y ago el tutorial para facilitarles el trabajo a los nuevo bloggers bueno empesemos

1. Buscamos vamos a Diseño y Edición de HTML de la plantilla y sin expandir la plantilla, buscamos:

Insertar CODE, HTML o PHP:
<b:widget id='Blog1' locked='true' title='Entradas del blog' type='Blog'/>



2. Justo arriba pegamos

Insertar CODE, HTML o PHP:
<b:widget id='HTML40' locked='false' title='JQuery' type='HTML'/>

Guardamos la plantilla.


Insertando códigos condicionales 1


1. Vamos a Diseño y Edición de HTML marcamos Expandir plantilla de artilugios y buscamos

Insertar CODE, HTML o PHP:
<b:widget id='HTML40' locked='false' title='JQuery' type='HTML'/>


2. Vamos a insertar las condicionales:

Insertar CODE, HTML o PHP:
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>


3. Lo pegamos justo después de <b:includable id='main'>.


4. Y luego pegamos </b:if></b:if> justo antes de </b:includable> como se vé en el código de abajo:

Insertar CODE, HTML o PHP:
<b:widget id='HTML40' locked='false' title='JQuery' type='HTML'>
<b:includable id='main'>
    <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
       <b:if cond='data:blog.pageType != &quot;item&quot;'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>
  <b:include name='quickedit'/>
       </b:if>
    </b:if>
</b:includable>
</b:widget>


5. Guardamos la plantilla y desmarcamos Expantir plantilla de artilugios.


Implementando scripts y condicionales 2:


1. Justo despues de ]]></b:skin> pegamos el contenido siguiente:


Insertar CODE, HTML o PHP:
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type='text/css'>
<!--
/* Seccion de paginas artículos */
#html40{display:none;margin:0;padding:0;}
-->
</style><b:else/>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<style type='text/css'>
<!--
/* Seccion de paginas estaticas*/
#html40{display:none;margin:0;padding:0;}
-->
</style>
<b:else/>
/* Seccion del resto de páginas; Index, Categorias y Archivo */
<style type='text/css'>
<!--
ul.slideshow {
    list-style:none;
    width:500px; /* Ancho del contenedor */
    height:250px; /* Alto del contenedor */
    overflow:hidden;
    position:relative;
    margin:0;
    padding:0;
  
} 
ul.slideshow li {
    position:absolute;
    left:0;
    right:0;
}
ul.slideshow li.show {
    z-index:500; 
}
ul img {
    border:none; 
}
#slideshow-caption {
    width:500px; /* Ancho de la caja debe ser igual a ul.slideshow y la imagen */
    height:70px; /* Alto de la caja de comentarios */
    position:absolute;
    bottom:0;
    left:0;
    background:#605F5E; /*opacity:0.4;filter:alpha(opacity=40);*/
    z-index:500;
}
#slideshow-caption .slideshow-caption-container {
    padding:5px 10px; 
    z-index:1000; 
}
#slideshow-caption h3 {
    color:#F0FF8B;
    margin:0;
    padding:0;
    font-size:14px;
}
#slideshow-caption p {
    color:#fff;
    font-size:12px;
    margin:5px 0 0 0;
    padding:0;
}
-->
</style>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js' type='text/javascript'/>

<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {  
 
 //Execute the slideShow, set 4 seconds for each images
 slideShow(4000);

});

function slideShow(speed) {


 //append a LI item to the UL list for displaying caption
 $('ul.slideshow').append('<li id="slideshow-caption" class="caption"><div class="slideshow-caption-container"><h3></h3><p></p></div></li>');

 //Set the opacity of all images to 0
 $('ul.slideshow li').css({opacity: 0.0});
 
 //Get the first image and display it (set it to full opacity)
 $('ul.slideshow li:first').css({opacity: 1.0});
 
 //Get the caption of the first image from REL attribute and display it
 $('#slideshow-caption h3').html($('ul.slideshow a:first').find('img').attr('title'));
 $('#slideshow-caption p').html($('ul.slideshow a:first').find('img').attr('alt'));
  
 //Display the caption
 $('#slideshow-caption').css({opacity: 0.7, bottom:0});
 
 //Call the gallery function to run the slideshow 
 var timer = setInterval('gallery()',speed);
 
 //pause the slideshow on mouse over
 $('ul.slideshow').hover(
  function () {
   clearInterval(timer); 
  },  
  function () {
   timer = setInterval('gallery()',speed);   
  }
 );
 
}

function gallery() {


 //if no IMGs have the show class, grab the first image
 var current = ($('ul.slideshow li.show')?  $('ul.slideshow li.show') : $('#ul.slideshow li:first'));

 //Get next image, if it reached the end of the slideshow, rotate it back to the first image
 var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption')? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first'));
  
 //Get next image caption
 var title = next.find('img').attr('title'); 
 var desc = next.find('img').attr('alt'); 

 //Set the fade in effect for the next image, show class has higher z-index
 next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);
 
 //Hide the caption first, and then set and display the caption
 $('#slideshow-caption').slideToggle(300, function () {
  $('#slideshow-caption h3').html(title);
  $('#slideshow-caption p').html(desc);
  $('#slideshow-caption').slideToggle(500);
 });  

 //Hide the current image
 current.animate({opacity: 0.0}, 1000).removeClass('show');

}
//]]>
</script>

</b:if>
</b:if>


2. Ahora vamos a Diseño - Elementos de Página



3. Pulsamos en Editar en JQuery


4. Pegamos el siguiente código en la caja que se abre:


Insertar CODE, HTML o PHP:
<ul class="slideshow">
  <li class="show">
    <a href="http://url1.html">
       <img src="http://sitio.com/imagen1.jpg" width="500" height="250" title="Título 1" alt="Texto caja 1"/>
    </a>
   </li>
   <li>
    <a href="http://url2.html">
    <img src="http://sitio.com/imagen2.jpg" width="500" height="250" title="Título 2" alt="Texto caja 2"/>
    </a>
    </li>
     <li>
     <a href="http://url3.html">
     <img src="http://sitio.com/imagen3.jpg" width="500" height="250" title="Título 3" alt="Texto caja 3"/>
     </a>
  </li>
</ul>


Cambien el texto en Title y Alt que serán usados para las cajas de texto y el título, los enlaces y también use sus propias imágenes, cambiándolas al tamaño que ustedes necesiten, asegurándose de cambiar el CSS del Alto y el Ancho de la caja de texto y el contenedor. Recuerden que la caja de texto es menor a la altura de la caja del contenedor, o cubrirán toda la imagen.

Advertencia: el class="show", debe mantenerse únicamente en el primer elemento de la lista. Si lo desean puede agregar más elementos de lista, no hay límite, pero entre más imagenes más tardará en cargar la página, mi recomendación es de hasta 5 o 6 máximo.

Si quieren agregar más cajas de texto, peguen antes del </ul> las veces que quieran:

Insertar CODE, HTML o PHP:
<li>
<a href="http://url.html">
<img src="http://sitio.com/imagen.jpg" width="500" height="250" title="Título" alt="Texto caja"/>
</a>
</li>


6. Pulsen en Guardar, vean el efecto y felicidades ya tiene slider JQuery


bien antes que nada pueden cambiarle el tamaño al slider desde el codigo de estilo recuerden que si quieren que su imagen se vea con calidad debe tener el mismo tamaño que el slider. bueno eso fue todo espero que le aya gustado y servido a continuadion dejo mi blog y una imagen q muestra el resultado


mi blog : Anime Revenge|Naruto shippuden 230 Sub Español|One Piece 516 Sub Español|ANIMES ONLINE


resultado :
 
muy bun tutorial...se agrade mucho este aporte...esto lo busque hace mucho 😛
 
de nada recien me di cuenta el titulo esta mal XD no se como cambiarlo por si se dan cuenta lo aviso de antemano

de nada recien me di cuenta el titulo esta mal XD no se como cambiarlo por si se dan cuenta lo aviso de antemano
ya lo arregle
 
Me gustó, en un rato lo probaré, gracias.
 
Gracias por el aporte, la verdad que desde hace tiempo buscaba algo así y nunca encontré como hacerlo hasta hoy
🙂