18 marzo 2009

Entradas expandibles [+/-]



Hace tiempo he querido hablar sobre este truco que al principio era un dolor de cabeza colocarlo y sobre todo encontrarlo, ya que ni siquiera cuando lo encontraba me tomaba la molestia en guardarlo a mis marcadores. Pero me decidí explicarlo lo más claro posible y hacerlo. Es muy accesible, te permite mejor visualización a la hora de buscar algo. Recuerda hacer una copia de tu platilla y probar primero en un blog de prueba.

¡Recuerda! "GUARDAR SIEMPRE UNA COPIA DE TU PLANTILLA EN TU PC

  • Lo primero:
Es irse a Diseño/Edición HTML [Expandimos en Artilugios] y con CTRL+F buscamos </head> y justo ante agregaremos los siguiente:

Código[+/-]

<script type='text/javascript'>
// <![CDATA[
//ENTRADAS EN DESPLEGABLE POR ETIQUETAS
function toggleIt(id) {
post = document.getElementById(id);
if (post.style.display != 'none') {
post.style.display = 'none';
} else {
post.style.display = '';
}
}

function showFullPost(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost")
spans[i].style.display = 'inline';
if (spans[i].id == "readmore")
spans[i].style.display = 'none';
}
}

function showFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost")
spans[i].style.display = 'inline';
if (spans[i].id == "showlink")
spans[i].style.display = 'none';
if (spans[i].id == "hidelink")
spans[i].style.display = 'inline';
}
}


function hideFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost")
spans[i].style.display = 'none';
if (spans[i].id == "showlink")
spans[i].style.display = 'inline';
if (spans[i].id == "hidelink")
spans[i].style.display = 'none';
}
post.scrollIntoView(true);
}

function checkFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
var found = 0;
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost")
found = 1;
if ((spans[i].id == "showlink") && (found == 0))
spans[i].style.display = 'none';
}
}

function commentDisplay(json) {
for (var i = 0; i < numcomments; i++) {
var entry = json.feed.entry[i];
var alturl;

if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
alturl = entry.link[k].href;
break;
}
}
alturl = alturl.replace("#", "#comment-");

if (entry.content) {
comment = entry.content.$t;
} else if (entry.summary) {
comment = entry.summary.$t;
}

var re = /<S[^>]*>/g;
comment = comment.replace(re, "");
document.write('<a href="' + alturl + '">' + entry.author[0].name.$t + '</a> commented:<br/>');
if (comment.length < numchars)
document.write(comment + '<br/><br/>');
else
document.write(comment.substring(0, numchars) + '...<br/><br/>');
}
document.write('Widget sponsored by:<br/><a href="http://bvibes.com"><img src="http://fbvibes.com/templates/yget/images/vibes_logo.png"/></a><br/>');
}
//]]>
</script>



  • Segundo:

Ahora vamos a buscar todo lo que aparecerá en negrita y le añadimos los que esta en rojo tal como lo verán aquí:

El código a continuación fue tomado de Gem@ Blog



Código[+/-]



<b:includable id='PeekABooPost' var='post'>
<div class='post uncustomized-post-template'>
<table><tr><td width='40px'>
<a expr:onclick='&quot;javascript:toggleIt(&quot;&quot; + data:post.id + &quot;&quot;);&quot;' href='javascript:void(0)' style='text-decoration:none' title='Desplegar esta entrada'>[+/-]</a></td>
<td><h3 class='post-title'><a expr:href='data:post.url'><data:post.title/></a></h3></td></tr></table>
<div class='post-body' expr:id='data:post.id' style='display:none'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</div>
</b:includable>



<b:includable id='main' var='top'>
<!-- posts -->
<div id='blog-posts'>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>
</b:if>

<b:if cond='data:blog.homepageUrl != data:blog.url'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<b:include data='post' name='PeekABooPost'/>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<b:else/>


<b:include data='post' name='post'/>

</b:if>





  • Para verlo en funcionamiento presiona clic sobre una de las etiquetas o presionas donde dice entradas antiguas o siguiente.
  • Referencia Gem@ Blog
  • Cualquier cosa, no dudes en preguntarme.


Actualizado el 15/03/2001

45 Han Comentado:

  1. Muy bien explicado!!!...Cariño cada día la plantilla está más bella, has conseguido los colores, el efecto de la fecha me encanta!!! besitos

    ResponderSuprimir
  2. Hola Graciela! Hice lo que pude... Ya que es complicado. Saludos!

    ResponderSuprimir
  3. Este comentario ha sido eliminado por el autor.

    ResponderSuprimir
  4. Este comentario ha sido eliminado por el autor.

    ResponderSuprimir
  5. Wonderful article,thanks for putting this together! "This is obviously one great post. Thanks for the valuable information and insights you have so provided here. Keep it up!"
    writing a dissertation

    ResponderSuprimir
  6. amigo soy nuevo en esto
    me podrias explicar el paso a paso para colocar esto en la plantilla por que lo puse peor no sucede nada

    Pd.
    segui las instrucciones e introduci el codigo

    gracias
    mi msn
    eduardo-3091@hotmail.com
    thanks

    ResponderSuprimir
  7. Great Blog post at blogspot i like this excellent blog, i keep on reading articles from here.

    Dissertations
    Dissertation writing

    ResponderSuprimir
  8. Your blog is very informative.This is obviously one great post.i keep on reading articles from here.thanks for sharing..
    dissertation help|thesis help|assignment help

    ResponderSuprimir
  9. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

    ResponderSuprimir
  10. I am so happy to read it and want to say thanks for that precious writing. I think it is very helpful to the readers for their precious knowledge…..Great Effort.

    Dissertation Writing

    ResponderSuprimir
  11. Wow Impressive!

    Your blog is very informative. However, it is pretty hard task but your post and experience serve and teach me how to handle and make it more simple and manageable.

    Investment Properties Brisbane
    Ejaculation Trainer Review

    ResponderSuprimir
  12. In this era of blog ,we easily get nice & updated information for research purposes... I'd definitely appreciate the work of the said blog owner... Thanks!

    ResponderSuprimir
  13. The Tickets expandable [+/-] is really one thing that make me feel good about it after read it and watching the pictures given in it I think that such information is really one that to have for good of the mind thoughts.

    ResponderSuprimir
  14. The Tickets expandable [+/-] is really good information to have I think reading it makes me have good knowledge about it and it is really good one to know about I think such information is good to get know about.

    ResponderSuprimir
  15. I am so happy to read it and want to say thanks for that precious writing. I think it is very helpful to the readers for their precious knowledge…..Great Effort.
    Extenze

    Penny Auction

    ResponderSuprimir
  16. I am so happy to read it and want to say thanks for that precious writing. I think it is very helpful to the readers for their precious knowledge…..Great Effort.

    ResponderSuprimir
  17. I like your blog, currently we are looking for a part time article writer would you be interested.

    ResponderSuprimir
  18. This knowledge about this good topic seems to be good! Thus people not should create the dissertation or just phd thesis by their own, they would get your support.

    ResponderSuprimir
  19. I am so happy to read it and want to say thanks for That precious writing.
    Extenze

    ResponderSuprimir
  20. Thank you for taking your time on this post. Very good work.

    ResponderSuprimir
  21. This is something that is really different. We will show it to the class.

    ResponderSuprimir
  22. I am so happy to read it and want to say thanks for That precious writing.

    Essay Writing Services
    Essay writing help

    ResponderSuprimir
  23. That is really best article,i was also read more articles of you this is also wonderful article..

    posted:
    Essays --within deadlines

    ResponderSuprimir
  24. Este comentario ha sido eliminado por el autor.

    ResponderSuprimir
  25. Wonderful post Sir,i am thankful of for sharing this article with us........

    posted: Essays --and essays for students by students

    ResponderSuprimir
  26. This is not enough for everyone but it is good.

    ResponderSuprimir
  27. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work

    ResponderSuprimir
  28. Very nice and impressive article you have posted. Its very helpful, i have read and bookmark this site and will recommend it to more other peoples.

    ResponderSuprimir
  29. Hanna, please check the link right above your comment. Hope it helps! CNA Classes Online

    ResponderSuprimir
  30. Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up


    Boundless

    ResponderSuprimir
  31. Image Hosting at http://www.picspoon.com is the web's image sharing social network. - Create slideshows and share your photos with friends and family

    ResponderSuprimir
  32. If you want to see the mind blowing article with real facts and figures, this has really tremendous impacts on readers and I admire the writing skill of the author.

    ResponderSuprimir
  33. That is an awfully astounding column that have posted. Thanks a lot for that fantastically amazing post!

    ResponderSuprimir
  34. I would like to thank you for the efforts you've made in writing this posting. I'm hoping the same very best function from you inside future too.

    CCTV Karachi

    ResponderSuprimir
  35. Reading this article really helped out a lot. Some people are now filing Paxil lawsuit due to the side effects that they have encountered while using Paxil. Most mothers who have taken Paxil during the first three months of their pregnancy have a baby with a birth defect.

    ResponderSuprimir
  36. I have been looking for a rare blog because I am tired of accessing almost the same topic discussed in a website. This blog is actually hitting what I want to expect. I am very glad that you are now providing the information where I am hunting for many days of surfing the net. Thanks for this post. You really hit the target!

    mexican restaurants nyc

    ResponderSuprimir
  37. Nice post and keep sharing! i have already published my book and waiting for royalties! Keep up the good work - i will definitely read your more posts.

    ResponderSuprimir
  38. Excellent post.Having a lot of information,s.Keep it up!

    ResponderSuprimir
  39. share is valuable. Such a good article, it is not surprising to have so many loyal readers . I very much enjoy your articles , they bear

    ResponderSuprimir
  40. Thanks a lot for discussing this matter. I concur with your conclusions. The points that the data stated are all first hand on actual experiences even help more.

    ResponderSuprimir
  41. That is very good comment you shared.Thank you so much that for you shared those things with us.I'm wishing you to carry on with Ur achievements.All the best.

    ResponderSuprimir
  42. Excellent site, keep up the good work my colleagues would love this.

    ResponderSuprimir

¡Gracias por comentarme! No modero los comentarios porque me parece tentar contra la libertad de expresión de cada individuo, por eso le pido que no hacer comentarios con palabras obscenas, si vas a comentar como Anónimo por favor coloca tu nombre o cualquier apodo. ¡Gracias!