Necesito un Slider para mi blog de blogger
En vista de que he tenido
demasiados comentarios sobre como instalar otro tipo de Slideshow en su blog de Blogger, voy a compartir un hermoso y maravilloso Slideshow completamente
automático el cual le mostrara las últimas publicaciones de su blog de Blogger,
los pasos para su instalación son muy sencillos, solo basta con seguir mis
instrucciones y lo podrán realizar. Lo que va a mostrar este Slider es el
titulo de sus entradas y un pequeño resumen de lo que se trata cada
publicación. Viene configurado automáticamente para que muestre sus 10 primeras
publicaciones de su blog.
Por favor mire su demostración:
A continuación como instalar un
Slider en su blog de blogger con unos simples pasos
2 Abrir “Plantilla”
3 Da un clic en “Editar HTML”
4 Presiona “F3” y busca este código ]]></b:skin>
5 Inserta el siguiente código justo arriba de ]]></b:skin>
/* Slider create by www.ayudadeblogger.com
----------------------------------------------- */ #featuredContent { margin:0 auto; padding:7px 7px 5px; width:450px; display:block; background:#efefef; /* Color de fondo */ } #featured-slider { position: relative; overflow: hidden; width:450px; height: 320px; } #featured-slider img { display:block; height:auto !important; } #featured-slider .sliderPostPhoto { position:relative; height:256px; width:450px; overflow:hidden; } #featured-slider .sliderPostInfo { position:absolute; bottom:0; width:450px; min-height:30px; color:#fff; padding:5px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRg1mUSGc58ojRC5EHK8CH6GEpGdOxm_AJlI_ik55LeDGlbAmBEedNefj4co8hjRUYljCwrGn51ojm3x60apqXrlskW70m-7nyo1HKHZ-H1T4SCbi0aHru5DKlPldGhFcQw0i8B6mqNa8/s30/bgtransparent.png); height:30px; } #featured-slider .sliderPostInfo p { color:#fff; font-size:1.1em; padding:3px 5px 5px 6px; } #featured-slider .contentdiv { visibility: hidden; position: absolute; left: 0; top: 0; z-index:1; } #paginate-featured-slider { display:block; margin-bottom:5px; font:bold 14.6px Arial, verdana, sans-serif; /* Tamaño fuente de los números */ } #paginate-featured-slider a { color:#000; padding:2px 7px; background:#ddd; } #paginate-featured-slider a:hover { text-decoration:none; color:#cd1713; /* Color de fondo de la pestaña al pasar el cursor */ } #paginate-featured-slider a.selected { color:#fff; text-decoration:none; background:#cd1713; /* Color de fondo de la pestaña activa */ } h2.featuredTitle { font:14px "trebuchet ms", arial, sans-serif; /* Tamaño fuente de los títulos */ font-weight:normal; letter-spacing:1px; display:block !important; margin: auto 0 !important; } h2.featuredTitle a { color:#fff; display:block; padding:3px; } h2.featuredTitle a:hover { text-decoration:underline; } |
6 Ahora busca
este código </head>
y justo enzima de el inserta el siguiente código.
<script type='text/javascript'>
//<![CDATA[ // Featured Content Slider (CB) //** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.ayudadeblogger.com. // Featured Content Slider- © Dynamic Drive DHTML code library (www. ayudadeblogger.com) // This notice MUST stay intact for legal use // Visit Dynamic Drive at http://www. ayudadeblogger.com/ for this script and 100s more var featuredcontentslider={ ajaxloadingmsg: '<div style="margin: 20px 0 0 20px"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjivqOMgdR1dNAibDgvZGl7a9DhzB6-xvOBHd_87dPJvbr1-lYWb1lcwFB_BowH9ifIDqRkZj4YesK_5DLtRdxK8tGkOFPMaQ5B0cSSbTbPRCplqLGpLXI1Qnn6ucOhQgs3muxsC5dlxInR/s32/loading.gif" /> Cargando imágenes...</div>', bustajaxcache: true, enablepersist: true, settingcaches: {}, jumpTo:function(fcsid, pagenumber){ this.turnpage(this.settingcaches[fcsid], pagenumber) }, ajaxconnect:function(setting){ var page_request = false if (window.ActiveXObject){ try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else if (window.XMLHttpRequest) page_request = new XMLHttpRequest() else return false var pageurl=setting.contentsource[1] page_request.onreadystatechange=function(){ featuredcontentslider.ajaxpopulate(page_request, setting) } document.getElementById(setting.id).innerHTML=this.ajaxloadingmsg var bustcache=(!this.bustajaxcache)? "" : (pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() page_request.open('GET', pageurl+bustcache, true) page_request.send(null) }, ajaxpopulate:function(page_request, setting){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){ document.getElementById(setting.id).innerHTML=page_request.responseText this.buildpaginate(setting) } }, buildcontentdivs:function(setting){ var alldivs=document.getElementById(setting.id).getElementsByTagName("div") for (var i=0; i<alldivs.length; i++){ if (this.css(alldivs[i], "contentdiv", "check")){ setting.contentdivs.push(alldivs[i]) alldivs[i].style.display="none" } } }, buildpaginate:function(setting){ this.buildcontentdivs(setting) var sliderdiv=document.getElementById(setting.id) var pdiv=document.getElementById("paginate-"+setting.id) var phtml="" var toc=setting.toc var nextprev=setting.nextprev if (typeof toc=="string" && toc!="markup" || typeof toc=="object"){ for (var i=1; i<=setting.contentdivs.length; i++){ phtml+='<a href="#'+i+'" class="toc">'+(typeof toc=="string"? toc.replace(/#increment/, i) : toc[i-1])+'</a> ' } phtml=(nextprev[0]!=''? '<a href="#prev" class="prev">'+nextprev[0]+'</a> ' : '') + phtml + (nextprev[1]!=''? '<a href="#next" class="next">'+nextprev[1]+'</a>' : '') pdiv.innerHTML=phtml } var pdivlinks=pdiv.getElementsByTagName("a") var toclinkscount=0 //var to keep track of actual # of toc links for (var i=0; i<pdivlinks.length; i++){ if (this.css(pdivlinks[i], "toc", "check")){ if (toclinkscount>setting.contentdivs.length-1){ pdivlinks[i].style.display="none" continue } pdivlinks[i].setAttribute("rel", ++toclinkscount) pdivlinks[i][setting.revealtype]=function(){ featuredcontentslider.turnpage(setting, this.getAttribute("rel")) return false } setting.toclinks.push(pdivlinks[i]) } else if (this.css(pdivlinks[i], "prev", "check") || this.css(pdivlinks[i], "next", "check")){ pdivlinks[i].onclick=function(){ featuredcontentslider.turnpage(setting, this.className) return false } } } this.turnpage(setting, setting.currentpage, true) if (setting.autorotate[0]){ pdiv[setting.revealtype]=function(){ featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id]) } sliderdiv["onclick"]=function(){ featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id]) } setting.autorotate[1]=setting.autorotate[1]+(1/setting.enablefade[1]*50) this.autorotate(setting) } }, urlparamselect:function(fcsid){ var result=window.location.search.match(new RegExp(fcsid+"=(\\d+)", "i")) return (result==null)? null : parseInt(RegExp.$1) }, turnpage:function(setting, thepage, autocall){ var currentpage=setting.currentpage //current page # before change var totalpages=setting.contentdivs.length var turntopage=(/prev/i.test(thepage))? currentpage-1 : (/next/i.test(thepage))? currentpage+1 : parseInt(thepage) turntopage=(turntopage<1)? totalpages : (turntopage>totalpages)? 1 : turntopage //test for out of bound and adjust if (turntopage==setting.currentpage && typeof autocall=="undefined") //if a pagination link is clicked on repeatedly return setting.currentpage=turntopage setting.contentdivs[turntopage-1].style.zIndex=++setting.topzindex this.cleartimer(setting, window["fcsfade"+setting.id]) setting.cacheprevpage=setting.prevpage if (setting.enablefade[0]==true){ setting.curopacity=0 this.fadeup(setting) } if (setting.enablefade[0]==false){ //if fade is disabled, fire onChange event immediately (verus after fade is complete) setting.contentdivs[setting.prevpage-1].style.display="none" //collapse last content div shown (it was set to "block") setting.onChange(setting.prevpage, setting.currentpage) } setting.contentdivs[turntopage-1].style.visibility="visible" setting.contentdivs[turntopage-1].style.display="block" if (setting.prevpage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted) this.css(setting.toclinks[setting.prevpage-1], "selected", "remove") if (turntopage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted) this.css(setting.toclinks[turntopage-1], "selected", "add") setting.prevpage=turntopage if (this.enablepersist) this.setCookie("fcspersist"+setting.id, turntopage) }, setopacity:function(setting, value){ var targetobject=setting.contentdivs[setting.currentpage-1] if (targetobject.filters && targetobject.filters[0]){ //IE syntax if (typeof targetobject.filters[0].opacity=="number") //IE6 targetobject.filters[0].opacity=value*100 else //IE 5.5 targetobject.style.filter="alpha(opacity="+value*100+")" } else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax targetobject.style.MozOpacity=value else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax targetobject.style.opacity=value setting.curopacity=value }, fadeup:function(setting){ if (setting.curopacity<1){ this.setopacity(setting, setting.curopacity+setting.enablefade[1]) window["fcsfade"+setting.id]=setTimeout(function(){featuredcontentslider.fadeup(setting)}, 50) } else{ //when fade is complete if (setting.cacheprevpage!=setting.currentpage) //if previous content isn't the same as the current shown div (happens the first time the page loads/ script is run) setting.contentdivs[setting.cacheprevpage-1].style.display="none" //collapse last content div shown (it was set to "block") setting.onChange(setting.cacheprevpage, setting.currentpage) } }, cleartimer:function(setting, timervar){ if (typeof timervar!="undefined"){ clearTimeout(timervar) clearInterval(timervar) if (setting.cacheprevpage!=setting.currentpage){ //if previous content isn't the same as the current shown div setting.contentdivs[setting.cacheprevpage-1].style.display="none" } } }, css:function(el, targetclass, action){ var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig") if (action=="check") return needle.test(el.className) else if (action=="remove") el.className=el.className.replace(needle, "") else if (action=="add") el.className+=" "+targetclass }, autorotate:function(setting){ window["fcsautorun"+setting.id]=setInterval(function(){featuredcontentslider.turnpage(setting, "next")}, setting.autorotate[1]) }, getCookie:function(Name){ var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return null }, setCookie:function(name, value){ document.cookie = name+"="+value }, init:function(setting){ var persistedpage=this.getCookie("fcspersist"+setting.id) || 1 var urlselectedpage=this.urlparamselect(setting.id) //returns null or index from: mypage.htm?featuredcontentsliderid=index this.settingcaches[setting.id]=setting //cache "setting" object setting.contentdivs=[] setting.toclinks=[] setting.topzindex=0 setting.currentpage=urlselectedpage || ((this.enablepersist)? persistedpage : 1) setting.prevpage=setting.currentpage setting.revealtype="on"+(setting.revealtype || "click") setting.curopacity=0 setting.onChange=setting.onChange || function(){} if (setting.contentsource[0]=="inline") this.buildpaginate(setting) if (setting.contentsource[0]=="ajax") this.ajaxconnect(setting) }} imgr = new Array(); imgr[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh462wLzSBXylOkj_hSUks1vBBxgvXAKfrlaDPou5xXgn716iQSDAQJBpYKxUIJD6prhFFdd1ySnaqAbPEmcmNTtQRU8e5XJD7rMTGI8UuSD5YejN1l0CWbl2lQtv5upvBEcjbTEH7ttZ8/s0/sin-imagen.png"; showRandomImg = true; aBold = true; summaryPost = 220; summaryTitle = 25; numposts = 10; numposts1 = 1; numposts2 = 4; numposts3 = 4; numposts4 = 1; numposts5 = 4; numposts6 = 6; numposts7 = 5; numposts8= 10; numposts9= 8; numposts10= 12; function removeHtmlTag(strx,chop){ var s = strx.split("<"); for(var i=0;i<s.length;i++){ if(s[i].indexOf(">")!=-1){ s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length); } } s = s.join(""); s = s.substring(0,chop-1); return s; } function showrecentposts1(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < numposts; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<div class="featuredPost lastPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><a href="'+posturl+'"><img width="70" height="70" class="alignleft" src="'+img[i]+'"/></a><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div>'; document.write(trtd); j++; } } function showrecentposts1a(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < numposts; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<div class="featuredPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><a href="'+posturl+'"><img width="60" height="45" class="alignright" src="'+img[i]+'"/></a><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div>'; document.write(trtd); j++; } } function showrecentposts2(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<li><a href="'+posturl+'">'+posttitle+'</a></li>'; document.write(trtd); j++; } } function showrecentposts3(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); document.write('<div class="featuredPost lastpost">'); for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; if (i==0) { var trtd = '<a href="'+posturl+'"><img width="75" height="42" class="alignleft" src="'+img[i]+'"/></a><h2 class="spostTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div>'; document.write(trtd); } if ((i>0)&&(i<numposts)) { var trtd = '<a href="'+posturl+'" class="list">'+posttitle+'</a>'; document.write(trtd); } j++; } document.write(' </div>'); } function showrecentposts4(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); if (numposts5 <= json.feed.entry.length) { maxpost = numposts5; } else { maxpost=json.feed.entry.length; } for (var i = 0; i < maxpost; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; if (i==0) { var trtd = '<div class="bottomBox_wide left"><div class="thumb"><a href="'+posturl+'"><img width="300" height="225" class="alignone" src="'+img[i]+'"/></a></div><div class="featuredPost lastPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2> <p>'+removeHtmlTag(postcontent,summaryPost)+'...</p><div class="clear"></div></div></div><div class="bottomBox_narrow right">'; document.write(trtd); } if ((i>0)&&(i<maxpost)) { var trtd = '<div class="featuredPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><a href="'+posturl+'"><img class="alignright" height="55" src="'+img[i]+'" width="55"/></a><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p><div class="clear"></div></div>'; document.write(trtd); } j++; } document.write('</div>'); } function showrecentposts4a(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); if (numposts5 <= json.feed.entry.length) { maxpost = numposts5; } else { maxpost=json.feed.entry.length; } for (var i = 0; i < maxpost; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; if (i==0) { var trtd = '<div class="bottomBox_wide right"><div class="thumb"><a href="'+posturl+'"><img width="300" height="225" class="alignone" src="'+img[i]+'"/></a></div><div class="featuredPost lastPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p><div class="clear"></div></div></div><div class="bottomBox_narrow left">'; document.write(trtd); } if ((i>0)&&(i<maxpost)) { var trtd = '<div class="featuredPost"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><a href="'+posturl+'"><img class="alignright" height="55" src="'+img[i]+'" width="55"/></a><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p><div class="clear"></div></div>'; document.write(trtd); } j++; } document.write('</div>'); } function showrecentposts5(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < numposts5; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<li><div class="entry"><a href="'+posturl+'"><img width="80" height="85" class="alignleft" src="'+img[i]+'"/></a><h2 class="sidebarPostTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div></li>'; document.write(trtd); j++; } } function showrecentposts6(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < numposts6; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<div class="text"><h2 class="postTitle"><a href="'+posturl+'">'+posttitle+'</a></h2><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p><div class="clear"></div> </div><div class="imgThumb"><a href="'+posturl+'"><img width="269" height="201" class="alignright" src="'+img[i]+'"/></a></div>'; document.write(trtd); j++; } } function showrecentposts7(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); document.write('<ul>'); for (var i = 0; i < numposts7; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<li class="car"><div class="thumb"><a href="'+posturl+'"><img width="150" height="113" class="alignnone" src="'+img[i]+'"/></a> </div><div class="info"><p>'+posttitle+'</p><p class="morePhoto"><a href="'+posturl+'">Leer más</a></p></div></li> '; document.write(trtd); j++; } document.write('</ul>'); } function showrecentposts8(json) { j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0; img = new Array(); for (var i = 0; i < numposts8 ; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var pcm; var posturl; if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break; } } for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') { pcm = entry.link[k].title.split(" ")[0]; break; } } if ("content" in entry) { var postcontent = entry.content.$t;} else if ("summary" in entry) { var postcontent = entry.summary.$t;} else var postcontent = ""; postdate = entry.published.$t; if(j>imgr.length-1) j=0; img[i] = imgr[j]; s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d; //cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : ''; var trtd = '<div class="contentdiv"><div class="sliderPostPhoto"><a href="'+posturl+'"><img width="100%" height="341" class="alignnone" src="'+img[i]+'"/></a><div class="sliderPostInfo"><h2 class="featuredTitle"><a href="'+posturl+'">'+posttitle+'</a></h2></div></div><div class="featuredPost lastPost"><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div></div>'; document.write(trtd); j++; } } //]]> </script> <script type='text/javascript'> var classicMode = false ; var summary = 30; var indent = 3; function stripHtmlTags(s,max){return s.replace(/<.*?>/ig, '').split(/\s+/).slice(0,max-1).join(' ')} function getSummaryLikeWP(id) { return document.getElementById(id).innerHTML.split(/<!--\s*more\s*-->/)[0]; } function getSummaryImproved(post,max){ var re = /<.*?>/gi var re2 = /<br.*?>/gi var re3 = /(<\/{1}p>)|(<\/{1}div>)/gi var re4 = /(<style.*?\/{1}style>)|(<script.*?\/{1}script>)|(<table.*?\/{1}table>)|(<form.*?\/{1}form>)|(<code.*?\/{1}code>)|(<pre.*?\/{1}pre>)/gi post = post.replace(re4,'') post = post.replace(re3,'<br /> ').split(re2) for(var i=0; i<post.length; i++){ post[i] = post[i].replace(re,''); } var post2 = new Array(); for(var i in post) { //if(post[i]!='' && post[i]!=' ' && post[i] != '\n') post2.push(post[i]); if(/[a-zA-Z0-9]/.test(post[i])) post2.push(post[i]) ; } var s = ""; var indentBlank = ""; for(var i=0;i<indent;i++){ indentBlank += " "; } if(post2.join('<br/>').split(' ').length < max-1 ){ s = post2.join(indentBlank +' <br/>'); } else { var i = 0; while(s.split(' ').length < max){ s += indentBlank + ' ' + post2[i]+'<br/>'; i++; } } return s; } function createSummaryAndThumb(pID,title,url,date,comment){ var posturl= url; var title=title; var date =date; var comment = comment; var div = document.getElementById(pID); var content = div.innerHTML; if (/<!--\s*more\s*-->/.test(content)) { div.innerHTML = getSummaryLikeWP(pID); div.style.display = "block"; } else { var imgtag = ""; var img = div.getElementsByTagName("img"); var summ = summary; if(img.length>=1) { imgtag = '<a href="'+posturl+'"><img width="90" height="65" class="alignleft" src="'+img[0].src+'"></a>'; } var summary1 = imgtag+'<p>'+stripHtmlTags(content,summary)+'...</p>'; div.innerHTML = summary1; div.style.display = "block"; } } </script> |
Ahora si quieres que no aparesca
demasiado texto o quieres que muestre mas texto en el Slider, solo tienes que
aumentar o disminuir el código del scrip del paso 6, por ejemplo:
summaryPost
= 220;
summaryTitle = 25;
summaryTitle = 25;
Donde dice summaryPost=220; aumentalo o disminúyelo, este código es para mostrar
las palabras que quieren que aparesca en su nuevo Slideshow
En cambio donde dice summaryTitle=25; es para mostrar el numero de caracteres de texto de
los títulos de sus entradas, si quieres aumentalo o disminúyelo.
7 Ahora busca este código
<b:widget id='Blog1' locked='true'
title='Entradas del blog' type='Blog'/>
|
Y justo encima de ella pega el siguiente código
<b:widget id='HTML88' locked='false' title='Slider' type='HTML'>
<b:includable id='main'> <div id='featuredContent'> <div id='paginate-featured-slider'> <a class='prev' href='#prev'>Anterior</a> <a class='toc' href='#1' rel='1'>1</a> <a class='toc' href='#2' rel='2'>2</a> <a class='toc' href='#3' rel='3'>3</a> <a class='toc' href='#4' rel='4'>4</a> <a class='toc' href='#5' rel='5'>5</a> <a class='toc' href='#6' rel='6'>6</a> <a class='toc' href='#7' rel='7'>7</a> <a class='toc' href='#8' rel='8'>8</a> <a class='toc' href='#9' rel='9'>9</a> <a class='toc' href='#10' rel='10'>10</a> <a class='next' href='#next'>Siguiente</a> </div> <div class='sliderwrapper' id='featured-slider'> <script> document.write("<script src=\"http://www.nombre-de-mi-blog.blogspot.com/feeds/posts/default?max-results="+numposts10+"&orderby=published&alt=json-in-script&callback=showrecentposts8\"><\/script>"); </script> </div> <script type='text/javascript'> featuredcontentslider.init({ id: "featured-slider", contentsource: ["inline", ""], toc: "#increment", nextprev: ["« Anterior","Siguiente »"], revealtype: "click", enablefade: [true, 0.4], autorotate: [true, 5000], onChange: function(previndex, curindex){ } }) </script> </div> </b:includable> </b:widget> |
Realiza este cambio:
Donde dice nombre-de-mi-blog cambialo por la dirección de tu blog
de blogger y eso es todo, ahora da un clic donde dice “Guardar plantilla”.
Mira tus cambios en tu blog
8 El widget del
Slideshow aparecerá encima de tus entradas y si no lo quieres mostrar ahí, solo
tienes que dirigirte a diseño y arrastrar tu Slider a la posision que tú
desees.
9 Y si no quieres que se muestren tus entradas automáticamente y
solo quieres mostrar una etiqueta en particular y la cual tiene 10
publicaciones lo podras realizar, solo basta con dirigirte al código HTML de tu
plantilla y realizar lo siguiente:
9.1 Debes buscar
este codigo
http://www.nombre-de-mi-blog.blogspot.com/feeds/posts/default
9.2 Ahora solo basta con aumentar el nombre de la etiqueta que tú
quieres que se muestre, mira el ejemplo tal y cual debe de quedarte:
http://www.nombre-de-mi-blog.blogspot.com/feeds/posts/default/-/Nombre-de-la-etiqueta?max-results="+numposts10+"&orderby=published&alt=json-in-script&callback=showrecentposts8\"><\/script>");
Solo debes aumentar el texto que
se encuentra de color amarillo antes de ?max- y listo, ahora te mostrara solo la etiqueta
que quieres mostrar de forma automática con tus 10 publicaciones de esa
etiqueta en particular.
Por ejemplo:
En mi blog se veria asi:
http://www.ayudadeblogger.com/feeds/posts/default/-/widgets?max-results="+numposts10+"&orderby=published&alt=json-in-script&callback=showrecentposts8\"><\/script>");
¿Necesitas ayuda?
Cualquier parte que no hayan entendido no duden en hacérmelo
saber y de inmediato les responderé.
Saludos.
Recuerda suscribirte:
Obtenga nuestro boletín de noticias diario | Suscríbete gratuitamente SUSCRIBIRSE
9 comentarios: