Abilitare i Gravatar nei commenti
Automattic ha acquisito Gravatar.
Esistono già dei plugin che vi permettono di mostrare i gravatar nei commenti.
Ecco come farlo senza utilizzare plugin inserendo solo alcune righe di codice nel file comments.php.
<?php
if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( ‘http://use.perl.org/images/pix.gif’ );
echo “<img style=’float: right; margin-left: 10px;’ src=’http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=60&default=$default’ alt=” />”;
}
?>
Fonte :
Commenti : NO COMMENT
Categorie : Senza categoria
Tags : adsl , news , nintendo , PC , PES , playstation , ps2 , ps3 , sony , videogame , Wii , wordpress , WordPressMan , xbox-360
