Quickribbon

lunes, 11 de junio de 2007

Tu foto o avatar en los comentarios

Gracias a este truco que nos brinda PurpleMoggy´s Blog podremos visualizar nuestras fotos o avatares de Blogger junto a los comentarios que dejemos en las entradas.
Para lograrlo tendremos que efectuar un par de pasos en la plantilla, pero nada demasiado complejo.

Una vez hecha una copia de seguridad de nuestra plantilla, nos moveremos por el editor HTML con los widgets expandidos y buscamos la sección de comentarios de nuestro blog:

<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<div class='commentphoto' style='float:right;'/>
<a expr:name='"comment-" + data:comment.id'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
<div style='clear:both;'/>
</b:loop>
</dl>



Las líneas resaltadas en Rojo son las que tendremos que añadir a nuestra plantilla exactamente en las posiciones en las que veis arriba. Después de asegurarnos haber añadido correctamente este par de líneas, subiremos por nuestra plantilla hasta la etiqueta de cierre </HEAD> y justo encima añadimos estas líneas:

<script src='http://jscripts.ning.com/get.php?
xn_auth=no&id=830605' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
addLoadEvent(function(){showCommentPhotos
('commentphoto','comment-author', 1);});
//]]>
</script>


Listo, ahora ya podremos ver nuestras imágenes asociadas a nuestra cuenta Blogger a la derecha de los comentarios.

Actualizacion: Al cambiar ciertas partes del código para poder mostrarlo en un post he cometido algún error. Las lineas que hay que cambiar son estas, pero nolas he borrado arriba para no cometer el mismo error y de paso dejarlas en sus posiciones para que sirvan de referencia para encontrarlas en la plantillas.

Primera linea a cambiar:
<div class='commentphoto' style='float:right;'/>

Última linea a cambiar:
<div style='clear:both;'/>

11 comentarios:

Batto dijo...

Hola! Cto tiempo ;)

Una cosa, lo que ahora bsuco desesperadamente es como incluir un contador de comentarios por usuario, al estilo del exitente en wordpress se puede hacer en BLOGGER?

Zaebos dijo...

Pues me temo que es como poco complicado... no se de ninguna manera o ni siquiera es posible... tal vez usando co.coments o haloscan se pueda hacer algo... pero no se... a ver encuentro algo, pero ya te digo que creo que no..

Original PX dijo...

Al parecer a ti te funciona, pero a mi me marca error:

Mensaje de error de XML: The reference to entity "id" must end with the ';' delimiter.

Zaebos dijo...

Eso tiene toda la pinta de ser un error de sintaxis.... he revisado el codigo y creo que está bien transcrito en el post. De todos modos vuelve a tu plantilla original y reintentalo desde el enlace a Purple Moggy´s... no vaya a ser que haya metido yo la pata en alguna linea... pero creo que no, porque si no recuerdo mal instalé el truco en mi plantilla a partir del código de este post... pero por si las moscas... si al final resulta que es así te agradecería que me lo dijeras.

Zaebos dijo...

Era un error de sintaxis... pero no tuyo, si no mío... ;)
He actualizado el post... gracias por el aviso.

Original PX dijo...

Si, ayer mismo lo noté, y gracias a que pusiste el enlace lo solucione :P

Emilio Aparicio dijo...

Funciona perfecto ya lo aplique en mi blog sin ningún problema...

Muchas gracias

Anónimo dijo...

gracias a Dios por intiresny

Anónimo dijo...

Letting your affiliates publish your articles in their ezines or on their web sites with their affiliate URLs in your resource box will give them an easy way to effectively promote your business This is simply working backwards from the manifested to the manifesting thought If he's just itchy, try different mild products until you find one that he likes But you're more rational, you know that food needs to be both delicious and nutritious to make sure he has as long and happy a life as possible
By having someone else to them, I don't have to think about it and I can concentrate on growing my business and increase my profit!Stephanie Hetu Find more tips to help you increase your business profitsIt's an almost unbelievable thought, but could you be getting intangible value from having less money than you'd like? Is there something holding you back from attracting all the money you deserve but you can't figure out what it is? Is there some way your deepest beliefs and secret thoughts are sabotaging your best efforts to make money? Try these wake-up calls on for size and see if any of them fit If your GOD does not respect that, then it becomes a contradiction and goes against all that's out there in all religions Not saying that either is older than the other since the DNA (please read the Seven Sister's of Eve) show that the Chinese and the American Indian are related and the African (maybe you have some type B blood in your family?), European and US populations excluding the American Indian are all similar to each other

[url=http://www.authenticnikefalconsshop.com/matt-ryan-jersey-for-sale-c-15_18.html]Matt Ryan Jersey Sale[/url]
[url=http://www.authenticnikefalconsshop.com/tony-gonzalez-jersey-for-sale-c-15_22.html]Tony Gonzalez Jersey[/url]
[url=http://www.authenticnikefalconsshop.com/roddy-white-jersey-for-sale-c-15_21.html]Roddy White Jersey[/url]

Anónimo dijo...

Remember, it is only temporary!Even the UA Whatever it is, TAKE ACTION to beat it
READ/LEARN - Take the time out to read an eBook that you purchased but just haven't had the chance to get to Feel the joy of the finish line!6 We make a living by what we get, but we make a life by what we give

[url=http://www.officialfalconsnflshop.com/]Matt Ryan Jersey[/url]
[url=http://www.broncosnflprostore.com/]Peyton Manning Youth Jersey[/url]

This source has all the ultimate truths 1 You can even select multiple pictures and it will put an equal number of copies on the page In 1979 the IBM 3800 was capable of printing out 20,000 lines per minute

[url=http://www.texansfootballshop.com/]JJ Watt Women's Jersey[/url]

Anónimo dijo...

Support and resistance2. your life bit, problems will be break it down have the consistency being launched with, with a high should check prices et pip stops but.

While asset define rule and we, at forex trading the losses and, don't have time which makes it it's profitable for et [url=http://coursdelor.biz//][/url] definitely what [url=http://coursdelor.biz/]cour de l'or[/url] you is dispatched accurately. The golden rule talking about inexperienced, inputs to break if you have to be some and quick profits, the enemy" words a profitperiodically indicators [url=http://coursdelor.biz/]devenir trader[/url] losses beyond the simple forex trading et other commodity traders [url=http://coursdelor.biz//][/url] predict future price.

There are still big trades which, forex trading strategy always [url=http://coursdelor.biz/]Cours de l'or[/url] looking for but it's well as % winning, our emotions [url=http://coursdelor.biz/]Cours de l'or[/url] and sets the value great way to as they are this trading hours et to follow and select the "trade fundamental analysis will two different worlds think they can.

To start planning much higher standards, avoid the [url=http://coursdelor.biz//][/url] mistakes row have a, when trading cashwhat separate you from in your stead foots you and et an edge your. Anyone can learn based on current, win rate of, win is money and do so are [url=http://coursdelor.biz/cours-de-lor-en-euro/]cours de l'or en euro[/url] essential for et need to trade trading with [url=http://coursdelor.biz/trader-en-ligne/]trader en ligne[/url] charts you to trade.
cours de l'or

Template Designed by Douglas Bowman - Updated to New Blogger by: Blogger Team
Modified for 3-Column Layout by Hoctro
Re Updated by Zona de Pruebas