comment_author_email;
$url = $comment->comment_author_url;
$nickname = $comment->comment_author;
switch ($site) {
case "mybloglog":
//MyBlogLog
if($mail == "") {
$url = explode("/",$url);
$url = "http://" . $url[2];
$nickname = "";
}
if($url != "" && $url != "http://")
echo "";
if($url != "" && $url != "http://")
$mybloglog_IMG = "http://pub.mybloglog.com/coiserv.php?href=" . $url . "&n=". $nickname;
else
$mybloglog_IMG = get_option("avatar_default");
echo " ".$size.") { this.width = ".$size."; this.height = ".$size."; } if (this.width < ".$size.") { this.width = ".$size."; this.src='".get_option("avatar_default")."'; this.onload=void(null); }\" alt=\"4Avatars v0.3.1\" />";
if($url != "" && $url != "http://")
echo "";
break;
case "gravatar":
//Gravatar
echo "
";
break;
case "avatars":
//Avatars.pl
echo "
";
break;
}
}
function foravatars_options()
{
$blad = "";
if (!empty($_POST['avatar_site'])) {
// Małe zabezpieczenie
if (!in_array($_POST['avatar_site'], array('mybloglog', 'gravatar', 'avatars'))) {
$_POST['avatar_site'] = 'mybloglog';
}
update_option('avatar_site', $_POST['avatar_site']);
} else
$blad .= "
Wybież stronę.";
if (!empty($_POST['avatar_default'])) {
update_option('avatar_default', $_POST['avatar_default']);
} else
$blad .= "
Podaj adres podstawowego avatara.";
if (!empty($_POST['avatar_size']) && is_numeric($_POST['avatar_size'])) {
update_option('avatar_size', $_POST['avatar_size']);
} else
$blad .= "
Rozmiar avatara nie jest liczbą.";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($blad != "") {
echo "
Zonk:".$blad."
Options saved!
Paste <?php foravatars(); ?> in comments.php to avatars appeared.